Skip to content

Commit 7da99b7

Browse files
refactor(components)!: retire 44 more zero-consumer entry exports (#30791)
<!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuJXTeAARtJsGhaLjuKz6yHL)_ Part of #25921. The umbrella stays open; this is barrel batch 7, claim 6674577823 (seat `domain:ui#1`), batch amendments 6674785161 and 6674939838. Earlier batches: #30541, #30576, #30629, #30650, #30708, #30752. Clause-②: no (narrowing) Metadata-protocol: none ## 维护者速读 - 改了什么:`@object-ui/components` 的包入口再少导出 44 个名字。其中 13 个包内也无人读,直接删除(`item.tsx` 的 9 个子件、整个 `native-select.tsx`、`ResizableHandleProps`、`useRelatedCount`);其余 31 个只离开入口,留在原模块供本包渲染器、筛选器和通知组件使用。 - 为什么改:这 44 个名字在仓内(包外,含测试与文档)与 hotcrm 均零引用或只有同名异物,README 未教,也不被保留导出的签名用到。本卡逐包收窄无人使用的公开导出。 - 风险与回滚:对外是 breaking 收窄,只影响直接从包入口 import 这些名字的外部宿主;控制台、所有 `@object-ui/*` 包、所有 schema 节点类型、筛选器和五种通知照常。`custom/index.ts` 的 8 行 `export *` 改成具名列表,反向探针证明其余 364 个入口名一个不少。回滚即 revert 本 PR。 - 先看:`ui/packages/components/src/custom/index.ts`(具名列表,漏列即丢活名)、`src/custom/item.tsx`(删掉 9 个子件)、`.changeset/25921-components-helpers-and-family-heads.md`(迁移说明)。 - 两分钟验证:`git grep -l -w -e ItemMedia -e NativeSelect -e notificationSeverityStyle -- ':!ui/packages/components' ':!**/CHANGELOG.md'` 应只命中本 PR 的 changeset。 - 需要你做的:无,席位落地。 ## What changes - `@object-ui/components`, **deleted** (nothing inside the package read them, tests included): the item sub-parts `ItemMedia`, `ItemContent`, `ItemActions`, `ItemGroup`, `ItemSeparator`, `ItemTitle`, `ItemDescription`, `ItemHeader`, `ItemFooter` (with the local `itemMediaVariants`; `Item` stays); `src/custom/native-select.tsx` with `NativeSelect` and `NativeSelectProps`; the type alias `ResizableHandleProps`; the hook `useRelatedCount` (one doc line that recommended it now points at `RelatedCountStore.get` under `useRelatedCountVersion()`). `item.tsx` is listed under `customComponents` in `shadcn-components.json` and `native-select.tsx` is not listed at all, so `pnpm shadcn:update` restores neither. - `@object-ui/components`, **off the entry only** (module files untouched except the deletions above; the shadcn registry files under `src/ui/` are not edited): - `src/ui/index.ts`: `MenubarMenu`, `MenubarItem`, `NavigationMenuItem`, `InputOTPGroup`, `InputOTPSeparator`, `CarouselItem` (the batch-6 family heads, per the seat's ruling). `input-otp` and `navigation-menu` leave the entry entirely; `Menubar`, `Carousel` and `CarouselApi` stay (see Acceptance notes). - `src/custom/index.ts`: `export *` over `filter-builder`, `filterRecordCurrency`, `kbd`, `navigation-overlay`, `view-states`, `mobile-dialog-content` becomes named lists, `native-select` goes, the `record-list-face` list keeps only `ActiveListRecordProvider`. Off: `mountedOperatorValue`, `retypeFilterValue`, `narrowFilterValueToOptions`, `CURRENCY_COMPANION_SUFFIX`, `currencyCompanionId`, `currencyCompanionOf`, `pairedCurrencyField`, `KbdGroup`, `SIDEBAR_WIDTH_FALLBACK`, `SIDEBAR_WIDTH_ICON_FALLBACK`, `DataLoadingState`, `DataLoadingStateProps`, `isInsidePopperLayer`, `usePopperAwareInteractOutside`, `useIsActiveListRecord`, `useScrollActiveListRecordIntoView`, `ActiveListRow`, `listRecordIdOf`. Each named list was built from the checker's export list of that module, so no name a module re-exports is lost. - `src/notifications/index.ts`: the `severity` block goes (`NOTIFICATION_ACTION_BUTTON_VARIANTS`, `NOTIFICATION_POSITION_CLASSES`, `NOTIFICATION_SEVERITY_STYLES`, `notificationActionVariant`, `notificationIcon`, `notificationSeverityStyle`, `NotificationSeverityStyle`); the four surfaces read it from the module file already. - All in-package readers already import these names from their module files (`renderers/overlay/menubar.tsx`, `renderers/basic/navigation-menu.tsx`, `renderers/form/input-otp.tsx`, `renderers/complex/carousel.tsx`, `renderers/complex/data-table.tsx`, `custom/panel-toggles.tsx`, `custom/navigation-overlay.tsx`, the notification surfaces and the tests), so no import path changes. - One test floor re-measured: `__tests__/empty-description-props-name-the-element-8571.test.tsx` walks every wrapper function under `src/custom/` and floors the population at 12; deleting the item parts leaves 11, so the floor is now 8 (still above the seven-member `Empty` family a broken walk would stop at), with the comment saying why. - One new changeset, `.changeset/25921-components-helpers-and-family-heads.md`: patch level, `!` title, BREAKING paragraph that separates the 13 deleted names from the 31 off-entry ones, FROM/TO lines for every retired name, ADR-0087 marker `not-required (runtime-export-retired …)` naming all 44 operands. No pending `25921-*` changeset is edited. ## Why Card #25921 narrows `ui/packages` barrels to names someone imports. The checker export list after this PR is exactly the base list minus these 44 (408 to 364), nothing added. ## Tests Census on `origin/main` b309866 with the method of batches 1 to 6 (full per-name table with same-module controls: project file `issue-25921-seat6/census-b7.md`): entry names from the TypeScript checker (`getExportsOfModule` on `src/index.ts`, 408); per name `git grep -l -w -F` outside the package minus `**/CHANGELOG.md`, `pnpm-lock.yaml`, `.changeset/**` (tests and prose count); the package `*.md`, `docs/`, `*.json` minus its CHANGELOG; keep rule 3 by an identifier walk of the built `dist/**/*.d.ts` from every kept export (through local declarations and reached candidates, to fixpoint) plus a source read where the d.ts inlines a type; a TS parse of every tracked source and doc file for named imports from `@object-ui/components` (0 for every retired name); hotcrm `6961ab1` (0 hits for all 44; hotcrm does not import the package, control `Select` 8 files). | Entry names | Zero outside hits | README-taught | Kept by rule 3 | Kept: released migration names them | Family heads ruled in (homonym hits) | Kept: ADR-0087 gate | Retired | |--:|--:|--:|--:|--:|--:|--:|--:| | 408 | 87 | 3 | 41 | 4 (`KanbanSkeleton`, `FormSkeleton`, `ListSkeleton`, `KanbanSkeletonProps`) | +8 | 3 (`Menubar`, `Carousel`, `CarouselApi`) | 44 | Controls (outside hits, same module as retired names): `FilterBuilder` 63, `NavigationOverlay` 54, `DataEmptyState` 30, `RelatedCountStore` 37, `NotificationSnackbar` 10, `MobileDialogContent` 5, `Kbd` 4, `ResizablePanel` 5, `ActiveListRecordProvider` 2, `Select` 458, `Command` 215. Readings at `ecad190f` (branch head; `origin/main` has since moved 5 commits, none touching `ui/packages/components`, and a re-grep of the 44 names there outside the package answers only the six family heads' homonym files the census lists, 0 files for the other 38): <details><summary>Build, type-check, package tests</summary> - `pnpm --filter '@object-ui/components...' build` (the package and its dependency closure) on the base: VERDICT command-exit 0; components rebuilt on the final head (`vite build`, declarations rebuilt). - `pnpm --filter @object-ui/components type-check` (`tsc --noEmit && tsc -p tsconfig.test.json`): exit 0. - `pnpm --filter @object-ui/components test`: Test Files 477 passed, 1 skipped (478); Tests 4565 passed, 24 skipped (4589); VERDICT command-exit 0. The first run (at da20801) had 1 red, `empty-description-props-name-the-element-8571.test.tsx` "finds the population" (expected 11 to be ≥ 12), the consequence of deleting the item parts; re-floored in ecad190, single-file run 7/7 green, then the full run above. </details> <details><summary>Reverse check over every former entry name</summary> A temporary probe under `ui/packages/plugin-view/src` importing ALL 408 base entry names of `@object-ui/components` (as `import type`), `tsc --noEmit -p` in `ui/packages/plugin-view` against the rebuilt `dist/index.d.ts`: exactly 44 errors in the probe (`TS2305` 35, `TS2724` 9), and the set of names they name is identical (`diff` empty) to the 44 retired names; the other 364 resolve. The run's 3 other errors are unbuilt sibling packages imported by `ObjectView.tsx` (`plugin-grid`, `plugin-form`, `permissions`), outside the probe. Probe deleted; `git status` clean. </details> <details><summary>Gates</summary> - `node scripts/pm/dispatch-gates.mjs --commands`: 35 derived families, each run on ecad190 with its exit code captured before any pipe, all exit 0 (`pnpm --dir ui exec vitest run scripts/` under the lock: Test Files 170 passed, 2 skipped (172), Tests 4970 passed, 2 skipped; `check:type-check-debt` after dogfood under the lock: OK, 0 raw tsc errors). - `check-adr-0087-registration --base origin/main` was red on da20801: predicate 2 (no-metadata-surface) refused `Menubar` and `Carousel` (Zod describe strings, see Acceptance notes). Both were put back in 76d6484; green since, with all 44 operands verified. - `dispatch-gates --ran`: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero: all 35 recorded an exit code, none 3). - `node scripts/check-platform-checklist.mjs --changed-from origin/main`: exit 0, 0 anchored files in the change set. </details> <details><summary>Dogfood (narrowing arm)</summary> `pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test` under `os-verify-lock` on ecad190: VERDICT command-exit 0; Test Files 422 passed, 3 skipped (425); Tests 3527 passed, 41 skipped (3568); no failures. </details> No ablation: export lines, deleted declarations nothing read, and one population floor re-measured. ## Acceptance notes - `Menubar` and `Carousel` stay on the entry, against the first amendment, and `CarouselApi` with them (the `setApi` prop of `Carousel` names it). `check-adr-0087-registration --base origin/main` refuses `runtime-export-retired` for both under predicate 2 (no-metadata-surface): `ui/packages/types/src/zod/overlay.zod.ts` carries `.describe('Menubar menus')` and `zod/complex.zod.ts` carries `.describe('Carousel items')`, and the gate deliberately counts a string inside a Zod schema as a reference. Retiring them would need an ADR-0087 ledger entry under `packages/spec`, outside the claim; the seat ruled to keep them (amendment 6674939838) and puts them back on the card's open list. - `KanbanSkeleton`, `FormSkeleton`, `ListSkeleton` and `KanbanSkeletonProps` have zero readers anywhere, but the released `ViewSkeleton` retirement in `ui/packages/components/CHANGELOG.md` says the other skeletons "stay exported unchanged" and gives them as its FROM/TO targets; the seat ruled them kept. - `Item` stays: its outside hits are the generic word (346 files, 0 named imports) and cannot be shown hit by hit to be homonyms. - The previous components changeset in this series (pending in the release PR) lists `MenubarMenu`, `MenubarItem`, `NavigationMenuItem`, `InputOTPGroup`, `InputOTPSeparator` and `CarouselItem` among the names that stay; this changeset says in its body that they leave now. That changeset is not edited (claim rule). ## Verification Reviewer: `git grep -l -w -e ItemMedia -e NativeSelect -e notificationSeverityStyle -- ':!ui/packages/components' ':!**/CHANGELOG.md'` answers only this PR's changeset; the CI `Type Check UI` lane compiles every `@object-ui/*` consumer against the narrowed entry. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgWd23yaWptSYazSPUo)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2fbddd4 commit 7da99b7

