Skip to content

Commit d93acbb

Browse files
refactor(ui)!: retire zero-consumer exports from @object-ui/plugin-gantt and @object-ui/plugin-designer (#29388)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbEi5wvRAxyvWna4gbUTJroF)_ Part of #25921 — the zero-consumer barrel batch for `@object-ui/plugin-gantt` and `@object-ui/plugin-designer` (claim 6576816381), the item landings 6542309053 and 6543370760 left open. The card stays open: every other item it lists is untouched. Clause-②: yes (narrowing) Metadata-protocol: none ## 维护者速读 - 改了什么:`@object-ui/plugin-gantt` 入口不再导出 19 个名字(快速筛选栏、资源负载网格、负载计算、班次带工具及其类型、`normalizeDependencies`);`@object-ui/plugin-designer` 入口不再导出 6 个值(`CollaborationProvider`、`ConnectionStatusIndicator`、`useClipboard`、`useMultiSelect`、`useCanvasPanZoom`、`PropertyEditor`)。模块文件全部保留,两个 README 不再教这些名字,每包一个 `!` changeset。 - 为什么改:这 25 个名字在全仓(含 examples、文档、技能、测试)和 hotcrm 中,除自己包外零引用;甘特图和设计器内部照常使用它们,只是不再作为没人用的公开面发布。 - 风险与回滚:仓内无消费者,Console 与其它 `@object-ui/*` 包不受影响;外部 npm 用户若导入会在升级时编译报错,changeset 写明每个名字改用的写法(多数是在 `gantt` 块里声明 `quickFilters` / `resourceView` / `timeSegments`)。回滚即 revert 本 PR。 - 先看:`ui/packages/plugin-gantt/src/index.tsx`、`ui/packages/plugin-designer/src/index.tsx`、`.changeset/25921-plugin-designer-internal-helpers-off-entry.md`(协作入口退出后,设计器里的协作分支在包外不可达)。 - 两分钟验证:`git grep -n -w -e QuickFilterBar -e computeWorkload -e CollaborationProvider -e useCanvasPanZoom -- ui/packages/plugin-gantt/src/index.tsx ui/packages/plugin-designer/src/index.tsx ui/packages/plugin-gantt/README.md ui/packages/plugin-designer/README.md`,预期无输出(退出码 1):两个入口和两个 README 都不再出现这些名字。 - 需要你做的:无,席位落地(入队前欠一次契约复审档的复审,由席位转总监)。 ## What changes - `@object-ui/plugin-gantt` (`src/index.tsx`): the entry stops exporting `QuickFilterBar`, `QuickFilterBarProps`, `QuickFilterField`, `QuickFilterOption`, `QuickFilterLabels`, `QuickFilterDef`, `ResourceWorkload`, `ResourceWorkloadProps`, `computeWorkload`, `WorkloadColumn`, `WorkloadOptions`, `ResourceCell`, `ResourceLoad`, `normalizeDependencies`, `normalizeShiftSegments`, `shiftDayStart`, `bandAt`, `ShiftSegmentsConfig` and `ShiftBandConfig`. Every module stays: `ObjectGantt` still imports the bar, the grid and the shift helpers, and `ResourceWorkload` still imports the workload math. - `@object-ui/plugin-designer` (`src/index.tsx`): the entry stops exporting `CollaborationProvider`, `ConnectionStatusIndicator`, `useClipboard`, `useMultiSelect`, `useCanvasPanZoom` and `PropertyEditor`. Every module stays: the four designers import the hooks, `PropertyEditor` and `useCollaboration` from them. - Both `README.md` files stop teaching the retired names (`check-readme-exports` binds every README self-import to a real export). The gantt README now says the bar, the workload grid and the shift bands are configured through the `gantt` block; the designer README drops the collaboration feature bullet, its section and the Quick Start wrapper. - Two changesets, `patch` with the `**BREAKING**` banner, both declaration lines, the ADR-0087 `not-required (runtime-export-retired …)` marker naming every operand, and a FROM → TO "no replacement" line with the one-line fix per group. New file names, distinct from the `25921-*` changesets #26517 still holds. ## Why How the set was chosen, the #28385 method re-run at `origin/main` `738971d2` (hotcrm `d4ffe99`): every name each barrel exports was listed from the barrel's AST (35 / 38), then `git grep -l -w -F` ran for each over the whole tree minus the package's own directory, `**/CHANGELOG.md`, the lockfiles, `.changeset/**` and `ui/.changeset/**`; the brief's cut (`ui/`, `packages/`, `apps/`, `examples/`, `content/`, tests excluded) and hotcrm were counted beside it. Positive controls, same command: `ObjectGantt` 108 files (the #28385 reading), `CreateAppPage` 48, `SchemaRenderer` 1157 (hotcrm 3). A name was retired only when all three hold: 1. zero hits outside its package on every cut (any hit, prose included, keeps the name); 2. no in-package module loses its last importer (no module file is deleted); 3. no export that stays needs it, measured with the TypeScript checker over the declared signatures of every kept export. | package | barrel names | zero hits outside | of those, needed by a kept export | retired here | |:--|--:|--:|--:|--:| | `@object-ui/plugin-gantt` | 35 | 24 | 5 | 19 | | `@object-ui/plugin-designer` | 38 | 15 | 9 | 6 | Kept by rule 3: `GanttViewProps` (props of `GanttView`), `GanttDependency` and `GanttDependencyObject` (`GanttTask.dependencies`), `NormShiftSegments` and `NormShiftBand` (`GanttViewProps.shiftSegments`); the nine designer `…Props` types of components that stay. ## Tests - Code head `641e44d3`; `bb4ab640` merges 21 `origin/main` commits, none under either package (branch delta re-read: the same 6 files, +71 / -107). - `turbo run type-check --filter=@object-ui/plugin-gantt --filter=@object-ui/plugin-designer --filter=@object-ui/app-shell --filter=@object-ui/console` → 74/74 tasks successful (os-verify-lock `VERDICT command-exit 0`). app-shell (the lazy designer pages) and the Console are the importers of either package. - `pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-gantt/ packages/plugin-designer/` → Test Files 156 passed, 1 skipped (157); Tests 1248 passed, 114 skipped (`VERDICT command-exit 0`). - `pnpm --dir ui exec vitest run scripts/` (includes `check-readme-exports`) → Test Files 169 passed, 2 skipped; Tests 4903 passed (`VERDICT command-exit 0`). - Full dogfood battery (the title carries `!`) on `bb4ab640`: closure `turbo run build --filter=@objectstack/dogfood^...` 68/68, then `pnpm --filter @objectstack/dogfood test` → Test Files 393 passed, 3 skipped (396); Tests 3243 passed, 28 skipped (3271); `VERDICT command-exit 0`, held the lock 2236 s. - Head `d0ee5c76` merges 29 more `origin/main` commits, none under either package; the census re-run on it still reads zero for all 25 retired names (control `ObjectGantt` 108). The suites above were not re-run on it. - No ablation: export lines and README text removed; no tested behaviour changed. ## Acceptance notes - With `CollaborationProvider` off the entry, nothing outside the package can mount it, so the collaboration branches in `PageDesigner`, `DataModelDesigner`, `ProcessDesigner` and `ReportDesigner` (`useCollaboration()` is now always `null` for a host) and the provider and indicator bodies in `CollaborationProvider.tsx` are dead code. Deleting them edits modules this claim does not cover; same card family, left for a next pass. - `useConfirmDialog` and `VersionHistory` have zero hits once tests are excluded; their only outside hits are comments in `ui/scripts/__tests__/one-authority-per-exported-name-6273.test.ts` naming their module files. Kept under rule 1 here. - Gantt names kept with outside hits: `ObjectGantt`, `ObjectGanttProps`, `ObjectGanttRenderer`, `GanttView`, `GanttTask`, `GanttTaskType`, `GanttViewMode`, `GanttLinkType`, `GanttMarker`, `normalizeTaskType`, `parseHHMM` (several are prose or same-name hits, for example `parseHHMM` in `service-messaging`; rule 1 keeps them all). - A `CONTRACT_REVIEW_TIER` review is owed before the queue (barrel narrowing); the seat routes it to the director. ## Verification <details><summary>Derived gates — 28/28 run, 0 NOT-MEASURED</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at `641e44d3`: 28 commands; `--ran`: "28 derived famil(ies) accounted for — 28 run, 0 NOT-MEASURED". Every command exit 0, among them `check-adr-0087-registration --base origin/main`, `check-empty-changeset --base origin/main`, `check-changeset-no-major --base origin/main`, `check-sdui-manifest` and its `--self-test`, `check:published-files`, `check:undeclared-dep-imports`, `check:nul-bytes` and `vitest run scripts/`. `check-comment-mask-corpus` first timed out at 300 s beside the closure build, then exit 0 alone (20050 files, 0 disagree, 284 s). Outside the derived set: `check-platform-checklist --changed-from origin/main` exit 0 (0 anchored files) at `bb4ab640`. `dispatch-gates`: 178 changed lines, under the 3000 threshold; no governed path. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `eslint` on the two changed barrels exits 0 (7 warnings, 0 errors: `react-refresh/only-export-components` on the kept helper exports and one `no-explicit-any`, all present on `main` before this diff); the repo-wide `pnpm lint` is CI's run. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (not touched) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jTqpZ1sWR3BcpiFGa3)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent d68d129 commit d93acbb

6 files changed

Lines changed: 71 additions & 107 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@object-ui/plugin-designer': patch
3+
---
4+
5+
refactor(plugin-designer)!: retire six zero-consumer exports (the collaboration provider and its status indicator, three canvas hooks and the property editor)
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-designer#CollaborationProvider, @object-ui/plugin-designer#ConnectionStatusIndicator, @object-ui/plugin-designer#useClipboard, @object-ui/plugin-designer#useMultiSelect, @object-ui/plugin-designer#useCanvasPanZoom, @object-ui/plugin-designer#PropertyEditor) the retired operands are React components and hooks in a published ui package's entry that nothing in the workspace or in hotcrm imported; no packages/spec schema, registered node type, ADR-0087 conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports any of these six names from `@object-ui/plugin-designer`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package (the four designers keep using the hooks and the property panel internally); only the entry stops publishing them. The designers, their `…Props` types, `useUndoRedo`, `useDesignerHistory`, `useConfirmDialog`, `ConfirmDialog`, `Minimap`, `VersionHistory`, the app pages and the metadata pages stay exported unchanged.
13+
14+
What leaves, and what to write instead (none has a replacement export):
15+
16+
- FROM `CollaborationProvider`, `ConnectionStatusIndicator` TO no replacement: render the designers without the wrapper; real-time co-editing is no longer offered from outside the package.
17+
- FROM `useClipboard`, `useMultiSelect`, `useCanvasPanZoom` TO no replacement: the designer canvases already copy/paste, multi-select and pan/zoom on their own; keep a local copy of the hook if you used it in your own canvas.
18+
- FROM `PropertyEditor` TO no replacement: the designers render their own property panel; for a form of your own, use `SchemaRenderer` with a form schema.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/plugin-gantt': patch
3+
---
4+
5+
refactor(plugin-gantt)!: retire nineteen zero-consumer exports (the quick-filter bar, the resource-workload grid, the workload math and the shift-band helpers)
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-gantt#QuickFilterBar, @object-ui/plugin-gantt#QuickFilterBarProps, @object-ui/plugin-gantt#QuickFilterField, @object-ui/plugin-gantt#QuickFilterOption, @object-ui/plugin-gantt#QuickFilterLabels, @object-ui/plugin-gantt#QuickFilterDef, @object-ui/plugin-gantt#ResourceWorkload, @object-ui/plugin-gantt#ResourceWorkloadProps, @object-ui/plugin-gantt#computeWorkload, @object-ui/plugin-gantt#WorkloadColumn, @object-ui/plugin-gantt#WorkloadOptions, @object-ui/plugin-gantt#ResourceCell, @object-ui/plugin-gantt#ResourceLoad, @object-ui/plugin-gantt#normalizeDependencies, @object-ui/plugin-gantt#normalizeShiftSegments, @object-ui/plugin-gantt#shiftDayStart, @object-ui/plugin-gantt#bandAt, @object-ui/plugin-gantt#ShiftSegmentsConfig, @object-ui/plugin-gantt#ShiftBandConfig) the retired operands are React components, helper functions and their TypeScript types in a published ui package's entry that nothing in the workspace or in hotcrm imported; no packages/spec schema, registered node type, ADR-0087 conversion surface or stored shape names them, so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports any of these nineteen names from `@object-ui/plugin-gantt`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected. Every module stays in the package (`ObjectGantt` still renders the quick-filter bar, the resource view and the shift bands from them); only the entry stops publishing them. `ObjectGantt`, `ObjectGanttRenderer`, `GanttView`, the task, dependency, link and marker types, `normalizeTaskType`, `parseHHMM` and the `NormShiftSegments` / `NormShiftBand` types that `GanttViewProps.shiftSegments` takes stay exported unchanged.
13+
14+
What leaves, and what to write instead (none has a replacement export):
15+
16+
- FROM `QuickFilterBar`, `QuickFilterBarProps`, `QuickFilterField`, `QuickFilterOption`, `QuickFilterLabels`, `QuickFilterDef` TO no replacement: declare `gantt.quickFilters` on the `object-gantt` node and let `ObjectGantt` draw the bar.
17+
- FROM `ResourceWorkload`, `ResourceWorkloadProps`, `computeWorkload`, `WorkloadColumn`, `WorkloadOptions`, `ResourceCell`, `ResourceLoad` TO no replacement: set `gantt.resourceView: true` with `assigneeField` (and optionally `effortField` / `capacity`) and let `ObjectGantt` render the workload grid.
18+
- FROM `normalizeShiftSegments`, `shiftDayStart`, `bandAt`, `ShiftSegmentsConfig`, `ShiftBandConfig` TO no replacement: declare `gantt.timeSegments`; to drive `GanttView` directly, pass `shiftSegments` already in the `NormShiftSegments` shape.
19+
- FROM `normalizeDependencies` TO no replacement: give each `GanttTask` you pass to `GanttView` a `dependencies` array of ids or `{ id, type }` objects (`GanttDependency[]`).

‎ui/packages/plugin-designer/README.md‎

Lines changed: 13 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# @object-ui/plugin-designer
22

3-
Visual designers for Object UI — page, data model, process, and report designers with collaboration support.
3+
Visual designers for Object UI — page, data model, process, and report designers.
44

55
## Features
66

77
- 🎨 **Page Designer** - Drag-and-drop page builder with component tree
88
- 🗄️ **Data Model Designer** - Entity-relationship diagram editor with auto-layout
99
- ⚙️ **Process Designer** - BPMN-style process flow editor with minimap
1010
- 📝 **Report Designer** - Visual report layout builder with sections
11-
- 🤝 **Collaboration Provider** - Real-time multi-user editing with connection status
1211
- ↩️ **Undo/Redo** - Full undo/redo history via `useUndoRedo`
13-
- 📋 **Clipboard** - Copy/paste support via `useClipboard`
14-
- 🔲 **Multi-Select** - Bulk selection via `useMultiSelect`
15-
- 🔍 **Canvas Pan/Zoom** - Smooth pan and zoom via `useCanvasPanZoom`
12+
- 📋 **Clipboard** - Copy/paste inside the designer canvases
13+
- 🔲 **Multi-Select** - Bulk selection inside the designer canvases
14+
- 🔍 **Canvas Pan/Zoom** - Smooth pan and zoom on the page, data model and process canvases
1615
- 🗺️ **Minimap** - Overview minimap for large canvases
1716
- 📦 **Auto-registered** - Components register with `ComponentRegistry` on import
1817

@@ -30,14 +29,8 @@ npm install @object-ui/plugin-designer
3029
## Quick Start
3130

3231
```tsx
33-
import { CollaborationProvider, PageDesigner } from '@object-ui/plugin-designer';
34-
import type { CollaborationConfig, DesignerComponent } from '@object-ui/types';
35-
36-
const collaboration: CollaborationConfig = {
37-
enabled: true,
38-
roomId: 'landing-page',
39-
showCursors: true,
40-
};
32+
import { PageDesigner } from '@object-ui/plugin-designer';
33+
import type { DesignerComponent } from '@object-ui/types';
4134

4235
const componentList: DesignerComponent[] = [
4336
{
@@ -51,13 +44,11 @@ const componentList: DesignerComponent[] = [
5144

5245
function DesignerApp() {
5346
return (
54-
<CollaborationProvider config={collaboration}>
55-
<PageDesigner
56-
components={componentList}
57-
showComponentTree
58-
undoRedo
59-
/>
60-
</CollaborationProvider>
47+
<PageDesigner
48+
components={componentList}
49+
showComponentTree
50+
undoRedo
51+
/>
6152
);
6253
}
6354
```
@@ -131,50 +122,21 @@ declare const sections: ReportDesignerSection[];
131122
<ReportDesigner reportName="Sales Report" objectName="Order" sections={sections} />;
132123
```
133124

134-
### CollaborationProvider / ConnectionStatusIndicator
135-
136-
Multi-user real-time editing support:
137-
138-
```tsx
139-
import {
140-
CollaborationProvider,
141-
ConnectionStatusIndicator,
142-
PageDesigner,
143-
} from '@object-ui/plugin-designer';
144-
import type { CollaborationConfig } from '@object-ui/types';
145-
146-
declare const collaboration: CollaborationConfig;
147-
148-
<CollaborationProvider config={collaboration}>
149-
<ConnectionStatusIndicator />
150-
<PageDesigner showComponentTree undoRedo />
151-
</CollaborationProvider>;
152-
```
153-
154125
### Shared Hooks
155126

156127
```tsx
157-
import {
158-
useUndoRedo,
159-
useClipboard,
160-
useMultiSelect,
161-
useCanvasPanZoom,
162-
useConfirmDialog,
163-
} from '@object-ui/plugin-designer';
128+
import { useUndoRedo, useConfirmDialog } from '@object-ui/plugin-designer';
164129

165130
import type { DesignerComponent } from '@object-ui/types';
166131

167132
const { undo, redo, canUndo, canRedo } = useUndoRedo<DesignerComponent[]>([]);
168-
const { clipboard, copy, paste, hasContent } = useClipboard<DesignerComponent>();
169-
const { selectedIds, selectOne, selectMany, clearSelection } = useMultiSelect();
170-
const { zoom, panOffset, zoomIn, zoomOut, resetZoom } = useCanvasPanZoom();
171133
const { confirm, isOpen } = useConfirmDialog();
172134
```
173135

174136
### Shared Components
175137

176138
```tsx
177-
import { ConfirmDialog, Minimap, PropertyEditor, VersionHistory } from '@object-ui/plugin-designer';
139+
import { ConfirmDialog, Minimap, VersionHistory } from '@object-ui/plugin-designer';
178140
```
179141

180142
## Links

‎ui/packages/plugin-designer/src/index.tsx‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { PageDesigner } from './PageDesigner';
1111
import { DataModelDesigner } from './DataModelDesigner';
1212
import { ProcessDesigner } from './ProcessDesigner';
1313
import { ReportDesigner } from './ReportDesigner';
14-
import { CollaborationProvider, ConnectionStatusIndicator } from './CollaborationProvider';
1514
import { AppCreationWizard } from './AppCreationWizard';
1615
import { NavigationDesigner } from './NavigationDesigner';
1716
import { EditorModeToggle } from './EditorModeToggle';
@@ -25,8 +24,6 @@ export {
2524
DataModelDesigner,
2625
ProcessDesigner,
2726
ReportDesigner,
28-
CollaborationProvider,
29-
ConnectionStatusIndicator,
3027
AppCreationWizard,
3128
NavigationDesigner,
3229
EditorModeToggle,
@@ -44,21 +41,20 @@ export type { BrandingEditorProps } from './BrandingEditor';
4441
export type { ObjectManagerProps } from './ObjectManager';
4542
export type { FieldDesignerProps } from './FieldDesigner';
4643

47-
// Shared hooks
44+
// Shared hooks. The clipboard, multi-select and pan/zoom hooks, the
45+
// `PropertyEditor` panel and the collaboration provider with its status
46+
// indicator are the designers' internals: nothing outside this package read
47+
// them, so they stay module-local.
4848
export { useUndoRedo } from './hooks/useUndoRedo';
4949
export { useDesignerHistory } from './hooks/useDesignerHistory';
5050
export { useConfirmDialog } from './hooks/useConfirmDialog';
51-
export { useClipboard } from './hooks/useClipboard';
52-
export { useMultiSelect } from './hooks/useMultiSelect';
53-
export { useCanvasPanZoom } from './hooks/useCanvasPanZoom';
5451
// The provider-less fallback table, exported so objectui#4401's mirror gate can
5552
// compare it against the `en` pack from a package that depends on both.
5653
export { DESIGNER_DEFAULT_TRANSLATIONS } from './hooks/useDesignerTranslation';
5754

5855
// Shared components
5956
export { ConfirmDialog } from './components/ConfirmDialog';
6057
export { Minimap } from './components/Minimap';
61-
export { PropertyEditor } from './components/PropertyEditor';
6258
export { VersionHistory } from './components/VersionHistory';
6359

6460
// Route-ready app authoring pages — host apps mount these at their

‎ui/packages/plugin-gantt/README.md‎

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,8 @@ import {
196196
ObjectGantt, // ObjectQL-integrated gantt: loads records, writes back edits
197197
ObjectGanttRenderer, // the registered renderer for `object-gantt`
198198
GanttView, // the standalone timeline component
199-
QuickFilterBar, // the toolbar's quick-filter dropdowns
200-
ResourceWorkload, // resource × period workload grid
201-
normalizeDependencies, // raw dependency-field value -> GanttDependency[]
202199
normalizeTaskType, // raw type-field value -> GanttTaskType
203-
normalizeShiftSegments, // raw timeSegments config -> NormShiftSegments
204-
parseHHMM,
205-
shiftDayStart,
206-
bandAt,
207-
computeWorkload,
200+
parseHHMM, // 'HH:MM' -> minutes after midnight
208201
} from '@object-ui/plugin-gantt';
209202

210203
import type {
@@ -217,23 +210,15 @@ import type {
217210
GanttDependencyObject,
218211
GanttLinkType,
219212
GanttMarker,
220-
QuickFilterDef,
221-
QuickFilterBarProps,
222-
QuickFilterField,
223-
QuickFilterOption,
224-
QuickFilterLabels,
225-
ShiftSegmentsConfig,
226-
ShiftBandConfig,
227-
NormShiftSegments,
213+
NormShiftSegments, // the shape GanttViewProps.shiftSegments takes
228214
NormShiftBand,
229-
ResourceWorkloadProps,
230-
WorkloadColumn,
231-
WorkloadOptions,
232-
ResourceCell,
233-
ResourceLoad,
234215
} from '@object-ui/plugin-gantt';
235216
```
236217

218+
The quick-filter bar, the resource-workload grid and the shift-band helpers
219+
are `ObjectGantt` internals and are not exported; configure them through the
220+
`gantt` block (`quickFilters`, `resourceView`, `timeSegments`) instead.
221+
237222
To serve the gantt under a registry key of your own, register the exported
238223
renderer under that key:
239224

‎ui/packages/plugin-gantt/src/index.tsx‎

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,13 @@ import {
1616
import { useObjectTranslation } from '@object-ui/i18n';
1717
import { ObjectGantt, type ObjectGanttProps } from './ObjectGantt';
1818

19+
// The entry publishes what a host composes with: the two gantt components, the
20+
// renderer, the timeline's task/marker vocabulary and the two helpers read
21+
// outside this package. The quick-filter bar, the resource-workload grid, the
22+
// workload math and the shift-band helpers are ObjectGantt's internals, read by
23+
// nothing outside it, so they stay module-local (each module keeps its tests).
1924
export { ObjectGantt };
20-
export type { ObjectGanttProps, QuickFilterDef } from './ObjectGantt';
21-
22-
export { QuickFilterBar } from './QuickFilterBar';
23-
export type {
24-
QuickFilterBarProps,
25-
QuickFilterField,
26-
QuickFilterOption,
27-
QuickFilterLabels,
28-
} from './QuickFilterBar';
25+
export type { ObjectGanttProps } from './ObjectGantt';
2926

3027
export { GanttView } from './GanttView';
3128
export type {
@@ -38,25 +35,12 @@ export type {
3835
GanttLinkType,
3936
GanttMarker,
4037
} from './GanttView';
41-
export { normalizeDependencies, normalizeTaskType } from './ObjectGantt';
38+
export { normalizeTaskType } from './ObjectGantt';
4239

43-
export { normalizeShiftSegments, parseHHMM, shiftDayStart, bandAt } from './shifts';
44-
export type {
45-
ShiftSegmentsConfig,
46-
ShiftBandConfig,
47-
NormShiftSegments,
48-
NormShiftBand,
49-
} from './shifts';
50-
51-
export { ResourceWorkload } from './ResourceWorkload';
52-
export type { ResourceWorkloadProps } from './ResourceWorkload';
53-
export { computeWorkload } from './workload';
54-
export type {
55-
WorkloadColumn,
56-
WorkloadOptions,
57-
ResourceCell,
58-
ResourceLoad,
59-
} from './workload';
40+
export { parseHHMM } from './shifts';
41+
// `GanttViewProps.shiftSegments` is typed by these two, so they stay public
42+
// with `GanttView`.
43+
export type { NormShiftSegments, NormShiftBand } from './shifts';
6044

6145
/**
6246
* What `ObjectGantt` reads for its own query: `objectName` (via `getDataConfig`,

0 commit comments

Comments
 (0)