Skip to content

Commit 730b0af

Browse files
committed
refactor(components)!: retire 63 zero-consumer shadcn sub-part entry exports
The package entry re-exported every shadcn primitive with `export *`. Sixty-three sub-parts have no importer outside the package (workspace, docs and hotcrm), are not taught in the package README, and no kept export's signature names them. Thirteen `export *` lines in `src/ui/index.ts` become named lists of their kept parts; the renderers that read a retired part import it from its module file instead. `src/ui/typography.tsx` had no reader inside the package either and is deleted (12 names). It is not a shadcn registry component. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgV6Wix8Nbop1d5WqZB
1 parent ab44ec9 commit 730b0af

10 files changed

Lines changed: 128 additions & 106 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
refactor(components)!: retire sixty-three zero-consumer shadcn sub-part exports, and delete the typography primitives nothing reads
6+
7+
Clause-②: no (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/components#TypographyH1, @object-ui/components#TypographyH2, @object-ui/components#TypographyH3, @object-ui/components#TypographyH4, @object-ui/components#TypographyP, @object-ui/components#TypographyBlockquote, @object-ui/components#TypographyList, @object-ui/components#TypographyInlineCode, @object-ui/components#TypographyLead, @object-ui/components#TypographyLarge, @object-ui/components#TypographySmall, @object-ui/components#TypographyMuted, @object-ui/components#AlertDialogOverlay, @object-ui/components#AlertDialogPortal, @object-ui/components#BreadcrumbEllipsis, @object-ui/components#BreadcrumbSeparator, @object-ui/components#CarouselContent, @object-ui/components#CarouselNext, @object-ui/components#CarouselPrevious, @object-ui/components#CommandShortcut, @object-ui/components#ContextMenuCheckboxItem, @object-ui/components#ContextMenuGroup, @object-ui/components#ContextMenuLabel, @object-ui/components#ContextMenuPortal, @object-ui/components#ContextMenuRadioGroup, @object-ui/components#ContextMenuRadioItem, @object-ui/components#ContextMenuShortcut, @object-ui/components#DrawerOverlay, @object-ui/components#DrawerPortal, @object-ui/components#useFormField, @object-ui/components#InputOTP, @object-ui/components#InputOTPSlot, @object-ui/components#MenubarCheckboxItem, @object-ui/components#MenubarContent, @object-ui/components#MenubarGroup, @object-ui/components#MenubarLabel, @object-ui/components#MenubarPortal, @object-ui/components#MenubarRadioGroup, @object-ui/components#MenubarRadioItem, @object-ui/components#MenubarSeparator, @object-ui/components#MenubarShortcut, @object-ui/components#MenubarSub, @object-ui/components#MenubarSubContent, @object-ui/components#MenubarSubTrigger, @object-ui/components#MenubarTrigger, @object-ui/components#NavigationMenu, @object-ui/components#NavigationMenuContent, @object-ui/components#NavigationMenuIndicator, @object-ui/components#NavigationMenuLink, @object-ui/components#NavigationMenuList, @object-ui/components#NavigationMenuTrigger, @object-ui/components#NavigationMenuViewport, @object-ui/components#navigationMenuTriggerStyle, @object-ui/components#PaginationContent, @object-ui/components#PaginationEllipsis, @object-ui/components#PaginationItem, @object-ui/components#PaginationLink, @object-ui/components#PaginationNext, @object-ui/components#PaginationPrevious, @object-ui/components#SelectScrollDownButton, @object-ui/components#SelectScrollUpButton, @object-ui/components#SelectSeparator, @object-ui/components#TableCaption) the retired operands are React UI primitives of the components package; 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 that draw menubars, carousels, breadcrumbs and the rest 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 sixty-three 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`, `pagination`, `carousel`, `breadcrumb`, `context-menu`, `input-otp`, `table` and the rest) renders exactly as before.
13+
14+
Twelve of them are **gone from the package, not only from the entry**, because nothing inside the package read them either: `src/ui/typography.tsx` is deleted with `TypographyH1`, `TypographyH2`, `TypographyH3`, `TypographyH4`, `TypographyP`, `TypographyBlockquote`, `TypographyList`, `TypographyInlineCode`, `TypographyLead`, `TypographyLarge`, `TypographySmall` and `TypographyMuted`. It was not a shadcn registry component (`shadcn-components.json` does not list it).
15+
16+
The other fifty-one stay in their shadcn modules, which this package's own renderers read and which `pnpm shadcn:update` keeps in step with the registry, and only leave the entry:
17+
18+
- `alert-dialog`: `AlertDialogOverlay`, `AlertDialogPortal`
19+
- `breadcrumb`: `BreadcrumbEllipsis`, `BreadcrumbSeparator`
20+
- `carousel`: `CarouselContent`, `CarouselNext`, `CarouselPrevious`
21+
- `command`: `CommandShortcut`
22+
- `context-menu`: `ContextMenuCheckboxItem`, `ContextMenuGroup`, `ContextMenuLabel`, `ContextMenuPortal`, `ContextMenuRadioGroup`, `ContextMenuRadioItem`, `ContextMenuShortcut`
23+
- `drawer`: `DrawerOverlay`, `DrawerPortal`
24+
- `form`: `useFormField`
25+
- `input-otp`: `InputOTP`, `InputOTPSlot`
26+
- `menubar`: `MenubarCheckboxItem`, `MenubarContent`, `MenubarGroup`, `MenubarLabel`, `MenubarPortal`, `MenubarRadioGroup`, `MenubarRadioItem`, `MenubarSeparator`, `MenubarShortcut`, `MenubarSub`, `MenubarSubContent`, `MenubarSubTrigger`, `MenubarTrigger`
27+
- `navigation-menu`: `NavigationMenu`, `NavigationMenuContent`, `NavigationMenuIndicator`, `NavigationMenuLink`, `NavigationMenuList`, `NavigationMenuTrigger`, `NavigationMenuViewport`, `navigationMenuTriggerStyle`
28+
- `pagination`: `PaginationContent`, `PaginationEllipsis`, `PaginationItem`, `PaginationLink`, `PaginationNext`, `PaginationPrevious`
29+
- `select`: `SelectScrollDownButton`, `SelectScrollUpButton`, `SelectSeparator`
30+
- `table`: `TableCaption`
31+
32+
Every other name the entry exported stays exported unchanged, among them `AlertDialog` and its content parts, `Breadcrumb`, `BreadcrumbList`, `BreadcrumbItem`, `BreadcrumbLink`, `BreadcrumbPage`, `Carousel`, `CarouselItem`, the type `CarouselApi` (the `setApi` prop of `Carousel` names it), `Command` and its parts, `ContextMenu` with its content, item, separator and sub-menu parts, `Drawer` and its parts, `Form` and its field parts, `InputOTPGroup`, `InputOTPSeparator`, `Menubar`, `MenubarMenu`, `MenubarItem`, `NavigationMenuItem`, `Pagination`, `Select` and its parts, `Table` and its parts, and `toggleVariants` (the props of `Toggle` and `ToggleGroup` are typed by it).
33+
34+
What leaves, and what to write instead:
35+
36+
- FROM `TypographyH1` … `TypographyMuted` TO the plain element with the Tailwind classes you want (`h1`, `p`, `blockquote`, `code` and so on), or an `element:text` node with a heading `variant` such as `h2`.
37+
- FROM any of the fifty-one shadcn sub-parts TO the same primitive in the host's own tree (`npx shadcn@latest add menubar`, `navigation-menu`, `pagination`, `carousel`, …), or the Radix / Embla / input-otp / vaul primitive it wraps; or, to draw one of these from metadata, the matching schema node type, which this package still registers.
38+
- FROM `useFormField` TO `FormLabel`, `FormControl`, `FormDescription` and `FormMessage`, which read the same field state.

‎ui/apps/console/src/__tests__/preview-samples-registry-resolvable.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* through every spec release while resolving to nothing: `heading` has never
2323
* been registered in this repo (the nearest real things are `element:text`
2424
* with a heading `variant` such as `h2` (`heading` until 17.7.0 retired it), and the `ui/typography`
25-
* primitives, which never go through the registry at all). Both `heading`
25+
* primitives, which never went through the registry and are now deleted). Both `heading`
2626
* nodes in the `page` sample fell through to the ComponentRegistry fallback,
2727
* so the gallery's page card — the worked example of a composed page — showed
2828
* two fallback boxes where its title and its section heading should have been.