10 files changed

Lines changed: 114 additions & 232 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
refactor(components)!: retire forty-four more zero-consumer exports — menubar, navigation-menu, input-otp and carousel parts, filter and notification helpers — and delete the item parts, `NativeSelect`, `ResizableHandleProps` and `useRelatedCount` nothing reads
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/components#MenubarMenu, @object-ui/components#MenubarItem, @object-ui/components#NavigationMenuItem, @object-ui/components#InputOTPGroup, @object-ui/components#InputOTPSeparator, @object-ui/components#CarouselItem, @object-ui/components#ItemMedia, @object-ui/components#ItemContent, @object-ui/components#ItemActions, @object-ui/components#ItemGroup, @object-ui/components#ItemSeparator, @object-ui/components#ItemTitle, @object-ui/components#ItemDescription, @object-ui/components#ItemHeader, @object-ui/components#ItemFooter, @object-ui/components#NativeSelect, @object-ui/components#NativeSelectProps, @object-ui/components#ResizableHandleProps, @object-ui/components#useRelatedCount, @object-ui/components#mountedOperatorValue, @object-ui/components#retypeFilterValue, @object-ui/components#narrowFilterValueToOptions, @object-ui/components#CURRENCY_COMPANION_SUFFIX, @object-ui/components#currencyCompanionId, @object-ui/components#currencyCompanionOf, @object-ui/components#pairedCurrencyField, @object-ui/components#KbdGroup, @object-ui/components#isInsidePopperLayer, @object-ui/components#usePopperAwareInteractOutside, @object-ui/components#SIDEBAR_WIDTH_FALLBACK, @object-ui/components#SIDEBAR_WIDTH_ICON_FALLBACK, @object-ui/components#useIsActiveListRecord, @object-ui/components#useScrollActiveListRecordIntoView, @object-ui/components#ActiveListRow, @object-ui/components#listRecordIdOf, @object-ui/components#DataLoadingState, @object-ui/components#DataLoadingStateProps, @object-ui/components#NOTIFICATION_ACTION_BUTTON_VARIANTS, @object-ui/components#NOTIFICATION_POSITION_CLASSES, @object-ui/components#NOTIFICATION_SEVERITY_STYLES, @object-ui/components#notificationActionVariant, @object-ui/components#notificationIcon, @object-ui/components#notificationSeverityStyle, @object-ui/components#NotificationSeverityStyle) the retired operands are React components, hooks, helpers, constants and their types on the components package entry; nothing in the workspace or in hotcrm imports any of them from the package entry, and no packages/spec schema, registered node type, conversion surface or stored shape names them (the schema renderers, the filter builder and the notification surfaces keep reading them inside the package), so there is nothing for `objectstack migrate meta` to rewrite -->
11+
12+
**BREAKING** for a host that imports any of these forty-four names from `@object-ui/components`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected, and every schema node type (`menubar`, `navigation-menu`, `input-otp`, `carousel` and the rest), the filter builder and the five notification surfaces render exactly as before.
13+
14+
The six shadcn parts below (`MenubarMenu`, `MenubarItem`, `NavigationMenuItem`, `InputOTPGroup`, `InputOTPSeparator`, `CarouselItem`) were named as staying on the entry by the previous `@object-ui/components` retirement in this series; they leave now. Every reference to them outside the package was a same-named declaration of another package (the `@object-ui/types` interfaces `MenubarMenu`, `NavigationMenuItem`, `CarouselItem`), an example title or test prose, never an import of these components.
15+
16+
Thirteen of them are **gone from the package, not only from the entry**, because nothing inside the package read them either:
17+
18+
- `src/custom/item.tsx` keeps only `Item`; `ItemMedia`, `ItemContent`, `ItemActions`, `ItemGroup`, `ItemSeparator`, `ItemTitle`, `ItemDescription`, `ItemHeader` and `ItemFooter` are deleted.
19+
- `src/custom/native-select.tsx` is deleted with `NativeSelect` and `NativeSelectProps`.
20+
- The type alias `ResizableHandleProps` is deleted.
21+
- The hook `useRelatedCount` is deleted; `useRelatedCountVersion` and `RelatedCountStore` stay.
22+
23+
The other thirty-one stay in their modules, which this package's own renderers, components and tests read, and only leave the entry (the shadcn registry files under `src/ui/` are untouched, so `pnpm shadcn:update` stays a clean re-fetch):
24+
25+
- `menubar`: `MenubarMenu`, `MenubarItem`
26+
- `navigation-menu`: `NavigationMenuItem`
27+
- `input-otp`: `InputOTPGroup`, `InputOTPSeparator`
28+
- `carousel`: `CarouselItem`
29+
- `filter-builder`: `mountedOperatorValue`, `retypeFilterValue`, `narrowFilterValueToOptions`
30+
- `filterRecordCurrency`: `CURRENCY_COMPANION_SUFFIX`, `currencyCompanionId`, `currencyCompanionOf`, `pairedCurrencyField`
31+
- `kbd`: `KbdGroup`
32+
- `mobile-dialog-content`: `isInsidePopperLayer`, `usePopperAwareInteractOutside`
33+
- `navigation-overlay`: `SIDEBAR_WIDTH_FALLBACK`, `SIDEBAR_WIDTH_ICON_FALLBACK`
34+
- `record-list-face`: `useIsActiveListRecord`, `useScrollActiveListRecordIntoView`, `ActiveListRow`, `listRecordIdOf`
35+
- `view-states`: `DataLoadingState`, `DataLoadingStateProps`
36+
- `notifications/severity`: `NOTIFICATION_ACTION_BUTTON_VARIANTS`, `NOTIFICATION_POSITION_CLASSES`, `NOTIFICATION_SEVERITY_STYLES`, `notificationActionVariant`, `notificationIcon`, `notificationSeverityStyle`, `NotificationSeverityStyle`
37+
38+
Every other name the entry exported stays exported unchanged, among them `Menubar`, `Carousel` with the type `CarouselApi`, `Item`, `Kbd`, `Pagination`, `FilterBuilder` with `filterValueArity`, `reshapeFilterValue`, `operatorsForFieldType` and the type `FilterValueArity`, `isCurrencyCompanion`, `syncRecordCurrencyRows` and the type `RecordCurrencyFilterField`, `MobileDialogContent`, `NavigationOverlay`, `ActiveListRecordProvider`, `DataEmptyState`, `EmptyState`, `DataErrorState`, the four notification surfaces with their props types, `ResizableHandle`, `ResizablePanel`, `ResizablePanelGroup`, and `GridSkeleton`, `KanbanSkeleton`, `FormSkeleton`, `ListSkeleton`, `ChartSkeleton` with their props types.
39+
40+
What leaves, and what to write instead:
41+
42+
- FROM `MenubarMenu`, `MenubarItem` TO the same parts in the host's own tree (`npx shadcn@latest add menubar`), or a `menubar` schema node.
43+
- FROM `NavigationMenuItem` TO the same part in the host's own tree (`npx shadcn@latest add navigation-menu`), or a `navigation-menu` schema node.
44+
- FROM `InputOTPGroup`, `InputOTPSeparator` TO the same parts in the host's own tree (`npx shadcn@latest add input-otp`), or an `input-otp` schema node.
45+
- FROM `CarouselItem` TO the same parts in the host's own tree (`npx shadcn@latest add carousel`), or a `carousel` schema node.
46+
- FROM `ItemMedia`, `ItemContent`, `ItemActions`, `ItemGroup`, `ItemSeparator`, `ItemTitle`, `ItemDescription`, `ItemHeader`, `ItemFooter` TO plain `div` / `p` elements with the classes you want inside `Item`, or the same parts in the host's own tree (`npx shadcn@latest add item`).
47+
- FROM `NativeSelect` TO a plain `select` element, or `Select`.
48+
- FROM `NativeSelectProps` TO `React.SelectHTMLAttributes<HTMLSelectElement>`, which it extended without adding a key.
49+
- FROM `ResizableHandleProps` TO `React.ComponentProps<typeof ResizableHandle>`, which it aliased.
50+
- FROM `useRelatedCount` TO `RelatedCountStore.get` with the same four arguments (object, relationship field, parent id, filter), guarding an absent object name yourself as the hook did (`objectName ? RelatedCountStore.get(objectName, relField, parentId, filter) : undefined`, since `get` takes `objectName: string`), read in a component that calls `useRelatedCountVersion()`, which re-renders it when the store changes.
51+
- FROM `mountedOperatorValue`, `retypeFilterValue`, `narrowFilterValueToOptions` TO `FilterBuilder`, which applies them to its rows, or `reshapeFilterValue` for the operator half.
52+
- FROM `CURRENCY_COMPANION_SUFFIX`, `currencyCompanionId`, `currencyCompanionOf`, `pairedCurrencyField` TO `isCurrencyCompanion` and `syncRecordCurrencyRows`, which pair and keep the currency rows.
53+
- FROM `KbdGroup` TO a `kbd` element with the classes `inline-flex items-center gap-1` around the `Kbd` elements.
54+
- FROM `isInsidePopperLayer`, `usePopperAwareInteractOutside` TO `MobileDialogContent`, which already keeps a dialog open when a click lands in a popover, menu or select layer.
55+
- FROM `SIDEBAR_WIDTH_FALLBACK`, `SIDEBAR_WIDTH_ICON_FALLBACK` TO the values they held, `16rem` and `3rem` (the fallbacks of the `--sidebar-width` and `--sidebar-width-icon` CSS variables).
56+
- FROM `useIsActiveListRecord`, `useScrollActiveListRecordIntoView`, `ActiveListRow`, `listRecordIdOf` TO `ActiveListRecordProvider` around a list this package draws: its data table marks and scrolls the active row itself.
57+
- FROM `DataLoadingState` TO `Spinner` or `Skeleton`, or `GridSkeleton` / `ListSkeleton` for a view.
58+
- FROM `DataLoadingStateProps` TO `React.ComponentProps<"div">` plus your own `message` prop.
59+
- FROM `NOTIFICATION_ACTION_BUTTON_VARIANTS`, `NOTIFICATION_POSITION_CLASSES`, `NOTIFICATION_SEVERITY_STYLES`, `notificationActionVariant`, `notificationIcon`, `notificationSeverityStyle`, `NotificationSeverityStyle` TO `NotificationBanners`, `NotificationSnackbar`, `NotificationAlerts` or `NotificationInline`, which style a notification by its severity and action variant themselves.

