TypeScript
Refine PDF editor controls and sidebar behavior
Andrew Luo575a02bcfc5a
diff --git a/README.md b/README.mdindex b305219..b7191bf 100644--- a/README.md+++ b/README.md@@ -32,7 +32,17 @@ and Tailwind code.## Getting Started-Install a component with the shadcn CLI:+Configure the style-aware registry in your `components.json`:++```json+{+ "registries": {+ "@extend": "https://www.extend.ai/ui/r/styles/{style}/{name}.json"+ }+}+```++Then install a component with the shadcn CLI:```bashnpx shadcn@latest add @extend/pdf-viewer@@ -41,10 +51,10 @@ npx shadcn@latest add @extend/pdf-viewerThen render the installed component from your app:```tsx-import { PDFViewer } from "@/components/ui/pdf-viewer"+import { PDFViewer } from "@/components/extend/pdf-viewer"export default function Page() {- return <PDFViewer file="/sample.pdf" className="h-[720px]" />+ return <PDFViewer src="/sample.pdf" className="h-[720px]" />}```@@ -53,13 +63,19 @@ The `react-pdf` version of the PDF viewer is available atExtend UI components are copied into your project as source, so you can adaptthem to your app. Shared primitives such as `Button`, `Select`, `Dialog`,-`ScrollArea`, and `Tooltip` are expected to use the primitives your app already-has. If your project uses a different alias or design-system path, update the+and `Tooltip` are imported directly from your existing UI components. The+registry selects Base or Radix source using your configured style and transforms+icons for your selected icon library. Keep existing primitives when the CLI+asks about overwriting them. If your project uses a different alias or design-system path, update thegenerated imports to match, for example changing`@/components/ui/button` or `@/components/ui/select` to your local primitivepaths. You can also set those aliases in `components.json` before installing sonew components are generated closer to your app structure.+Use current shadcn primitive APIs. The historical `default` style is+[deprecated upstream](https://ui.shadcn.com/docs/components-json#style) and must+be migrated before installing.+## Examples### Layout Blocks@@ -74,7 +90,7 @@ npx shadcn@latest add @extend/layout-blocks-block``````tsx-import type { ParsedOcrOutput } from "@/components/ui/layout-blocks"+import type { ParsedOcrOutput } from "@/components/extend/layout-blocks"import { OcrBlocksBlock } from "@/components/blocks/layout-blocks-block"const output: ParsedOcrOutput = {@@ -113,7 +129,7 @@ npx shadcn@latest add @extend/bounding-box-citations-block``````tsx-import type { ReviewField } from "@/components/ui/bounding-box-citations"+import type { ReviewField } from "@/components/extend/bounding-box-citations"import { HumanReviewBlock } from "@/components/blocks/bounding-box-citations-block"const fields: ReviewField[] = [@@ -157,7 +173,7 @@ npx shadcn@latest add @extend/file-system-block``````tsx-import type { FileSystemItem } from "@/components/ui/file-system"+import type { FileSystemItem } from "@/components/extend/file-system"import { FileSystemBlock } from "@/components/blocks/file-system-block"const items: FileSystemItem[] = [diff --git a/apps/v4/app/r/[...path]/route.ts b/apps/v4/app/r/[...path]/route.tsindex 3ac5ef4..bccd8fc 100644--- a/apps/v4/app/r/[...path]/route.ts+++ b/apps/v4/app/r/[...path]/route.ts@@ -1,6 +1,11 @@import { readFile } from "node:fs/promises"import path from "node:path"+import {+ getRegistryFamily,+ styleRegistryDependencies,+} from "@/lib/registry-style"+export const dynamic = "force-dynamic"type RegistryCatalog = {@@ -8,6 +13,12 @@ type RegistryCatalog = {[key: string]: unknown}+type RegistryItem = {+ name: string+ registryDependencies?: string[]+ [key: string]: unknown+}+class RegistryJsonNotFoundError extends Error {constructor(readonly fileName: string) {super(`Registry JSON file "${fileName}" was not found.`)@@ -17,6 +28,15 @@ class RegistryJsonNotFoundError extends Error {const registryJsonCache = new Map<string, Promise<unknown>>()function parseRegistryPath(pathSegments: string[]) {+ if (pathSegments.length === 3 && pathSegments[0] === "styles") {+ const [, style, segment] = pathSegments+ const match = /^([a-z0-9-]+)\.json$/.exec(segment)++ if (!match || !/^[a-z0-9-]+$/.test(style)) return null++ return { name: match[1], style, type: "item" as const }+ }+if (pathSegments.length !== 1) return nullconst [segment] = pathSegments@@ -29,7 +49,7 @@ function parseRegistryPath(pathSegments: string[]) {if (!match) return null- return { name: match[1], type: "item" as const }+ return { name: match[1], style: undefined, type: "item" as const }}function isFileNotFoundError(error: unknown) {@@ -104,9 +124,25 @@ export async function GET()}- return Response.json(- await loadBuiltRegistryJson<unknown>(`${parsedPath.name}.json`)+ const family = parsedPath.style ? getRegistryFamily(parsedPath.style) : null++ if (parsedPath.style && !family) {+ return Response.json(+ { error: `Registry style "${parsedPath.style}" is not supported.` },+ { status: 404 }+ )+ }++ const builtItem = await loadBuiltRegistryJson<RegistryItem>(+ family+ ? `bases/${family}/${parsedPath.name}.json`+ : `${parsedPath.name}.json`)+ const item = parsedPath.style+ ? styleRegistryDependencies(builtItem, parsedPath.style)+ : builtItem++ return Response.json(item)} catch (error) {if (error instanceof RegistryJsonNotFoundError) {return Response.json(diff --git a/apps/v4/components.json b/apps/v4/components.jsonindex 4c014c4..eb57b60 100644--- a/apps/v4/components.json+++ b/apps/v4/components.json@@ -19,7 +19,7 @@"hooks": "@/hooks"},"registries": {- "@extend": "https://www.extend.ai/ui/r/{name}.json",+ "@extend": "https://www.extend.ai/ui/r/styles/{style}/{name}.json","@coss": "https://coss.com/ui/r/{name}.json"}}diff --git a/apps/v4/components/extend/bounding-box-citations.tsx b/apps/v4/components/extend/bounding-box-citations.tsxindex 02e9109..0090f43 100644--- a/apps/v4/components/extend/bounding-box-citations.tsx+++ b/apps/v4/components/extend/bounding-box-citations.tsx@@ -30,6 +30,7 @@ import {} from "@pierre/diffs/react"import { flushSync } from "react-dom"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"import { Input } from "@/components/ui/input"@@ -45,7 +46,7 @@ import { IconPlaceholder } from "@/components/icon-placeholder"import "@glideapps/glide-data-grid/dist/index.css"-function InputNumericGlyph(props: React.ComponentProps<"svg">) {+function InputNumericGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Hash"@@ -58,7 +59,7 @@ function InputNumericGlyph(props: React.ComponentProps<"svg">) {)}-function InputTextGlyph(props: React.ComponentProps<"svg">) {+function InputTextGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="TextCursorInput"@@ -71,7 +72,7 @@ function InputTextGlyph(props: React.ComponentProps<"svg">) {)}-function SecondBracketGlyph(props: React.ComponentProps<"svg">) {+function SecondBracketGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Brackets"@@ -84,7 +85,7 @@ function SecondBracketGlyph(props: React.ComponentProps<"svg">) {)}-function SourceCodeSquareGlyph(props: React.ComponentProps<"svg">) {+function SourceCodeSquareGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="SquareCode"@@ -97,7 +98,7 @@ function SourceCodeSquareGlyph(props: React.ComponentProps<"svg">) {)}-function TextCheckGlyph(props: React.ComponentProps<"svg">) {+function TextCheckGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="CaptionsIcon"@@ -233,7 +234,6 @@ function ScrollAreaVirtualizer({)}-const DEFAULT_ZOOM = 1const REVIEW_HIGHLIGHT_STYLE ="border-blue-500/70 bg-blue-500/12 shadow-[0_4px_16px_rgb(59_130_246_/_10%)]"diff --git a/apps/v4/components/extend/document-preview-card.tsx b/apps/v4/components/extend/document-preview-card.tsxnew file mode 100644index 0000000..a112991--- /dev/null+++ b/apps/v4/components/extend/document-preview-card.tsx@@ -0,0 +1,71 @@+"use client"++import * as React from "react"+import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"++export function PreviewCard({+ closeDelay: _closeDelay,+ openDelay: _openDelay,+ ...props+}: PreviewCardPrimitive.Root.Props & {+ closeDelay?: number+ openDelay?: number+}) {+ return <PreviewCardPrimitive.Root {...props} />+}++export function PreviewCardTrigger({+ asChild,+ children,+ closeDelay = 120,+ delay = 0,+ render,+ ...props+}: PreviewCardPrimitive.Trigger.Props & { asChild?: boolean }) {+ return (+ <PreviewCardPrimitive.Trigger+ closeDelay={closeDelay}+ delay={delay}+ render={+ render ??+ (asChild && React.isValidElement(children)+ ? (children as React.ReactElement<Record<string, unknown>>)+ : undefined)+ }+ {...props}+ >+ {asChild && React.isValidElement(children) ? undefined : children}+ </PreviewCardPrimitive.Trigger>+ )+}++export function PreviewCardContent({+ align = "start",+ alignOffset = 0,+ children,+ className,+ side = "right",+ sideOffset = 10,+ ...props+}: PreviewCardPrimitive.Popup.Props & {+ align?: PreviewCardPrimitive.Positioner.Props["align"]+ alignOffset?: PreviewCardPrimitive.Positioner.Props["alignOffset"]+ side?: PreviewCardPrimitive.Positioner.Props["side"]+ sideOffset?: PreviewCardPrimitive.Positioner.Props["sideOffset"]+}) {+ return (+ <PreviewCardPrimitive.Portal>+ <PreviewCardPrimitive.Positioner+ align={align}+ alignOffset={alignOffset}+ className="z-40"+ side={side}+ sideOffset={sideOffset}+ >+ <PreviewCardPrimitive.Popup className={className} {...props}>+ {children}+ </PreviewCardPrimitive.Popup>+ </PreviewCardPrimitive.Positioner>+ </PreviewCardPrimitive.Portal>+ )+}diff --git a/apps/v4/components/extend/document-scroll-content.tsx b/apps/v4/components/extend/document-scroll-content.tsxnew file mode 100644index 0000000..061a74a--- /dev/null+++ b/apps/v4/components/extend/document-scroll-content.tsx@@ -0,0 +1,5 @@+"use client"++import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"++export const ScrollAreaContent = ScrollAreaPrimitive.Contentdiff --git a/apps/v4/components/extend/docx-annotation-card.tsx b/apps/v4/components/extend/docx-annotation-card.tsxindex a094a48..0c16d2b 100644--- a/apps/v4/components/extend/docx-annotation-card.tsx+++ b/apps/v4/components/extend/docx-annotation-card.tsx@@ -7,12 +7,21 @@ import type {DocxTrackedChangeCardRenderProps,} from "@extend-ai/react-docx"+import { cn } from "@/lib/utils"import { Badge } from "@/components/ui/badge"import { Card } from "@/components/ui/card"+type AnnotationBadgeVariant =+ | "outline"+ | "secondary"+ | "success"+ | "error"+ | "warning"+ | "info"+function trackedChangeBadgeVariant(kind: DocxTrackedChangeCardRenderProps["change"]["kind"]-): React.ComponentProps<typeof Badge>["variant"] {+): AnnotationBadgeVariant {switch (kind) {case "insertion":case "move-to":@@ -55,7 +64,7 @@ function DocxAnnotationCard({}: {anchorText?: stringbadge: string- badgeVariant?: React.ComponentProps<typeof Badge>["variant"]+ badgeVariant?: AnnotationBadgeVariantdate?: stringdocumentTheme: DocxDocumentThememeta: string@@ -92,9 +101,18 @@ function DocxAnnotationCard({{date ? <div className="mt-0.5 truncate">{date}</div> : null}</div><Badge- variant={badgeVariant}+ variant={badgeVariant === "outline" ? "outline" : "secondary"}size="sm"- className="max-w-[92px] truncate"+ className={cn(+ "max-w-[92px] truncate",+ badgeVariant === "success" &&+ "bg-green-500/10 text-green-700 dark:text-green-300",+ badgeVariant === "error" && "bg-destructive/10 text-destructive",+ badgeVariant === "warning" &&+ "bg-amber-500/10 text-amber-700 dark:text-amber-300",+ badgeVariant === "info" &&+ "bg-blue-500/10 text-blue-700 dark:text-blue-300"+ )}>{badge}</Badge>diff --git a/apps/v4/components/extend/docx-editor.tsx b/apps/v4/components/extend/docx-editor.tsxindex 9e35053..fff1978 100644--- a/apps/v4/components/extend/docx-editor.tsx+++ b/apps/v4/components/extend/docx-editor.tsx@@ -1,7 +1,6 @@"use client"import * as React from "react"-import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"import {DocxEditorViewer,paragraphLetterheadFloatSideAtNodeIndex,@@ -21,6 +20,7 @@ import {type ParagraphStyleDefinition,} from "@extend-ai/react-docx"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"import { ColorPicker } from "@/components/ui/color-picker"@@ -49,6 +49,11 @@ import {TooltipProvider,TooltipTrigger,} from "@/components/ui/tooltip"+import {+ PreviewCard,+ PreviewCardContent,+ PreviewCardTrigger,+} from "@/components/extend/document-preview-card"import {DocumentViewerThumbnailSidebar,useElementWidth,@@ -61,7 +66,7 @@ import {import { FileThumbnail } from "@/components/extend/file-thumbnail"import { IconPlaceholder } from "@/components/icon-placeholder"-function ArrowExpandDiagonal01Glyph(props: React.ComponentProps<"svg">) {+function ArrowExpandDiagonal01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="ArrowDownRight"@@ -74,7 +79,7 @@ function ArrowExpandDiagonal01Glyph(props: React.ComponentProps<"svg">) {)}-function ArrowExpandDiagonal02Glyph(props: React.ComponentProps<"svg">) {+function ArrowExpandDiagonal02Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="ArrowUpRight"@@ -87,7 +92,7 @@ function ArrowExpandDiagonal02Glyph(props: React.ComponentProps<"svg">) {)}-function BorderAll01Glyph(props: React.ComponentProps<"svg">) {+function BorderAll01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Grid2x2"@@ -100,7 +105,7 @@ function BorderAll01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderBottom01Glyph(props: React.ComponentProps<"svg">) {+function BorderBottom01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelBottom"@@ -113,7 +118,7 @@ function BorderBottom01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderHorizontalGlyph(props: React.ComponentProps<"svg">) {+function BorderHorizontalGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="SeparatorHorizontal"@@ -126,7 +131,7 @@ function BorderHorizontalGlyph(props: React.ComponentProps<"svg">) {)}-function BorderInnerGlyph(props: React.ComponentProps<"svg">) {+function BorderInnerGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="SquarePlus"@@ -139,7 +144,7 @@ function BorderInnerGlyph(props: React.ComponentProps<"svg">) {)}-function BorderLeft01Glyph(props: React.ComponentProps<"svg">) {+function BorderLeft01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelLeft"@@ -152,7 +157,7 @@ function BorderLeft01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderNone01Glyph(props: React.ComponentProps<"svg">) {+function BorderNone01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="SquareDashed"@@ -165,7 +170,7 @@ function BorderNone01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderRight01Glyph(props: React.ComponentProps<"svg">) {+function BorderRight01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelRight"@@ -178,7 +183,7 @@ function BorderRight01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderTop01Glyph(props: React.ComponentProps<"svg">) {+function BorderTop01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelTop"@@ -191,7 +196,7 @@ function BorderTop01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderVerticalGlyph(props: React.ComponentProps<"svg">) {+function BorderVerticalGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="SeparatorVertical"@@ -204,7 +209,7 @@ function BorderVerticalGlyph(props: React.ComponentProps<"svg">) {)}-function LineGlyph(props: React.ComponentProps<"svg">) {+function LineGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Minus"@@ -217,7 +222,7 @@ function LineGlyph(props: React.ComponentProps<"svg">) {)}-function Moon02Glyph(props: React.ComponentProps<"svg">) {+function Moon02Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Moon"@@ -230,7 +235,7 @@ function Moon02Glyph(props: React.ComponentProps<"svg">) {)}-function Sun03Glyph(props: React.ComponentProps<"svg">) {+function Sun03Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Sun"@@ -243,7 +248,7 @@ function Sun03Glyph(props: React.ComponentProps<"svg">) {)}-function TextColorGlyph(props: React.ComponentProps<"svg">) {+function TextColorGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Baseline"@@ -647,13 +652,6 @@ function paragraphStylePreviewStyle(}}-function paragraphStylePreviewTriggerId(prefix: string, styleId: string) {- return `${prefix}-paragraph-style-preview-${styleId.replace(- /[^a-zA-Z0-9_-]/g,- "_"- )}`-}-function parseToolbarSectionColumns(sectionPropertiesXml?: string): { count: number; gapPx: number } | undefined {@@ -877,27 +875,9 @@ function DocxEditorToolbar({paragraphStyleOptions.find((option) => "isDefault" in option)?.id ??paragraphStyleOptions[0]?.id ??"Normal"- const selectedParagraphStyleOption =- paragraphStyleOptions.find(- (option) => option.id === selectedParagraphStyleValue- ) ??- paragraphStyleOptions[0] ??- FALLBACK_PARAGRAPH_STYLE_OPTIONS[0]- const paragraphStylePreviewHandle = React.useMemo(- () => PreviewCardPrimitive.createHandle<ParagraphStyleDefinition>(),- []- )- const paragraphStylePreviewIdPrefix = React.useId()- const [isParagraphStyleMenuOpen, setIsParagraphStyleMenuOpen] =- React.useState(false)- const openParagraphStylePreview = React.useCallback(- (styleId: string) => {- paragraphStylePreviewHandle.open(- paragraphStylePreviewTriggerId(paragraphStylePreviewIdPrefix, styleId)- )- },- [paragraphStylePreviewHandle, paragraphStylePreviewIdPrefix]- )+ const [paragraphStylePreviewId, setParagraphStylePreviewId] = React.useState<+ string | null+ >(null)const selectedLineSpacingValue = React.useMemo(() => {const current = Number.isFinite(lineSpacing.multiple)? lineSpacing.multiple@@ -1161,109 +1141,71 @@ function DocxEditorToolbar({<ToolbarSeparator />- <PreviewCardPrimitive.Root handle={paragraphStylePreviewHandle}>- {({ payload }) => {- const previewOption = payload ?? selectedParagraphStyleOption-- return (- <>- <Select- value={selectedParagraphStyleValue}- onOpenChange={(open) => {- setIsParagraphStyleMenuOpen(open)-- if (!open) {- paragraphStylePreviewHandle.close()- return- }-- window.requestAnimationFrame(() => {- openParagraphStylePreview(selectedParagraphStyleValue)- })- }}- onValueChange={(value) => {- if (value) {- setParagraphStyle(value)- }- }}- disabled={!canEdit}- modal={false}- >- <SelectTrigger- size="sm"- className="w-[136px] min-w-[136px]"- aria-label="Paragraph style"- >- <SelectValue placeholder="Style" />- </SelectTrigger>- <SelectContent- align="start"- alignItemWithTrigger={false}- className="z-40 min-w-[210px]"- >- {paragraphStyleOptions.map((option) => {- const previewTriggerId = paragraphStylePreviewTriggerId(- paragraphStylePreviewIdPrefix,- option.id- )-- return (- <SelectItem- key={option.id}- value={option.id}- label={option.name}- className="relative min-w-[190px]"- onFocus={() => openParagraphStylePreview(option.id)}- onPointerEnter={() =>- openParagraphStylePreview(option.id)- }- >- <span className="block truncate">- {option.name}- </span>- <PreviewCardPrimitive.Trigger- id={previewTriggerId}- handle={paragraphStylePreviewHandle}- payload={option}- delay={0}- closeDelay={120}- render={- <span- aria-hidden="true"- className="pointer-events-none absolute inset-0 block"- />- }- />- </SelectItem>- )- })}- </SelectContent>- </Select>- {isParagraphStyleMenuOpen && previewOption ? (- <PreviewCardPrimitive.Portal>- <PreviewCardPrimitive.Positioner- side="right"- align="start"- sideOffset={10}- alignOffset={-4}- className="z-40 transition-[top,left,right,bottom,transform] duration-100 ease-out data-instant:transition-none"- >- <PreviewCardPrimitive.Popup- data-slot="paragraph-style-preview-card"- className="origin-(--transform-origin) rounded-lg border bg-popover text-popover-foreground shadow-lg/5 transition-opacity duration-100 outline-none not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]"- >- <ParagraphStylePreviewCard- documentTheme={documentTheme}- option={previewOption}- />- </PreviewCardPrimitive.Popup>- </PreviewCardPrimitive.Positioner>- </PreviewCardPrimitive.Portal>- ) : null}- </>- )+ <Select+ value={selectedParagraphStyleValue}+ onOpenChange={() => setParagraphStylePreviewId(null)}+ onValueChange={(value) => {+ if (value) {+ setParagraphStyle(value)+ }}}- </PreviewCardPrimitive.Root>+ disabled={!canEdit}+ modal={false}+ >+ <SelectTrigger+ size="sm"+ className="w-[136px] min-w-[136px]"+ aria-label="Paragraph style"+ >+ <SelectValue placeholder="Style" />+ </SelectTrigger>+ <SelectContent+ align="start"+ alignItemWithTrigger={false}+ className="z-40 min-w-[210px]"+ >+ {paragraphStyleOptions.map((option) => (+ <PreviewCard+ key={option.id}+ open={paragraphStylePreviewId === option.id}+ onOpenChange={(open) => {+ setParagraphStylePreviewId((current) =>+ open ? option.id : current === option.id ? null : current+ )+ }}+ openDelay={0}+ closeDelay={120}+ >+ <SelectItem+ value={option.id}+ label={option.name}+ className="relative min-w-[190px]"+ onFocus={() => setParagraphStylePreviewId(option.id)}+ onPointerEnter={() => setParagraphStylePreviewId(option.id)}+ >+ <PreviewCardTrigger asChild>+ <span className="block w-full truncate">+ {option.name}+ </span>+ </PreviewCardTrigger>+ </SelectItem>+ <PreviewCardContent+ side="right"+ align="start"+ sideOffset={10}+ alignOffset={-4}+ data-slot="paragraph-style-preview-card"+ className="origin-(--transform-origin) rounded-lg border bg-popover text-popover-foreground shadow-lg/5 transition-opacity duration-100 outline-none not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]"+ >+ <ParagraphStylePreviewCard+ documentTheme={documentTheme}+ option={option}+ />+ </PreviewCardContent>+ </PreviewCard>+ ))}+ </SelectContent>+ </Select><Selectvalue={selectedRunStyle?.fontFamily ?? "Calibri"}diff --git a/apps/v4/components/extend/file-system.tsx b/apps/v4/components/extend/file-system.tsxindex 4e1b6fa..c5ca43a 100644--- a/apps/v4/components/extend/file-system.tsx+++ b/apps/v4/components/extend/file-system.tsx@@ -11,6 +11,7 @@ import {import { FileTree as PierreFileTree, useFileTree } from "@pierre/trees/react"import { createPortal } from "react-dom"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"import {@@ -45,7 +46,7 @@ import {PopoverContent,PopoverTrigger,} from "@/components/ui/popover"-import { ScrollArea, ScrollAreaPrimitive } from "@/components/ui/scroll-area"+import { ScrollArea } from "@/components/ui/scroll-area"import {Select,SelectContent,@@ -55,10 +56,11 @@ import {} from "@/components/ui/select"import { Spinner } from "@/components/ui/spinner"import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"+import { ScrollAreaContent } from "@/components/extend/document-scroll-content"import { FileThumbnail } from "@/components/extend/file-thumbnail"import { IconPlaceholder } from "@/components/icon-placeholder"-function ArrowDown01Glyph(props: React.ComponentProps<"svg">) {+function ArrowDown01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="ChevronDown"@@ -71,7 +73,7 @@ function ArrowDown01Glyph(props: React.ComponentProps<"svg">) {)}-function ArrowUp01Glyph(props: React.ComponentProps<"svg">) {+function ArrowUp01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="ChevronUp"@@ -84,7 +86,7 @@ function ArrowUp01Glyph(props: React.ComponentProps<"svg">) {)}-function Calendar03Glyph(props: React.ComponentProps<"svg">) {+function Calendar03Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Calendar"@@ -97,7 +99,7 @@ function Calendar03Glyph(props: React.ComponentProps<"svg">) {)}-function File01Glyph(props: React.ComponentProps<"svg">) {+function File01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="FileArchiveIcon"@@ -110,7 +112,7 @@ function File01Glyph(props: React.ComponentProps<"svg">) {)}-function GalleryThumbnailsGlyph(props: React.ComponentProps<"svg">) {+function GalleryThumbnailsGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="GalleryThumbnails"@@ -123,7 +125,7 @@ function GalleryThumbnailsGlyph(props: React.ComponentProps<"svg">) {)}-function GridViewGlyph(props: React.ComponentProps<"svg">) {+function GridViewGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="LayoutGrid"@@ -136,7 +138,7 @@ function GridViewGlyph(props: React.ComponentProps<"svg">) {)}-function LayoutThreeColumnGlyph(props: React.ComponentProps<"svg">) {+function LayoutThreeColumnGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Columns3"@@ -149,7 +151,7 @@ function LayoutThreeColumnGlyph(props: React.ComponentProps<"svg">) {)}-function LeftToRightListBulletGlyph(props: React.ComponentProps<"svg">) {+function LeftToRightListBulletGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Columns3Icon"@@ -1423,7 +1425,7 @@ function FileVisual({}const VIEW_OPTIONS: Array<{- icon: React.ComponentType<React.ComponentProps<"svg">>+ icon: React.ComponentType<RegistryIconProps>label: stringvalue: FileSystemView}> = [@@ -2142,18 +2144,24 @@ export function FileSystem({const activeViewOption = VIEW_OPTIONS.find((option) => option.value === view)const viewerCloseToolbarAction = (<DialogClose- aria-label="Close preview"- render={<Button type="button" variant="ghost" size="icon-sm" />}- >- <IconPlaceholder- lucide="X"- tabler="IconX"- hugeicons="Cancel01Icon"- phosphor="XIcon"- remixicon="RiCloseLine"- className="size-4"- />- </DialogClose>+ render={+ <Button+ type="button"+ variant="ghost"+ size="icon-sm"+ aria-label="Close preview"+ >+ <IconPlaceholder+ lucide="X"+ tabler="IconX"+ hugeicons="Cancel01Icon"+ phosphor="XIcon"+ remixicon="RiCloseLine"+ className="size-4"+ />+ </Button>+ }+ ></DialogClose>)return (@@ -2566,27 +2574,25 @@ function FileSystemSearchField({return (<Popover open={isExpanded} onOpenChange={onExpandedChange}>- <PopoverTrigger- render={- <button- type="button"- aria-label="Search"- title="Search"- className={cn(TOOLBAR_ICON_BUTTON_CLASSNAME, "relative")}+ <PopoverTrigger asChild>+ <button+ type="button"+ aria-label="Search"+ title="Search"+ className={cn(TOOLBAR_ICON_BUTTON_CLASSNAME, "relative")}+ >+ <IconPlaceholder+ lucide="Search"+ tabler="IconSearch"+ hugeicons="Search01Icon"+ phosphor="MagnifyingGlassIcon"+ remixicon="RiSearchLine"+ className="size-4"/>- }- >- <IconPlaceholder- lucide="Search"- tabler="IconSearch"- hugeicons="Search01Icon"- phosphor="MagnifyingGlassIcon"- remixicon="RiSearchLine"- className="size-4"- />- {value ? (- <span className="absolute top-1 right-1 size-1.5 rounded-full bg-primary" />- ) : null}+ {value ? (+ <span className="absolute top-1 right-1 size-1.5 rounded-full bg-primary" />+ ) : null}+ </button></PopoverTrigger><PopoverContent align="end" sideOffset={6} className="w-64 p-1">{input}@@ -2756,29 +2762,27 @@ function FileSystemFilterMenu({return (<DropdownMenu>- <DropdownMenuTrigger- render={- <Button- type="button"- variant="outline"- size="icon-sm"- aria-label="Filter"- title="Filter"- className="relative size-7 sm:size-7"+ <DropdownMenuTrigger asChild>+ <Button+ type="button"+ variant="outline"+ size="icon-sm"+ aria-label="Filter"+ title="Filter"+ className="relative size-7 sm:size-7"+ >+ <IconPlaceholder+ lucide="Filter"+ tabler="IconFilter"+ hugeicons="FilterIcon"+ phosphor="FunnelIcon"+ remixicon="RiFilterLine"+ className="size-4"/>- }- >- <IconPlaceholder- lucide="Filter"- tabler="IconFilter"- hugeicons="FilterIcon"- phosphor="FunnelIcon"- remixicon="RiFilterLine"- className="size-4"- />- {filters.length > 0 ? (- <span className="absolute top-1 right-1 size-1.5 rounded-full bg-primary" />- ) : null}+ {filters.length > 0 ? (+ <span className="absolute top-1 right-1 size-1.5 rounded-full bg-primary" />+ ) : null}+ </Button></DropdownMenuTrigger><DropdownMenuContent align="end" className="min-w-44"><DropdownMenuSub>@@ -2891,15 +2895,13 @@ function FileSystemFilterPill({{FILTER_TYPE_LABELS[filter.type]}</span><DropdownMenu>- <DropdownMenuTrigger- render={- <button- type="button"- className={cn(FILTER_PILL_BUTTON_CLASSNAME, "text-primary")}- />- }- >- {FILTER_OPERATOR_LABELS[filter.operator]}+ <DropdownMenuTrigger asChild>+ <button+ type="button"+ className={cn(FILTER_PILL_BUTTON_CLASSNAME, "text-primary")}+ >+ {FILTER_OPERATOR_LABELS[filter.operator]}+ </button></DropdownMenuTrigger><DropdownMenuContent align="start" className="min-w-28">{filterOperatorChoices(filter).map((operator) => (@@ -2914,18 +2916,16 @@ function FileSystemFilterPill({</DropdownMenu>{filter.type === "fileType" ? (<DropdownMenu>- <DropdownMenuTrigger- render={- <button- type="button"- title={selectedTypeLabels.join(", ")}- className={FILTER_PILL_BUTTON_CLASSNAME}- />- }- >- {filter.value.length === 1- ? selectedTypeLabels[0]- : `${filter.value.length} selected`}+ <DropdownMenuTrigger asChild>+ <button+ type="button"+ title={selectedTypeLabels.join(", ")}+ className={FILTER_PILL_BUTTON_CLASSNAME}+ >+ {filter.value.length === 1+ ? selectedTypeLabels[0]+ : `${filter.value.length} selected`}+ </button></DropdownMenuTrigger><DropdownMenuContent align="start" className="w-60"><FileSystemFileTypeCommand@@ -2947,12 +2947,10 @@ function FileSystemFilterPill({</button>) : (<DropdownMenu>- <DropdownMenuTrigger- render={- <button type="button" className={FILTER_PILL_BUTTON_CLASSNAME} />- }- >- {filter.value[0]}+ <DropdownMenuTrigger asChild>+ <button type="button" className={FILTER_PILL_BUTTON_CLASSNAME}>+ {filter.value[0]}+ </button></DropdownMenuTrigger><DropdownMenuContent align="start"><ScrollArea orientation="vertical" className="h-auto max-h-72">@@ -4663,7 +4661,7 @@ function FileSystemColumnsView(props: FileSystemViewProps) {scrollbar hides; the viewport alone only observes its own box. Itsbuilt-in inline min-width (fit-content) would beat a min-w-fullclass, so the full-width floor is inline too. */}- <ScrollAreaPrimitive.Content+ <ScrollAreaContentclassName="flex h-full w-max"style={{ minWidth: "100%" }}onKeyDown={handleKeyDown}@@ -4736,7 +4734,7 @@ function FileSystemColumnsView(props: FileSystemViewProps) {</div></ScrollArea>) : null}- </ScrollAreaPrimitive.Content>+ </ScrollAreaContent></ScrollArea>)}diff --git a/apps/v4/components/extend/file-upload.tsx b/apps/v4/components/extend/file-upload.tsxindex 8d5688e..8848b71 100644--- a/apps/v4/components/extend/file-upload.tsx+++ b/apps/v4/components/extend/file-upload.tsx@@ -3,12 +3,13 @@import * as React from "react"import { BorderBeam } from "border-beam"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { Card } from "@/components/ui/card"import { FileThumbnail } from "@/components/extend/file-thumbnail"import { IconPlaceholder } from "@/components/icon-placeholder"-function FileImageGlyph(props: React.ComponentProps<"svg">) {+function FileImageGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="FileImage"@@ -21,7 +22,7 @@ function FileImageGlyph(props: React.ComponentProps<"svg">) {)}-function FileSpreadsheetGlyph(props: React.ComponentProps<"svg">) {+function FileSpreadsheetGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="FileSpreadsheet"@@ -34,7 +35,7 @@ function FileSpreadsheetGlyph(props: React.ComponentProps<"svg">) {)}-function FileUploadGlyph(props: React.ComponentProps<"svg">) {+function FileUploadGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="FileUp"@@ -57,7 +58,7 @@ type FileUploadItem = {type AcceptedFileType = {label: string- icon: React.ComponentType<React.ComponentProps<"svg">>+ icon: React.ComponentType<RegistryIconProps>}type FileUploadProps = {diff --git a/apps/v4/components/extend/layout-blocks.tsx b/apps/v4/components/extend/layout-blocks.tsxindex a1fbbbe..c6a281f 100644--- a/apps/v4/components/extend/layout-blocks.tsx+++ b/apps/v4/components/extend/layout-blocks.tsx@@ -7,11 +7,12 @@ import rehypeRaw from "rehype-raw"import rehypeSanitize, { defaultSchema } from "rehype-sanitize"import remarkGfm from "remark-gfm"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { ScrollArea } from "@/components/ui/scroll-area"import { IconPlaceholder } from "@/components/icon-placeholder"-function AlignBoxBottomCenterGlyph(props: React.ComponentProps<"svg">) {+function AlignBoxBottomCenterGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="AlignVerticalJustifyEnd"@@ -24,7 +25,7 @@ function AlignBoxBottomCenterGlyph(props: React.ComponentProps<"svg">) {)}-function Heading01Glyph(props: React.ComponentProps<"svg">) {+function Heading01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Heading1"@@ -37,7 +38,7 @@ function Heading01Glyph(props: React.ComponentProps<"svg">) {)}-function ImageCompositionGlyph(props: React.ComponentProps<"svg">) {+function ImageCompositionGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Image"@@ -50,7 +51,7 @@ function ImageCompositionGlyph(props: React.ComponentProps<"svg">) {)}-function LeftToRightListBulletGlyph(props: React.ComponentProps<"svg">) {+function LeftToRightListBulletGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Columns3Icon"@@ -63,7 +64,7 @@ function LeftToRightListBulletGlyph(props: React.ComponentProps<"svg">) {)}-function ParagraphGlyph(props: React.ComponentProps<"svg">) {+function ParagraphGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Pilcrow"@@ -76,7 +77,7 @@ function ParagraphGlyph(props: React.ComponentProps<"svg">) {)}-function Table01Glyph(props: React.ComponentProps<"svg">) {+function Table01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Table"@@ -89,7 +90,7 @@ function Table01Glyph(props: React.ComponentProps<"svg">) {)}-function TextCenterlineCenterTopGlyph(props: React.ComponentProps<"svg">) {+function TextCenterlineCenterTopGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelTop"@@ -102,7 +103,7 @@ function TextCenterlineCenterTopGlyph(props: React.ComponentProps<"svg">) {)}-function TextNumberSignGlyph(props: React.ComponentProps<"svg">) {+function TextNumberSignGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Hash"@@ -8041,7 +8042,7 @@ const BLOCK_STYLES: Record<OcrBlockType,{label: string- icon: React.ComponentType<React.ComponentProps<"svg">>+ icon: React.ComponentType<RegistryIconProps>overlay: stringmutedOverlay: stringring: stringdiff --git a/apps/v4/components/extend/pdf-editor-dialogs.tsx b/apps/v4/components/extend/pdf-editor-dialogs.tsxindex 6fd39f5..eb4f4ac 100644--- a/apps/v4/components/extend/pdf-editor-dialogs.tsx+++ b/apps/v4/components/extend/pdf-editor-dialogs.tsx@@ -64,7 +64,6 @@ import {} from "@/components/ui/select"import { Spinner } from "@/components/ui/spinner"import {- CloseGlyph,CopyGlyph,downloadBlob,DownloadGlyph,@@ -78,7 +77,6 @@ import {PdfEditorFieldLabel,PdfEditorSection,PdfEditorSwatch,- PdfEditorToolButton,ShieldGlyph,UnlockGlyph,usePdfEditor,diff --git a/apps/v4/components/extend/pdf-editor-panels.tsx b/apps/v4/components/extend/pdf-editor-panels.tsxindex fc3e767..7453bb3 100644--- a/apps/v4/components/extend/pdf-editor-panels.tsx+++ b/apps/v4/components/extend/pdf-editor-panels.tsx@@ -57,7 +57,6 @@ import type { degrees, ParseSpeeds, PDFDocument } from "pdf-lib"import { cn } from "@/lib/utils"import { Badge } from "@/components/ui/badge"import { Button } from "@/components/ui/button"-import { Input } from "@/components/ui/input"import {Select,SelectContent,@@ -90,7 +89,6 @@ import {PaperclipGlyph,PdfEditorEmptyState,PdfEditorScrollArea,- PdfEditorSection,PdfEditorToolbarSeparator,PdfEditorToolButton,PlusGlyph,diff --git a/apps/v4/components/extend/pdf-editor.tsx b/apps/v4/components/extend/pdf-editor.tsxindex fab8b0d..2910365 100644--- a/apps/v4/components/extend/pdf-editor.tsx+++ b/apps/v4/components/extend/pdf-editor.tsx@@ -5,7 +5,6 @@ import { createPluginRegistration } from "@embedpdf/core"import {EmbedPDF,useDocumentPermissions,- useDocumentState,useRegistry,} from "@embedpdf/core/react"import {@@ -4068,7 +4067,7 @@ function PdfEditorDocumentLoader({activeDocument?.status === "loaded" ? activeDocument.document : nullreturn (- <>+ <TooltipProvider delay={TOOLTIP_DELAY_MS}><PdfEditorSignaturePersistence storageKey={signatureStorageKey} /><PdfEditorInnerkey={activeDocumentId}@@ -4081,7 +4080,7 @@ function PdfEditorDocumentLoader({formDesignMode={formDesignMode}setFormDesignMode={setFormDesignMode}/>- </>+ </TooltipProvider>)}diff --git a/apps/v4/components/extend/schema-builder.tsx b/apps/v4/components/extend/schema-builder.tsxindex ca65978..57d5701 100644--- a/apps/v4/components/extend/schema-builder.tsx+++ b/apps/v4/components/extend/schema-builder.tsx@@ -39,6 +39,7 @@ import {} from "@pierre/diffs/react"import { useTheme } from "next-themes"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"import {@@ -62,7 +63,7 @@ import { ScrollArea } from "@/components/ui/scroll-area"import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"import { IconPlaceholder } from "@/components/icon-placeholder"-function CancelCircleGlyph(props: React.ComponentProps<"svg">) {+function CancelCircleGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="CircleX"@@ -75,7 +76,7 @@ function CancelCircleGlyph(props: React.ComponentProps<"svg">) {)}-function InputNumericGlyph(props: React.ComponentProps<"svg">) {+function InputNumericGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Hash"@@ -88,7 +89,7 @@ function InputNumericGlyph(props: React.ComponentProps<"svg">) {)}-function InputTextGlyph(props: React.ComponentProps<"svg">) {+function InputTextGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="TextCursorInput"@@ -101,7 +102,7 @@ function InputTextGlyph(props: React.ComponentProps<"svg">) {)}-function LeftToRightListBulletGlyph(props: React.ComponentProps<"svg">) {+function LeftToRightListBulletGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Columns3Icon"@@ -114,7 +115,7 @@ function LeftToRightListBulletGlyph(props: React.ComponentProps<"svg">) {)}-function SecondBracketGlyph(props: React.ComponentProps<"svg">) {+function SecondBracketGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Brackets"@@ -127,7 +128,7 @@ function SecondBracketGlyph(props: React.ComponentProps<"svg">) {)}-function SourceCodeSquareGlyph(props: React.ComponentProps<"svg">) {+function SourceCodeSquareGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="SquareCode"@@ -140,7 +141,7 @@ function SourceCodeSquareGlyph(props: React.ComponentProps<"svg">) {)}-function TextCheckGlyph(props: React.ComponentProps<"svg">) {+function TextCheckGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="CaptionsIcon"@@ -323,7 +324,7 @@ type SchemaBuilderTypeStyleKey =const TYPE_STYLES: Record<SchemaBuilderTypeStyleKey,{- icon: React.ComponentType<React.ComponentProps<"svg">>+ icon: React.ComponentType<RegistryIconProps>badge: string}> = {@@ -1451,7 +1452,7 @@ function InlineTextInput({...props}: React.InputHTMLAttributes<HTMLInputElement>) {const handleInput = React.useCallback(- (event: React.FormEvent<HTMLInputElement>) => {+ (event: React.InputEvent<HTMLInputElement>) => {onInput?.(event)onChange?.(event as unknown as React.ChangeEvent<HTMLInputElement>)},diff --git a/apps/v4/components/extend/ui-toast.tsx b/apps/v4/components/extend/ui-toast.tsxnew file mode 100644index 0000000..38c81d6--- /dev/null+++ b/apps/v4/components/extend/ui-toast.tsx@@ -0,0 +1,103 @@+"use client"++import * as React from "react"+import { createPortal } from "react-dom"++import { cn } from "@/lib/utils"++type ToastTone = "error" | "info" | "success"+type ToastItem = {+ id: number+ createdAt: number+ title: React.ReactNode+ type?: ToastTone+}++function createToastManager() {+ let nextId = 1+ let items: ToastItem[] = []+ const listeners = new Set<() => void>()+ const emit = () => listeners.forEach((listener) => listener())++ return {+ add(item: Omit<ToastItem, "id" | "createdAt">) {+ const id = nextId+++ items = [...items, { ...item, id, createdAt: Date.now() }]+ emit()+ return id+ },+ getSnapshot: () => items,+ remove(id: number) {+ items = items.filter((item) => item.id !== id)+ emit()+ },+ subscribe(listener: () => void) {+ listeners.add(listener)+ return () => listeners.delete(listener)+ },+ }+}++export const ToastPrimitive = { createToastManager }++type ToastManager = ReturnType<typeof createToastManager>++export function ToastProvider({+ children,+ limit = 3,+ portalProps,+ timeout = 5000,+ toastManager,+ viewportProps,+}: {+ children: React.ReactNode+ limit?: number+ portalProps?: { container?: Element | DocumentFragment | null }+ timeout?: number+ toastManager: ToastManager+ viewportProps?: React.ComponentProps<"div">+}) {+ const items = React.useSyncExternalStore(+ toastManager.subscribe,+ toastManager.getSnapshot,+ toastManager.getSnapshot+ )++ React.useEffect(() => {+ const timers = items.map((item) =>+ window.setTimeout(+ () => toastManager.remove(item.id),+ Math.max(0, item.createdAt + timeout - Date.now())+ )+ )+ return () => timers.forEach((timer) => window.clearTimeout(timer))+ }, [items, limit, timeout, toastManager])++ const viewport = (+ <div+ {...viewportProps}+ className={cn(+ "pointer-events-none absolute right-3 bottom-3 z-50 flex w-80 max-w-[calc(100%-1.5rem)] flex-col gap-2",+ viewportProps?.className+ )}+ >+ {items.slice(-limit).map((item) => (+ <div+ key={item.id}+ role={item.type === "error" ? "alert" : "status"}+ className="pointer-events-auto rounded-lg border bg-popover px-3 py-2 text-sm text-popover-foreground shadow-lg"+ >+ {item.title}+ </div>+ ))}+ </div>+ )+ const container = portalProps?.container++ return (+ <>+ {children}+ {container ? createPortal(viewport, container) : viewport}+ </>+ )+}diff --git a/apps/v4/components/extend/xlsx-editor.tsx b/apps/v4/components/extend/xlsx-editor.tsxindex f5c4c43..34293cb 100644--- a/apps/v4/components/extend/xlsx-editor.tsx+++ b/apps/v4/components/extend/xlsx-editor.tsx@@ -17,6 +17,7 @@ import {type XlsxTableHeaderMenuRenderProps,} from "@extend-ai/react-xlsx"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"import { ColorPicker, ColorPickerPanel } from "@/components/ui/color-picker"@@ -56,7 +57,7 @@ import {} from "@/components/extend/xlsx-viewer"import { IconPlaceholder } from "@/components/icon-placeholder"-function BorderAll01Glyph(props: React.ComponentProps<"svg">) {+function BorderAll01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Grid2x2"@@ -69,7 +70,7 @@ function BorderAll01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderBottom01Glyph(props: React.ComponentProps<"svg">) {+function BorderBottom01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelBottom"@@ -82,7 +83,7 @@ function BorderBottom01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderLeft01Glyph(props: React.ComponentProps<"svg">) {+function BorderLeft01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelLeft"@@ -95,7 +96,7 @@ function BorderLeft01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderNone01Glyph(props: React.ComponentProps<"svg">) {+function BorderNone01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="SquareDashed"@@ -108,7 +109,7 @@ function BorderNone01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderRight01Glyph(props: React.ComponentProps<"svg">) {+function BorderRight01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelRight"@@ -121,7 +122,7 @@ function BorderRight01Glyph(props: React.ComponentProps<"svg">) {)}-function BorderTop01Glyph(props: React.ComponentProps<"svg">) {+function BorderTop01Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PanelTop"@@ -134,7 +135,7 @@ function BorderTop01Glyph(props: React.ComponentProps<"svg">) {)}-function Calendar03Glyph(props: React.ComponentProps<"svg">) {+function Calendar03Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Calendar"@@ -147,7 +148,7 @@ function Calendar03Glyph(props: React.ComponentProps<"svg">) {)}-function DollarCircleGlyph(props: React.ComponentProps<"svg">) {+function DollarCircleGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="CircleDollarSign"@@ -160,7 +161,7 @@ function DollarCircleGlyph(props: React.ComponentProps<"svg">) {)}-function Moon02Glyph(props: React.ComponentProps<"svg">) {+function Moon02Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Moon"@@ -173,7 +174,7 @@ function Moon02Glyph(props: React.ComponentProps<"svg">) {)}-function PaintBucketGlyph(props: React.ComponentProps<"svg">) {+function PaintBucketGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="PaintBucket"@@ -186,7 +187,7 @@ function PaintBucketGlyph(props: React.ComponentProps<"svg">) {)}-function PercentGlyph(props: React.ComponentProps<"svg">) {+function PercentGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Percent"@@ -199,7 +200,7 @@ function PercentGlyph(props: React.ComponentProps<"svg">) {)}-function Sun03Glyph(props: React.ComponentProps<"svg">) {+function Sun03Glyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Sun"@@ -212,7 +213,7 @@ function Sun03Glyph(props: React.ComponentProps<"svg">) {)}-function TextColorGlyph(props: React.ComponentProps<"svg">) {+function TextColorGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Baseline"@@ -225,7 +226,7 @@ function TextColorGlyph(props: React.ComponentProps<"svg">) {)}-function TextNumberSignGlyph(props: React.ComponentProps<"svg">) {+function TextNumberSignGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="Hash"@@ -238,7 +239,7 @@ function TextNumberSignGlyph(props: React.ComponentProps<"svg">) {)}-function TextWrapGlyph(props: React.ComponentProps<"svg">) {+function TextWrapGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="WrapText"@@ -283,7 +284,7 @@ type UploadedWorkbook = {type NumberFormatOption = {formatString?: stringformatType: NonNullable<XlsxCellStyleInput["numberFormat"]>["formatType"]- icon: React.ComponentType<React.ComponentProps<"svg">>+ icon: React.ComponentType<RegistryIconProps>id?: numberlabel: stringvalue: string@@ -291,7 +292,7 @@ type NumberFormatOption = {type BorderOption = {action: XlsxBorderAction- icon: React.ComponentType<React.ComponentProps<"svg">>+ icon: React.ComponentType<RegistryIconProps>label: string}@@ -874,7 +875,7 @@ function StyleDropdownItem({onClick,}: {children: React.ReactNode- icon: React.ComponentType<React.ComponentProps<"svg">>+ icon: React.ComponentType<RegistryIconProps>onClick: () => void}) {const IconComponent = icondiff --git a/apps/v4/components/ui/color-picker.tsx b/apps/v4/components/ui/color-picker.tsxindex 81092ac..84e3dff 100644--- a/apps/v4/components/ui/color-picker.tsx+++ b/apps/v4/components/ui/color-picker.tsx@@ -25,6 +25,7 @@ import {type OklchColor,type RgbColor,} from "@/lib/color-picker-utils"+import type { RegistryIconProps } from "@/lib/registry-icon-props"import { cn } from "@/lib/utils"import { Button } from "@/components/ui/button"import {@@ -635,7 +636,7 @@ export type ColorPickerProps = {defaultFormat?: ColorFormatvariant?: "input" | "swatch" | "panel"className?: string- icon?: React.ComponentType<React.ComponentProps<"svg">>+ icon?: React.ComponentType<RegistryIconProps>rainbowTrigger?: booleanonTriggerMouseDown?: React.MouseEventHandler<HTMLButtonElement>onTriggerPointerDown?: React.PointerEventHandler<HTMLButtonElement>@@ -946,7 +947,7 @@ export function ColorPicker({tabler="IconColorPicker"hugeicons="ColorPickerIcon"phosphor="EyedropperIcon"- remixicon="RiColorPickerLine"+ remixicon="RiDropperLine"className="size-4"/></TooltipTrigger>@@ -1007,7 +1008,11 @@ export function ColorPicker({<Selectvalue={format}onValueChange={(next) => {- if (next !== null) setFormat(next)+ if (+ COLOR_FORMAT_OPTIONS.some((option) => option.value === next)+ ) {+ setFormat(next as ColorFormat)+ }}}><SelectPrimitive.Trigger@@ -1031,6 +1036,7 @@ export function ColorPicker({/></SelectPrimitive.Trigger><SelectContent+ alignItemWithTrigger={false}align="end"className="min-w-28"portalProps={{ container: portalContainer }}diff --git a/apps/v4/content/docs/(root)/index.mdx b/apps/v4/content/docs/(root)/index.mdxindex 9e16042..627da52 100644--- a/apps/v4/content/docs/(root)/index.mdx+++ b/apps/v4/content/docs/(root)/index.mdx@@ -16,6 +16,30 @@ Extend is built around the work of turning raw PDFs, spreadsheets, scans, and te## Component set-The document-specific React components are maintained in Extend UI. The rest of the base primitives are from [Coss UI](https://coss.com/ui/docs), including the shared button, tooltip, select, popover, dialog, and menu patterns. Icons follow the `iconLibrary` in your `components.json` — the CLI supports [Lucide](https://lucide.dev/), [Tabler](https://tabler.io/icons), [Hugeicons](https://hugeicons.com/), [Phosphor](https://phosphoricons.com/), and [Remix Icon](https://remixicon.com/), and this site renders Hugeicons.+The document-specific React components are maintained in Extend UI. This site uses [Coss UI](https://coss.com/ui/docs). Installed document components use your project's Base UI or Radix primitives, selected by the `style` in `components.json`. Icons follow your `iconLibrary`: [Lucide](https://lucide.dev/), [Tabler](https://tabler.io/icons), [Hugeicons](https://hugeicons.com/), [Phosphor](https://phosphoricons.com/), or [Remix Icon](https://remixicon.com/). This site renders Hugeicons.++## Installation++Configure the style-aware registry in `components.json`:++```json+{+ "registries": {+ "@extend": "https://www.extend.ai/ui/r/styles/{style}/{name}.json"+ }+}+```++Then install the component you need:++```bash+npx shadcn@latest add @extend/pdf-editor+```++The CLI installs missing dependencies and respects your component aliases.+Keep your existing primitives when prompted; no overwrite flag is required.+Your primitives should use current shadcn APIs. Projects using the+[deprecated `default` style](https://ui.shadcn.com/docs/components-json#style)+must migrate before installing.Start with [Components](/docs/components) for the full list, or jump into [Blocks](/blocks) for composed examples.diff --git a/apps/v4/content/docs/components/pdf-editor.mdx b/apps/v4/content/docs/components/pdf-editor.mdxindex c1824d3..6825eb3 100644--- a/apps/v4/content/docs/components/pdf-editor.mdx+++ b/apps/v4/content/docs/components/pdf-editor.mdx@@ -15,6 +15,9 @@ PDF rendering and editing are powered by [EmbedPDF](https://www.embedpdf.com/).## Installation+Use the [style-aware registry configuration](/docs#installation) to select your+project's Base UI or Radix implementation and icon library automatically.+<CodeTabs><TabsList>@@ -31,6 +34,10 @@ npx shadcn@latest add @extend/pdf-editor<TabsContent value="manual">+The manual source below uses this site's coss/Base UI primitives. For standard+shadcn Base UI or Radix projects, use the Command tab to install the matching+source and complete dependency set.+<Steps className="mb-0 pt-2"><Step>Install the following dependencies:</Step>diff --git a/apps/v4/lib/registry-icon-props.ts b/apps/v4/lib/registry-icon-props.tsnew file mode 100644index 0000000..862bb6f--- /dev/null+++ b/apps/v4/lib/registry-icon-props.ts@@ -0,0 +1,6 @@+import type * as React from "react"++export type RegistryIconProps = Omit<+ React.ComponentProps<"svg">,+ "children" | "strokeWidth"+> & { strokeWidth?: number }diff --git a/apps/v4/lib/registry-style.ts b/apps/v4/lib/registry-style.tsnew file mode 100644index 0000000..b7d65fe--- /dev/null+++ b/apps/v4/lib/registry-style.ts@@ -0,0 +1,19 @@+export function getRegistryFamily(style: string): "base" | "radix" | null {+ if (style.startsWith("base-")) return "base"+ if (style.startsWith("radix-") || ["new-york", "new-york-v4"].includes(style))+ return "radix"+ return null+}++export function styleRegistryDependencies<+ T extends { registryDependencies?: string[] },+>(item: T, style: string): T {+ return {+ ...item,+ registryDependencies: item.registryDependencies?.map((dependency) =>+ dependency.startsWith("@") || dependency.startsWith("http")+ ? dependency+ : `https://ui.shadcn.com/r/styles/${style}/${dependency}.json`+ ),+ }+}diff --git a/apps/v4/package.json b/apps/v4/package.jsonindex 33fe55c..31736a8 100644--- a/apps/v4/package.json+++ b/apps/v4/package.json@@ -13,7 +13,9 @@"typecheck": "tsc --noEmit","format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache","format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",- "registry:build": "shadcn build --output public/r",+ "registry:build": "node scripts/build-registry.mts",+ "registry:check-extend-ui": "node scripts/check-extend-ui-registry.mts",+ "registry:test": "node --test scripts/registry-source.test.mts","registry:validate": "shadcn registry validate","postinstall": "fumadocs-mdx"},@@ -62,6 +64,10 @@"@paper-design/shaders-react": "^0.0.76","@pierre/diffs": "^1.2.7","@pierre/trees": "1.0.0-beta.4",+ "@radix-ui/react-hover-card": "^1.1.23",+ "@radix-ui/react-popover": "^1.1.23",+ "@radix-ui/react-scroll-area": "^1.2.18",+ "@radix-ui/react-select": "^2.3.7","@tabler/icons-react": "^3.31.0","@tanstack/react-virtual": "3.13.26","@vercel/analytics": "^2.0.1",diff --git a/apps/v4/registry.json b/apps/v4/registry.jsonindex 0ae87d3..5121550 100644--- a/apps/v4/registry.json+++ b/apps/v4/registry.json@@ -527,7 +527,7 @@"type": "registry:component","title": "PDF Block Resizable Shell","description": "A reusable resizable left document viewer and right review panel shell for PDF-style blocks.",- "registryDependencies": ["resizable", "utils"],+ "registryDependencies": ["utils"],"categories": ["documents", "blocks"],"files": [{@@ -543,7 +543,7 @@"title": "File Upload","description": "A drag-and-drop file upload surface with accepted file type icons and a compact file list.","dependencies": ["border-beam@^1.0.1"],- "registryDependencies": ["card", "@extend/file-thumbnail", "utils"],+ "registryDependencies": ["@extend/file-thumbnail", "utils"],"categories": ["documents"],"files": [{@@ -574,20 +574,10 @@"description": "A macOS Finder-style file browser for flat object-store manifests with icon, list, column, and gallery views.","dependencies": ["@pierre/[email protected]"],"registryDependencies": [- "button",- "command",- "dialog","@extend/docx-viewer",- "dropdown-menu","@extend/file-thumbnail",- "input","@extend/pdf-viewer","@extend/pptx-viewer",- "popover",- "scroll-area",- "select",- "spinner",- "tabs","utils","@extend/xlsx-viewer"],@@ -637,20 +627,7 @@"@embedpdf/plugin-zoom@^2.15.0","pdf-lib@^1.17.1"],- "registryDependencies": [- "button",- "@extend/document-viewer-sidebar",- "dropdown-menu",- "input",- "popover",- "scroll-area",- "select",- "separator",- "spinner",- "toggle",- "tooltip",- "utils"- ],+ "registryDependencies": ["@extend/document-viewer-sidebar", "utils"],"categories": ["documents"],"files": [{@@ -670,6 +647,14 @@"type": "registry:ui","title": "PDF Editor","description": "A PDF editor with annotations, comments, redaction, form filling and design, signatures, rubber stamps, page organization, security, printing, and export.",+ "registryDependencies": ["@extend/pdf-editor-core"],+ "categories": ["documents"]+ },+ {+ "name": "pdf-editor-core",+ "type": "registry:ui",+ "title": "PDF Editor Core",+ "description": "Shared PDF editor behavior and state for the Base UI and Radix UI artifacts.","dependencies": ["@embedpdf/core@^2.15.0","@embedpdf/engines@^2.15.0",@@ -701,25 +686,7 @@"@embedpdf/plugin-zoom@^2.15.0","pdf-lib@^1.17.1"],- "registryDependencies": [- "badge",- "button",- "@extend/color-picker",- "dialog",- "@extend/document-viewer-sidebar",- "dropdown-menu",- "input",- "kbd",- "popover",- "scroll-area",- "select",- "spinner",- "switch",- "@extend/toast",- "toggle",- "tooltip",- "utils"- ],+ "registryDependencies": ["@extend/document-viewer-sidebar"],"categories": ["documents"],"files": [{@@ -764,18 +731,8 @@"@tanstack/react-virtual@^3.13.12"],"registryDependencies": [- "badge",- "button",- "card","@extend/document-viewer-sidebar",- "dropdown-menu","@extend/file-thumbnail",- "input",- "scroll-area",- "select",- "separator",- "spinner",- "tooltip","utils"],"categories": ["documents"],@@ -797,21 +754,10 @@"type": "registry:ui","title": "DOCX Editor","description": "An experimental DOCX editor with a Word-style toolbar, page thumbnails, import, export, and live document mutation.",- "dependencies": ["@base-ui/react@^1.4.1", "@extend-ai/react-docx@^0.9.0"],+ "dependencies": ["@extend-ai/react-docx@^0.9.0"],"registryDependencies": [- "badge",- "button",- "card",- "@extend/color-picker","@extend/document-viewer-sidebar",- "dropdown-menu","@extend/file-thumbnail",- "input",- "scroll-area",- "select",- "separator",- "spinner",- "tooltip","utils"],"categories": ["documents"],@@ -834,17 +780,7 @@"title": "Excel Viewer","description": "An XLSX viewer with workbook loading, thumbnails, sheet tabs, upload, zoom, and theme controls.","dependencies": ["@extend-ai/[email protected]"],- "registryDependencies": [- "button",- "dropdown-menu",- "scroll-area",- "select",- "separator",- "spinner",- "tabs",- "tooltip",- "utils"- ],+ "registryDependencies": ["utils"],"categories": ["documents"],"files": [{@@ -864,16 +800,8 @@"@tanstack/react-virtual@^3.13.12"],"registryDependencies": [- "button","@extend/document-viewer-sidebar",- "dropdown-menu","@extend/file-thumbnail",- "input",- "scroll-area",- "select",- "separator",- "spinner",- "tooltip","utils"],"categories": ["documents"],@@ -891,20 +819,7 @@"title": "Excel Editor","description": "An experimental XLSX editor with formula input, undo and redo, sheet controls, export, and live workbook mutation.","dependencies": ["@extend-ai/[email protected]"],- "registryDependencies": [- "button",- "@extend/color-picker",- "@extend/group",- "input",- "scroll-area",- "select",- "separator",- "spinner",- "toggle",- "tooltip",- "utils",- "@extend/xlsx-viewer"- ],+ "registryDependencies": ["utils", "@extend/xlsx-viewer"],"categories": ["documents"],"files": [{@@ -924,15 +839,7 @@"papaparse@^5.5.3"],"devDependencies": ["@types/papaparse@^5.5.2"],- "registryDependencies": [- "button",- "input",- "popover",- "select",- "separator",- "spinner",- "tooltip"- ],+ "registryDependencies": [],"categories": ["documents"],"files": [{@@ -969,7 +876,7 @@"rehype-sanitize@^6.0.0","remark-gfm@^4.0.1"],- "registryDependencies": ["scroll-area", "utils"],+ "registryDependencies": ["utils"],"categories": ["documents"],"files": [{@@ -1005,11 +912,8 @@"description": "A PDF signature review block with field overlays and signing actions.","dependencies": ["pdf-lib@^1.17.1", "signature_pad@^5.1.3"],"registryDependencies": [- "button",- "dialog","@extend/pdf-block-resizable-shell","@extend/pdf-viewer",- "scroll-area","utils"],"categories": ["documents", "blocks"],@@ -1030,14 +934,7 @@"@glideapps/[email protected]","@pierre/diffs@^1.1.22"],- "registryDependencies": [- "button",- "input",- "scroll-area",- "tabs",- "tooltip",- "utils"- ],+ "registryDependencies": ["utils"],"categories": ["documents"],"files": [{@@ -1059,14 +956,7 @@"@pierre/diffs@^1.2.7",],- "registryDependencies": [- "button",- "collapsible",- "dropdown-menu",- "scroll-area",- "tabs",- "utils"- ],+ "registryDependencies": ["utils"],"categories": ["documents"],"files": [{@@ -1105,12 +995,7 @@"@dnd-kit/sortable@^10.0.0","@dnd-kit/utilities@^3.2.2"],- "registryDependencies": [- "button",- "@extend/file-thumbnail",- "scroll-area",- "utils"- ],+ "registryDependencies": ["@extend/file-thumbnail", "utils"],"categories": ["documents"],"files": [{@@ -1198,6 +1083,96 @@"target": "@components/extend/document-viewer-sidebar.tsx"}]+ },+ {+ "name": "document-color-popover",+ "type": "registry:ui",+ "title": "Color Picker Popover",+ "files": [+ {+ "path": "registry/bases/base/document-color-popover.tsx",+ "type": "registry:ui",+ "target": "@components/extend/document-color-popover.tsx"+ }+ ]+ },+ {+ "name": "document-controls",+ "type": "registry:ui",+ "title": "document-controls",+ "files": [+ {+ "path": "registry/extend/document-controls.tsx",+ "type": "registry:ui",+ "target": "@components/extend/document-controls.tsx"+ }+ ]+ },+ {+ "name": "document-scroll-area",+ "type": "registry:ui",+ "title": "document-scroll-area",+ "files": [+ {+ "path": "registry/bases/base/document-scroll-area.tsx",+ "type": "registry:ui",+ "target": "@components/extend/document-scroll-area.tsx"+ }+ ]+ },+ {+ "name": "document-preview-card",+ "type": "registry:ui",+ "title": "document-preview-card",+ "files": [+ {+ "path": "components/extend/document-preview-card.tsx",+ "type": "registry:ui",+ "target": "@components/extend/document-preview-card.tsx"+ }+ ]+ },+ {+ "name": "document-color-picker",+ "type": "registry:ui",+ "title": "document-color-picker",+ "files": [+ {+ "path": "components/ui/color-picker.tsx",+ "type": "registry:ui",+ "target": "@components/extend/document-color-picker.tsx"+ },+ {+ "path": "lib/color-picker-utils.ts",+ "type": "registry:lib",+ "target": "@lib/color-picker-utils.ts"+ }+ ],+ "dependencies": []+ },+ {+ "name": "document-toast",+ "type": "registry:ui",+ "title": "document-toast",+ "files": [+ {+ "path": "components/extend/ui-toast.tsx",+ "type": "registry:ui",+ "target": "@components/extend/ui-toast.tsx"+ }+ ]+ },+ {+ "name": "registry-icon-props",+ "type": "registry:ui",+ "title": "registry-icon-props",+ "files": [+ {+ "path": "lib/registry-icon-props.ts",+ "type": "registry:lib",+ "target": "@lib/registry-icon-props.ts"+ }+ ]}]}diff --git a/apps/v4/registry/bases/base/document-color-popover.tsx b/apps/v4/registry/bases/base/document-color-popover.tsxnew file mode 100644index 0000000..c39f130--- /dev/null+++ b/apps/v4/registry/bases/base/document-color-popover.tsx@@ -0,0 +1,34 @@+"use client"++import { Popover } from "@base-ui/react/popover"++import { cn } from "@/lib/utils"++export function ColorPopoverContent({+ anchor,+ align,+ sideOffset,+ className,+ ...props+}: Popover.Popup.Props &+ Pick<Popover.Positioner.Props, "anchor" | "align" | "sideOffset">) {+ return (+ <Popover.Portal>+ <Popover.Positioner+ anchor={anchor}+ align={align}+ sideOffset={sideOffset}+ className="z-50"+ >+ <Popover.Popup+ {...props}+ className={cn(+ "rounded-xl border bg-popover text-popover-foreground shadow-md outline-none",+ className,+ "p-3.5"+ )}+ />+ </Popover.Positioner>+ </Popover.Portal>+ )+}diff --git a/apps/v4/registry/bases/base/document-scroll-area.tsx b/apps/v4/registry/bases/base/document-scroll-area.tsxnew file mode 100644index 0000000..c9f2880--- /dev/null+++ b/apps/v4/registry/bases/base/document-scroll-area.tsx@@ -0,0 +1,101 @@+"use client"++import * as React from "react"+import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"++import { cn } from "@/lib/utils"++type ScrollAreaProps = ScrollAreaPrimitive.Root.Props & {+ orientation?: "vertical" | "horizontal" | "both"+ scrollFade?: boolean+ scrollbarGutter?: boolean+ scrollbarOverflowOnly?: boolean+ viewportClassName?: string+ viewportProps?: ScrollAreaPrimitive.Viewport.Props+ viewportRef?: React.Ref<HTMLDivElement>+}++export function ScrollArea({+ className,+ children,+ orientation = "both",+ scrollFade = false,+ scrollbarGutter = false,+ scrollbarOverflowOnly = false,+ viewportClassName,+ viewportProps,+ viewportRef,+ ...props+}: ScrollAreaProps) {+ const {+ className: viewportPropsClassName,+ ref: viewportPropsRef,+ ...resolvedViewportProps+ } = viewportProps ?? {}+ const composedViewportRef = React.useMemo(+ () => composeRefs(viewportPropsRef, viewportRef),+ [viewportPropsRef, viewportRef]+ )++ return (+ <ScrollAreaPrimitive.Root+ className={cn(+ "size-full min-h-0",+ scrollbarOverflowOnly &&+ "[&:not(:has([data-slot=scroll-area-viewport][data-has-overflow-x]))_[data-orientation=horizontal]]:hidden [&:not(:has([data-slot=scroll-area-viewport][data-has-overflow-y]))_[data-orientation=vertical]]:hidden",+ className+ )}+ {...props}+ >+ <ScrollAreaPrimitive.Viewport+ {...resolvedViewportProps}+ ref={composedViewportRef}+ className={cn(+ "h-full rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring",+ scrollFade &&+ "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] [--fade-size:1.5rem]",+ scrollbarGutter && orientation !== "vertical" && "pb-3.5",+ scrollbarGutter && orientation !== "horizontal" && "pe-3.5",+ viewportPropsClassName,+ viewportClassName+ )}+ data-slot="scroll-area-viewport"+ >+ {children}+ </ScrollAreaPrimitive.Viewport>+ {orientation !== "horizontal" ? (+ <ScrollAreaPrimitive.Scrollbar+ data-slot="scroll-area-scrollbar"+ orientation="vertical"+ className="m-1 flex w-1.5"+ >+ <ScrollAreaPrimitive.Thumb className="relative flex-1 rounded-full bg-foreground/20" />+ </ScrollAreaPrimitive.Scrollbar>+ ) : null}+ {orientation !== "vertical" ? (+ <ScrollAreaPrimitive.Scrollbar+ data-slot="scroll-area-scrollbar"+ orientation="horizontal"+ className="m-1 flex h-1.5 flex-col"+ >+ <ScrollAreaPrimitive.Thumb className="relative flex-1 rounded-full bg-foreground/20" />+ </ScrollAreaPrimitive.Scrollbar>+ ) : null}+ {orientation === "both" ? <ScrollAreaPrimitive.Corner /> : null}+ </ScrollAreaPrimitive.Root>+ )+}++export function ScrollAreaContent(props: ScrollAreaPrimitive.Content.Props) {+ return <ScrollAreaPrimitive.Content {...props} />+}++function composeRefs<T>(...refs: Array<React.Ref<T> | undefined>) {+ return (node: T | null) => {+ for (const ref of refs) {+ if (!ref) continue+ if (typeof ref === "function") ref(node)+ else ref.current = node+ }+ }+}diff --git a/apps/v4/registry/bases/radix/document-color-popover.tsx b/apps/v4/registry/bases/radix/document-color-popover.tsxnew file mode 100644index 0000000..887ccdc--- /dev/null+++ b/apps/v4/registry/bases/radix/document-color-popover.tsx@@ -0,0 +1,28 @@+"use client"++import * as React from "react"+import { Anchor as PopoverAnchor } from "@radix-ui/react-popover"++import { cn } from "@/lib/utils"+import { PopoverContent } from "@/components/ui/popover"++export function ColorPopoverContent({+ anchor,+ className,+ ...props+}: React.ComponentProps<typeof PopoverContent> & {+ anchor?: React.RefObject<HTMLElement | null>+}) {+ const virtualRef = {+ current: {+ getBoundingClientRect: () =>+ anchor?.current?.getBoundingClientRect() ?? new DOMRect(),+ },+ }+ return (+ <>+ {anchor ? <PopoverAnchor virtualRef={virtualRef} /> : null}+ <PopoverContent {...props} className={cn(className, "p-3.5")} />+ </>+ )+}diff --git a/apps/v4/registry/bases/radix/document-preview-card.tsx b/apps/v4/registry/bases/radix/document-preview-card.tsxnew file mode 100644index 0000000..86a411b--- /dev/null+++ b/apps/v4/registry/bases/radix/document-preview-card.tsx@@ -0,0 +1,17 @@+"use client"++import * as React from "react"+import * as HoverCard from "@radix-ui/react-hover-card"++export const PreviewCard = HoverCard.Root+export const PreviewCardTrigger = HoverCard.Trigger++export function PreviewCardContent(+ props: React.ComponentProps<typeof HoverCard.Content>+) {+ return (+ <HoverCard.Portal>+ <HoverCard.Content {...props} />+ </HoverCard.Portal>+ )+}diff --git a/apps/v4/registry/bases/radix/document-scroll-area.tsx b/apps/v4/registry/bases/radix/document-scroll-area.tsxnew file mode 100644index 0000000..6350c20--- /dev/null+++ b/apps/v4/registry/bases/radix/document-scroll-area.tsx@@ -0,0 +1,129 @@+"use client"++import * as React from "react"+import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"++import { cn } from "@/lib/utils"++type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {+ orientation?: "vertical" | "horizontal" | "both"+ scrollFade?: boolean+ scrollbarGutter?: boolean+ scrollbarOverflowOnly?: boolean+ viewportClassName?: string+ viewportProps?: React.ComponentProps<typeof ScrollAreaPrimitive.Viewport>+ viewportRef?: React.Ref<HTMLDivElement>+}++export function ScrollArea({+ className,+ children,+ orientation = "both",+ scrollFade = false,+ scrollbarGutter = false,+ scrollbarOverflowOnly = false,+ viewportClassName,+ viewportProps,+ viewportRef,+ ...props+}: ScrollAreaProps) {+ const localViewportRef = React.useRef<HTMLDivElement>(null)+ const {+ className: viewportPropsClassName,+ ref: viewportPropsRef,+ ...resolvedViewportProps+ } = viewportProps ?? {}+ const composedViewportRef = React.useMemo(+ () => composeRefs(localViewportRef, viewportPropsRef, viewportRef),+ [viewportPropsRef, viewportRef]+ )++ React.useEffect(() => {+ const viewport = localViewportRef.current+ if (!viewport || !scrollFade) return+ const updateOverflow = () => {+ const x = Math.abs(viewport.scrollLeft)+ const y = Math.max(0, viewport.scrollTop)+ const overflow = {+ "x-start": x,+ "x-end": Math.max(0, viewport.scrollWidth - viewport.clientWidth - x),+ "y-start": y,+ "y-end": Math.max(0, viewport.scrollHeight - viewport.clientHeight - y),+ }+ for (const [edge, value] of Object.entries(overflow)) {+ viewport.style.setProperty(+ `--scroll-area-overflow-${edge}`,+ `${value}px`+ )+ }+ }+ const observer = new ResizeObserver(updateOverflow)+ observer.observe(viewport)+ if (viewport.firstElementChild) observer.observe(viewport.firstElementChild)+ viewport.addEventListener("scroll", updateOverflow, { passive: true })+ updateOverflow()+ return () => {+ observer.disconnect()+ viewport.removeEventListener("scroll", updateOverflow)+ }+ }, [scrollFade])++ return (+ <ScrollAreaPrimitive.Root+ type={scrollbarOverflowOnly ? "auto" : "hover"}+ data-slot="scroll-area"+ className={cn("size-full min-h-0 overflow-hidden", className)}+ {...props}+ >+ <ScrollAreaPrimitive.Viewport+ {...resolvedViewportProps}+ ref={composedViewportRef}+ data-slot="scroll-area-viewport"+ className={cn(+ "h-full w-full rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring",+ scrollFade &&+ "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] [--fade-size:1.5rem]",+ scrollbarGutter && orientation !== "vertical" && "pb-3.5",+ scrollbarGutter && orientation !== "horizontal" && "pe-3.5",+ viewportPropsClassName,+ viewportClassName+ )}+ >+ {children}+ </ScrollAreaPrimitive.Viewport>+ {orientation !== "horizontal" ? (+ <ScrollAreaPrimitive.ScrollAreaScrollbar+ orientation="vertical"+ data-slot="scroll-area-scrollbar"+ className="m-1 flex w-1.5 touch-none select-none"+ >+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-foreground/20" />+ </ScrollAreaPrimitive.ScrollAreaScrollbar>+ ) : null}+ {orientation !== "vertical" ? (+ <ScrollAreaPrimitive.ScrollAreaScrollbar+ orientation="horizontal"+ data-slot="scroll-area-scrollbar"+ className="m-1 flex h-1.5 touch-none flex-col select-none"+ >+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-foreground/20" />+ </ScrollAreaPrimitive.ScrollAreaScrollbar>+ ) : null}+ {orientation === "both" ? <ScrollAreaPrimitive.Corner /> : null}+ </ScrollAreaPrimitive.Root>+ )+}++export function ScrollAreaContent(props: React.ComponentProps<"div">) {+ return <div {...props} />+}++function composeRefs<T>(...refs: Array<React.Ref<T> | undefined>) {+ return (node: T | null) => {+ for (const ref of refs) {+ if (!ref) continue+ if (typeof ref === "function") ref(node)+ else ref.current = node+ }+ }+}diff --git a/apps/v4/registry/extend/document-controls.tsx b/apps/v4/registry/extend/document-controls.tsxnew file mode 100644index 0000000..c53fcdc--- /dev/null+++ b/apps/v4/registry/extend/document-controls.tsx@@ -0,0 +1,64 @@+"use client"++import type * as React from "react"++import type { RegistryIconProps } from "@/lib/registry-icon-props"+import { cn } from "@/lib/utils"+import { Button } from "@/components/ui/button"+import { ScrollArea } from "@/components/ui/scroll-area"+import { IconPlaceholder } from "@/components/icon-placeholder"++export function Spinner({ className, ...props }: RegistryIconProps) {+ return (+ <IconPlaceholder+ lucide="LoaderCircle"+ tabler="IconLoader2"+ hugeicons="Loading03Icon"+ phosphor="CircleNotchIcon"+ remixicon="RiLoader4Line"+ role="status"+ aria-label="Loading"+ className={cn("size-4 animate-spin", className)}+ {...props}+ />+ )+}++export function DialogPanel({+ className,+ children,+ scrollFade = true,+ ...props+}: React.ComponentProps<"div"> & { scrollFade?: boolean }) {+ return (+ <ScrollArea scrollFade={scrollFade} className="min-h-0">+ <div+ data-slot="dialog-panel"+ className={cn("min-h-0", className)}+ {...props}+ >+ {children}+ </div>+ </ScrollArea>+ )+}++export function LoadingButton({+ loading,+ disabled,+ children,+ className,+ ...props+}: React.ComponentProps<typeof Button> & { loading?: boolean }) {+ return (+ <Button+ {...props}+ className={cn("relative", className)}+ disabled={disabled || loading}+ aria-busy={loading || undefined}+ >+ <span className={cn("contents", loading && "invisible")}>{children}</span>+ {loading ? <Spinner className="pointer-events-none absolute" /> : null}+ </Button>+ )+}diff --git a/apps/v4/registry/new-york-v4/blocks/pdf-dropzone.tsx b/apps/v4/registry/new-york-v4/blocks/pdf-dropzone.tsxindex c3af90e..b2bfd8a 100644--- a/apps/v4/registry/new-york-v4/blocks/pdf-dropzone.tsx+++ b/apps/v4/registry/new-york-v4/blocks/pdf-dropzone.tsx@@ -2,11 +2,12 @@import * as React from "react"+import { type RegistryIconProps } from "@/lib/registry-icon-props"import { FileUpload } from "@/components/extend/file-upload"import { PDFViewer } from "@/components/extend/pdf-viewer"import { IconPlaceholder } from "@/components/icon-placeholder"-function FileUploadGlyph(props: React.ComponentProps<"svg">) {+function FileUploadGlyph(props: RegistryIconProps) {return (<IconPlaceholderlucide="FileUp"diff --git a/apps/v4/registry/new-york-v4/blocks/pdf-editor-block.tsx b/apps/v4/registry/new-york-v4/blocks/pdf-editor-block.tsxindex a46ea94..96e9d8c 100644--- a/apps/v4/registry/new-york-v4/blocks/pdf-editor-block.tsx+++ b/apps/v4/registry/new-york-v4/blocks/pdf-editor-block.tsx@@ -1,7 +1,5 @@"use client"-import * as React from "react"-import { PDFEditor, type PdfEditorMode } from "@/components/extend/pdf-editor"export function PdfEditorBlock({diff --git a/apps/v4/scripts/README.md b/apps/v4/scripts/README.mdnew file mode 100644index 0000000..6e1e362--- /dev/null+++ b/apps/v4/scripts/README.md@@ -0,0 +1,71 @@+# Registry compatibility++The site keeps its coss/Base UI primitives. Document behavior and state have a+single source in `components/extend`. The registry build adapts composition at+build time and formats separate Base and Radix artifacts in+`public/r/bases/{base,radix}`.++Installed components import ordinary primitives directly from the consumer's+`components/ui` alias. Extend does not ship replacements for those primitives+as document dependencies. Enhanced scrolling, color-picker positioning, loading+buttons, and document notifications live in separately named Extend components.++The route `/r/styles/{style}/{name}.json` selects the family artifact and resolves+standard dependencies against the same upstream style. It does not translate+source at request time or maintain a preset allowlist. Icons remain+`IconPlaceholder` elements until shadcn transforms them for the configured+`iconLibrary`.++## Checks++From `apps/v4`:++```sh+pnpm registry:test+pnpm typecheck+pnpm registry:check-extend-ui+```++The install fixture creates Base and Radix Maia Vite projects, preinstalls and+hashes consumer primitives, installs every public document component with the+real CLI, declines overwrite prompts, and verifies the hashes. It installs all+icon-bearing sources with each of the five icon libraries and runs production+builds. It then installs actual upstream primitives for every other supported+preset and typechecks the entire component and icon matrix.++The matrix covers all eight current presets for both families, plus the Radix+`new-york` and `new-york-v4` aliases. Consumer primitives must implement their+current shadcn APIs. The historical `default` style is+[deprecated upstream](https://ui.shadcn.com/docs/components-json#style) and uses+incompatible older primitive and dependency APIs; migrate it before installing.++`EXTEND_KEEP_FIXTURES=1` retains temporary projects for debugging.+`EXTEND_FIXTURE_FAMILY=base|radix` and `EXTEND_SKIP_STYLE_MATRIX=1` narrow a local+run; neither should be used for release validation.++## Release++Deploy the built registry before changing the global shadcn namespace entry to:++```json+{+ "name": "@extend",+ "homepage": "https://www.extend.ai/ui",+ "url": "https://www.extend.ai/ui/r/styles/{style}/{name}.json"+}+```++Until that upstream entry is updated, consumers can configure the same URL in+their own `components.json`:++```json+{+ "registries": {+ "@extend": "https://www.extend.ai/ui/r/styles/{style}/{name}.json"+ }+}+```++Then the installation command remains `npx shadcn@latest add @extend/pdf-editor`.+The legacy unstyled endpoint cannot discover the consumer's primitive family.+Do not advertise it as automatically supporting Radix.diff --git a/apps/v4/scripts/build-registry.mts b/apps/v4/scripts/build-registry.mtsnew file mode 100644index 0000000..b7b4296--- /dev/null+++ b/apps/v4/scripts/build-registry.mts@@ -0,0 +1,166 @@+import { spawnSync } from "node:child_process"+import { mkdir, readFile, writeFile } from "node:fs/promises"+import path from "node:path"+import { format, resolveConfig } from "prettier"+import ts from "typescript"++import { transformRegistrySource } from "./registry-source.mts"++type RegistryFile = {+ path: string+ target?: string+ content?: string+ type: string+}+type RegistryItem = {+ name: string+ categories?: string[]+ files?: RegistryFile[]+ dependencies?: string[]+ registryDependencies?: string[]+ [key: string]: unknown+}++const appRoot = process.cwd()+const outputRoot = path.join(appRoot, "public/r")+const formatOptions = await resolveConfig(path.join(appRoot, "package.json"))+const build = spawnSync(+ path.join(appRoot, "node_modules/.bin/shadcn"),+ ["build", "--output", "public/r"],+ { stdio: "inherit" }+)+if (build.status !== 0) process.exit(build.status ?? 1)++const registry = JSON.parse(+ await readFile(path.join(appRoot, "registry.json"), "utf8")+) as { items: RegistryItem[] }+const manifest = JSON.parse(+ await readFile(path.join(appRoot, "package.json"), "utf8")+) as { dependencies: Record<string, string> }+const owners = new Map<string, string>()+for (const item of registry.items)+ for (const file of item.files ?? []) {+ const target = file.target+ ?.replace(/^@components\//, "@/components/")+ .replace(/^@lib\//, "@/lib/")+ .replace(/\.(tsx?|jsx?)$/, "")+ if (target && !target.startsWith("@/components/ui/"))+ owners.set(target, item.name)+ }++for (const family of ["base", "radix"] as const) {+ const directory = path.join(outputRoot, "bases", family)+ await mkdir(directory, { recursive: true })+ for (const definition of registry.items) {+ const item = JSON.parse(+ await readFile(path.join(outputRoot, `${definition.name}.json`), "utf8")+ ) as RegistryItem+ const dependencies = new Set(item.dependencies)+ const registryDependencies = new Set(item.registryDependencies ?? [])+ const files: RegistryFile[] = []+ for (const file of item.files ?? []) {+ let content = file.content ?? ""+ if (item.name === "document-scroll-area")+ content = await readFile(+ path.join(+ appRoot,+ `registry/bases/${family}/document-scroll-area.tsx`+ ),+ "utf8"+ )+ if (item.name === "document-color-popover")+ content = await readFile(+ path.join(+ appRoot,+ `registry/bases/${family}/document-color-popover.tsx`+ ),+ "utf8"+ )+ if (item.name === "document-preview-card" && family === "radix")+ content = await readFile(+ path.join(appRoot, "registry/bases/radix/document-preview-card.tsx"),+ "utf8"+ )+ const isDocumentSource =+ file.target?.startsWith("@components/extend/") ||+ file.target?.startsWith("@components/blocks/")+ if (isDocumentSource && /\.[jt]sx?$/.test(file.path))+ content = await format(transformRegistrySource(content, family), {+ ...formatOptions,+ filepath: path.join(appRoot, file.path),+ })+ const source = ts.createSourceFile(+ file.path,+ content,+ ts.ScriptTarget.Latest,+ true,+ ts.ScriptKind.TSX+ )+ for (const statement of source.statements) {+ if (+ !ts.isImportDeclaration(statement) ||+ !ts.isStringLiteral(statement.moduleSpecifier)+ )+ continue+ const modulePath = statement.moduleSpecifier.text+ if (modulePath.startsWith("@/components/ui/"))+ registryDependencies.add(modulePath.slice("@/components/ui/".length))+ else if (modulePath === "@/lib/utils") registryDependencies.add("utils")+ else if (owners.has(modulePath) && owners.get(modulePath) !== item.name)+ registryDependencies.add(`@extend/${owners.get(modulePath)}`)+ else if (!modulePath.startsWith("@/") && !modulePath.startsWith(".")) {+ const packageName = modulePath.startsWith("@")+ ? modulePath.split("/").slice(0, 2).join("/")+ : modulePath.split("/")[0]+ if (["react", "react-dom"].includes(packageName)) continue+ if (+ [...dependencies].some(+ (dependency) =>+ dependency === packageName ||+ dependency.startsWith(`${packageName}@`)+ )+ )+ continue+ const version = manifest.dependencies[packageName]+ if (!version)+ throw new Error(`Missing dependency version for ${packageName}`)+ dependencies.add(`${packageName}@${version}`)+ }+ }+ files.push({ ...file, content })+ }+ if (family === "radix" && item.name === "document-preview-card") {+ for (const dependency of dependencies)+ if (dependency.startsWith("@base-ui/")) dependencies.delete(dependency)+ }+ const result = {+ ...item,+ files,+ dependencies: [...dependencies],+ registryDependencies: [...registryDependencies],+ }+ await writeFile(+ path.join(directory, `${item.name}.json`),+ `${JSON.stringify(result, null, 2)}\n`+ )+ }+}++for (const definition of registry.items) {+ if (+ definition.categories?.includes("documents") ||+ definition.name.startsWith("document-") ||+ definition.name === "registry-icon-props"+ ) {+ await writeFile(+ path.join(outputRoot, `${definition.name}.json`),+ await readFile(+ path.join(outputRoot, "bases/base", `${definition.name}.json`)+ )+ )+ }+}++console.log(+ "Built Base and Radix registry artifacts with direct primitive imports."+)diff --git a/apps/v4/scripts/check-extend-ui-registry.mts b/apps/v4/scripts/check-extend-ui-registry.mtsnew file mode 100644index 0000000..4ba5929--- /dev/null+++ b/apps/v4/scripts/check-extend-ui-registry.mts@@ -0,0 +1,442 @@+import assert from "node:assert/strict"+import { spawn } from "node:child_process"+import { createHash } from "node:crypto"+import {+ cp,+ mkdtemp,+ readdir,+ readFile,+ rm,+ symlink,+ writeFile,+} from "node:fs/promises"+import { createServer } from "node:http"+import os from "node:os"+import path from "node:path"+import ts from "typescript"++import {+ getRegistryFamily,+ styleRegistryDependencies,+} from "../lib/registry-style.ts"++type Family = "base" | "radix"+type RegistryFile = {+ path: string+ target?: string+ content?: string+ type: string+}+type RegistryItem = {+ name: string+ type: string+ categories?: string[]+ dependencies?: string[]+ registryDependencies?: string[]+ files?: RegistryFile[]+}+const styles = ["nova", "vega", "maia", "lyra", "mira", "luma", "sera", "rhea"]+const iconLibraries = {+ lucide: ["lucide-react"],+ hugeicons: ["@hugeicons/react", "@hugeicons/core-free-icons"],+ tabler: ["@tabler/icons-react"],+ phosphor: ["@phosphor-icons/react"],+ remixicon: ["@remixicon/react"],+}+const appRoot = process.cwd()+const registryRoot = path.join(appRoot, "public/r")+const shadcn = path.join(appRoot, "node_modules/.bin/shadcn")++async function run(+ command: string,+ args: string[],+ cwd: string,+ declineOverwrites = false+) {+ const env = { ...process.env }+ for (const key of [+ "INIT_CWD",+ "npm_config_user_agent",+ "npm_config_workspace_dir",+ "npm_execpath",+ "npm_node_execpath",+ ])+ delete env[key]+ await new Promise<void>((resolve, reject) => {+ const child = spawn(command, args, {+ cwd,+ env,+ stdio: declineOverwrites ? ["pipe", "pipe", "pipe"] : "inherit",+ })+ if (declineOverwrites) {+ const output = (chunk: Buffer, destination: NodeJS.WriteStream) => {+ destination.write(chunk)+ if (chunk.toString().includes("(y/N)")) child.stdin!.write("n\n")+ if (/Skipped \d+ files|Created \d+ files/.test(chunk.toString()))+ child.stdin!.end()+ }+ child.stdout!.on("data", (chunk) => output(chunk, process.stdout))+ child.stderr!.on("data", (chunk) => output(chunk, process.stderr))+ }+ child.on("error", reject)+ child.on("exit", (code) =>+ code === 0+ ? resolve()+ : reject(new Error(`${command} exited with code ${code}`))+ )+ })+}++await run("pnpm", ["registry:build"], appRoot)+const catalog = (+ JSON.parse(await readFile(path.join(appRoot, "registry.json"), "utf8")) as {+ items: RegistryItem[]+ }+).items+const publicItems = catalog+ .filter(+ (item) =>+ item.categories?.includes("documents") && item.name !== "pdf-editor-core"+ )+ .map((item) => item.name)+assert(publicItems.includes("pdf-editor"))+const readItem = async (family: Family, name: string): Promise<RegistryItem> =>+ JSON.parse(+ await readFile(+ path.join(registryRoot, "bases", family, `${name}.json`),+ "utf8"+ )+ )++async function iconProbe(+ family: Family,+ library: keyof typeof iconLibraries+): Promise<RegistryItem> {+ const files = new Map<string, RegistryFile>()+ for (const definition of catalog) {+ for (const file of (await readItem(family, definition.name)).files ?? []) {+ if (+ file.target?.match(/^@components\/(extend|blocks)\//) &&+ file.content?.includes("IconPlaceholder")+ ) {+ files.set(file.target, {+ ...file,+ target: `@components/extend/icon-tests/${library}/${path.basename(file.target)}`,+ })+ }+ }+ }+ assert(files.size > 0)+ return {+ name: `icon-probe-${library}`,+ type: "registry:ui",+ files: [...files.values()],+ dependencies: iconLibraries[library],+ }+}++const server = createServer(async (request, response) => {+ try {+ const match = /^\/r\/styles\/([a-z0-9-]+)\/([a-z0-9-]+)\.json$/.exec(+ new URL(request.url ?? "/", "http://localhost").pathname+ )+ if (!match) {+ response.writeHead(404).end()+ return+ }+ const [, style, name] = match+ const family = getRegistryFamily(style)+ if (!family) {+ response.writeHead(404).end()+ return+ }+ const library = name.replace(+ "icon-probe-",+ ""+ ) as keyof typeof iconLibraries+ const item = name.startsWith("icon-probe-")+ ? await iconProbe(family, library)+ : await readItem(family, name)+ response+ .writeHead(200, { "Content-Type": "application/json" })+ .end(JSON.stringify(styleRegistryDependencies(item, style)))+ } catch (error) {+ response.writeHead(500).end(String(error))+ }+})+await new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve))+const address = server.address()+assert(address && typeof address === "object")+const registryUrl = `http://127.0.0.1:${address.port}/r/styles/{style}/{name}.json`+const fixtureRoot = await mkdtemp(path.join(os.tmpdir(), "extend-registry-"))+console.log(`Fixtures: ${fixtureRoot}`)++async function configure(directory: string, changes: Record<string, unknown>) {+ const filename = path.join(directory, "components.json")+ const config = JSON.parse(await readFile(filename, "utf8"))+ await writeFile(+ filename,+ JSON.stringify(+ { ...config, ...changes, registries: { "@extend": registryUrl } },+ null,+ 2+ )+ )+}+async function checksum(filename: string) {+ return createHash("sha256")+ .update(await readFile(filename))+ .digest("hex")+}+async function primitiveHashes(directory: string) {+ const names = await readdir(path.join(directory, "src/components/ui"))+ return Object.fromEntries(+ await Promise.all(+ names.map(async (name) => [+ name,+ await checksum(path.join(directory, "src/components/ui", name)),+ ])+ )+ )+}++async function checkFamily(family: Family) {+ const items = await Promise.all(+ catalog.map((item) => readItem(family, item.name))+ )+ const byName = new Map(items.map((item) => [item.name, item]))+ for (const entry of publicItems) {+ const closure = new Map<string, RegistryItem>()+ const include = (name: string) => {+ if (closure.has(name)) return+ const item = byName.get(name)+ assert(item, `Missing registry dependency ${name}`)+ closure.set(name, item)+ for (const dependency of item.registryDependencies ?? []) {+ if (dependency.startsWith("@extend/"))+ include(dependency.slice("@extend/".length))+ }+ }+ include(entry)+ const dependencies = new Set(+ [...closure.values()].flatMap((item) => item.registryDependencies ?? [])+ )+ const packages = new Set(+ [...closure.values()]+ .flatMap((item) => item.dependencies ?? [])+ .map((name) => name.match(/^(@[^/]+\/[^@]+|[^@]+)/)![0])+ )+ const files = [...closure.values()].flatMap((item) => item.files ?? [])+ const modules = new Set(+ files.map((file) =>+ file.target+ ?.replace(/^@components\//, "@/components/")+ .replace(/^@lib\//, "@/lib/")+ .replace(/^@hooks\//, "@/hooks/")+ .replace(/\.[jt]sx?$/, "")+ )+ )+ for (const file of files) {+ assert(+ !file.target?.startsWith("@ui/"),+ `${entry} writes a consumer primitive`+ )+ const source = ts.createSourceFile(+ file.path,+ file.content ?? "",+ ts.ScriptTarget.Latest,+ true,+ ts.ScriptKind.TSX+ )+ for (const statement of source.statements) {+ if (+ !ts.isImportDeclaration(statement) ||+ !ts.isStringLiteral(statement.moduleSpecifier)+ )+ continue+ const modulePath = statement.moduleSpecifier.text+ if (modulePath.startsWith("@/components/ui/"))+ assert(+ dependencies.has(modulePath.slice("@/components/ui/".length)),+ `${entry} lacks ${modulePath}`+ )+ else if (modulePath === "@/lib/utils")+ assert(dependencies.has("utils"), `${entry} lacks utils`)+ else if (+ modulePath.startsWith("@/") &&+ modulePath !== "@/components/icon-placeholder"+ )+ assert(modules.has(modulePath), `${entry} lacks ${modulePath}`)+ else if (!modulePath.startsWith(".") && !modulePath.startsWith("@/")) {+ const packageName = modulePath.startsWith("@")+ ? modulePath.split("/").slice(0, 2).join("/")+ : modulePath.split("/")[0]+ assert(+ ["react", "react-dom"].includes(packageName) ||+ packages.has(packageName),+ `${entry} lacks package ${packageName}`+ )+ }+ }+ }+ }+ for (const item of items) {+ for (const file of item.files ?? []) {+ if (!file.target?.match(/^@components\/(extend|blocks)\//)) continue+ assert(+ !file.content?.includes("ui-adapter"),+ `${item.name} must not use a UI adapter`+ )+ if (file.content?.match(/<Button[\s/>]/))+ assert.match(+ file.content,+ /import\s*{[^}]*\bButton\b[^}]*}\s*from\s*["']@\/components\/ui\/button["']/+ )+ }+ for (const style of styles) {+ const styled = styleRegistryDependencies(item, `${family}-${style}`)+ item.registryDependencies?.forEach((dependency, index) => {+ if (!dependency.startsWith("@") && !dependency.startsWith("http"))+ assert.equal(+ styled.registryDependencies?.[index],+ `https://ui.shadcn.com/r/styles/${family}-${style}/${dependency}.json`+ )+ })+ }+ }+ console.log(+ `PASS ${family}: individual dependency closures and direct primitive imports`+ )+ if (process.argv.includes("--artifacts-only")) return+ const primitives = [+ ...new Set(+ items+ .filter(+ (item) =>+ item.categories?.includes("documents") ||+ item.name.startsWith("document-")+ )+ .flatMap((item) => item.registryDependencies ?? [])+ .filter((name) => !name.startsWith("@") && !name.startsWith("http"))+ ),+ ]+ const name = `${family}-maia`+ const directory = path.join(fixtureRoot, name)+ await run(+ shadcn,+ [+ "create",+ "--template",+ "vite",+ "-b",+ family,+ "-p",+ "maia",+ "-n",+ name,+ "--no-monorepo",+ "-y",+ ],+ fixtureRoot+ )+ await configure(directory, {})+ await run(shadcn, ["add", ...primitives, "-y"], directory)+ const buttonPath = path.join(directory, "src/components/ui/button.tsx")+ await writeFile(+ buttonPath,+ `${await readFile(buttonPath, "utf8")}\nexport const consumerCustomization = true\n`+ )+ const before = await primitiveHashes(directory)+ const utilsBefore = await checksum(path.join(directory, "src/lib/utils.ts"))+ await run(+ shadcn,+ ["add", ...publicItems.map((name) => `@extend/${name}`), "-y"],+ directory,+ true+ )+ assert.deepEqual(+ await primitiveHashes(directory),+ before,+ "Consumer primitives were changed"+ )+ assert.equal(+ await checksum(path.join(directory, "src/lib/utils.ts")),+ utilsBefore,+ "Consumer utils were changed"+ )+ for (const library of Object.keys(iconLibraries)) {+ await configure(directory, { iconLibrary: library })+ await run(shadcn, ["add", `@extend/icon-probe-${library}`, "-y"], directory)+ const iconDirectory = path.join(+ directory,+ "src/components/extend/icon-tests",+ library+ )+ for (const filename of await readdir(iconDirectory))+ assert(+ !(await readFile(path.join(iconDirectory, filename), "utf8")).includes(+ "IconPlaceholder"+ ),+ `Unresolved icon in ${filename}`+ )+ }+ await writeFile(+ path.join(directory, "src/App.tsx"),+ 'import { PDFEditor } from "./components/extend/pdf-editor"\nexport default function App() { return <PDFEditor src="/fixture.pdf" className="h-svh" defaultMode="annotate" persistSignatures={false} /> }\n'+ )+ await cp(+ path.join(appRoot, "public/samples/attention.pdf"),+ path.join(directory, "public/fixture.pdf")+ )+ await run("npm", ["run", "build"], directory)+ console.log(+ `PASS ${name}: all public components, all icon libraries, unchanged consumer primitives, production build`+ )+ if (process.env.EXTEND_SKIP_STYLE_MATRIX === "1") return+ const otherStyles = styles+ .filter((style) => style !== "maia")+ .map((style) => `${family}-${style}`)+ if (family === "radix") otherStyles.push("new-york", "new-york-v4")+ for (const style of otherStyles) {+ const styledDirectory = path.join(fixtureRoot, style)+ await cp(directory, styledDirectory, {+ recursive: true,+ filter: (source) =>+ !["node_modules", "dist", ".git"].includes(path.basename(source)),+ })+ await symlink(+ path.join(directory, "node_modules"),+ path.join(styledDirectory, "node_modules"),+ "dir"+ )+ await rm(path.join(styledDirectory, "src/components/ui"), {+ recursive: true,+ })+ await configure(styledDirectory, { style })+ await run(shadcn, ["add", ...primitives, "-y"], styledDirectory)+ await run("npx", ["tsc", "-b", "--force"], styledDirectory)+ console.log(`PASS ${style}: all public components and icon libraries`)+ }+}++try {+ const families = (["base", "radix"] as const).filter(+ (family) =>+ !process.env.EXTEND_FIXTURE_FAMILY ||+ process.env.EXTEND_FIXTURE_FAMILY === family+ )+ const results = await Promise.allSettled(families.map(checkFamily))+ const failures = results.filter(+ (result): result is PromiseRejectedResult => result.status === "rejected"+ )+ if (failures.length)+ throw new AggregateError(+ failures.map((result) => result.reason),+ "Registry fixture failures"+ )+} finally {+ server.closeAllConnections()+ await new Promise<void>((resolve) => server.close(() => resolve()))+ if (process.env.EXTEND_KEEP_FIXTURES !== "1")+ await rm(fixtureRoot, { recursive: true })+}diff --git a/apps/v4/scripts/registry-source.mts b/apps/v4/scripts/registry-source.mtsnew file mode 100644index 0000000..83bbdbe--- /dev/null+++ b/apps/v4/scripts/registry-source.mts@@ -0,0 +1,400 @@+import ts from "typescript"++export type PrimitiveFamily = "base" | "radix"++const customModules: Record<string, string> = {+ "@/components/ui/color-picker": "@/components/extend/document-color-picker",+ "@/components/ui/scroll-area": "@/components/extend/document-scroll-area",+ "@/components/ui/group": "@/components/ui/button-group",+ "@/components/ui/toast": "@/components/extend/ui-toast",+ "@/components/ui/spinner": "@/components/extend/document-controls",+ "@/components/extend/document-scroll-content":+ "@/components/extend/document-scroll-area",+}++export function transformRegistrySource(+ content: string,+ family: PrimitiveFamily+) {+ const source = ts.createSourceFile(+ "component.tsx",+ content,+ ts.ScriptTarget.Latest,+ true,+ ts.ScriptKind.TSX+ )+ const f = ts.factory+ const extraImports = new Map<string, Set<string>>()+ let buttonProps = false+ const addImport = (modulePath: string, name: string) => {+ if (!extraImports.has(modulePath)) extraImports.set(modulePath, new Set())+ extraImports.get(modulePath)!.add(name)+ }+ const expression = (text: string) => {+ const parsed = ts.createSourceFile(+ "expression.tsx",+ `const value = (${text})`,+ ts.ScriptTarget.Latest,+ true,+ ts.ScriptKind.TSX+ )+ const statement = parsed.statements[0] as ts.VariableStatement+ const node = statement.declarationList.declarations[0].initializer!+ const synthesize = (node: ts.Node): void => {+ ts.setTextRange(node, { pos: -1, end: -1 })+ ts.forEachChild(node, synthesize)+ }+ synthesize(node)+ return node+ }+ const printer = ts.createPrinter()+ const print = (node: ts.Node) =>+ printer.printNode(ts.EmitHint.Unspecified, node, source)+ const transform: ts.TransformerFactory<ts.SourceFile> = (context) => {+ const visit: ts.Visitor = (node) => {+ if (+ ts.isVariableStatement(node) &&+ node.declarationList.declarations.every(+ (declaration) =>+ ts.isIdentifier(declaration.name) &&+ declaration.name.text === "portalContainer"+ )+ )+ return undefined+ if (+ ts.isImportDeclaration(node) &&+ ts.isStringLiteral(node.moduleSpecifier) &&+ node.importClause?.namedBindings &&+ ts.isNamedImports(node.importClause.namedBindings)+ ) {+ let modulePath = node.moduleSpecifier.text+ const imports: ts.ImportSpecifier[] = []+ for (const specifier of node.importClause.namedBindings.elements) {+ const name = specifier.propertyName?.text ?? specifier.name.text+ if (+ modulePath === "@/components/ui/popover" &&+ name === "PopoverContent" &&+ content.includes("triggerGroupRef")+ ) {+ addImport(+ "@/components/extend/document-color-popover",+ "ColorPopoverContent as PopoverContent"+ )+ continue+ }+ if (modulePath === "@/components/ui/group") {+ imports.push(+ f.updateImportSpecifier(+ specifier,+ specifier.isTypeOnly,+ f.createIdentifier(name.replace(/^Group/, "ButtonGroup")),+ specifier.name+ )+ )+ continue+ }+ if (+ modulePath === "@/components/ui/button" &&+ name === "ButtonProps"+ ) {+ buttonProps = true+ continue+ }+ if (+ modulePath === "@/components/ui/dialog" &&+ name === "DialogPanel"+ ) {+ addImport("@/components/extend/document-controls", "DialogPanel")+ continue+ }+ if (+ modulePath === "@/components/ui/select" &&+ name === "SelectPrimitive"+ ) {+ continue+ }+ if (+ modulePath === "@/components/ui/toggle" &&+ name.startsWith("ToggleGroup")+ ) {+ addImport("@/components/ui/toggle-group", name)+ continue+ }+ imports.push(+ name === "CollapsiblePanel"+ ? f.updateImportSpecifier(+ specifier,+ specifier.isTypeOnly,+ f.createIdentifier("CollapsibleContent"),+ specifier.name+ )+ : specifier+ )+ }+ if (+ modulePath === "@/components/ui/select" &&+ node.importClause.namedBindings.elements.some(+ (s) => s.name.text === "SelectPrimitive"+ )+ ) {+ const packageName =+ family === "base"+ ? "@base-ui/react/select"+ : "@radix-ui/react-select"+ addImport(+ packageName,+ family === "base"+ ? "Select as SelectPrimitive"+ : "* as SelectPrimitive"+ )+ }+ if (!imports.length) return undefined+ modulePath = customModules[modulePath] ?? modulePath+ return f.updateImportDeclaration(+ node,+ node.modifiers,+ f.updateImportClause(+ node.importClause,+ node.importClause.isTypeOnly,+ node.importClause.name,+ f.createNamedImports(imports)+ ),+ f.createStringLiteral(modulePath),+ node.attributes+ )+ }++ if (ts.isJsxElement(node) || ts.isJsxSelfClosingElement(node)) {+ const opening = ts.isJsxElement(node) ? node.openingElement : node+ let name = print(opening.tagName)+ let attributes = [...opening.attributes.properties]+ let children = ts.isJsxElement(node) ? [...node.children] : []+ const get = (name: string) =>+ attributes.find(+ (a): a is ts.JsxAttribute =>+ ts.isJsxAttribute(a) && print(a.name) === name+ )+ const value = (name: string) => {+ const a = get(name)+ if (!a) return undefined+ if (!a.initializer) return "true"+ if (ts.isStringLiteral(a.initializer))+ return JSON.stringify(a.initializer.text)+ if (ts.isJsxExpression(a.initializer) && a.initializer.expression)+ return print(a.initializer.expression)+ throw new Error(`Unsupported ${name} attribute`)+ }+ const remove = (name: string) => {+ attributes = attributes.filter(+ (a) => !ts.isJsxAttribute(a) || print(a.name) !== name+ )+ }+ const set = (name: string, text: string) => {+ remove(name)+ attributes.push(+ f.createJsxAttribute(+ f.createIdentifier(name),+ f.createJsxExpression(undefined, expression(text))+ )+ )+ }+ const classes = (text: string) => {+ const previous = value("className")+ addImport("@/lib/utils", "cn")+ set("className", `cn(${text}${previous ? `, ${previous}` : ""})`)+ }++ if (name === "Input") {+ if (value("size") === '"sm"') classes('"h-8 px-2.5"')+ remove("size")+ remove("nativeInput")+ }+ if (name === "Badge") {+ if (value("size") === '"sm"') classes('"h-4 px-1 text-[10px]"')+ remove("size")+ }+ if (name === "Button") {+ if (value("variant") === '"destructive-outline"') {+ set("variant", '"outline"')+ classes(+ '"border-destructive/32 text-destructive hover:bg-destructive/10"'+ )+ }+ if (get("loading")) {+ name = "LoadingButton"+ addImport("@/components/extend/document-controls", "LoadingButton")+ }+ }+ if (name === "DialogFooter") {+ classes(+ value("variant") === '"bare"'+ ? '"pt-3"'+ : '"border-t bg-muted/72 pt-4"'+ )+ remove("variant")+ }+ if (name === "DropdownMenuCheckboxItem") {+ if (value("variant") === '"switch"') classes('"justify-between"')+ remove("variant")+ }+ if (name === "ToggleGroup") {+ if (get("spacing"))+ set("spacing", value("spacing") === '"none"' ? "0" : "1")+ if (family === "radix") {+ const multiple = value("multiple") === "true"+ set("type", multiple ? '"multiple"' : '"single"')+ remove("multiple")+ if (!multiple) {+ for (const prop of ["value", "defaultValue"])+ if (get(prop)) set(prop, `(${value(prop)})?.[0] ?? ""`)+ if (get("onValueChange"))+ set(+ "onValueChange",+ `(next) => (${value("onValueChange")})(next ? [next] : [])`+ )+ }+ }+ }+ if (+ ["PopoverContent", "SelectContent", "TooltipContent"].includes(name)+ )+ remove("portalProps")+ if (family === "radix") {+ if (name === "Select") {+ remove("items")+ remove("modal")+ }+ if (name === "SelectItem" && get("label")) {+ set("textValue", value("label")!)+ remove("label")+ }+ if (name === "SelectContent" && get("alignItemWithTrigger")) {+ set(+ "position",+ `${value("alignItemWithTrigger")} ? "item-aligned" : "popper"`+ )+ remove("alignItemWithTrigger")+ }+ if (name === "TooltipProvider" && get("delay")) {+ set("delayDuration", value("delay")!)+ remove("delay")+ }+ if (name === "TabsContent" && get("keepMounted")) {+ set("forceMount", value("keepMounted")!)+ remove("keepMounted")+ classes('"data-[state=inactive]:hidden"')+ }+ if (get("render")) {+ const render = get("render")!.initializer+ if (+ !render ||+ !ts.isJsxExpression(render) ||+ !render.expression ||+ !(+ ts.isJsxSelfClosingElement(render.expression) ||+ ts.isJsxElement(render.expression)+ )+ )+ throw new Error(`Unsupported render on ${name}`)+ const element = render.expression+ const childOpening = ts.isJsxElement(element)+ ? element.openingElement+ : f.createJsxOpeningElement(+ element.tagName,+ element.typeArguments,+ element.attributes+ )+ const childClosing = ts.isJsxElement(element)+ ? element.closingElement+ : f.createJsxClosingElement(element.tagName)+ children = [+ f.createJsxElement(+ childOpening,+ children.length+ ? children+ : ts.isJsxElement(element)+ ? element.children+ : [],+ childClosing+ ),+ ]+ remove("render")+ set("asChild", "true")+ }+ } else if (get("asChild")) {+ const elements = children.filter(+ (c) => !ts.isJsxText(c) || c.text.trim()+ )+ if (elements.length !== 1)+ throw new Error(+ `Expected one child for ${name}: ${print(node).slice(0, 700)}`+ )+ const child = elements[0]+ if (ts.isJsxExpression(child) && child.expression)+ set("render", print(child.expression))+ else if (ts.isJsxElement(child) || ts.isJsxSelfClosingElement(child))+ set("render", print(child))+ else throw new Error(`Unsupported child for ${name}`)+ remove("asChild")+ children = []+ }+ const tag =+ name === print(opening.tagName)+ ? opening.tagName+ : f.createIdentifier(name)+ const attrs = f.createJsxAttributes(attributes)+ const result =+ ts.isJsxSelfClosingElement(node) && !children.length+ ? f.updateJsxSelfClosingElement(+ node,+ tag,+ node.typeArguments,+ attrs+ )+ : f.createJsxElement(+ f.createJsxOpeningElement(tag, opening.typeArguments, attrs),+ children,+ f.createJsxClosingElement(tag)+ )+ return ts.visitEachChild(result, visit, context)+ }+ return ts.visitEachChild(node, visit, context)+ }+ return (source) => ts.visitNode(source, visit) as ts.SourceFile+ }+ const result = ts.transform(source, [transform])+ let output = printer.printFile(result.transformed[0])+ result.dispose()+ const existing = ts.createSourceFile(+ "output.tsx",+ output,+ ts.ScriptTarget.Latest,+ true,+ ts.ScriptKind.TSX+ )+ const declared = new Set(+ existing.statements.flatMap((s) =>+ ts.isImportDeclaration(s) &&+ s.importClause?.namedBindings &&+ ts.isNamedImports(s.importClause.namedBindings)+ ? s.importClause.namedBindings.elements.map((e) => e.name.text)+ : []+ )+ )+ const additions: string[] = []+ for (const [modulePath, names] of extraImports) {+ const missing = [...names].filter((n) => !declared.has(n))+ if (!missing.length) continue+ additions.push(+ missing[0].startsWith("* as ")+ ? `import ${missing[0]} from "${modulePath}"`+ : `import { ${missing.join(", ")} } from "${modulePath}"`+ )+ }+ output = output.replace(/("use client";?)/, `$1\n${additions.join("\n")}`)+ if (!output.includes('"use client"'))+ output = `${additions.join("\n")}\n${output}`+ if (buttonProps)+ output += "\ntype ButtonProps = React.ComponentProps<typeof Button>\n"+ return output+}diff --git a/apps/v4/scripts/registry-source.test.mts b/apps/v4/scripts/registry-source.test.mtsnew file mode 100644index 0000000..1285286--- /dev/null+++ b/apps/v4/scripts/registry-source.test.mts@@ -0,0 +1,135 @@+import assert from "node:assert/strict"+import { readFileSync } from "node:fs"+import test from "node:test"+import ts from "typescript"++import {+ getRegistryFamily,+ styleRegistryDependencies,+} from "../lib/registry-style.ts"+import { transformRegistrySource } from "./registry-source.mts"++const source = `"use client"+import {Button} from "@/components/ui/button"+import {DialogTrigger, DialogClose, DialogPanel} from "@/components/ui/dialog"+import {Select, SelectContent, SelectItem} from "@/components/ui/select"+import {ToggleGroup, ToggleGroupItem} from "@/components/ui/toggle"+export function Controls() { return <><DialogTrigger render={<Button/>}>Open</DialogTrigger><DialogClose render={<Button>Close</Button>}/><DialogPanel>Body</DialogPanel><Select items={options}><SelectContent alignItemWithTrigger={false}><SelectItem value="one" label="One">One</SelectItem></SelectContent></Select><ToggleGroup value={values} onValueChange={setValues}><ToggleGroupItem value="one">One</ToggleGroupItem></ToggleGroup></> }`++for (const family of ["base", "radix"] as const) {+ test(`${family} source keeps direct primitives and valid composition`, () => {+ const output = transformRegistrySource(source, family)+ assert.match(output, /import \{ Button \} from "@\/components\/ui\/button"/)+ assert.doesNotMatch(output, /ui-adapter/)+ assert.match(output, /@\/components\/ui\/toggle-group/)+ const parsed = ts.createSourceFile(+ "controls.tsx",+ output,+ ts.ScriptTarget.Latest,+ true,+ ts.ScriptKind.TSX+ )+ assert.equal(+ (parsed as ts.SourceFile & { parseDiagnostics: unknown[] })+ .parseDiagnostics.length,+ 0+ )+ if (family === "radix") {+ assert.doesNotMatch(+ output,+ /render=|items=|alignItemWithTrigger=|label="One"/+ )+ assert.match(output, /<Button>Open<\/Button>/)+ assert.match(output, /<Button>Close<\/Button>/)+ assert.match(output, /next \? \[next\] : \[\]/)+ assert.match(output, /textValue=/)+ } else {+ assert.match(output, /render=/)+ assert.match(output, /items=/)+ }+ })+}++test("Base child composition retains content and event handlers", () => {+ const output = transformRegistrySource(+ "const control = <TooltipTrigger asChild><button onClick={action}><span>Label</span></button></TooltipTrigger>",+ "base"+ )+ assert.doesNotMatch(output, /asChild/)+ assert.match(output, /onClick=\{action\}/)+ assert.match(output, /<span>Label<\/span>/)+})++test("Toggle spacing retains the compact toolbar gap", () => {+ for (const family of ["base", "radix"] as const) {+ const output = transformRegistrySource(+ 'const controls = <><ToggleGroup spacing="default" /><ToggleGroup spacing="none" /></>',+ family+ )+ assert.match(output, /spacing=\{\(1\)\}/)+ assert.match(output, /spacing=\{\(0\)\}/)+ }+})++test("Style routing uses the family without a preset allowlist", () => {+ assert.equal(getRegistryFamily("base-nova"), "base")+ assert.equal(getRegistryFamily("radix-maia"), "radix")+ assert.equal(getRegistryFamily("radix-future"), "radix")+ assert.equal(getRegistryFamily("new-york"), "radix")+ assert.equal(getRegistryFamily("new-york-v4"), "radix")+ assert.equal(getRegistryFamily("default"), null)+ assert.equal(getRegistryFamily("invalid"), null)+ assert.deepEqual(+ styleRegistryDependencies(+ { registryDependencies: ["button", "@extend/pdf-editor-core"] },+ "radix-vega"+ ).registryDependencies,+ [+ "https://ui.shadcn.com/r/styles/radix-vega/button.json",+ "@extend/pdf-editor-core",+ ]+ )+})++test("The editor provider includes its dialogs and side panels", () => {+ const source = ts.createSourceFile(+ "editor.tsx",+ readFileSync(+ new URL("../components/extend/pdf-editor.tsx", import.meta.url),+ "utf8"+ ),+ ts.ScriptTarget.Latest,+ true,+ ts.ScriptKind.TSX+ )+ let covered = false+ const visit = (node: ts.Node) => {+ if (+ ts.isJsxSelfClosingElement(node) &&+ node.tagName.getText(source) === "PdfEditorInner"+ ) {+ let parent = node.parent+ while (parent) {+ if (+ ts.isJsxElement(parent) &&+ parent.openingElement.tagName.getText(source) === "TooltipProvider"+ )+ covered = true+ parent = parent.parent+ }+ }+ ts.forEachChild(node, visit)+ }+ visit(source)+ assert(covered)+})++test("The icon-only color select uses popup positioning", () => {+ const source = readFileSync(+ new URL("../components/ui/color-picker.tsx", import.meta.url),+ "utf8"+ )+ assert.match(source, /<SelectContent\s+alignItemWithTrigger=\{false\}/)+ assert.match(transformRegistrySource(source, "radix"), /position=\{/)+ assert.doesNotMatch(source, /RiColorPickerLine/)+})diff --git a/apps/v4/tsconfig.json b/apps/v4/tsconfig.jsonindex 2480907..fe75b9f 100644--- a/apps/v4/tsconfig.json+++ b/apps/v4/tsconfig.json@@ -6,6 +6,7 @@"skipLibCheck": true,"strict": true,"noEmit": true,+ "allowImportingTsExtensions": true,"esModuleInterop": true,"module": "esnext","moduleResolution": "bundler",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e282843..9e8fad4 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -150,6 +150,18 @@ importers:'@pierre/trees':specifier: 1.0.0-beta.4+ '@radix-ui/react-hover-card':+ specifier: ^1.1.23+ version: 1.1.23(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-popover':+ specifier: ^1.1.23+ version: 1.1.23(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-scroll-area':+ specifier: ^1.2.18+ version: 1.2.18(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-select':+ specifier: ^2.3.7+ version: 2.3.7(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@tabler/icons-react':specifier: ^3.31.0version: 3.34.1([email protected])@@ -1902,9 +1914,41 @@ packages:react: ^18.3.1 || ^19.0.0react-dom: ^18.3.1 || ^19.0.0+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA==}+'@radix-ui/[email protected]':resolution: {integrity: sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q==}++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-v4zggRcjadnI+ClKDuijlQEW4tw3NoaeHc/PwpKnLoLLKNUG4InLegkstooLcRIUWCs+8L22dGURCVuFfOKfnA==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-9W+B9NPF0NaaPh/1NJd3+KqsnlLqU9H7T2rvww+fp+T/evVXdNAyYcnfRQZFOjkR1ajQp3yORlqnI8soawLvNA==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==}peerDependencies:@@ -1914,6 +1958,15 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==}peerDependencies:@@ -1923,6 +1976,15 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-RHCUGwKHDr0hDGg4X7ma4JG4/+12qxw8rkh5QKdDldlCvtja6nUx1Ef/8HVrJze81lEsgLQlqjzjGNHantgnQA==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==}peerDependencies:@@ -1936,6 +1998,15 @@ packages:'@types/react-dom':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-5pzg4FGQNpExhnhT2zlrP1wZFaYCd1K0nYWoFAdcYoYK868IEigqMX3B3f8yIoRlAhAeDWciLI6ZdCKHF9P4Vg==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==}peerDependencies:@@ -1949,6 +2020,19 @@ packages:'@types/react-dom':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-8g4pfOL9HoKKLWGiypT+dphVqjFfmcXO5GBnhsG6zI+lxAx/8feQpr+1LSN8Re3hiZ+XkLNS4O9ztK11/LzQ6w==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==}peerDependencies:@@ -1958,6 +2042,28 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-RNOJjfZMTyBM6xYmV3IVGXkPjIhcBAuv48POevAXwrGJhkWZ9p1rFoIS1JFooPuT193AZmRsCPhpoVJxx6OPoQ==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-wmRZ2WWLvmt6KHy2rNPOdPUjwq5xOHY02+m+udwJTn0aNIox/rkskAvJTyTLGhPK6KgrUjlJUJpgmx/+wFiFIQ==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==}peerDependencies:@@ -1971,6 +2077,19 @@ packages:'@types/react-dom':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-H8qONfZd3ltrU3+jHCIgITbWo6e1iTKvP9DHdrvYbX48ooRM5FjEDTn16AMwdfuOGkWdZEhpl3PLL/Wk/AnHDQ==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==}peerDependencies:@@ -1980,6 +2099,54 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-mw58MrBlyHWFisTOYignD0vf/3gdcgAR+9of1s9G/38CbFiUwH1nCDkc0AUM9IrXFgN5Ue8n45j9WCgyM1sbiQ==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-UsJrrd7w4wuKKTdvd/DNERVlwSlUcyXzjhyDwBk+3aPOsCjOY6ZSbxuw8E6lZTjjfP8Cpd0J8VVkrYUWyGYXyg==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-vKQLcWypUnwZVvfV7UkGahH2g6ySe8M8R+zYBwPrv5byZ9QAW6cQVvNKo7GgmD+p8aYb6D9JBuvy8/WhOno2wQ==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==}peerDependencies:@@ -1993,6 +2160,19 @@ packages:'@types/react-dom':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-3wyzCQ6+ubRA+D4uv9m95JYLXxmOHp05qjrkjeA7uKHHtjpPggQzc6DAb0URl7j67oR0K2foO4ip27TiX037Bw==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==}peerDependencies:@@ -2006,6 +2186,19 @@ packages:'@types/react-dom':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-MucOnzh6hR5mid6VpkbglRAMYMjKLqRnGBbjXkzjK52fuQDd1qbkx78a5P40mkcnVXJdEVxm26E9OPAiUq7nBg==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==}peerDependencies:@@ -2032,6 +2225,32 @@ packages:'@types/react-dom':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-Zn5Cd171wxsO3Dfg8HaW6RifTb9CYTKQJHs/G4+LN1GfmJpaQMZQyQxMprVPHpaz7QY4l9BxK2JwQuzHsXC8nA==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-WFGImkmbzcfxeIwq/+4HvRN0pizBwbwQUED4I13ezQsDdfl38ZntN6TmR8XaSzPBqoCToe8rF75j6NPNDSzhbg==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==}peerDependencies:@@ -2050,6 +2269,15 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-qx7oqnYbxnK9kYI9m317qmFmEgo6ywqWvbTogdj7cL9p3/yx4M48p7Rnw5z3H890cL/ow/EeWJsuTykeZVXP5Q==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==}peerDependencies:@@ -2059,6 +2287,15 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-R6OUY2e2fA6Yn6s+VSx5KBV6Nx8LQEhu+cz7LCej18rQ1HLyg9PSC9jP/ZNx0o6FAIK9c0F1kHylzSxKsdlkrQ==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==}peerDependencies:@@ -2068,6 +2305,15 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-uEQJGT97ZA/TgP/Hydw47lHu+/vQj6z/0jA+WeTbK1o9Rx45GImjpD0tc3W5ad3D6XTSR6e1yEO0FvGq6WQfVQ==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==}peerDependencies:@@ -2077,6 +2323,15 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==}peerDependencies:@@ -2095,6 +2350,58 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-XoSLhbRbqxFtgJoi2fNHA3C6pDlY34x508vUpUGoFZfvePfHXHbE1lC4FYFMnJWgiCRroSTw6fOsXQoVS9RwZg==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-D3anSY15EJoxrihpsXI6SMrmmonnQtR2ni7arO+Lfdg3O95b9hNXxONk8jA5C8ANdF/h5HMAxejgs8PWJ6rlhw==}+ peerDependencies:+ '@types/react': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-NFS86RYYZb4/exihaESBGOpMJFz8MGLAfu3mOBSGByVnVPC9JPASfYubxd/8KbkQK0sYAv8lVQDEQukDX/qXvQ==}+ peerDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==}+'@rollup/[email protected]':resolution: {integrity: sha512-c0wdcekXtQvvn5Tsrk/+op/gUArrbWaFduBnTLP2l1cKLSQs4diMWjJw3m6A0DdzT8dAAX95KpkJ3qynCePbmw==}cpu: [arm]@@ -3398,6 +3705,7 @@ packages:resolution: {integrity: sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}+ deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.hasBin: truepeerDependencies:jiti: '*'@@ -3720,9 +4028,6 @@ packages:resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==}engines: {node: '>= 0.4'}- resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==}-resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==}@@ -6072,7 +6377,7 @@ snapshots:'@babel/[email protected]':dependencies:'@babel/code-frame': 7.27.1- '@babel/parser': 7.28.0+ '@babel/parser': 7.29.7'@babel/types': 7.28.2'@babel/[email protected]':@@ -7303,20 +7608,57 @@ snapshots:react: 19.2.3react-dom: 19.2.3([email protected])+ '@radix-ui/[email protected]': {}+'@radix-ui/[email protected]': {}+ '@radix-ui/[email protected]': {}++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+dependencies:react: 19.2.3optionalDependencies:'@types/react': 19.2.2+ dependencies:+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2+dependencies:react: 19.2.3optionalDependencies:'@types/react': 19.2.2+ dependencies:+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2+'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.3@@ -7339,6 +7681,12 @@ snapshots:'@types/react': 19.2.2'@types/react-dom': 19.2.2(@types/[email protected])+ dependencies:+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2+'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.3@@ -7352,12 +7700,42 @@ snapshots:'@types/react': 19.2.2'@types/react-dom': 19.2.2(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-effect-event': 0.0.5(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+dependencies:react: 19.2.3optionalDependencies:'@types/react': 19.2.2+ dependencies:+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])@@ -7369,6 +7747,23 @@ snapshots:'@types/react': 19.2.2'@types/react-dom': 19.2.2(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.19(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-popper': 1.3.7(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-portal': 1.1.17(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-controllable-state': 1.2.6(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+dependencies:'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])@@ -7376,6 +7771,64 @@ snapshots:optionalDependencies:'@types/react': 19.2.2+ dependencies:+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.19(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-focus-guards': 1.1.6(@types/[email protected])([email protected])+ '@radix-ui/react-focus-scope': 1.1.16(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-popper': 1.3.7(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-portal': 1.1.17(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])+ '@radix-ui/react-use-controllable-state': 1.2.6(@types/[email protected])([email protected])+ aria-hidden: 1.2.6+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ react-remove-scroll: 2.7.2(@types/[email protected])([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-arrow': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-rect': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-size': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/rect': 1.1.3+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-primitive': 2.1.3(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])@@ -7386,6 +7839,15 @@ snapshots:'@types/react': 19.2.2'@types/react-dom': 19.2.2(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])@@ -7396,6 +7858,15 @@ snapshots:'@types/react': 19.2.2'@types/react-dom': 19.2.2(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-slot': 1.2.3(@types/[email protected])([email protected])@@ -7414,6 +7885,53 @@ snapshots:'@types/react': 19.2.2'@types/react-dom': 19.2.2(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/number': 1.1.3+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-direction': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-presence': 1.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/number': 1.1.3+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-collection': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-direction': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.19(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-focus-guards': 1.1.6(@types/[email protected])([email protected])+ '@radix-ui/react-focus-scope': 1.1.16(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-popper': 1.3.7(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-portal': 1.1.17(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-controllable-state': 1.2.6(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-previous': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-visually-hidden': 1.2.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ aria-hidden: 1.2.6+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ react-remove-scroll: 2.7.2(@types/[email protected])([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])+dependencies:'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])@@ -7428,12 +7946,25 @@ snapshots:optionalDependencies:'@types/react': 19.2.2+ dependencies:+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2+dependencies:react: 19.2.3optionalDependencies:'@types/react': 19.2.2+ dependencies:+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2+dependencies:'@radix-ui/react-use-effect-event': 0.0.2(@types/[email protected])([email protected])@@ -7442,6 +7973,15 @@ snapshots:optionalDependencies:'@types/react': 19.2.2+ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-use-effect-event': 0.0.5(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2+dependencies:'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])@@ -7449,6 +7989,13 @@ snapshots:optionalDependencies:'@types/react': 19.2.2+ dependencies:+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2+dependencies:'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])@@ -7462,6 +8009,43 @@ snapshots:optionalDependencies:'@types/react': 19.2.2+ dependencies:+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2++ dependencies:+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2++ dependencies:+ '@radix-ui/rect': 1.1.3+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2++ dependencies:+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.3+ optionalDependencies:+ '@types/react': 19.2.2++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ react: 19.2.3+ react-dom: 19.2.3([email protected])+ optionalDependencies:+ '@types/react': 19.2.2+ '@types/react-dom': 19.2.2(@types/[email protected])++ '@radix-ui/[email protected]': {}+'@rollup/[email protected]':optional: true@@ -8769,10 +9353,10 @@ snapshots:'@nolyfill/is-core-module': 1.0.39debug: 4.4.3eslint: 9.26.0([email protected])([email protected])- get-tsconfig: 4.10.1+ get-tsconfig: 4.14.0is-bun-module: 2.0.0stable-hash: 0.0.5- tinyglobby: 0.2.15+ tinyglobby: 0.2.17unrs-resolver: 1.11.1optionalDependencies:eslint-plugin-import: 2.32.0(@typescript-eslint/[email protected]([email protected]([email protected])([email protected]))([email protected]))([email protected])([email protected]([email protected])([email protected]))@@ -9128,7 +9712,6 @@ snapshots:optionalDependencies:picomatch: 4.0.5- optional: truedependencies:@@ -9304,14 +9887,9 @@ snapshots:es-errors: 1.3.0get-intrinsic: 1.3.0- dependencies:- resolve-pkg-maps: 1.0.0-dependencies:resolve-pkg-maps: 1.0.0- optional: true@@ -10649,8 +11227,7 @@ snapshots:- optional: true+ [email protected]: {}@@ -11463,7 +12040,6 @@ snapshots:dependencies:fdir: 6.5.0([email protected])picomatch: 4.0.5- optional: true