Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .changeset/25921-components-zero-consumer-exports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
'@object-ui/components': patch
---

refactor(components)!: retire sixty-three zero-consumer shadcn sub-part exports, and delete the typography primitives nothing reads

Clause-②: no (narrowing)
Metadata-protocol: none

<!-- 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 -->

**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.

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).

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:

- `alert-dialog`: `AlertDialogOverlay`, `AlertDialogPortal`
- `breadcrumb`: `BreadcrumbEllipsis`, `BreadcrumbSeparator`
- `carousel`: `CarouselContent`, `CarouselNext`, `CarouselPrevious`
- `command`: `CommandShortcut`
- `context-menu`: `ContextMenuCheckboxItem`, `ContextMenuGroup`, `ContextMenuLabel`, `ContextMenuPortal`, `ContextMenuRadioGroup`, `ContextMenuRadioItem`, `ContextMenuShortcut`
- `drawer`: `DrawerOverlay`, `DrawerPortal`
- `form`: `useFormField`
- `input-otp`: `InputOTP`, `InputOTPSlot`
- `menubar`: `MenubarCheckboxItem`, `MenubarContent`, `MenubarGroup`, `MenubarLabel`, `MenubarPortal`, `MenubarRadioGroup`, `MenubarRadioItem`, `MenubarSeparator`, `MenubarShortcut`, `MenubarSub`, `MenubarSubContent`, `MenubarSubTrigger`, `MenubarTrigger`
- `navigation-menu`: `NavigationMenu`, `NavigationMenuContent`, `NavigationMenuIndicator`, `NavigationMenuLink`, `NavigationMenuList`, `NavigationMenuTrigger`, `NavigationMenuViewport`, `navigationMenuTriggerStyle`
- `pagination`: `PaginationContent`, `PaginationEllipsis`, `PaginationItem`, `PaginationLink`, `PaginationNext`, `PaginationPrevious`
- `select`: `SelectScrollDownButton`, `SelectScrollUpButton`, `SelectSeparator`
- `table`: `TableCaption`

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).

What leaves, and what to write instead:

- FROM `TypographyH1`, `TypographyH2`, `TypographyH3`, `TypographyH4`, `TypographyP`, `TypographyBlockquote`, `TypographyList`, `TypographyInlineCode`, `TypographyLead`, `TypographyLarge`, `TypographySmall`, `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`.
- FROM `AlertDialogOverlay`, `AlertDialogPortal` TO `AlertDialogContent`, which already mounts the portal and the overlay.
- FROM `BreadcrumbEllipsis`, `BreadcrumbSeparator` TO the same parts in the host's own tree (`npx shadcn@latest add breadcrumb`), or a `breadcrumb` schema node, which draws the separators and the collapsed-crumb ellipsis itself.
- FROM `CarouselContent`, `CarouselNext`, `CarouselPrevious` TO the same parts in the host's own tree (`npx shadcn@latest add carousel`), or a `carousel` schema node.
- FROM `CommandShortcut` TO a `kbd` element (or `Kbd`) inside `CommandItem`.
- FROM `ContextMenuCheckboxItem`, `ContextMenuGroup`, `ContextMenuLabel`, `ContextMenuPortal`, `ContextMenuRadioGroup`, `ContextMenuRadioItem`, `ContextMenuShortcut` TO the same parts in the host's own tree (`npx shadcn@latest add context-menu`), or the `@radix-ui/react-context-menu` primitive they wrap.
- FROM `DrawerOverlay`, `DrawerPortal` TO `DrawerContent`, which already mounts the portal and the overlay.
- FROM `useFormField` TO `FormLabel`, `FormControl`, `FormDescription` and `FormMessage`, which read the same field state.
- FROM `InputOTP`, `InputOTPSlot` TO the same parts in the host's own tree (`npx shadcn@latest add input-otp`), or an `input-otp` schema node.
- FROM `MenubarCheckboxItem`, `MenubarContent`, `MenubarGroup`, `MenubarLabel`, `MenubarPortal`, `MenubarRadioGroup`, `MenubarRadioItem`, `MenubarSeparator`, `MenubarShortcut`, `MenubarSub`, `MenubarSubContent`, `MenubarSubTrigger`, `MenubarTrigger` TO the same parts in the host's own tree (`npx shadcn@latest add menubar`), or a `menubar` schema node.
- FROM `NavigationMenu`, `NavigationMenuContent`, `NavigationMenuIndicator`, `NavigationMenuLink`, `NavigationMenuList`, `NavigationMenuTrigger`, `NavigationMenuViewport`, `navigationMenuTriggerStyle` TO the same parts in the host's own tree (`npx shadcn@latest add navigation-menu`), or a `navigation-menu` schema node.
- FROM `PaginationContent`, `PaginationEllipsis`, `PaginationItem`, `PaginationLink`, `PaginationNext`, `PaginationPrevious` TO the same parts in the host's own tree (`npx shadcn@latest add pagination`), or a `pagination` schema node.
- FROM `SelectScrollDownButton`, `SelectScrollUpButton`, `SelectSeparator` TO `SelectContent`, which already draws the scroll buttons, and `Separator` between groups.
- FROM `TableCaption` TO a `caption` element inside `Table`.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* through every spec release while resolving to nothing: `heading` has never
* been registered in this repo (the nearest real things are `element:text`
* with a heading `variant` such as `h2` (`heading` until 17.7.0 retired it), and the `ui/typography`
* primitives, which never go through the registry at all). Both `heading`
* primitives, which never went through the registry and are now deleted). Both `heading`
* nodes in the `page` sample fell through to the ComponentRegistry fallback,
* so the gallery's page card — the worked example of a composed page — showed
* two fallback boxes where its title and its section heading should have been.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ import {
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbPage,
BreadcrumbSeparator,
Separator,
Skeleton,
} from '../index';
import { BreadcrumbSeparator } from '../ui/breadcrumb';

// ─── Alert Snapshots ────────────────────────────────────────────────────

Expand Down
2 changes: 1 addition & 1 deletion ui/packages/components/src/renderers/complex/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
CarouselItem,
CarouselPrevious,
CarouselNext
} from '../../ui';
} from '../../ui/carousel';
import { renderChildren } from '../../lib/utils';

ComponentRegistry.register('carousel',
Expand Down
2 changes: 1 addition & 1 deletion ui/packages/components/src/renderers/complex/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
TableRow,
TableCell,
TableCaption
} from '../../ui';
} from '../../ui/table';

// A simple data-driven table
ComponentRegistry.register('table',
Expand Down
2 changes: 1 addition & 1 deletion ui/packages/components/src/renderers/form/input-otp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import {
BreadcrumbList,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbSeparator,
BreadcrumbPage,
DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
Input,
} from '../../ui';
import { BreadcrumbSeparator } from '../../ui/breadcrumb';
import { ChevronDown, Search } from 'lucide-react';
// `crumbs` is typed `BreadcrumbItem[]` — the SAME declaration `ui:breadcrumb`'s
// `items` uses — and `BreadcrumbItem.icon` is not merely declared but DESCRIBED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ContextMenuSubTrigger,
ContextMenuSubContent,
ContextMenuShortcut
} from '../../ui';
} from '../../ui/context-menu';
import { renderChildren } from '../../lib/utils';
// Same-package sibling import, the path `renderers/complex/data-table.tsx`
// already uses. `icon` on a menu item is an authored lucide NAME. The twin
Expand Down
97 changes: 83 additions & 14 deletions ui/packages/components/src/ui/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 0 additions & 85 deletions ui/packages/components/src/ui/typography.tsx

This file was deleted.

Loading