‎ui/packages/components/src/__tests__/empty-description-props-name-the-element-8571.test.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,11 @@ describe('objectui#8571 — the declared intrinsic is the rendered one, across s
221221
});
222222

223223
it('finds the population (guards against a broken walk)', () => {
224-
// 17 agreeing members plus the ledger at the time of writing; the floor is
225-
// loose so adding or removing one wrapper does not fail the wrong assertion.
226-
expect(ALL_MEMBERS.filter(judged).length).toBeGreaterThanOrEqual(12);
224+
// 11 judged members since the unread `item.tsx` sub-parts were deleted
225+
// (objectstack#25921). The floor stays above the seven-member
226+
// `Empty` family, so a walk that reaches only `empty.tsx` still fails, and
227+
// is loose so adding or removing one wrapper does not fail the wrong assertion.
228+
expect(ALL_MEMBERS.filter(judged).length).toBeGreaterThanOrEqual(8);
227229
});
228230

229231
it('every judged member under src/custom names the intrinsic it returns, except the ledgered cards', () => {
Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// A module whose helpers nothing outside this package imports is re-exported
2+
// as a named list, not `export *` (objectstack#25921): the names left off stay
3+
// in their module for this package's own components and tests.
14
export * from './button-group';
25
export * from './character-count';
36
export * from './combobox';
@@ -8,21 +11,40 @@ export * from './date-picker';
811
export * from './empty';
912
export * from './field';
1013
export * from './currency-code-picker';
11-
export * from './filter-builder';
12-
export * from './filterRecordCurrency';
14+
export {
15+
normalizeFilterBuilderOperator,
16+
filterValueArity,
17+
reshapeFilterValue,
18+
reconcileOperatorForField,
19+
isFilterValueComplete,
20+
operatorsForFieldType,
21+
type FilterBuilderRow,
22+
type FilterBuilderRowGroup,
23+
type FilterBuilderProps,
24+
FILTER_BUILDER_OPERATORS,
25+
type FilterBuilderOperator,
26+
VALUELESS_FILTER_BUILDER_OPERATORS,
27+
type FilterValueArity,
28+
FilterBuilder,
29+
LookupValuePicker,
30+
} from './filter-builder';
31+
export {
32+
isCurrencyCompanion,
33+
syncRecordCurrencyRows,
34+
type RecordCurrencyFilterField,
35+
} from './filterRecordCurrency';
1336
export * from './fullscreen-editor';
1437
export * from './input-group';
1538
export * from './item';
16-
export * from './kbd';
17-
export * from './native-select';
18-
export * from './navigation-overlay';
39+
export { Kbd } from './kbd';
1940
export {
20-
ActiveListRecordProvider,
21-
useIsActiveListRecord,
22-
useScrollActiveListRecordIntoView,
23-
ActiveListRow,
24-
listRecordIdOf,
25-
} from './record-list-face';
41+
recordOverlayWidthStorageKey,
42+
legacyRecordDrawerWidthKey,
43+
type NavigationOverlayMode,
44+
type NavigationOverlayProps,
45+
NavigationOverlay,
46+
} from './navigation-overlay';
47+
export { ActiveListRecordProvider } from './record-list-face';
2648
export * from './panel-toggles';
2749
export * from './record-top-bar';
2850
export * from './resizable';
@@ -33,9 +55,19 @@ export * from './grouping-editor';
3355
export * from './view-skeleton';
3456
export * from './RecordTitleChip';
3557
export * from './refresh-indicator';
36-
export * from './view-states';
58+
export {
59+
DataEmptyState,
60+
EmptyState,
61+
DataErrorState,
62+
type DataEmptyStateProps,
63+
type EmptyStateProps,
64+
type DataErrorStateProps,
65+
} from './view-states';
3766
export * from './empty-state-link';
38-
export * from './mobile-dialog-content';
67+
export {
68+
MobileDialogContent,
69+
type MobileDialogContentProps,
70+
} from './mobile-dialog-content';
3971
export * from './dialog-viewport-gutter';
4072
export { HorizontalOverflowBox, type HorizontalOverflowBoxProps } from './horizontal-overflow';
4173
export { PINNED_RIGHT_SEAM_SHADOW_CLASSES } from './use-horizontal-overflow';

‎ui/packages/components/src/custom/item.tsx‎

Lines changed: 1 addition & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,6 @@ import { Slot as SlotPrimitive } from "@radix-ui/react-slot"
1111
import { cva, type VariantProps } from "class-variance-authority"
1212

1313
import { cn } from "../lib/utils"
14-
import { Separator } from "../ui/separator"
15-
16-
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
17-
return (
18-
<div
19-
role="list"
20-
data-slot="item-group"
21-
className={cn("group/item-group flex flex-col", className)}
22-
{...props}
23-
/>
24-
)
25-
}
26-
27-
function ItemSeparator({
28-
className,
29-
...props
30-
}: React.ComponentProps<typeof Separator>) {
31-
return (
32-
<Separator
33-
data-slot="item-separator"
34-
orientation="horizontal"
35-
className={cn("my-0", className)}
36-
{...props}
37-
/>
38-
)
39-
}
4014

