|
| 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. |
0 commit comments