@codemation/ui 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +19 -0
- package/.turbo/turbo-lint.log +4 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +25 -0
- package/LICENSE +37 -0
- package/dist/index.cjs +845 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +417 -0
- package/dist/index.d.ts +417 -0
- package/dist/index.js +749 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -0
- package/src/components/StatusPill.tsx +33 -0
- package/src/components/composite/CodemationDialog.tsx +137 -0
- package/src/components/composite/JsonMonacoEditor.tsx +75 -0
- package/src/components/reui/tree/Tree.tsx +35 -0
- package/src/components/reui/tree/TreeContext.ts +21 -0
- package/src/components/reui/tree/TreeDragLine.tsx +28 -0
- package/src/components/reui/tree/TreeItem.tsx +51 -0
- package/src/components/reui/tree/TreeItemLabel.tsx +58 -0
- package/src/components/ui/badge.tsx +40 -0
- package/src/components/ui/button.tsx +64 -0
- package/src/components/ui/collapsible.tsx +26 -0
- package/src/components/ui/dialog.tsx +137 -0
- package/src/components/ui/dropdown-menu.tsx +239 -0
- package/src/components/ui/input.tsx +20 -0
- package/src/components/ui/label.tsx +18 -0
- package/src/components/ui/select.tsx +171 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/tabs.tsx +76 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/index.ts +76 -0
- package/src/lib/cn.ts +6 -0
- package/src/lucide-icons.d.ts +46 -0
- package/test/StatusPill.test.tsx +26 -0
- package/test/primitives.test.tsx +707 -0
- package/test/setup.ts +7 -0
- package/test/ui-components.test.tsx +208 -0
- package/tsconfig.json +11 -0
- package/tsdown.config.ts +10 -0
- package/vitest.ui.config.ts +40 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Slot","LabelPrimitive","SwitchPrimitive","Slot","CollapsiblePrimitive","DialogPrimitive","XIcon","DropdownMenuPrimitive","CheckIcon","ChevronRightIcon","SelectPrimitive","ChevronDownIcon","CheckIcon","ChevronUpIcon","TabsPrimitive","Slot","Slot","Slot","Fragment","MinusIcon","PlusIcon","ChevronDownIcon","defaultOptions: NonNullable<ComponentProps<typeof Editor>[\"options\"]>","Editor","KIND_CLASSES: Record<StatusKind, string>"],"sources":["../src/lib/cn.ts","../src/components/ui/badge.tsx","../src/components/ui/input.tsx","../src/components/ui/label.tsx","../src/components/ui/switch.tsx","../src/components/ui/button.tsx","../src/components/ui/collapsible.tsx","../src/components/ui/dialog.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/select.tsx","../src/components/ui/tabs.tsx","../src/components/ui/textarea.tsx","../src/components/reui/tree/TreeContext.ts","../src/components/reui/tree/Tree.tsx","../src/components/reui/tree/TreeDragLine.tsx","../src/components/reui/tree/TreeItem.tsx","../src/components/reui/tree/TreeItemLabel.tsx","../src/components/composite/CodemationDialog.tsx","../src/components/composite/JsonMonacoEditor.tsx","../src/components/StatusPill.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { cn } from \"../../lib/cn\";\n\nconst badgeVariants = cva(\n \"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap shadow-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive:\n \"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Badge({\n className,\n variant = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"span\";\n\n return (\n <Comp data-slot=\"badge\" data-variant={variant} className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n","import * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","import * as React from \"react\";\nimport { Label as LabelPrimitive } from \"radix-ui\";\nimport { cn } from \"../../lib/cn\";\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"text-sm leading-none font-medium select-none group-data-[disabled=true]/form-item:pointer-events-none group-data-[disabled=true]/form-item:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n","import * as React from \"react\";\nimport { Switch as SwitchPrimitive } from \"radix-ui\";\nimport { cn } from \"../../lib/cn\";\n\nfunction Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n \"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-[color,box-shadow] outline-none\",\n \"focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80\",\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n \"pointer-events-none block size-4 rounded-full bg-white shadow-sm ring-0 transition-transform\",\n \"data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0\",\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { cn } from \"../../lib/cn\";\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap shadow-sm transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n outline:\n \"shadow-none border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"shadow-none hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"shadow-none bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"shadow-none text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n xs: \"h-6 gap-1 rounded-sm px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-sm px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n icon: \"size-8\",\n \"icon-xs\": \"size-6 rounded-sm in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-7 rounded-sm in-data-[slot=button-group]:rounded-md\",\n \"icon-lg\": \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot.Root : \"button\";\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\";\n\nimport { cn } from \"../../lib/cn\";\n\nfunction Collapsible(props: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger(props: React.ComponentProps<typeof CollapsiblePrimitive.Trigger>) {\n return <CollapsiblePrimitive.Trigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Content>) {\n return (\n <CollapsiblePrimitive.Content\n data-slot=\"collapsible-content\"\n className={cn(\"overflow-hidden\", className)}\n {...props}\n />\n );\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\n\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"./button\";\nimport XIcon from \"lucide-react/dist/esm/icons/x\";\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n <Button variant=\"ghost\" className=\"absolute top-2 right-2\" size=\"icon-sm\">\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"dialog-header\" className={cn(\"flex flex-col gap-2\", className)} {...props} />;\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-base leading-none font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\n\nimport { cn } from \"../../lib/cn\";\nimport CheckIcon from \"lucide-react/dist/esm/icons/check\";\nimport ChevronRightIcon from \"lucide-react/dist/esm/icons/chevron-right\";\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n align = \"start\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n align={align}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-radio-item-indicator\"\n >\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\n\nimport { cn } from \"../../lib/cn\";\nimport CheckIcon from \"lucide-react/dist/esm/icons/check\";\nimport ChevronDownIcon from \"lucide-react/dist/esm/icons/chevron-down\";\nimport ChevronUpIcon from \"lucide-react/dist/esm/icons/chevron-up\";\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" className={cn(\"scroll-my-1 p-1\", className)} {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\";\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-sm transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-sm *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(\n \"relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n \"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\",\n position === \"popper\" && \"\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\n\nimport { cn } from \"../../lib/cn\";\n\nfunction Tabs({ className, orientation = \"horizontal\", ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n className={cn(\"group/tabs flex gap-2 data-horizontal:flex-col\", className)}\n {...props}\n />\n );\n}\n\nconst tabsListVariants = cva(\n \"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none\",\n {\n variants: {\n variant: {\n default: \"bg-muted\",\n line: \"gap-1 bg-transparent\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction TabsList({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n \"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent\",\n \"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground\",\n \"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn(\"flex-1 text-sm outline-none\", className)}\n {...props}\n />\n );\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import type { ItemInstance } from \"@headless-tree/core\";\nimport { createContext } from \"react\";\n\nexport type ToggleIconType = \"chevron\" | \"plus-minus\";\n\nexport type TreeContextValue<T = unknown> = {\n indent: number;\n currentItem?: ItemInstance<T>;\n tree?: {\n getContainerProps?: () => Record<string, unknown>;\n getDragLineStyle?: () => Record<string, unknown> | null;\n };\n toggleIconType?: ToggleIconType;\n};\n\nexport const TreeContext = createContext<TreeContextValue>({\n indent: 20,\n currentItem: undefined,\n tree: undefined,\n toggleIconType: \"plus-minus\",\n});\n","\"use client\";\n\nimport { Slot } from \"radix-ui\";\nimport type { CSSProperties, HTMLAttributes } from \"react\";\n\nimport { cn } from \"../../../lib/cn\";\n\nimport { TreeContext, type ToggleIconType } from \"./TreeContext\";\n\ntype TreeProps = HTMLAttributes<HTMLDivElement> & {\n indent?: number;\n tree?: {\n getContainerProps?: () => Record<string, unknown>;\n };\n toggleIconType?: ToggleIconType;\n asChild?: boolean;\n};\n\nexport function Tree(args: Readonly<TreeProps>) {\n const { indent = 20, tree, className, toggleIconType = \"chevron\", asChild = false, ...props } = args;\n const containerProps = tree?.getContainerProps?.() ?? {};\n const mergedProps = { ...props, ...containerProps };\n const { style: propStyle, ...otherProps } = mergedProps as HTMLAttributes<HTMLDivElement>;\n const mergedStyle = {\n ...propStyle,\n \"--tree-indent\": `${indent}px`,\n } as CSSProperties;\n const Component = asChild ? Slot.Root : \"div\";\n\n return (\n <TreeContext.Provider value={{ indent, tree, toggleIconType }}>\n <Component data-slot=\"tree\" style={mergedStyle} className={cn(\"flex flex-col\", className)} {...otherProps} />\n </TreeContext.Provider>\n );\n}\n","\"use client\";\n\nimport { useContext, type HTMLAttributes } from \"react\";\n\nimport { cn } from \"../../../lib/cn\";\n\nimport { TreeContext } from \"./TreeContext\";\n\nexport function TreeDragLine(args: Readonly<HTMLAttributes<HTMLDivElement>>) {\n const { className, ...props } = args;\n const { tree } = useContext(TreeContext);\n const dragLine = tree?.getDragLineStyle?.();\n\n if (!dragLine) {\n return null;\n }\n\n return (\n <div\n style={dragLine}\n className={cn(\n \"bg-primary before:bg-background before:border-primary absolute z-30 -mt-px h-0.5 w-[unset] before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n","\"use client\";\n\nimport type { ItemInstance } from \"@headless-tree/core\";\nimport { Slot } from \"radix-ui\";\nimport { useContext, type ButtonHTMLAttributes, type CSSProperties } from \"react\";\n\nimport { cn } from \"../../../lib/cn\";\n\nimport { TreeContext } from \"./TreeContext\";\n\ntype TreeItemProps<T = unknown> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"indent\"> & {\n item: ItemInstance<T>;\n indent?: number;\n asChild?: boolean;\n};\n\nexport function TreeItem<T = unknown>(args: Readonly<TreeItemProps<T>>) {\n const { item, className, asChild = false, children, ...props } = args;\n const parentContext = useContext(TreeContext);\n const indent = parentContext.indent;\n const itemProps = item.getProps();\n const mergedProps = { ...props, children, ...itemProps };\n const { style: propStyle, ...otherProps } = mergedProps as ButtonHTMLAttributes<HTMLButtonElement>;\n const mergedStyle = {\n ...propStyle,\n \"--tree-padding\": `${item.getItemMeta().level * indent}px`,\n } as CSSProperties;\n const defaultProps = {\n \"data-slot\": \"tree-item\",\n style: mergedStyle,\n className: cn(\n \"z-10 ps-(--tree-padding) outline-hidden select-none not-last:pb-0.5 focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n ),\n \"data-focus\": item.isFocused() || false,\n \"data-folder\": item.isFolder() || false,\n \"data-selected\": typeof item.isSelected === \"function\" ? item.isSelected() || false : undefined,\n \"data-drag-target\": typeof item.isDragTarget === \"function\" ? item.isDragTarget() || false : undefined,\n \"data-search-match\": typeof item.isMatchingSearch === \"function\" ? item.isMatchingSearch() || false : undefined,\n \"aria-expanded\": item.isExpanded(),\n };\n const Component = asChild ? Slot.Root : \"button\";\n\n return (\n <TreeContext.Provider value={{ ...parentContext, currentItem: item as ItemInstance<unknown> }}>\n <Component {...defaultProps} {...otherProps}>\n {children}\n </Component>\n </TreeContext.Provider>\n );\n}\n","\"use client\";\n\nimport ChevronDownIcon from \"lucide-react/dist/esm/icons/chevron-down\";\nimport MinusIcon from \"lucide-react/dist/esm/icons/minus\";\nimport PlusIcon from \"lucide-react/dist/esm/icons/plus\";\nimport { Slot } from \"radix-ui\";\nimport { Fragment, useContext, type HTMLAttributes } from \"react\";\n\nimport { cn } from \"../../../lib/cn\";\n\nimport { TreeContext } from \"./TreeContext\";\n\ntype TreeItemLabelProps = HTMLAttributes<HTMLSpanElement> & {\n item?: {\n isFolder: () => boolean;\n isExpanded: () => boolean;\n getItemName: () => string;\n };\n asChild?: boolean;\n};\n\nexport function TreeItemLabel(args: Readonly<TreeItemLabelProps>) {\n const { item: propItem, children, className, asChild = false, ...props } = args;\n const { currentItem, toggleIconType } = useContext(TreeContext);\n const item = propItem ?? currentItem;\n\n if (!item) {\n return null;\n }\n\n const Component = asChild ? Slot.Root : \"span\";\n\n return (\n <Component\n data-slot=\"tree-item-label\"\n className={cn(\n \"in-focus-visible:ring-ring/50 bg-background hover:bg-accent in-data-[selected=true]:bg-accent in-data-[selected=true]:text-accent-foreground in-data-[drag-target=true]:bg-accent flex items-center gap-1 transition-colors not-in-data-[folder=true]:ps-7 in-focus-visible:ring-[3px] in-data-[search-match=true]:bg-blue-50! [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"rounded-sm py-1.5 px-2 text-sm\",\n className,\n )}\n {...props}\n >\n <Fragment>\n {item.isFolder() &&\n (toggleIconType === \"plus-minus\" ? (\n item.isExpanded() ? (\n <MinusIcon className=\"text-muted-foreground size-3.5\" stroke=\"currentColor\" strokeWidth=\"1\" />\n ) : (\n <PlusIcon className=\"text-muted-foreground size-3.5\" stroke=\"currentColor\" strokeWidth=\"1\" />\n )\n ) : (\n <ChevronDownIcon className=\"text-muted-foreground size-4 in-aria-[expanded=false]:-rotate-90\" />\n ))}\n {children ?? item.getItemName()}\n </Fragment>\n </Component>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport { Dialog, DialogContent, DialogTitle } from \"../ui/dialog\";\nimport { cn } from \"../../lib/cn\";\n\nconst maxWidthBySize = {\n narrow: \"sm:max-w-lg\",\n wide: \"sm:max-w-2xl\",\n full: \"sm:max-w-[min(92vw,960px)]\",\n} as const;\n\nexport type CodemationDialogSize = keyof typeof maxWidthBySize;\n\nexport type CodemationDialogRootProps = Readonly<{\n children: React.ReactNode;\n onClose: () => void;\n /** Root `data-testid` (applied to the dialog panel). */\n testId?: string;\n /** `dialog` (default) or `alertdialog` for confirmations. */\n role?: \"dialog\" | \"alertdialog\";\n /** Max width preset; default `wide`. */\n size?: CodemationDialogSize;\n /** Extra classes on the Radix panel (e.g. `max-h-[min(90vh,640px)]`). */\n contentClassName?: string;\n /** Corner X to dismiss (Radix); default false — use `<CodemationDialog.Actions>` for explicit buttons. */\n showCloseButton?: boolean;\n}>;\n\nfunction CodemationDialogRoot({\n children,\n onClose,\n testId,\n role = \"dialog\",\n size = \"wide\",\n contentClassName,\n showCloseButton = false,\n}: CodemationDialogRootProps) {\n return (\n <Dialog\n open\n onOpenChange={(open) => {\n if (!open) onClose();\n }}\n >\n <DialogContent\n showCloseButton={showCloseButton}\n data-testid={testId}\n role={role}\n aria-describedby={undefined}\n className={cn(\n \"flex max-h-[min(92vh,900px)] flex-col gap-0 overflow-hidden p-0\",\n maxWidthBySize[size],\n contentClassName,\n )}\n >\n {children}\n </DialogContent>\n </Dialog>\n );\n}\n\nexport type CodemationDialogTitleProps = Readonly<{\n children: React.ReactNode;\n className?: string;\n}>;\n\n/**\n * Do not set `id` on the underlying Radix `DialogTitle` — the dialog root assigns `titleId`\n * in context; overriding `id` breaks `aria-labelledby` and Radix dev warnings.\n */\nfunction CodemationDialogTitle({ children, className }: CodemationDialogTitleProps) {\n return (\n <DialogTitle\n className={cn(\"m-0 shrink-0 border-b border-border px-4 py-3 text-base leading-none font-semibold\", className)}\n >\n {children}\n </DialogTitle>\n );\n}\n\nexport type CodemationDialogContentProps = Readonly<{\n children: React.ReactNode;\n className?: string;\n}>;\n\nfunction CodemationDialogContent({ children, className }: CodemationDialogContentProps) {\n return (\n <div className={cn(\"flex min-h-0 flex-1 flex-col gap-4 overflow-auto px-4 py-3 text-sm\", className)}>\n {children}\n </div>\n );\n}\n\nexport type CodemationDialogActionsProps = Readonly<{\n children: React.ReactNode;\n /** Toolbar directly under the title (e.g. filters). Default is footer actions. */\n position?: \"top\" | \"bottom\";\n /** Flex alignment for the button row. */\n align?: \"start\" | \"end\" | \"between\";\n className?: string;\n}>;\n\nfunction CodemationDialogActions({\n children,\n position = \"bottom\",\n align = \"end\",\n className,\n}: CodemationDialogActionsProps) {\n return (\n <div\n className={cn(\n \"flex shrink-0 flex-wrap gap-2 border-border bg-muted/30 px-4 py-3\",\n position === \"top\" ? \"border-b\" : \"border-t\",\n align === \"end\" && \"justify-end\",\n align === \"start\" && \"justify-start\",\n align === \"between\" && \"justify-between\",\n className,\n )}\n >\n {children}\n </div>\n );\n}\n\nexport type CodemationDialogCompound = typeof CodemationDialogRoot & {\n Title: typeof CodemationDialogTitle;\n Content: typeof CodemationDialogContent;\n Actions: typeof CodemationDialogActions;\n};\n\nexport const CodemationDialog = Object.assign(CodemationDialogRoot, {\n Title: CodemationDialogTitle,\n Content: CodemationDialogContent,\n Actions: CodemationDialogActions,\n}) as CodemationDialogCompound;\n","\"use client\";\n\nimport Editor from \"@monaco-editor/react\";\nimport type { ComponentProps } from \"react\";\n\nimport { Textarea } from \"../ui/textarea\";\n\nconst defaultOptions: NonNullable<ComponentProps<typeof Editor>[\"options\"]> = {\n automaticLayout: true,\n formatOnPaste: true,\n formatOnType: true,\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n lineNumbersMinChars: 3,\n tabSize: 2,\n insertSpaces: true,\n wordWrap: \"on\",\n bracketPairColorization: {\n enabled: true,\n },\n guides: {\n indentation: true,\n bracketPairs: true,\n },\n padding: {\n top: 12,\n bottom: 12,\n },\n};\n\n/**\n * Monaco-based JSON editor with a mirrored, visually hidden `<textarea>` that carries the same value.\n * Tests and automation can drive `data-testid` on that textarea because Monaco's surface is not a reliable\n * DOM target for `fireEvent.change` / user typing simulation.\n */\nexport function JsonMonacoEditor(\n args: Readonly<{\n path: string;\n value: string;\n onChange: (value: string | undefined) => void;\n /** Shown below the editor region when set. */\n error?: string | null;\n /** Passed to the hidden textarea for stable test selectors. */\n testId?: string;\n }>,\n) {\n const { path, value, onChange, error, testId = \"workflow-json-editor-input\" } = args;\n return (\n <div className=\"relative flex min-h-0 flex-1 flex-col\">\n <div className=\"h-[min(60vh,560px)] min-h-[200px] shrink-0 overflow-hidden rounded-md border border-border bg-background\">\n <Editor\n height=\"100%\"\n language=\"json\"\n path={path}\n value={value}\n onChange={onChange}\n loading={<div className=\"grid h-full place-items-center text-xs text-muted-foreground\">Loading editor…</div>}\n options={defaultOptions}\n />\n </div>\n <Textarea\n data-testid={testId}\n value={value}\n onChange={(event) => {\n onChange(event.target.value);\n }}\n spellCheck={false}\n className=\"pointer-events-none absolute inset-0 h-px w-px min-h-0 resize-none border-0 p-0 opacity-0\"\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n {error ? <div className=\"mt-1 text-xs text-destructive\">{error}</div> : null}\n </div>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport { Badge } from \"./ui/badge\";\nimport { cn } from \"../lib/cn\";\n\nexport type StatusKind = \"success\" | \"warning\" | \"danger\" | \"neutral\" | \"info\";\n\nconst KIND_CLASSES: Record<StatusKind, string> = {\n success:\n \"bg-emerald-100 text-emerald-800 border-emerald-200 hover:bg-emerald-100 dark:bg-emerald-900/30 dark:text-emerald-300 dark:border-emerald-800\",\n warning:\n \"bg-amber-100 text-amber-800 border-amber-200 hover:bg-amber-100 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800\",\n danger:\n \"bg-red-100 text-red-800 border-red-200 hover:bg-red-100 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800\",\n neutral: \"border-border text-foreground bg-transparent hover:bg-muted\",\n info: \"bg-blue-100 text-blue-800 border-blue-200 hover:bg-blue-100 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-800\",\n};\n\nexport interface StatusPillProps {\n status: StatusKind;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function StatusPill({ status, children, className }: StatusPillProps) {\n return (\n <Badge variant=\"outline\" className={cn(\"inline-flex items-center gap-1\", KIND_CLASSES[status], className)}>\n {children ?? status}\n </Badge>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAgB,GAAG,GAAG,QAAsB;AAC1C,mDAAoB,OAAO,CAAC;;;;;ACE9B,MAAM,kDACJ,2fACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,WAAW;EACX,aACE;EACF,SAAS;EACT,OAAO;EACP,MAAM;EACP,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAED,SAAS,MAAM,EACb,WACA,UAAU,WACV,UAAU,MACV,GAAG,SACyF;AAG5F,QACE,2CAHW,UAAUA,cAAK,OAAO;EAG3B,aAAU;EAAQ,gBAAc;EAAS,WAAW,GAAG,cAAc,EAAE,SAAS,CAAC,EAAE,UAAU;EAAE,GAAI;GAAS;;;;;AChCtH,SAAS,MAAM,EAAE,WAAW,KAAM,GAAG,SAAwC;AAC3E,QACE,2CAAC;EACO;EACN,aAAU;EACV,WAAW,GACT,kbACA,iFACA,kIACA,UACD;EACD,GAAI;GACJ;;;;;ACXN,SAAS,MAAM,EAAE,UAAW,GAAG,SAA2D;AACxF,QACE,2CAACC,eAAe;EACd,aAAU;EACV,WAAW,GACT,mNACA,UACD;EACD,GAAI;GACJ;;;;;ACTN,SAAS,OAAO,EAAE,UAAW,GAAG,SAA4D;AAC1F,QACE,2CAACC,gBAAgB;EACf,aAAU;EACV,WAAW,GACT,+JACA,uDACA,mDACA,2GACA,UACD;EACD,GAAI;YAEJ,2CAACA,gBAAgB;GACf,aAAU;GACV,WAAW,GACT,gGACA,0EACD;IACD;GACmB;;;;;AClB3B,MAAM,mDACJ,olBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACF,WACE;GACF,OACE;GACF,aACE;GACF,MAAM;GACP;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GAC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ACD;EAEA;GACG;;AAUV,MAAa,mBAAmB,OAAO,OAAO,sBAAsB;CAClE,OAAO;CACP,SAAS;CACT,SAAS;CACV,CAAC;;;;ACjIF,MAAMC,iBAAwE;CAC5E,iBAAiB;CACjB,eAAe;CACf,cAAc;CACd,SAAS,EAAE,SAAS,OAAO;CAC3B,sBAAsB;CACtB,qBAAqB;CACrB,SAAS;CACT,cAAc;CACd,UAAU;CACV,yBAAyB,EACvB,SAAS,MACV;CACD,QAAQ;EACN,aAAa;EACb,cAAc;EACf;CACD,SAAS;EACP,KAAK;EACL,QAAQ;EACT;CACF;;;;;;AAOD,SAAgB,iBACd,MASA;CACA,MAAM,EAAE,MAAM,OAAO,UAAU,OAAO,SAAS,iCAAiC;AAChF,QACE,4CAAC;EAAI,WAAU;;GACb,2CAAC;IAAI,WAAU;cACb,2CAACC;KACC,QAAO;KACP,UAAS;KACH;KACC;KACG;KACV,SAAS,2CAAC;MAAI,WAAU;gBAA+D;OAAqB;KAC5G,SAAS;MACT;KACE;GACN,2CAAC;IACC,eAAa;IACN;IACP,WAAW,UAAU;AACnB,cAAS,MAAM,OAAO,MAAM;;IAE9B,YAAY;IACZ,WAAU;IACV,eAAY;IACZ,UAAU;KACV;GACD,QAAQ,2CAAC;IAAI,WAAU;cAAiC;KAAY,GAAG;;GACpE;;;;;AC/DV,MAAMC,eAA2C;CAC/C,SACE;CACF,SACE;CACF,QACE;CACF,SAAS;CACT,MAAM;CACP;AAQD,SAAgB,WAAW,EAAE,QAAQ,UAAU,aAA8B;AAC3E,QACE,2CAAC;EAAM,SAAQ;EAAU,WAAW,GAAG,kCAAkC,aAAa,SAAS,UAAU;YACtG,YAAY;GACP"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import { ClassValue } from "clsx";
|
|
2
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from "react";
|
|
6
|
+
import { VariantProps } from "class-variance-authority";
|
|
7
|
+
import { Collapsible as Collapsible$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, Select as Select$1, Switch as Switch$1, Tabs as Tabs$1 } from "radix-ui";
|
|
8
|
+
import { ItemInstance } from "@headless-tree/core";
|
|
9
|
+
|
|
10
|
+
//#region src/lib/cn.d.ts
|
|
11
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/components/ui/badge.d.ts
|
|
14
|
+
declare const badgeVariants: (props?: ({
|
|
15
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
17
|
+
declare function Badge({
|
|
18
|
+
className,
|
|
19
|
+
variant,
|
|
20
|
+
asChild,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/ui/input.d.ts
|
|
27
|
+
declare function Input({
|
|
28
|
+
className,
|
|
29
|
+
type,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<"input">): react_jsx_runtime0.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/ui/label.d.ts
|
|
34
|
+
declare function Label({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: React.ComponentProps<typeof Label$1.Root>): react_jsx_runtime0.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/ui/switch.d.ts
|
|
40
|
+
declare function Switch({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: React.ComponentProps<typeof Switch$1.Root>): react_jsx_runtime0.JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/ui/button.d.ts
|
|
46
|
+
declare const buttonVariants: (props?: ({
|
|
47
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
48
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
49
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
50
|
+
declare function Button({
|
|
51
|
+
className,
|
|
52
|
+
variant,
|
|
53
|
+
size,
|
|
54
|
+
asChild,
|
|
55
|
+
...props
|
|
56
|
+
}: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
57
|
+
asChild?: boolean;
|
|
58
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/ui/collapsible.d.ts
|
|
61
|
+
declare function Collapsible(props: React.ComponentProps<typeof Collapsible$1.Root>): react_jsx_runtime0.JSX.Element;
|
|
62
|
+
declare function CollapsibleTrigger(props: React.ComponentProps<typeof Collapsible$1.Trigger>): react_jsx_runtime0.JSX.Element;
|
|
63
|
+
declare function CollapsibleContent({
|
|
64
|
+
className,
|
|
65
|
+
...props
|
|
66
|
+
}: React.ComponentProps<typeof Collapsible$1.Content>): react_jsx_runtime0.JSX.Element;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/ui/dialog.d.ts
|
|
69
|
+
declare function Dialog({
|
|
70
|
+
...props
|
|
71
|
+
}: React.ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime0.JSX.Element;
|
|
72
|
+
declare function DialogTrigger({
|
|
73
|
+
...props
|
|
74
|
+
}: React.ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime0.JSX.Element;
|
|
75
|
+
declare function DialogPortal({
|
|
76
|
+
...props
|
|
77
|
+
}: React.ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime0.JSX.Element;
|
|
78
|
+
declare function DialogClose({
|
|
79
|
+
...props
|
|
80
|
+
}: React.ComponentProps<typeof Dialog$1.Close>): react_jsx_runtime0.JSX.Element;
|
|
81
|
+
declare function DialogOverlay({
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}: React.ComponentProps<typeof Dialog$1.Overlay>): react_jsx_runtime0.JSX.Element;
|
|
85
|
+
declare function DialogContent({
|
|
86
|
+
className,
|
|
87
|
+
children,
|
|
88
|
+
showCloseButton,
|
|
89
|
+
...props
|
|
90
|
+
}: React.ComponentProps<typeof Dialog$1.Content> & {
|
|
91
|
+
showCloseButton?: boolean;
|
|
92
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
93
|
+
declare function DialogHeader({
|
|
94
|
+
className,
|
|
95
|
+
...props
|
|
96
|
+
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
97
|
+
declare function DialogFooter({
|
|
98
|
+
className,
|
|
99
|
+
showCloseButton,
|
|
100
|
+
children,
|
|
101
|
+
...props
|
|
102
|
+
}: React.ComponentProps<"div"> & {
|
|
103
|
+
showCloseButton?: boolean;
|
|
104
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
105
|
+
declare function DialogTitle({
|
|
106
|
+
className,
|
|
107
|
+
...props
|
|
108
|
+
}: React.ComponentProps<typeof Dialog$1.Title>): react_jsx_runtime0.JSX.Element;
|
|
109
|
+
declare function DialogDescription({
|
|
110
|
+
className,
|
|
111
|
+
...props
|
|
112
|
+
}: React.ComponentProps<typeof Dialog$1.Description>): react_jsx_runtime0.JSX.Element;
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/components/ui/dropdown-menu.d.ts
|
|
115
|
+
declare function DropdownMenu({
|
|
116
|
+
...props
|
|
117
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime0.JSX.Element;
|
|
118
|
+
declare function DropdownMenuPortal({
|
|
119
|
+
...props
|
|
120
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Portal>): react_jsx_runtime0.JSX.Element;
|
|
121
|
+
declare function DropdownMenuTrigger({
|
|
122
|
+
...props
|
|
123
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Trigger>): react_jsx_runtime0.JSX.Element;
|
|
124
|
+
declare function DropdownMenuContent({
|
|
125
|
+
className,
|
|
126
|
+
align,
|
|
127
|
+
sideOffset,
|
|
128
|
+
...props
|
|
129
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Content>): react_jsx_runtime0.JSX.Element;
|
|
130
|
+
declare function DropdownMenuGroup({
|
|
131
|
+
...props
|
|
132
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime0.JSX.Element;
|
|
133
|
+
declare function DropdownMenuItem({
|
|
134
|
+
className,
|
|
135
|
+
inset,
|
|
136
|
+
variant,
|
|
137
|
+
...props
|
|
138
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Item> & {
|
|
139
|
+
inset?: boolean;
|
|
140
|
+
variant?: "default" | "destructive";
|
|
141
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
142
|
+
declare function DropdownMenuCheckboxItem({
|
|
143
|
+
className,
|
|
144
|
+
children,
|
|
145
|
+
checked,
|
|
146
|
+
inset,
|
|
147
|
+
...props
|
|
148
|
+
}: React.ComponentProps<typeof DropdownMenu$1.CheckboxItem> & {
|
|
149
|
+
inset?: boolean;
|
|
150
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
151
|
+
declare function DropdownMenuRadioGroup({
|
|
152
|
+
...props
|
|
153
|
+
}: React.ComponentProps<typeof DropdownMenu$1.RadioGroup>): react_jsx_runtime0.JSX.Element;
|
|
154
|
+
declare function DropdownMenuRadioItem({
|
|
155
|
+
className,
|
|
156
|
+
children,
|
|
157
|
+
inset,
|
|
158
|
+
...props
|
|
159
|
+
}: React.ComponentProps<typeof DropdownMenu$1.RadioItem> & {
|
|
160
|
+
inset?: boolean;
|
|
161
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
162
|
+
declare function DropdownMenuLabel({
|
|
163
|
+
className,
|
|
164
|
+
inset,
|
|
165
|
+
...props
|
|
166
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Label> & {
|
|
167
|
+
inset?: boolean;
|
|
168
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
169
|
+
declare function DropdownMenuSeparator({
|
|
170
|
+
className,
|
|
171
|
+
...props
|
|
172
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Separator>): react_jsx_runtime0.JSX.Element;
|
|
173
|
+
declare function DropdownMenuShortcut({
|
|
174
|
+
className,
|
|
175
|
+
...props
|
|
176
|
+
}: React.ComponentProps<"span">): react_jsx_runtime0.JSX.Element;
|
|
177
|
+
declare function DropdownMenuSub({
|
|
178
|
+
...props
|
|
179
|
+
}: React.ComponentProps<typeof DropdownMenu$1.Sub>): react_jsx_runtime0.JSX.Element;
|
|
180
|
+
declare function DropdownMenuSubTrigger({
|
|
181
|
+
className,
|
|
182
|
+
inset,
|
|
183
|
+
children,
|
|
184
|
+
...props
|
|
185
|
+
}: React.ComponentProps<typeof DropdownMenu$1.SubTrigger> & {
|
|
186
|
+
inset?: boolean;
|
|
187
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
188
|
+
declare function DropdownMenuSubContent({
|
|
189
|
+
className,
|
|
190
|
+
...props
|
|
191
|
+
}: React.ComponentProps<typeof DropdownMenu$1.SubContent>): react_jsx_runtime0.JSX.Element;
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/components/ui/select.d.ts
|
|
194
|
+
declare function Select({
|
|
195
|
+
...props
|
|
196
|
+
}: React.ComponentProps<typeof Select$1.Root>): react_jsx_runtime0.JSX.Element;
|
|
197
|
+
declare function SelectGroup({
|
|
198
|
+
className,
|
|
199
|
+
...props
|
|
200
|
+
}: React.ComponentProps<typeof Select$1.Group>): react_jsx_runtime0.JSX.Element;
|
|
201
|
+
declare function SelectValue({
|
|
202
|
+
...props
|
|
203
|
+
}: React.ComponentProps<typeof Select$1.Value>): react_jsx_runtime0.JSX.Element;
|
|
204
|
+
declare function SelectTrigger({
|
|
205
|
+
className,
|
|
206
|
+
size,
|
|
207
|
+
children,
|
|
208
|
+
...props
|
|
209
|
+
}: React.ComponentProps<typeof Select$1.Trigger> & {
|
|
210
|
+
size?: "sm" | "default";
|
|
211
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
212
|
+
declare function SelectContent({
|
|
213
|
+
className,
|
|
214
|
+
children,
|
|
215
|
+
position,
|
|
216
|
+
align,
|
|
217
|
+
...props
|
|
218
|
+
}: React.ComponentProps<typeof Select$1.Content>): react_jsx_runtime0.JSX.Element;
|
|
219
|
+
declare function SelectLabel({
|
|
220
|
+
className,
|
|
221
|
+
...props
|
|
222
|
+
}: React.ComponentProps<typeof Select$1.Label>): react_jsx_runtime0.JSX.Element;
|
|
223
|
+
declare function SelectItem({
|
|
224
|
+
className,
|
|
225
|
+
children,
|
|
226
|
+
...props
|
|
227
|
+
}: React.ComponentProps<typeof Select$1.Item>): react_jsx_runtime0.JSX.Element;
|
|
228
|
+
declare function SelectSeparator({
|
|
229
|
+
className,
|
|
230
|
+
...props
|
|
231
|
+
}: React.ComponentProps<typeof Select$1.Separator>): react_jsx_runtime0.JSX.Element;
|
|
232
|
+
declare function SelectScrollUpButton({
|
|
233
|
+
className,
|
|
234
|
+
...props
|
|
235
|
+
}: React.ComponentProps<typeof Select$1.ScrollUpButton>): react_jsx_runtime0.JSX.Element;
|
|
236
|
+
declare function SelectScrollDownButton({
|
|
237
|
+
className,
|
|
238
|
+
...props
|
|
239
|
+
}: React.ComponentProps<typeof Select$1.ScrollDownButton>): react_jsx_runtime0.JSX.Element;
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/components/ui/tabs.d.ts
|
|
242
|
+
declare function Tabs({
|
|
243
|
+
className,
|
|
244
|
+
orientation,
|
|
245
|
+
...props
|
|
246
|
+
}: React.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime0.JSX.Element;
|
|
247
|
+
declare const tabsListVariants: (props?: ({
|
|
248
|
+
variant?: "default" | "line" | null | undefined;
|
|
249
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
250
|
+
declare function TabsList({
|
|
251
|
+
className,
|
|
252
|
+
variant,
|
|
253
|
+
...props
|
|
254
|
+
}: React.ComponentProps<typeof Tabs$1.List> & VariantProps<typeof tabsListVariants>): react_jsx_runtime0.JSX.Element;
|
|
255
|
+
declare function TabsTrigger({
|
|
256
|
+
className,
|
|
257
|
+
...props
|
|
258
|
+
}: React.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime0.JSX.Element;
|
|
259
|
+
declare function TabsContent({
|
|
260
|
+
className,
|
|
261
|
+
...props
|
|
262
|
+
}: React.ComponentProps<typeof Tabs$1.Content>): react_jsx_runtime0.JSX.Element;
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/components/ui/textarea.d.ts
|
|
265
|
+
declare function Textarea({
|
|
266
|
+
className,
|
|
267
|
+
...props
|
|
268
|
+
}: React.ComponentProps<"textarea">): react_jsx_runtime0.JSX.Element;
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/components/reui/tree/TreeContext.d.ts
|
|
271
|
+
type ToggleIconType = "chevron" | "plus-minus";
|
|
272
|
+
type TreeContextValue<T = unknown> = {
|
|
273
|
+
indent: number;
|
|
274
|
+
currentItem?: ItemInstance<T>;
|
|
275
|
+
tree?: {
|
|
276
|
+
getContainerProps?: () => Record<string, unknown>;
|
|
277
|
+
getDragLineStyle?: () => Record<string, unknown> | null;
|
|
278
|
+
};
|
|
279
|
+
toggleIconType?: ToggleIconType;
|
|
280
|
+
};
|
|
281
|
+
declare const TreeContext: React.Context<TreeContextValue<unknown>>;
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/components/reui/tree/Tree.d.ts
|
|
284
|
+
type TreeProps = HTMLAttributes<HTMLDivElement> & {
|
|
285
|
+
indent?: number;
|
|
286
|
+
tree?: {
|
|
287
|
+
getContainerProps?: () => Record<string, unknown>;
|
|
288
|
+
};
|
|
289
|
+
toggleIconType?: ToggleIconType;
|
|
290
|
+
asChild?: boolean;
|
|
291
|
+
};
|
|
292
|
+
declare function Tree(args: Readonly<TreeProps>): react_jsx_runtime0.JSX.Element;
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/components/reui/tree/TreeDragLine.d.ts
|
|
295
|
+
declare function TreeDragLine(args: Readonly<HTMLAttributes<HTMLDivElement>>): react_jsx_runtime0.JSX.Element | null;
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/components/reui/tree/TreeItem.d.ts
|
|
298
|
+
type TreeItemProps<T = unknown> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "indent"> & {
|
|
299
|
+
item: ItemInstance<T>;
|
|
300
|
+
indent?: number;
|
|
301
|
+
asChild?: boolean;
|
|
302
|
+
};
|
|
303
|
+
declare function TreeItem<T = unknown>(args: Readonly<TreeItemProps<T>>): react_jsx_runtime0.JSX.Element;
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/components/reui/tree/TreeItemLabel.d.ts
|
|
306
|
+
type TreeItemLabelProps = HTMLAttributes<HTMLSpanElement> & {
|
|
307
|
+
item?: {
|
|
308
|
+
isFolder: () => boolean;
|
|
309
|
+
isExpanded: () => boolean;
|
|
310
|
+
getItemName: () => string;
|
|
311
|
+
};
|
|
312
|
+
asChild?: boolean;
|
|
313
|
+
};
|
|
314
|
+
declare function TreeItemLabel(args: Readonly<TreeItemLabelProps>): react_jsx_runtime0.JSX.Element | null;
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region src/components/composite/CodemationDialog.d.ts
|
|
317
|
+
declare const maxWidthBySize: {
|
|
318
|
+
readonly narrow: "sm:max-w-lg";
|
|
319
|
+
readonly wide: "sm:max-w-2xl";
|
|
320
|
+
readonly full: "sm:max-w-[min(92vw,960px)]";
|
|
321
|
+
};
|
|
322
|
+
type CodemationDialogSize = keyof typeof maxWidthBySize;
|
|
323
|
+
type CodemationDialogRootProps = Readonly<{
|
|
324
|
+
children: React.ReactNode;
|
|
325
|
+
onClose: () => void;
|
|
326
|
+
/** Root `data-testid` (applied to the dialog panel). */
|
|
327
|
+
testId?: string;
|
|
328
|
+
/** `dialog` (default) or `alertdialog` for confirmations. */
|
|
329
|
+
role?: "dialog" | "alertdialog";
|
|
330
|
+
/** Max width preset; default `wide`. */
|
|
331
|
+
size?: CodemationDialogSize;
|
|
332
|
+
/** Extra classes on the Radix panel (e.g. `max-h-[min(90vh,640px)]`). */
|
|
333
|
+
contentClassName?: string;
|
|
334
|
+
/** Corner X to dismiss (Radix); default false — use `<CodemationDialog.Actions>` for explicit buttons. */
|
|
335
|
+
showCloseButton?: boolean;
|
|
336
|
+
}>;
|
|
337
|
+
declare function CodemationDialogRoot({
|
|
338
|
+
children,
|
|
339
|
+
onClose,
|
|
340
|
+
testId,
|
|
341
|
+
role,
|
|
342
|
+
size,
|
|
343
|
+
contentClassName,
|
|
344
|
+
showCloseButton
|
|
345
|
+
}: CodemationDialogRootProps): react_jsx_runtime0.JSX.Element;
|
|
346
|
+
type CodemationDialogTitleProps = Readonly<{
|
|
347
|
+
children: React.ReactNode;
|
|
348
|
+
className?: string;
|
|
349
|
+
}>;
|
|
350
|
+
/**
|
|
351
|
+
* Do not set `id` on the underlying Radix `DialogTitle` — the dialog root assigns `titleId`
|
|
352
|
+
* in context; overriding `id` breaks `aria-labelledby` and Radix dev warnings.
|
|
353
|
+
*/
|
|
354
|
+
declare function CodemationDialogTitle({
|
|
355
|
+
children,
|
|
356
|
+
className
|
|
357
|
+
}: CodemationDialogTitleProps): react_jsx_runtime0.JSX.Element;
|
|
358
|
+
type CodemationDialogContentProps = Readonly<{
|
|
359
|
+
children: React.ReactNode;
|
|
360
|
+
className?: string;
|
|
361
|
+
}>;
|
|
362
|
+
declare function CodemationDialogContent({
|
|
363
|
+
children,
|
|
364
|
+
className
|
|
365
|
+
}: CodemationDialogContentProps): react_jsx_runtime0.JSX.Element;
|
|
366
|
+
type CodemationDialogActionsProps = Readonly<{
|
|
367
|
+
children: React.ReactNode;
|
|
368
|
+
/** Toolbar directly under the title (e.g. filters). Default is footer actions. */
|
|
369
|
+
position?: "top" | "bottom";
|
|
370
|
+
/** Flex alignment for the button row. */
|
|
371
|
+
align?: "start" | "end" | "between";
|
|
372
|
+
className?: string;
|
|
373
|
+
}>;
|
|
374
|
+
declare function CodemationDialogActions({
|
|
375
|
+
children,
|
|
376
|
+
position,
|
|
377
|
+
align,
|
|
378
|
+
className
|
|
379
|
+
}: CodemationDialogActionsProps): react_jsx_runtime0.JSX.Element;
|
|
380
|
+
type CodemationDialogCompound = typeof CodemationDialogRoot & {
|
|
381
|
+
Title: typeof CodemationDialogTitle;
|
|
382
|
+
Content: typeof CodemationDialogContent;
|
|
383
|
+
Actions: typeof CodemationDialogActions;
|
|
384
|
+
};
|
|
385
|
+
declare const CodemationDialog: CodemationDialogCompound;
|
|
386
|
+
//#endregion
|
|
387
|
+
//#region src/components/composite/JsonMonacoEditor.d.ts
|
|
388
|
+
/**
|
|
389
|
+
* Monaco-based JSON editor with a mirrored, visually hidden `<textarea>` that carries the same value.
|
|
390
|
+
* Tests and automation can drive `data-testid` on that textarea because Monaco's surface is not a reliable
|
|
391
|
+
* DOM target for `fireEvent.change` / user typing simulation.
|
|
392
|
+
*/
|
|
393
|
+
declare function JsonMonacoEditor(args: Readonly<{
|
|
394
|
+
path: string;
|
|
395
|
+
value: string;
|
|
396
|
+
onChange: (value: string | undefined) => void;
|
|
397
|
+
/** Shown below the editor region when set. */
|
|
398
|
+
error?: string | null;
|
|
399
|
+
/** Passed to the hidden textarea for stable test selectors. */
|
|
400
|
+
testId?: string;
|
|
401
|
+
}>): react_jsx_runtime0.JSX.Element;
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/components/StatusPill.d.ts
|
|
404
|
+
type StatusKind = "success" | "warning" | "danger" | "neutral" | "info";
|
|
405
|
+
interface StatusPillProps {
|
|
406
|
+
status: StatusKind;
|
|
407
|
+
children?: React.ReactNode;
|
|
408
|
+
className?: string;
|
|
409
|
+
}
|
|
410
|
+
declare function StatusPill({
|
|
411
|
+
status,
|
|
412
|
+
children,
|
|
413
|
+
className
|
|
414
|
+
}: StatusPillProps): react_jsx_runtime0.JSX.Element;
|
|
415
|
+
//#endregion
|
|
416
|
+
export { Badge, Button, CodemationDialog, type CodemationDialogActionsProps, type CodemationDialogCompound, type CodemationDialogContentProps, type CodemationDialogRootProps, type CodemationDialogSize, type CodemationDialogTitleProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, JsonMonacoEditor, Label, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type StatusKind, StatusPill, type StatusPillProps, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ToggleIconType, Tree, TreeContext, type TreeContextValue, TreeDragLine, TreeItem, TreeItemLabel, badgeVariants, buttonVariants, cn, tabsListVariants };
|
|
417
|
+
//# sourceMappingURL=index.d.cts.map
|