4115
const itemVariants = cva(
4216
"group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
@@ -79,123 +53,4 @@ function Item({
7953
)
8054
}
8155

82-
const itemMediaVariants = cva(
83-
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
84-
{
85-
variants: {
86-
variant: {
87-
default: "bg-transparent",
88-
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
89-
image:
90-
"size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover",
91-
},
92-
},
93-
defaultVariants: {
94-
variant: "default",
95-
},
96-
}
97-
)
98-
99-
function ItemMedia({
100-
className,
101-
variant = "default",
102-
...props
103-
}: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
104-
return (
105-
<div
106-
data-slot="item-media"
107-
data-variant={variant}
108-
className={cn(itemMediaVariants({ variant, className }))}
109-
{...props}
110-
/>
111-
)
112-
}
113-
114-
function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
115-
return (
116-
<div
117-
data-slot="item-content"
118-
className={cn(
119-
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
120-
className
121-
)}
122-
{...props}
123-
/>
124-
)
125-
}
126-
127-
function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
128-
return (
129-
<div
130-
data-slot="item-title"
131-
className={cn(
132-
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
133-
className
134-
)}
135-
{...props}
136-
/>
137-
)
138-
}
139-
140-
function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
141-
return (
142-
<p
143-
data-slot="item-description"
144-
className={cn(
145-
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
146-
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
147-
className
148-
)}
149-
{...props}
150-
/>
151-
)
152-
}
153-
154-
function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
155-
return (
156-
<div
157-
data-slot="item-actions"
158-
className={cn("flex items-center gap-2", className)}
159-
{...props}
160-
/>
161-
)
162-
}
163-
164-
function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
165-
return (
166-
<div
167-
data-slot="item-header"
168-
className={cn(
169-
"flex basis-full items-center justify-between gap-2",
170-
className
171-
)}
172-
{...props}
173-
/>
174-
)
175-
}
176-
177-
function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
178-
return (
179-
<div
180-
data-slot="item-footer"
181-
className={cn(
182-
"flex basis-full items-center justify-between gap-2",
183-
className
184-
)}
185-
{...props}
186-
/>
187-
)
188-
}
189-
190-
export {
191-
Item,
192-
ItemMedia,
193-
ItemContent,
194-
ItemActions,
195-
ItemGroup,
196-
ItemSeparator,
197-
ItemTitle,
198-
ItemDescription,
199-
ItemHeader,
200-
ItemFooter,
201-
}
56+
export { Item }