‎ui/packages/components/src/__tests__/snapshot-critical.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ import {
6161
BreadcrumbItem,
6262
BreadcrumbLink,
6363
BreadcrumbPage,
64-
BreadcrumbSeparator,
6564
Separator,
6665
Skeleton,
6766
} from '../index';
67+
import { BreadcrumbSeparator } from '../ui/breadcrumb';
6868

6969
// ─── Alert Snapshots ────────────────────────────────────────────────────
7070

‎ui/packages/components/src/renderers/complex/carousel.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
CarouselItem,
1515
CarouselPrevious,
1616
CarouselNext
17-
} from '../../ui';
17+
} from '../../ui/carousel';
1818
import { renderChildren } from '../../lib/utils';
1919

2020
ComponentRegistry.register('carousel',

‎ui/packages/components/src/renderers/complex/table.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
TableRow,
2525
TableCell,
2626
TableCaption
27-
} from '../../ui';
27+
} from '../../ui/table';
2828

2929
// A simple data-driven table
3030
ComponentRegistry.register('table',

‎ui/packages/components/src/renderers/form/input-otp.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { ComponentRegistry } from '@object-ui/core';
1010
import type { InputOTPSchema } from '@object-ui/types';
11-
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '../../ui';
11+
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '../../ui/input-otp';
1212
import { toFormControlDomProps } from '../../lib/form-control-dom-props';
1313
import type { RendererHostProps } from '../../lib/renderer-host-props';
1414

‎ui/packages/components/src/renderers/navigation/header-bar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ import {
1717
BreadcrumbList,
1818
BreadcrumbItem,
1919
BreadcrumbLink,
20-
BreadcrumbSeparator,
2120
BreadcrumbPage,
2221
DropdownMenu,
2322
DropdownMenuTrigger,
2423
DropdownMenuContent,
2524
DropdownMenuItem,
2625
Input,
2726
} from '../../ui';
27+
import { BreadcrumbSeparator } from '../../ui/breadcrumb';
2828
import { ChevronDown, Search } from 'lucide-react';
2929
// `crumbs` is typed `BreadcrumbItem[]` — the SAME declaration `ui:breadcrumb`'s
3030
// `items` uses — and `BreadcrumbItem.icon` is not merely declared but DESCRIBED

‎ui/packages/components/src/renderers/overlay/context-menu.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
ContextMenuSubTrigger,
1919
ContextMenuSubContent,
2020
ContextMenuShortcut
21-
} from '../../ui';
21+
} from '../../ui/context-menu';
2222
import { renderChildren } from '../../lib/utils';
2323
// Same-package sibling import, the path `renderers/complex/data-table.tsx`
2424
// already uses. `icon` on a menu item is an authored lucide NAME. The twin

‎ui/packages/components/src/ui/index.ts‎

Lines changed: 83 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ui/packages/components/src/ui/typography.tsx‎

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

0 commit comments

Comments
 (0)