‎ui/packages/components/src/custom/native-select.tsx‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

‎ui/packages/components/src/custom/resizable.tsx‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@
2626
* `ui/index.ts`: `src/index.ts` star-exports `./ui` and `./custom` side by side,
2727
* so exporting `Resizable*` from both would collide (TS2308).
2828
*/
29-
import type * as React from 'react';
30-
3129
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '../ui/resizable';
3230

33-
/** Kept on the public surface (it is exported from the package root) even though
34-
* the wrapper it was introduced for is gone. */
35-
export type ResizableHandleProps = React.ComponentProps<typeof ResizableHandle>;
36-
3731
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };

‎ui/packages/components/src/hooks/related-count-store.ts‎

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -552,22 +552,6 @@ function getSnapshot(): number {
552552
return version;
553553
}
554554

555-
/**
556-
* Subscribe to the related-count store and read the count for a single
557-
* (object, relField, parentId) triple. Returns `undefined` while the
558-
* probe is in flight or before the first request.
559-
*/
560-
export function useRelatedCount(
561-
objectName: string | undefined,
562-
relField: string | undefined,
563-
parentId: string | undefined,
564-
filter?: CountScopeFilter,
565-
): number | undefined {
566-
useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
567-
if (!objectName) return undefined;
568-
return getCount(objectName, relField, parentId, filter);
569-
}
570-
571555
/**
572556
* Subscribe to the store's monotonic version. Put it in an effect dependency
573557
* array to RE-RUN count probes after an invalidation (#2269) — invalidate
@@ -581,7 +565,7 @@ export function useRelatedCountVersion(): number {
581565

582566
/**
583567
* Imperative store API for non-React callers (mutation handlers, tests).
584-
* Prefer `useRelatedCount` in components.
568+
* In components, read `RelatedCountStore.get` under `useRelatedCountVersion()`.
585569
*
586570
* `fetch`'s last parameter is the CHILD object's field defs. It is optional
587571
* because a caller that cannot see metadata must still be able to probe — the

0 commit comments

Comments
 (0)