diff --git a/.changeset/static-data-slot-scripts.md b/.changeset/static-data-slot-scripts.md
new file mode 100644
index 000000000..6590cdedd
--- /dev/null
+++ b/.changeset/static-data-slot-scripts.md
@@ -0,0 +1,5 @@
+---
+"fulldev-ui": minor
+---
+
+Data Slot components start with their page script, with no loading helper. Dialog, Sheet and NavigationMenu no longer load their controller per media query: `media` is still accepted but has no effect, and the registry no longer has the `on-media` item or `src/lib/dialog.ts`; a site that installed them can delete `src/lib/on-media.ts` and `src/lib/dialog.ts` once nothing imports them. Header blocks 1 to 5 take `fold="lg"`, the default, or `fold="xl"` for the breakpoint between their mobile sheet and desktop navigation, and close whichever one the layout hides at that breakpoint, which also releases the sheet's scroll lock. Every Data Slot component also binds new roots on `astro:after-swap`, so a site's own `astro:page-load` command after ClientRouter navigation reaches a started controller.
diff --git a/public/r/styles/base-luma/accordion.json b/public/r/styles/base-luma/accordion.json
index 3f65ff7a4..8aa10e279 100644
--- a/public/r/styles/base-luma/accordion.json
+++ b/public/r/styles/base-luma/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n
\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/alert-dialog.json b/public/r/styles/base-luma/alert-dialog.json
index a468db30a..89c4c6ab7 100644
--- a/public/r/styles/base-luma/alert-dialog.json
+++ b/public/r/styles/base-luma/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/collapsible.json b/public/r/styles/base-luma/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-luma/collapsible.json
+++ b/public/r/styles/base-luma/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/combobox.json b/public/r/styles/base-luma/combobox.json
index 04c5c83a7..646ecbb68 100644
--- a/public/r/styles/base-luma/combobox.json
+++ b/public/r/styles/base-luma/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/command.json b/public/r/styles/base-luma/command.json
index 47e318171..ff067f6d2 100644
--- a/public/r/styles/base-luma/command.json
+++ b/public/r/styles/base-luma/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/dialog.json b/public/r/styles/base-luma/dialog.json
index e78813e1a..f8767e6d7 100644
--- a/public/r/styles/base-luma/dialog.json
+++ b/public/r/styles/base-luma/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-luma/drawer.json b/public/r/styles/base-luma/drawer.json
index c4de548b8..b4beb4776 100644
--- a/public/r/styles/base-luma/drawer.json
+++ b/public/r/styles/base-luma/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/dropdown-menu.json b/public/r/styles/base-luma/dropdown-menu.json
index ca89e2c0a..c7a598dfa 100644
--- a/public/r/styles/base-luma/dropdown-menu.json
+++ b/public/r/styles/base-luma/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/header-1.json b/public/r/styles/base-luma/header-1.json
index bdb755eda..0823df6fd 100644
--- a/public/r/styles/base-luma/header-1.json
+++ b/public/r/styles/base-luma/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-luma/header-2.json b/public/r/styles/base-luma/header-2.json
index ae95d9456..c7f4e9e7c 100644
--- a/public/r/styles/base-luma/header-2.json
+++ b/public/r/styles/base-luma/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-luma/header-3.json b/public/r/styles/base-luma/header-3.json
index 4a298248a..64d7f383a 100644
--- a/public/r/styles/base-luma/header-3.json
+++ b/public/r/styles/base-luma/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-luma/header-4.json b/public/r/styles/base-luma/header-4.json
index 3ca6481bf..52623446d 100644
--- a/public/r/styles/base-luma/header-4.json
+++ b/public/r/styles/base-luma/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-luma/header-5.json b/public/r/styles/base-luma/header-5.json
index 05e37eea8..618e5f899 100644
--- a/public/r/styles/base-luma/header-5.json
+++ b/public/r/styles/base-luma/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-luma/hover-card.json b/public/r/styles/base-luma/hover-card.json
index c17e2e651..af026df2f 100644
--- a/public/r/styles/base-luma/hover-card.json
+++ b/public/r/styles/base-luma/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/navigation-menu.json b/public/r/styles/base-luma/navigation-menu.json
index 3f00e2c0a..3db0843cc 100644
--- a/public/r/styles/base-luma/navigation-menu.json
+++ b/public/r/styles/base-luma/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/on-media.json b/public/r/styles/base-luma/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-luma/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-luma/popover.json b/public/r/styles/base-luma/popover.json
index 7c1325cdc..e5df45afd 100644
--- a/public/r/styles/base-luma/popover.json
+++ b/public/r/styles/base-luma/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/radio-group.json b/public/r/styles/base-luma/radio-group.json
index dfd12f473..44c8e4fe1 100644
--- a/public/r/styles/base-luma/radio-group.json
+++ b/public/r/styles/base-luma/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/registry.json b/public/r/styles/base-luma/registry.json
index 0e4d43364..ee42214e2 100644
--- a/public/r/styles/base-luma/registry.json
+++ b/public/r/styles/base-luma/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-luma/resizable.json b/public/r/styles/base-luma/resizable.json
index b58e4687f..03981b9cf 100644
--- a/public/r/styles/base-luma/resizable.json
+++ b/public/r/styles/base-luma/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-luma/select.json b/public/r/styles/base-luma/select.json
index 9d0e1303f..074e5bc22 100644
--- a/public/r/styles/base-luma/select.json
+++ b/public/r/styles/base-luma/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/sheet.json b/public/r/styles/base-luma/sheet.json
index 8d2ad1084..c1d1df178 100644
--- a/public/r/styles/base-luma/sheet.json
+++ b/public/r/styles/base-luma/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/slider.json b/public/r/styles/base-luma/slider.json
index 6283e80b6..fd380d807 100644
--- a/public/r/styles/base-luma/slider.json
+++ b/public/r/styles/base-luma/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/switch.json b/public/r/styles/base-luma/switch.json
index ec0a491b0..e58a5ae22 100644
--- a/public/r/styles/base-luma/switch.json
+++ b/public/r/styles/base-luma/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input/90 data-checked:border-primary border-2 data-unchecked:border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-full focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-5 data-[size=default]:w-11 data-[size=sm]:h-4 data-[size=sm]:w-7 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input/90 data-checked:border-primary border-2 data-unchecked:border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-full focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-5 data-[size=default]:w-11 data-[size=sm]:h-4 data-[size=sm]:w-7 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/tabs.json b/public/r/styles/base-luma/tabs.json
index 84e284dfa..655b6087b 100644
--- a/public/r/styles/base-luma/tabs.json
+++ b/public/r/styles/base-luma/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/toast.json b/public/r/styles/base-luma/toast.json
index c087fb469..d2f72c690 100644
--- a/public/r/styles/base-luma/toast.json
+++ b/public/r/styles/base-luma/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/toggle-group.json b/public/r/styles/base-luma/toggle-group.json
index cc6bcdec1..8416e8c41 100644
--- a/public/r/styles/base-luma/toggle-group.json
+++ b/public/r/styles/base-luma/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-luma/toggle.json b/public/r/styles/base-luma/toggle.json
index 8be271974..6f9b29c21 100644
--- a/public/r/styles/base-luma/toggle.json
+++ b/public/r/styles/base-luma/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-luma/tooltip.json b/public/r/styles/base-luma/tooltip.json
index 0ec7166b9..652678e27 100644
--- a/public/r/styles/base-luma/tooltip.json
+++ b/public/r/styles/base-luma/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/accordion.json b/public/r/styles/base-lyra/accordion.json
index 54deaebe0..03d478756 100644
--- a/public/r/styles/base-lyra/accordion.json
+++ b/public/r/styles/base-lyra/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/alert-dialog.json b/public/r/styles/base-lyra/alert-dialog.json
index 21d834d63..3019b12bc 100644
--- a/public/r/styles/base-lyra/alert-dialog.json
+++ b/public/r/styles/base-lyra/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/collapsible.json b/public/r/styles/base-lyra/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-lyra/collapsible.json
+++ b/public/r/styles/base-lyra/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/combobox.json b/public/r/styles/base-lyra/combobox.json
index efc9c05ae..bb776fda1 100644
--- a/public/r/styles/base-lyra/combobox.json
+++ b/public/r/styles/base-lyra/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/command.json b/public/r/styles/base-lyra/command.json
index b74747316..44bd21712 100644
--- a/public/r/styles/base-lyra/command.json
+++ b/public/r/styles/base-lyra/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/dialog.json b/public/r/styles/base-lyra/dialog.json
index 31934bfdd..2d2f44cdd 100644
--- a/public/r/styles/base-lyra/dialog.json
+++ b/public/r/styles/base-lyra/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-lyra/drawer.json b/public/r/styles/base-lyra/drawer.json
index b7487c287..a5024f4e4 100644
--- a/public/r/styles/base-lyra/drawer.json
+++ b/public/r/styles/base-lyra/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/dropdown-menu.json b/public/r/styles/base-lyra/dropdown-menu.json
index 3dfa31939..db6d0674d 100644
--- a/public/r/styles/base-lyra/dropdown-menu.json
+++ b/public/r/styles/base-lyra/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/header-1.json b/public/r/styles/base-lyra/header-1.json
index 39040261d..81e1ce3e8 100644
--- a/public/r/styles/base-lyra/header-1.json
+++ b/public/r/styles/base-lyra/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-lyra/header-2.json b/public/r/styles/base-lyra/header-2.json
index 0994b6fa0..dc12a2584 100644
--- a/public/r/styles/base-lyra/header-2.json
+++ b/public/r/styles/base-lyra/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-lyra/header-3.json b/public/r/styles/base-lyra/header-3.json
index ce43de7ca..bce22e4ac 100644
--- a/public/r/styles/base-lyra/header-3.json
+++ b/public/r/styles/base-lyra/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-lyra/header-4.json b/public/r/styles/base-lyra/header-4.json
index a8bb19062..c4900d2c7 100644
--- a/public/r/styles/base-lyra/header-4.json
+++ b/public/r/styles/base-lyra/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-lyra/header-5.json b/public/r/styles/base-lyra/header-5.json
index c666f48db..a3a465402 100644
--- a/public/r/styles/base-lyra/header-5.json
+++ b/public/r/styles/base-lyra/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-lyra/hover-card.json b/public/r/styles/base-lyra/hover-card.json
index 3a57eca11..7ca8723d4 100644
--- a/public/r/styles/base-lyra/hover-card.json
+++ b/public/r/styles/base-lyra/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/navigation-menu.json b/public/r/styles/base-lyra/navigation-menu.json
index 8fb08e84f..51feb85ce 100644
--- a/public/r/styles/base-lyra/navigation-menu.json
+++ b/public/r/styles/base-lyra/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/on-media.json b/public/r/styles/base-lyra/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-lyra/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-lyra/popover.json b/public/r/styles/base-lyra/popover.json
index 173f76908..598437115 100644
--- a/public/r/styles/base-lyra/popover.json
+++ b/public/r/styles/base-lyra/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/radio-group.json b/public/r/styles/base-lyra/radio-group.json
index e7bf65a66..f108dfc93 100644
--- a/public/r/styles/base-lyra/radio-group.json
+++ b/public/r/styles/base-lyra/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/registry.json b/public/r/styles/base-lyra/registry.json
index 7a951fce8..5f4f21362 100644
--- a/public/r/styles/base-lyra/registry.json
+++ b/public/r/styles/base-lyra/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-lyra/resizable.json b/public/r/styles/base-lyra/resizable.json
index 7c559a9e7..b8c0fb751 100644
--- a/public/r/styles/base-lyra/resizable.json
+++ b/public/r/styles/base-lyra/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-lyra/select.json b/public/r/styles/base-lyra/select.json
index ced35dc67..e2ef56418 100644
--- a/public/r/styles/base-lyra/select.json
+++ b/public/r/styles/base-lyra/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/sheet.json b/public/r/styles/base-lyra/sheet.json
index dafb5f79d..91793d9fc 100644
--- a/public/r/styles/base-lyra/sheet.json
+++ b/public/r/styles/base-lyra/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/slider.json b/public/r/styles/base-lyra/slider.json
index 0a28201d4..1feae0a69 100644
--- a/public/r/styles/base-lyra/slider.json
+++ b/public/r/styles/base-lyra/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/switch.json b/public/r/styles/base-lyra/switch.json
index 9ec099716..29ca8ccae 100644
--- a/public/r/styles/base-lyra/switch.json
+++ b/public/r/styles/base-lyra/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/tabs.json b/public/r/styles/base-lyra/tabs.json
index ff0939cf4..0f4752d03 100644
--- a/public/r/styles/base-lyra/tabs.json
+++ b/public/r/styles/base-lyra/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/toast.json b/public/r/styles/base-lyra/toast.json
index 1e3d9187c..5b680444c 100644
--- a/public/r/styles/base-lyra/toast.json
+++ b/public/r/styles/base-lyra/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/toggle-group.json b/public/r/styles/base-lyra/toggle-group.json
index 2dbe0efa2..49e8ed6f0 100644
--- a/public/r/styles/base-lyra/toggle-group.json
+++ b/public/r/styles/base-lyra/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-lyra/toggle.json b/public/r/styles/base-lyra/toggle.json
index 15942d3c7..30233cf46 100644
--- a/public/r/styles/base-lyra/toggle.json
+++ b/public/r/styles/base-lyra/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-lyra/tooltip.json b/public/r/styles/base-lyra/tooltip.json
index 9a99dee83..dd2dc0c44 100644
--- a/public/r/styles/base-lyra/tooltip.json
+++ b/public/r/styles/base-lyra/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/accordion.json b/public/r/styles/base-maia/accordion.json
index 3f65ff7a4..8aa10e279 100644
--- a/public/r/styles/base-maia/accordion.json
+++ b/public/r/styles/base-maia/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/alert-dialog.json b/public/r/styles/base-maia/alert-dialog.json
index e23e285b3..a8f12fd12 100644
--- a/public/r/styles/base-maia/alert-dialog.json
+++ b/public/r/styles/base-maia/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/collapsible.json b/public/r/styles/base-maia/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-maia/collapsible.json
+++ b/public/r/styles/base-maia/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/combobox.json b/public/r/styles/base-maia/combobox.json
index b4b9e1ea7..3196e27a5 100644
--- a/public/r/styles/base-maia/combobox.json
+++ b/public/r/styles/base-maia/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/command.json b/public/r/styles/base-maia/command.json
index 426f88421..a0a932b4e 100644
--- a/public/r/styles/base-maia/command.json
+++ b/public/r/styles/base-maia/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/dialog.json b/public/r/styles/base-maia/dialog.json
index e4a10aa40..67d168a1f 100644
--- a/public/r/styles/base-maia/dialog.json
+++ b/public/r/styles/base-maia/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-maia/drawer.json b/public/r/styles/base-maia/drawer.json
index c90c4eb17..f5f4667f3 100644
--- a/public/r/styles/base-maia/drawer.json
+++ b/public/r/styles/base-maia/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/dropdown-menu.json b/public/r/styles/base-maia/dropdown-menu.json
index 276c9cae8..85cb7ad59 100644
--- a/public/r/styles/base-maia/dropdown-menu.json
+++ b/public/r/styles/base-maia/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/header-1.json b/public/r/styles/base-maia/header-1.json
index 817755925..611052241 100644
--- a/public/r/styles/base-maia/header-1.json
+++ b/public/r/styles/base-maia/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-maia/header-2.json b/public/r/styles/base-maia/header-2.json
index ad1218347..8c762bf80 100644
--- a/public/r/styles/base-maia/header-2.json
+++ b/public/r/styles/base-maia/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-maia/header-3.json b/public/r/styles/base-maia/header-3.json
index f2fbc6f6f..781506218 100644
--- a/public/r/styles/base-maia/header-3.json
+++ b/public/r/styles/base-maia/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-maia/header-4.json b/public/r/styles/base-maia/header-4.json
index 53b453cc9..e3375e84b 100644
--- a/public/r/styles/base-maia/header-4.json
+++ b/public/r/styles/base-maia/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-maia/header-5.json b/public/r/styles/base-maia/header-5.json
index 194275a0f..1a8f902a1 100644
--- a/public/r/styles/base-maia/header-5.json
+++ b/public/r/styles/base-maia/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-maia/hover-card.json b/public/r/styles/base-maia/hover-card.json
index aa8bffbd5..d0f758eca 100644
--- a/public/r/styles/base-maia/hover-card.json
+++ b/public/r/styles/base-maia/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/navigation-menu.json b/public/r/styles/base-maia/navigation-menu.json
index f188242e4..128d24446 100644
--- a/public/r/styles/base-maia/navigation-menu.json
+++ b/public/r/styles/base-maia/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/on-media.json b/public/r/styles/base-maia/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-maia/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-maia/popover.json b/public/r/styles/base-maia/popover.json
index 7568597a6..91cbff198 100644
--- a/public/r/styles/base-maia/popover.json
+++ b/public/r/styles/base-maia/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/radio-group.json b/public/r/styles/base-maia/radio-group.json
index 65f1f7199..62491c23e 100644
--- a/public/r/styles/base-maia/radio-group.json
+++ b/public/r/styles/base-maia/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/registry.json b/public/r/styles/base-maia/registry.json
index ba1b85ade..c2bb2bef2 100644
--- a/public/r/styles/base-maia/registry.json
+++ b/public/r/styles/base-maia/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-maia/resizable.json b/public/r/styles/base-maia/resizable.json
index b58e4687f..03981b9cf 100644
--- a/public/r/styles/base-maia/resizable.json
+++ b/public/r/styles/base-maia/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-maia/select.json b/public/r/styles/base-maia/select.json
index 133768eac..e4e4a0110 100644
--- a/public/r/styles/base-maia/select.json
+++ b/public/r/styles/base-maia/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/sheet.json b/public/r/styles/base-maia/sheet.json
index ac120b149..05dd72742 100644
--- a/public/r/styles/base-maia/sheet.json
+++ b/public/r/styles/base-maia/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/slider.json b/public/r/styles/base-maia/slider.json
index 8236a6133..92b2a55bd 100644
--- a/public/r/styles/base-maia/slider.json
+++ b/public/r/styles/base-maia/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/switch.json b/public/r/styles/base-maia/switch.json
index 2a031a4c5..4bd1a2515 100644
--- a/public/r/styles/base-maia/switch.json
+++ b/public/r/styles/base-maia/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-[3px] aria-invalid:ring-[3px] group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-[3px] aria-invalid:ring-[3px] group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/tabs.json b/public/r/styles/base-maia/tabs.json
index a4ce938d3..246a1ee88 100644
--- a/public/r/styles/base-maia/tabs.json
+++ b/public/r/styles/base-maia/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/toast.json b/public/r/styles/base-maia/toast.json
index c087fb469..d2f72c690 100644
--- a/public/r/styles/base-maia/toast.json
+++ b/public/r/styles/base-maia/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/toggle-group.json b/public/r/styles/base-maia/toggle-group.json
index 63fd673ad..d48f87e56 100644
--- a/public/r/styles/base-maia/toggle-group.json
+++ b/public/r/styles/base-maia/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-maia/toggle.json b/public/r/styles/base-maia/toggle.json
index 6b695b5fd..3cb821f25 100644
--- a/public/r/styles/base-maia/toggle.json
+++ b/public/r/styles/base-maia/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-maia/tooltip.json b/public/r/styles/base-maia/tooltip.json
index 7d987f2f8..c314ec9d0 100644
--- a/public/r/styles/base-maia/tooltip.json
+++ b/public/r/styles/base-maia/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/accordion.json b/public/r/styles/base-mira/accordion.json
index a3d1c68dc..0e801d202 100644
--- a/public/r/styles/base-mira/accordion.json
+++ b/public/r/styles/base-mira/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/alert-dialog.json b/public/r/styles/base-mira/alert-dialog.json
index 19b4183fb..b4ca701b5 100644
--- a/public/r/styles/base-mira/alert-dialog.json
+++ b/public/r/styles/base-mira/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/collapsible.json b/public/r/styles/base-mira/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-mira/collapsible.json
+++ b/public/r/styles/base-mira/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/combobox.json b/public/r/styles/base-mira/combobox.json
index 75609543e..615d03b08 100644
--- a/public/r/styles/base-mira/combobox.json
+++ b/public/r/styles/base-mira/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/command.json b/public/r/styles/base-mira/command.json
index 77cca2076..66377de98 100644
--- a/public/r/styles/base-mira/command.json
+++ b/public/r/styles/base-mira/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/dialog.json b/public/r/styles/base-mira/dialog.json
index 7251f173a..edec3acc8 100644
--- a/public/r/styles/base-mira/dialog.json
+++ b/public/r/styles/base-mira/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-mira/drawer.json b/public/r/styles/base-mira/drawer.json
index 5cd1a579c..e136ecc91 100644
--- a/public/r/styles/base-mira/drawer.json
+++ b/public/r/styles/base-mira/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/dropdown-menu.json b/public/r/styles/base-mira/dropdown-menu.json
index 0cefaec42..a63d4258c 100644
--- a/public/r/styles/base-mira/dropdown-menu.json
+++ b/public/r/styles/base-mira/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/header-1.json b/public/r/styles/base-mira/header-1.json
index 817755925..611052241 100644
--- a/public/r/styles/base-mira/header-1.json
+++ b/public/r/styles/base-mira/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-mira/header-2.json b/public/r/styles/base-mira/header-2.json
index ad1218347..8c762bf80 100644
--- a/public/r/styles/base-mira/header-2.json
+++ b/public/r/styles/base-mira/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-mira/header-3.json b/public/r/styles/base-mira/header-3.json
index f2fbc6f6f..781506218 100644
--- a/public/r/styles/base-mira/header-3.json
+++ b/public/r/styles/base-mira/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-mira/header-4.json b/public/r/styles/base-mira/header-4.json
index 53b453cc9..e3375e84b 100644
--- a/public/r/styles/base-mira/header-4.json
+++ b/public/r/styles/base-mira/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-mira/header-5.json b/public/r/styles/base-mira/header-5.json
index 194275a0f..1a8f902a1 100644
--- a/public/r/styles/base-mira/header-5.json
+++ b/public/r/styles/base-mira/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-mira/hover-card.json b/public/r/styles/base-mira/hover-card.json
index b599e6507..dc90bc750 100644
--- a/public/r/styles/base-mira/hover-card.json
+++ b/public/r/styles/base-mira/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/navigation-menu.json b/public/r/styles/base-mira/navigation-menu.json
index 4cb0ebad6..cf6e3f636 100644
--- a/public/r/styles/base-mira/navigation-menu.json
+++ b/public/r/styles/base-mira/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/on-media.json b/public/r/styles/base-mira/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-mira/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-mira/popover.json b/public/r/styles/base-mira/popover.json
index 5062be3aa..80617ed76 100644
--- a/public/r/styles/base-mira/popover.json
+++ b/public/r/styles/base-mira/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/radio-group.json b/public/r/styles/base-mira/radio-group.json
index 65f1f7199..62491c23e 100644
--- a/public/r/styles/base-mira/radio-group.json
+++ b/public/r/styles/base-mira/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/registry.json b/public/r/styles/base-mira/registry.json
index 8d83a000f..d36fc2bf9 100644
--- a/public/r/styles/base-mira/registry.json
+++ b/public/r/styles/base-mira/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-mira/resizable.json b/public/r/styles/base-mira/resizable.json
index b58e4687f..03981b9cf 100644
--- a/public/r/styles/base-mira/resizable.json
+++ b/public/r/styles/base-mira/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-mira/select.json b/public/r/styles/base-mira/select.json
index 942bc6668..83629d6d8 100644
--- a/public/r/styles/base-mira/select.json
+++ b/public/r/styles/base-mira/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/sheet.json b/public/r/styles/base-mira/sheet.json
index 040a9b84a..415322e39 100644
--- a/public/r/styles/base-mira/sheet.json
+++ b/public/r/styles/base-mira/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/slider.json b/public/r/styles/base-mira/slider.json
index 18ba79712..94af523da 100644
--- a/public/r/styles/base-mira/slider.json
+++ b/public/r/styles/base-mira/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/switch.json b/public/r/styles/base-mira/switch.json
index 6d4392e5f..780ed33c5 100644
--- a/public/r/styles/base-mira/switch.json
+++ b/public/r/styles/base-mira/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-2 aria-invalid:ring-2 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[16.6px] data-[size=default]:w-[28px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-2 aria-invalid:ring-2 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[16.6px] data-[size=default]:w-[28px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/tabs.json b/public/r/styles/base-mira/tabs.json
index f23331b79..502f2c65b 100644
--- a/public/r/styles/base-mira/tabs.json
+++ b/public/r/styles/base-mira/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/toast.json b/public/r/styles/base-mira/toast.json
index 2c80c0d43..5e677b424 100644
--- a/public/r/styles/base-mira/toast.json
+++ b/public/r/styles/base-mira/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/toggle-group.json b/public/r/styles/base-mira/toggle-group.json
index 6f2824642..3867e1c2c 100644
--- a/public/r/styles/base-mira/toggle-group.json
+++ b/public/r/styles/base-mira/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-mira/toggle.json b/public/r/styles/base-mira/toggle.json
index fe740eca5..a06c3d7e3 100644
--- a/public/r/styles/base-mira/toggle.json
+++ b/public/r/styles/base-mira/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-mira/tooltip.json b/public/r/styles/base-mira/tooltip.json
index 9d1754e23..e8c2f3653 100644
--- a/public/r/styles/base-mira/tooltip.json
+++ b/public/r/styles/base-mira/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/accordion.json b/public/r/styles/base-nova/accordion.json
index 8986f964d..e07aa560b 100644
--- a/public/r/styles/base-nova/accordion.json
+++ b/public/r/styles/base-nova/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/alert-dialog.json b/public/r/styles/base-nova/alert-dialog.json
index f7de14429..4125cea9c 100644
--- a/public/r/styles/base-nova/alert-dialog.json
+++ b/public/r/styles/base-nova/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/collapsible.json b/public/r/styles/base-nova/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-nova/collapsible.json
+++ b/public/r/styles/base-nova/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/combobox.json b/public/r/styles/base-nova/combobox.json
index 1c5520ed4..713e4b536 100644
--- a/public/r/styles/base-nova/combobox.json
+++ b/public/r/styles/base-nova/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/command.json b/public/r/styles/base-nova/command.json
index eecf9c0eb..79e09dd33 100644
--- a/public/r/styles/base-nova/command.json
+++ b/public/r/styles/base-nova/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/dialog.json b/public/r/styles/base-nova/dialog.json
index cb223f7b4..7815479a7 100644
--- a/public/r/styles/base-nova/dialog.json
+++ b/public/r/styles/base-nova/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-nova/drawer.json b/public/r/styles/base-nova/drawer.json
index a2d4fdd0d..85186fa0e 100644
--- a/public/r/styles/base-nova/drawer.json
+++ b/public/r/styles/base-nova/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/dropdown-menu.json b/public/r/styles/base-nova/dropdown-menu.json
index 9e09da020..4c9b590b6 100644
--- a/public/r/styles/base-nova/dropdown-menu.json
+++ b/public/r/styles/base-nova/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/header-1.json b/public/r/styles/base-nova/header-1.json
index 39040261d..81e1ce3e8 100644
--- a/public/r/styles/base-nova/header-1.json
+++ b/public/r/styles/base-nova/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-nova/header-2.json b/public/r/styles/base-nova/header-2.json
index 0994b6fa0..dc12a2584 100644
--- a/public/r/styles/base-nova/header-2.json
+++ b/public/r/styles/base-nova/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-nova/header-3.json b/public/r/styles/base-nova/header-3.json
index ce43de7ca..bce22e4ac 100644
--- a/public/r/styles/base-nova/header-3.json
+++ b/public/r/styles/base-nova/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-nova/header-4.json b/public/r/styles/base-nova/header-4.json
index a8bb19062..c4900d2c7 100644
--- a/public/r/styles/base-nova/header-4.json
+++ b/public/r/styles/base-nova/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-nova/header-5.json b/public/r/styles/base-nova/header-5.json
index c666f48db..a3a465402 100644
--- a/public/r/styles/base-nova/header-5.json
+++ b/public/r/styles/base-nova/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-nova/hover-card.json b/public/r/styles/base-nova/hover-card.json
index 8f1581961..f5976bbd2 100644
--- a/public/r/styles/base-nova/hover-card.json
+++ b/public/r/styles/base-nova/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/navigation-menu.json b/public/r/styles/base-nova/navigation-menu.json
index 879213914..dc3fa4577 100644
--- a/public/r/styles/base-nova/navigation-menu.json
+++ b/public/r/styles/base-nova/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/on-media.json b/public/r/styles/base-nova/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-nova/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-nova/popover.json b/public/r/styles/base-nova/popover.json
index fc799d4ba..30c22e4df 100644
--- a/public/r/styles/base-nova/popover.json
+++ b/public/r/styles/base-nova/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/radio-group.json b/public/r/styles/base-nova/radio-group.json
index e7bf65a66..f108dfc93 100644
--- a/public/r/styles/base-nova/radio-group.json
+++ b/public/r/styles/base-nova/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/registry.json b/public/r/styles/base-nova/registry.json
index d43d3d7cc..c2520628b 100644
--- a/public/r/styles/base-nova/registry.json
+++ b/public/r/styles/base-nova/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-nova/resizable.json b/public/r/styles/base-nova/resizable.json
index b58e4687f..03981b9cf 100644
--- a/public/r/styles/base-nova/resizable.json
+++ b/public/r/styles/base-nova/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-nova/select.json b/public/r/styles/base-nova/select.json
index efb1113be..7923f2667 100644
--- a/public/r/styles/base-nova/select.json
+++ b/public/r/styles/base-nova/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/sheet.json b/public/r/styles/base-nova/sheet.json
index 5c1c6d852..5a859036f 100644
--- a/public/r/styles/base-nova/sheet.json
+++ b/public/r/styles/base-nova/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/slider.json b/public/r/styles/base-nova/slider.json
index 05104c003..defd8c41b 100644
--- a/public/r/styles/base-nova/slider.json
+++ b/public/r/styles/base-nova/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/switch.json b/public/r/styles/base-nova/switch.json
index b0d22bc2a..352ee664e 100644
--- a/public/r/styles/base-nova/switch.json
+++ b/public/r/styles/base-nova/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/tabs.json b/public/r/styles/base-nova/tabs.json
index d8db86e45..e8f807405 100644
--- a/public/r/styles/base-nova/tabs.json
+++ b/public/r/styles/base-nova/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/toast.json b/public/r/styles/base-nova/toast.json
index c087fb469..d2f72c690 100644
--- a/public/r/styles/base-nova/toast.json
+++ b/public/r/styles/base-nova/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/toggle-group.json b/public/r/styles/base-nova/toggle-group.json
index 6037669ce..2aabe2fba 100644
--- a/public/r/styles/base-nova/toggle-group.json
+++ b/public/r/styles/base-nova/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-nova/toggle.json b/public/r/styles/base-nova/toggle.json
index 5ecb0b613..633ba7895 100644
--- a/public/r/styles/base-nova/toggle.json
+++ b/public/r/styles/base-nova/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-nova/tooltip.json b/public/r/styles/base-nova/tooltip.json
index 9d1754e23..e8c2f3653 100644
--- a/public/r/styles/base-nova/tooltip.json
+++ b/public/r/styles/base-nova/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/accordion.json b/public/r/styles/base-rhea/accordion.json
index 3f65ff7a4..8aa10e279 100644
--- a/public/r/styles/base-rhea/accordion.json
+++ b/public/r/styles/base-rhea/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/alert-dialog.json b/public/r/styles/base-rhea/alert-dialog.json
index 083d9f475..1355c7856 100644
--- a/public/r/styles/base-rhea/alert-dialog.json
+++ b/public/r/styles/base-rhea/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/collapsible.json b/public/r/styles/base-rhea/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-rhea/collapsible.json
+++ b/public/r/styles/base-rhea/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/combobox.json b/public/r/styles/base-rhea/combobox.json
index 5343c8c69..4d16c704a 100644
--- a/public/r/styles/base-rhea/combobox.json
+++ b/public/r/styles/base-rhea/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/command.json b/public/r/styles/base-rhea/command.json
index 1c09da085..0396f2840 100644
--- a/public/r/styles/base-rhea/command.json
+++ b/public/r/styles/base-rhea/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/dialog.json b/public/r/styles/base-rhea/dialog.json
index 701f422a1..fd625ff36 100644
--- a/public/r/styles/base-rhea/dialog.json
+++ b/public/r/styles/base-rhea/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-rhea/drawer.json b/public/r/styles/base-rhea/drawer.json
index 21f28debe..1c219db43 100644
--- a/public/r/styles/base-rhea/drawer.json
+++ b/public/r/styles/base-rhea/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/dropdown-menu.json b/public/r/styles/base-rhea/dropdown-menu.json
index cb2c5b4cd..199a8372f 100644
--- a/public/r/styles/base-rhea/dropdown-menu.json
+++ b/public/r/styles/base-rhea/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/header-1.json b/public/r/styles/base-rhea/header-1.json
index bdb755eda..0823df6fd 100644
--- a/public/r/styles/base-rhea/header-1.json
+++ b/public/r/styles/base-rhea/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-rhea/header-2.json b/public/r/styles/base-rhea/header-2.json
index ae95d9456..c7f4e9e7c 100644
--- a/public/r/styles/base-rhea/header-2.json
+++ b/public/r/styles/base-rhea/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-rhea/header-3.json b/public/r/styles/base-rhea/header-3.json
index 4a298248a..64d7f383a 100644
--- a/public/r/styles/base-rhea/header-3.json
+++ b/public/r/styles/base-rhea/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-rhea/header-4.json b/public/r/styles/base-rhea/header-4.json
index 3ca6481bf..52623446d 100644
--- a/public/r/styles/base-rhea/header-4.json
+++ b/public/r/styles/base-rhea/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-rhea/header-5.json b/public/r/styles/base-rhea/header-5.json
index 05e37eea8..618e5f899 100644
--- a/public/r/styles/base-rhea/header-5.json
+++ b/public/r/styles/base-rhea/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-rhea/hover-card.json b/public/r/styles/base-rhea/hover-card.json
index c17e2e651..af026df2f 100644
--- a/public/r/styles/base-rhea/hover-card.json
+++ b/public/r/styles/base-rhea/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/navigation-menu.json b/public/r/styles/base-rhea/navigation-menu.json
index 93c918598..cc1f75cf9 100644
--- a/public/r/styles/base-rhea/navigation-menu.json
+++ b/public/r/styles/base-rhea/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/on-media.json b/public/r/styles/base-rhea/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-rhea/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-rhea/popover.json b/public/r/styles/base-rhea/popover.json
index 7c1325cdc..e5df45afd 100644
--- a/public/r/styles/base-rhea/popover.json
+++ b/public/r/styles/base-rhea/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/radio-group.json b/public/r/styles/base-rhea/radio-group.json
index afdf9fef1..cf8f8dc50 100644
--- a/public/r/styles/base-rhea/radio-group.json
+++ b/public/r/styles/base-rhea/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/registry.json b/public/r/styles/base-rhea/registry.json
index 05a2b539f..1d9d85ac5 100644
--- a/public/r/styles/base-rhea/registry.json
+++ b/public/r/styles/base-rhea/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-rhea/resizable.json b/public/r/styles/base-rhea/resizable.json
index b58e4687f..03981b9cf 100644
--- a/public/r/styles/base-rhea/resizable.json
+++ b/public/r/styles/base-rhea/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-rhea/select.json b/public/r/styles/base-rhea/select.json
index cf6373afd..1d6a829e3 100644
--- a/public/r/styles/base-rhea/select.json
+++ b/public/r/styles/base-rhea/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/sheet.json b/public/r/styles/base-rhea/sheet.json
index 8d2ad1084..c1d1df178 100644
--- a/public/r/styles/base-rhea/sheet.json
+++ b/public/r/styles/base-rhea/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/slider.json b/public/r/styles/base-rhea/slider.json
index 891303553..d007e49c6 100644
--- a/public/r/styles/base-rhea/slider.json
+++ b/public/r/styles/base-rhea/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/switch.json b/public/r/styles/base-rhea/switch.json
index 1697da96c..ab35263c8 100644
--- a/public/r/styles/base-rhea/switch.json
+++ b/public/r/styles/base-rhea/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input/90 data-checked:border-primary border-2 data-unchecked:border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-2xl focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-5 data-[size=default]:w-8 data-[size=sm]:h-4 data-[size=sm]:w-6 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input/90 data-checked:border-primary border-2 data-unchecked:border-transparent focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-2xl focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-5 data-[size=default]:w-8 data-[size=sm]:h-4 data-[size=sm]:w-6 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/tabs.json b/public/r/styles/base-rhea/tabs.json
index d89e5cb51..31ac8b5d9 100644
--- a/public/r/styles/base-rhea/tabs.json
+++ b/public/r/styles/base-rhea/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/toast.json b/public/r/styles/base-rhea/toast.json
index 0d123d06b..5a23298ff 100644
--- a/public/r/styles/base-rhea/toast.json
+++ b/public/r/styles/base-rhea/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/toggle-group.json b/public/r/styles/base-rhea/toggle-group.json
index 9765f2a99..6dfe1f25d 100644
--- a/public/r/styles/base-rhea/toggle-group.json
+++ b/public/r/styles/base-rhea/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-rhea/toggle.json b/public/r/styles/base-rhea/toggle.json
index e4763415f..842dd5511 100644
--- a/public/r/styles/base-rhea/toggle.json
+++ b/public/r/styles/base-rhea/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-rhea/tooltip.json b/public/r/styles/base-rhea/tooltip.json
index 0ec7166b9..652678e27 100644
--- a/public/r/styles/base-rhea/tooltip.json
+++ b/public/r/styles/base-rhea/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/accordion.json b/public/r/styles/base-sera/accordion.json
index 1f3fb804f..69a8e8816 100644
--- a/public/r/styles/base-sera/accordion.json
+++ b/public/r/styles/base-sera/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/alert-dialog.json b/public/r/styles/base-sera/alert-dialog.json
index d965391d2..c44910cdf 100644
--- a/public/r/styles/base-sera/alert-dialog.json
+++ b/public/r/styles/base-sera/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/collapsible.json b/public/r/styles/base-sera/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-sera/collapsible.json
+++ b/public/r/styles/base-sera/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/combobox.json b/public/r/styles/base-sera/combobox.json
index 9cef6c46c..ef6469094 100644
--- a/public/r/styles/base-sera/combobox.json
+++ b/public/r/styles/base-sera/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/command.json b/public/r/styles/base-sera/command.json
index 8e9e13a1f..1443d04e8 100644
--- a/public/r/styles/base-sera/command.json
+++ b/public/r/styles/base-sera/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/dialog.json b/public/r/styles/base-sera/dialog.json
index dd17f8e34..f42333b83 100644
--- a/public/r/styles/base-sera/dialog.json
+++ b/public/r/styles/base-sera/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-sera/drawer.json b/public/r/styles/base-sera/drawer.json
index 2c577a682..fe5ba93cf 100644
--- a/public/r/styles/base-sera/drawer.json
+++ b/public/r/styles/base-sera/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/dropdown-menu.json b/public/r/styles/base-sera/dropdown-menu.json
index aeb816846..445dfdbfe 100644
--- a/public/r/styles/base-sera/dropdown-menu.json
+++ b/public/r/styles/base-sera/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/header-1.json b/public/r/styles/base-sera/header-1.json
index bdb755eda..0823df6fd 100644
--- a/public/r/styles/base-sera/header-1.json
+++ b/public/r/styles/base-sera/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-sera/header-2.json b/public/r/styles/base-sera/header-2.json
index ae95d9456..c7f4e9e7c 100644
--- a/public/r/styles/base-sera/header-2.json
+++ b/public/r/styles/base-sera/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-sera/header-3.json b/public/r/styles/base-sera/header-3.json
index 4a298248a..64d7f383a 100644
--- a/public/r/styles/base-sera/header-3.json
+++ b/public/r/styles/base-sera/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-sera/header-4.json b/public/r/styles/base-sera/header-4.json
index 3ca6481bf..52623446d 100644
--- a/public/r/styles/base-sera/header-4.json
+++ b/public/r/styles/base-sera/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-sera/header-5.json b/public/r/styles/base-sera/header-5.json
index 05e37eea8..618e5f899 100644
--- a/public/r/styles/base-sera/header-5.json
+++ b/public/r/styles/base-sera/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-sera/hover-card.json b/public/r/styles/base-sera/hover-card.json
index 7b0cd4016..8d8fbf99d 100644
--- a/public/r/styles/base-sera/hover-card.json
+++ b/public/r/styles/base-sera/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/navigation-menu.json b/public/r/styles/base-sera/navigation-menu.json
index f4020aed8..a8837ce88 100644
--- a/public/r/styles/base-sera/navigation-menu.json
+++ b/public/r/styles/base-sera/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/on-media.json b/public/r/styles/base-sera/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-sera/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-sera/popover.json b/public/r/styles/base-sera/popover.json
index 32abc68d5..e3fb8791d 100644
--- a/public/r/styles/base-sera/popover.json
+++ b/public/r/styles/base-sera/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/radio-group.json b/public/r/styles/base-sera/radio-group.json
index 6ffc237bd..0afc71bd8 100644
--- a/public/r/styles/base-sera/radio-group.json
+++ b/public/r/styles/base-sera/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/registry.json b/public/r/styles/base-sera/registry.json
index e1e6e54e3..1ee79fae1 100644
--- a/public/r/styles/base-sera/registry.json
+++ b/public/r/styles/base-sera/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-sera/resizable.json b/public/r/styles/base-sera/resizable.json
index 7c559a9e7..b8c0fb751 100644
--- a/public/r/styles/base-sera/resizable.json
+++ b/public/r/styles/base-sera/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-sera/select.json b/public/r/styles/base-sera/select.json
index 43e881408..13de0345d 100644
--- a/public/r/styles/base-sera/select.json
+++ b/public/r/styles/base-sera/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/sheet.json b/public/r/styles/base-sera/sheet.json
index 7a0a7f728..02037e72f 100644
--- a/public/r/styles/base-sera/sheet.json
+++ b/public/r/styles/base-sera/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/slider.json b/public/r/styles/base-sera/slider.json
index abbedde63..09ae13c8d 100644
--- a/public/r/styles/base-sera/slider.json
+++ b/public/r/styles/base-sera/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/switch.json b/public/r/styles/base-sera/switch.json
index 4d65124dc..086a10084 100644
--- a/public/r/styles/base-sera/switch.json
+++ b/public/r/styles/base-sera/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input data-checked:border-primary border data-unchecked:border-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-none focus-visible:ring-2 aria-invalid:ring-2 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-input/50 group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-4.5 data-[size=default]:w-8.25 data-[size=sm]:h-3.5 data-[size=sm]:w-6.25 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input data-checked:border-primary border data-unchecked:border-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 shrink-0 rounded-none focus-visible:ring-2 aria-invalid:ring-2 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:data-unchecked:border-input/50 group-has-[:focus-visible]/field-label:data-checked:border-primary data-[size=default]:h-4.5 data-[size=default]:w-8.25 data-[size=sm]:h-3.5 data-[size=sm]:w-6.25 peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/tabs.json b/public/r/styles/base-sera/tabs.json
index e0d26b5b6..9d1d089e2 100644
--- a/public/r/styles/base-sera/tabs.json
+++ b/public/r/styles/base-sera/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/toast.json b/public/r/styles/base-sera/toast.json
index e0a9986fb..a67a93294 100644
--- a/public/r/styles/base-sera/toast.json
+++ b/public/r/styles/base-sera/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/toggle-group.json b/public/r/styles/base-sera/toggle-group.json
index dfcb0059a..df779aa09 100644
--- a/public/r/styles/base-sera/toggle-group.json
+++ b/public/r/styles/base-sera/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-sera/toggle.json b/public/r/styles/base-sera/toggle.json
index 5c6e3e99f..878efe486 100644
--- a/public/r/styles/base-sera/toggle.json
+++ b/public/r/styles/base-sera/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-sera/tooltip.json b/public/r/styles/base-sera/tooltip.json
index 9a99dee83..dd2dc0c44 100644
--- a/public/r/styles/base-sera/tooltip.json
+++ b/public/r/styles/base-sera/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/accordion.json b/public/r/styles/base-vega/accordion.json
index fb470a949..d10a0434e 100644
--- a/public/r/styles/base-vega/accordion.json
+++ b/public/r/styles/base-vega/accordion.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/accordion/accordion.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n multiple?: boolean\n defaultValue?: string | string[]\n disabled?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loopFocus?: boolean\n hiddenUntilFound?: boolean\n collapsible?: boolean\n}\n\nconst {\n class: className,\n multiple,\n defaultValue,\n disabled,\n orientation = \"vertical\",\n loopFocus,\n hiddenUntilFound,\n collapsible,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? JSON.stringify(defaultValue)\n : defaultValue\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/alert-dialog.json b/public/r/styles/base-vega/alert-dialog.json
index e818af71f..98a8a3ae0 100644
--- a/public/r/styles/base-vega/alert-dialog.json
+++ b/public/r/styles/base-vega/alert-dialog.json
@@ -12,7 +12,7 @@
"files": [
{
"path": "src/components/ui/alert-dialog/alert-dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/collapsible.json b/public/r/styles/base-vega/collapsible.json
index dd0c03d41..beff3692c 100644
--- a/public/r/styles/base-vega/collapsible.json
+++ b/public/r/styles/base-vega/collapsible.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/collapsible/collapsible.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // \"li\" makes a list item the collapsible, such as a sidebar menu item.\n as?: \"div\" | \"li\"\n defaultOpen?: boolean\n hiddenUntilFound?: boolean\n closeOnEscape?: boolean\n closeOnClickOutside?: boolean\n}\n\nconst {\n as: Tag = \"div\",\n class: className,\n defaultOpen,\n hiddenUntilFound,\n closeOnEscape,\n closeOnClickOutside,\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/combobox.json b/public/r/styles/base-vega/combobox.json
index 106cb02cf..5f75c5e1e 100644
--- a/public/r/styles/base-vega/combobox.json
+++ b/public/r/styles/base-vega/combobox.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/combobox/combobox.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type {\n Align as ComboboxAlign,\n Side as ComboboxSide,\n} from \"@data-slot/combobox\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n openOnFocus?: boolean\n autoHighlight?: boolean\n side?: ComboboxSide\n align?: ComboboxAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n}\n\nconst {\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n openOnFocus,\n autoHighlight,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/command.json b/public/r/styles/base-vega/command.json
index f664cd338..5cdabf837 100644
--- a/public/r/styles/base-vega/command.json
+++ b/public/r/styles/base-vega/command.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/command/command.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n label?: string\n defaultValue?: string\n defaultSearch?: string\n shouldFilter?: boolean\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n}\n\nconst {\n class: className,\n label,\n defaultValue,\n defaultSearch,\n shouldFilter,\n loop,\n disablePointerSelection,\n vimBindings,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/dialog.json b/public/r/styles/base-vega/dialog.json
index d23e66345..a3eb10dd5 100644
--- a/public/r/styles/base-vega/dialog.json
+++ b/public/r/styles/base-vega/dialog.json
@@ -8,13 +8,12 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n alertDialog?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n alertDialog,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
@@ -66,11 +65,6 @@
"path": "src/components/ui/dialog/index.ts",
"content": "export { default as Dialog } from \"./dialog.astro\"\nexport { default as DialogPortal } from \"./dialog-portal.astro\"\nexport { default as DialogOverlay } from \"./dialog-overlay.astro\"\nexport { default as DialogContent } from \"./dialog-content.astro\"\nexport { default as DialogTrigger } from \"./dialog-trigger.astro\"\nexport { default as DialogHeader } from \"./dialog-header.astro\"\nexport { default as DialogTitle } from \"./dialog-title.astro\"\nexport { default as DialogDescription } from \"./dialog-description.astro\"\nexport { default as DialogFooter } from \"./dialog-footer.astro\"\nexport { default as DialogClose } from \"./dialog-close.astro\"\n",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "content": "import { onMedia } from \"./on-media\"\n\nconst roots = new Map void>()\n\nexport function initializeDialogs() {\n for (const root of document.querySelectorAll(\n '[data-slot=\"dialog\"]'\n )) {\n if (roots.has(root)) continue\n roots.set(\n root,\n onMedia(\n root.dataset.media ?? \"all\",\n () => import(\"@data-slot/dialog\"),\n ({ createDialog }) => {\n const controller = createDialog(root)\n return () => controller.destroy()\n },\n { root, selector: '[data-slot=\"dialog-trigger\"]', event: \"dialog:set\" }\n )\n )\n }\n}\n\ndocument.addEventListener(\"astro:page-load\", initializeDialogs)\ndocument.addEventListener(\"astro:before-swap\", () => {\n for (const dispose of roots.values()) dispose()\n roots.clear()\n})\n",
- "type": "registry:lib"
}
],
"docs": "https://ui.full.dev/components/dialog/",
diff --git a/public/r/styles/base-vega/drawer.json b/public/r/styles/base-vega/drawer.json
index 343339cfc..cf8e91d0b 100644
--- a/public/r/styles/base-vega/drawer.json
+++ b/public/r/styles/base-vega/drawer.json
@@ -92,7 +92,7 @@
},
{
"path": "src/components/ui/drawer/drawer.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DrawerSnapPoint, DrawerSwipeDirection } from \"@data-slot/drawer\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n modal?: boolean | \"trap-focus\"\n disablePointerDismissal?: boolean\n closeOnEscape?: boolean\n swipeDirection?: DrawerSwipeDirection\n snapPoint?: DrawerSnapPoint | null\n defaultSnapPoint?: DrawerSnapPoint | null\n triggerId?: string | null\n defaultTriggerId?: string | null\n}\n\nconst {\n class: className,\n defaultOpen,\n modal,\n disablePointerDismissal,\n closeOnEscape,\n swipeDirection,\n snapPoint,\n defaultSnapPoint,\n triggerId,\n defaultTriggerId,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/dropdown-menu.json b/public/r/styles/base-vega/dropdown-menu.json
index 4495930c2..c8e05f046 100644
--- a/public/r/styles/base-vega/dropdown-menu.json
+++ b/public/r/styles/base-vega/dropdown-menu.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/dropdown-menu/dropdown-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Side } from \"@data-slot/dropdown-menu\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n defaultValue?: string | null\n defaultValues?: string[]\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n closeOnSelect?: boolean\n highlightItemOnHover?: boolean\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n lockScroll?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n defaultValue,\n defaultValues,\n closeOnClickOutside,\n closeOnEscape,\n closeOnSelect,\n highlightItemOnHover,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n lockScroll,\n ...props\n} = Astro.props\n\nconst defaultValuesAttr =\n defaultValues === undefined ? undefined : JSON.stringify(defaultValues)\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/header-1.json b/public/r/styles/base-vega/header-1.json
index 817755925..611052241 100644
--- a/public/r/styles/base-vega/header-1.json
+++ b/public/r/styles/base-vega/header-1.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-1.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n {navigation.length > 0 && (\n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n )}\n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-vega/header-2.json b/public/r/styles/base-vega/header-2.json
index ad1218347..8c762bf80 100644
--- a/public/r/styles/base-vega/header-2.json
+++ b/public/r/styles/base-vega/header-2.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-2.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-vega/header-3.json b/public/r/styles/base-vega/header-3.json
index f2fbc6f6f..781506218 100644
--- a/public/r/styles/base-vega/header-3.json
+++ b/public/r/styles/base-vega/header-3.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-3.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n active?: boolean\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n \n {navigation.map((item, index) => (\n \n \n {item.label}\n \n \n ))}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n {item.label}\n \n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-vega/header-4.json b/public/r/styles/base-vega/header-4.json
index 53b453cc9..e3375e84b 100644
--- a/public/r/styles/base-vega/header-4.json
+++ b/public/r/styles/base-vega/header-4.json
@@ -17,7 +17,7 @@
"files": [
{
"path": "src/components/blocks/header-4.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-vega/header-5.json b/public/r/styles/base-vega/header-5.json
index 194275a0f..1a8f902a1 100644
--- a/public/r/styles/base-vega/header-5.json
+++ b/public/r/styles/base-vega/header-5.json
@@ -18,7 +18,7 @@
"files": [
{
"path": "src/components/blocks/header-5.astro",
- "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopQuery = fold === \"xl\" ? \"(min-width: 80rem)\" : \"(min-width: 64rem)\"\nconst mobileQuery = fold === \"xl\" ? \"(width < 80rem)\" : \"(width < 64rem)\"\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n",
+ "content": "---\nimport type { ImageMetadata } from \"astro\"\nimport { Image } from \"astro:assets\"\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Header, HeaderContainer, HeaderGroup } from \"@/components/ui/header\"\nimport { Icon } from \"@/components/ui/icon\"\nimport { Logo, LogoImage, LogoText } from \"@/components/ui/logo\"\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n} from \"@/components/ui/navigation-menu\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from \"@/components/ui/sheet\"\n\ntype Props = HTMLAttributes<\"header\"> & {\n fold?: \"lg\" | \"xl\"\n logo: {\n label: string\n href: string\n src?: ImageMetadata\n srcLight?: ImageMetadata\n srcDark?: ImageMetadata\n }\n navigation: {\n label: string\n href: string\n description?: string\n active?: boolean\n image?: {\n src: ImageMetadata\n }\n links?: {\n label: string\n href: string\n description?: string\n icon?: string\n active?: boolean\n }[]\n }[]\n buttons: {\n label: string\n href: string\n icon?: string\n target?: \"_self\" | \"_blank\"\n }[]\n navigationLabel: string\n menu: {\n label: string\n title: string\n description: string\n closeLabel: string\n }\n}\n\nconst {\n fold = \"lg\",\n class: className,\n logo,\n navigation,\n buttons,\n navigationLabel,\n menu,\n ...props\n} = Astro.props\n\nconst desktopClass = fold === \"xl\" ? \"xl:flex\" : \"lg:flex\"\nconst mobileClass = fold === \"xl\" ? \"xl:hidden\" : \"lg:hidden\"\nconst dividerClass = fold === \"xl\" ? \"xl:block\" : \"lg:block\"\n---\n\n\n \n \n \n \n {logo.label} \n \n \n \n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n \n \n \n \n \n \n \n {menu.title} \n {menu.description} \n \n \n
\n {navigation.map((item) => (\n \n
\n {item.label}\n \n {item.links && item.links.length > 0 && (\n
\n {item.links.map((link) => (\n \n {link.icon && }\n {link.label}\n \n ))}\n
\n )}\n
\n ))}\n \n {buttons.length > 0 &&
}\n {buttons.length > 0 && (\n
\n {buttons.map(({ label, href, icon, target }, index) => (\n \n {icon && }\n {label}\n \n ))}\n
\n )}\n
\n \n \n {menu.closeLabel} \n \n \n \n \n \n \n \n \n {navigation.map((item, index) =>\n item.links?.length ? (\n \n {item.label} \n \n \n
\n {item.image && (\n \n )}\n \n {item.label} \n {item.description && (\n \n {item.description}\n \n )}\n \n \n
\n {item.links.map((link) => (\n \n {link.icon && (\n \n )}\n \n {link.label} \n {link.description && (\n \n {link.description}\n \n )}\n \n \n ))}\n
\n
\n \n \n ) : (\n \n \n \n )\n )}\n \n \n \n \n\n\n",
"type": "registry:block"
}
],
diff --git a/public/r/styles/base-vega/hover-card.json b/public/r/styles/base-vega/hover-card.json
index e1e8b21ac..6567bba4a 100644
--- a/public/r/styles/base-vega/hover-card.json
+++ b/public/r/styles/base-vega/hover-card.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/hover-card/hover-card.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultOpen?: boolean\n open?: boolean\n delay?: number\n skipDelayDuration?: number\n closeDelay?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultOpen,\n open,\n delay = 700,\n skipDelayDuration = 300,\n closeDelay = 300,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n closeOnClickOutside = true,\n closeOnEscape = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/navigation-menu.json b/public/r/styles/base-vega/navigation-menu.json
index cc52ed99e..9311ceb2c 100644
--- a/public/r/styles/base-vega/navigation-menu.json
+++ b/public/r/styles/base-vega/navigation-menu.json
@@ -7,13 +7,10 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport NavigationMenuPositioner from \"./navigation-menu-positioner.astro\"\n\ntype Props = HTMLAttributes<\"nav\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n mountStrategy?: \"lazy\" | \"eager\"\n delayOpen?: number\n delayClose?: number\n openOnFocus?: boolean\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n align?: \"start\" | \"center\" | \"end\"\n sideOffset?: number\n alignOffset?: number\n positionMethod?: \"absolute\" | \"fixed\"\n safeTriangle?: boolean\n debugSafeTriangle?: boolean\n}\n\nconst {\n media,\n mountStrategy,\n class: className = \"\",\n delayOpen = 0,\n delayClose = 0,\n openOnFocus,\n side = \"bottom\",\n align = \"start\",\n sideOffset = 8,\n alignOffset = 0,\n positionMethod = \"absolute\",\n safeTriangle,\n debugSafeTriangle,\n \"aria-label\": ariaLabel = \"Main\",\n ...props\n} = Astro.props\n---\n\n\n \n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/on-media.json b/public/r/styles/base-vega/on-media.json
deleted file mode 100644
index d8e7970e4..000000000
--- a/public/r/styles/base-vega/on-media.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema/registry-item.json",
- "name": "on-media",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "content": "type Trigger = { root: Element; selector: string; event?: string }\n\n// A modified or non-primary click on a link keeps its native action, such as\n// opening a new tab, instead of being replayed as a plain click.\nconst nativeLinkClick = (event: Event, target: Element) => {\n const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent\n return (\n (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&\n target.matches(\"a[href], area[href]\")\n )\n}\n\n/** Import and mount only while the query matches; dispose on exit. */\nexport function onMedia(\n query: string,\n load: () => Promise,\n mount: (module: T) => () => void,\n trigger?: Trigger\n) {\n const media = window.matchMedia(query)\n let disposed = false\n let epoch = 0\n let cleanup: (() => void) | undefined\n let pendingClick: HTMLElement | undefined\n let pendingEvent: CustomEvent | undefined\n\n const matches = () => {\n const matching = window.matchMedia(query).matches\n if (!matching) {\n pendingClick = undefined\n pendingEvent = undefined\n }\n return matching\n }\n\n const replayClick = () => {\n const target = pendingClick\n const event = pendingEvent\n pendingClick = undefined\n pendingEvent = undefined\n if (event && trigger?.root.isConnected)\n trigger.root.dispatchEvent(\n new CustomEvent(event.type, { detail: event.detail })\n )\n else if (target?.isConnected)\n target.dispatchEvent(new MouseEvent(\"click\", { cancelable: true }))\n }\n\n const update = async () => {\n const current = ++epoch\n cleanup?.()\n cleanup = undefined\n if (!matches() || disposed) {\n pendingClick = undefined\n pendingEvent = undefined\n return\n }\n try {\n const module = await load()\n if (disposed || current !== epoch || !matches()) return\n cleanup = mount(module)\n replayClick()\n } catch (error) {\n if (!disposed && current === epoch) {\n pendingClick = undefined\n pendingEvent = undefined\n console.error(error)\n }\n }\n }\n const click = (event: Event) => {\n if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)\n return\n if (!(event.target instanceof Element)) return\n const target = event.target.closest(trigger.selector)\n if (!target || !trigger.root.contains(target)) return\n if (nativeLinkClick(event, target)) return\n pendingClick ??= target\n pendingEvent = undefined\n event.preventDefault()\n }\n const request = (event: Event) => {\n if (cleanup || disposed || !matches() || event.target !== trigger?.root)\n return\n if (!(event instanceof CustomEvent)) return\n pendingEvent = event\n pendingClick = undefined\n }\n const change = () => void update()\n media.addEventListener(\"change\", change)\n trigger?.root.addEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.addEventListener(trigger.event, request)\n change()\n return () => {\n disposed = true\n epoch++\n pendingClick = undefined\n pendingEvent = undefined\n media.removeEventListener(\"change\", change)\n trigger?.root.removeEventListener(\"click\", click, true)\n if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)\n cleanup?.()\n cleanup = undefined\n }\n}\n",
- "type": "registry:lib"
- }
- ],
- "type": "registry:lib"
-}
\ No newline at end of file
diff --git a/public/r/styles/base-vega/popover.json b/public/r/styles/base-vega/popover.json
index 6572d0fce..f054804b9 100644
--- a/public/r/styles/base-vega/popover.json
+++ b/public/r/styles/base-vega/popover.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/popover/popover.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { PopoverAlign, PopoverSide } from \"@data-slot/popover\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultOpen?: boolean\n side?: PopoverSide\n align?: PopoverAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n /** Compatibility alias. Prefer `side`. */\n position?: PopoverSide\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n}\n\nconst {\n class: className,\n defaultOpen,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n portal,\n position,\n closeOnClickOutside,\n closeOnEscape,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/radio-group.json b/public/r/styles/base-vega/radio-group.json
index 65f1f7199..62491c23e 100644
--- a/public/r/styles/base-vega/radio-group.json
+++ b/public/r/styles/base-vega/radio-group.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/radio-group/radio-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n name?: string\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n name,\n disabled,\n readOnly,\n required,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/registry.json b/public/r/styles/base-vega/registry.json
index cc92c80b6..19cd0846d 100644
--- a/public/r/styles/base-vega/registry.json
+++ b/public/r/styles/base-vega/registry.json
@@ -595,8 +595,7 @@
"@lucide/astro"
],
"registryDependencies": [
- "@fulldev/button",
- "@fulldev/on-media"
+ "@fulldev/button"
],
"files": [
{
@@ -642,10 +641,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1266,9 +1261,6 @@
"@data-slot/navigation-menu@^1.1.2",
"@lucide/astro"
],
- "registryDependencies": [
- "@fulldev/on-media"
- ],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4858,18 +4850,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/public/r/styles/base-vega/resizable.json b/public/r/styles/base-vega/resizable.json
index b58e4687f..03981b9cf 100644
--- a/public/r/styles/base-vega/resizable.json
+++ b/public/r/styles/base-vega/resizable.json
@@ -24,7 +24,7 @@
},
{
"path": "src/components/ui/resizable/resizable.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n direction?: \"horizontal\" | \"vertical\"\n keyboardResizeBy?: number\n}\n\nconst {\n class: className,\n direction = \"horizontal\",\n keyboardResizeBy,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-vega/select.json b/public/r/styles/base-vega/select.json
index 2f45edd0e..4f993a253 100644
--- a/public/r/styles/base-vega/select.json
+++ b/public/r/styles/base-vega/select.json
@@ -10,7 +10,7 @@
"files": [
{
"path": "src/components/ui/select/select.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { Align, Position, Side } from \"@data-slot/select\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n defaultValue?: string\n defaultOpen?: boolean\n placeholder?: string\n disabled?: boolean\n required?: boolean\n name?: string\n position?: Position\n side?: Side\n align?: Align\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n highlightItemOnHover?: boolean\n lockScroll?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n defaultValue,\n defaultOpen,\n placeholder,\n disabled,\n required,\n name,\n position,\n side,\n align,\n sideOffset,\n alignOffset,\n avoidCollisions,\n collisionPadding,\n highlightItemOnHover,\n lockScroll,\n ...props\n} = Astro.props\n\n// Show the text Data Slot puts in the SelectValue when it starts: the label of\n// the default item, or the placeholder. Without it the trigger is empty, and\n// has no accessible name, until the script runs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\nconst escape = (value: string) =>\n value.replace(/[&<>]/g, (char) => `${char.charCodeAt(0)};`)\n\ntype Item = { value?: string; label?: string; text: string; itemText?: string }\nconst items: Item[] = []\nlet trigger: number | undefined\nlet value: { start: number; end?: number; placeholder?: string } | undefined\nconst open: { name: string; item?: Item; itemText?: Item; value?: true }[] = []\nlet last = 0\nfor (const match of html.matchAll(tags)) {\n const { 0: whole, 2: close, 3: tag, 4: source = \"\", index } = match\n const text = html.slice(last, index)\n last = index + whole.length\n for (const element of open) {\n if (element.item) element.item.text += text\n if (element.itemText) element.itemText.itemText += text\n }\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at < 0) continue\n if (value && open.slice(at).some((element) => element.value)) {\n value.end ??= index\n }\n open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n const element: (typeof open)[number] = { name }\n if (slot === \"select-item\") {\n element.item = {\n value: get(\"data-value\"),\n label: get(\"data-label\")?.trim(),\n text: \"\",\n }\n items.push(element.item)\n }\n const owner = open.findLast((element) => element.item)?.item\n if (slot === \"select-item-text\" && owner && owner.itemText === undefined) {\n owner.itemText = \"\"\n element.itemText = owner\n }\n if (slot === \"select-trigger\" && get(\"data-placeholder\") === undefined) {\n trigger ??= index + whole.length - 1\n }\n if (slot === \"select-value\" && !value) {\n value = { start: last, placeholder: get(\"data-placeholder\") }\n element.value = true\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) open.push(element)\n}\n\n// The label as Data Slot reads it: data-label, the SelectItemText, the item's\n// text, or else the value itself.\nconst item = items.find((item) => item.value === defaultValue)\nconst plain = (source = \"\") => escape(decode(source).trim())\nconst label =\n defaultValue === undefined\n ? escape(placeholder ?? value?.placeholder ?? \"\")\n : item?.label\n ? escape(item.label)\n : plain(item?.itemText) || plain(item?.text) || escape(defaultValue)\nconst edits: [start: number, end: number, text: string][] = []\nif (value?.end !== undefined && label) {\n if (!html.slice(value.start, value.end).trim()) {\n edits.push([value.start, value.end, label])\n }\n}\nif (defaultValue === undefined && trigger !== undefined) {\n edits.push([trigger, trigger, \" data-placeholder\"])\n}\nlet content = html\nfor (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {\n content = content.slice(0, start) + text + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/sheet.json b/public/r/styles/base-vega/sheet.json
index 8e6aec92b..326e6bb9f 100644
--- a/public/r/styles/base-vega/sheet.json
+++ b/public/r/styles/base-vega/sheet.json
@@ -14,7 +14,7 @@
"files": [
{
"path": "src/components/ui/sheet/sheet.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n // No effect: the controller starts with the page. Kept so installs that\n // pass it still type-check.\n media?: string\n defaultOpen?: boolean\n closeOnClickOutside?: boolean\n closeOnEscape?: boolean\n lockScroll?: boolean\n}\n\nconst {\n media,\n class: className,\n defaultOpen,\n closeOnClickOutside,\n closeOnEscape,\n lockScroll,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/slider.json b/public/r/styles/base-vega/slider.json
index 8de2e4374..6ef9d408f 100644
--- a/public/r/styles/base-vega/slider.json
+++ b/public/r/styles/base-vega/slider.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/slider/slider.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SliderValue = number | [number, number]\ntype ThumbAlignment = \"center\" | \"edge\" | \"edge-client-only\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: SliderValue\n min?: number\n max?: number\n step?: number\n largeStep?: number\n orientation?: \"horizontal\" | \"vertical\"\n thumbAlignment?: ThumbAlignment\n disabled?: boolean\n}\n\nconst {\n class: className,\n defaultValue,\n min,\n max,\n step,\n largeStep,\n orientation = \"horizontal\",\n thumbAlignment = \"edge\",\n disabled,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\",\")\n : defaultValue\nconst thumbCount = String(serializedDefaultValue ?? \"\").includes(\",\") ? 2 : 1\nconst orientationAttributes = {\n \"data-horizontal\": orientation === \"horizontal\" ? \"\" : undefined,\n \"data-vertical\": orientation === \"vertical\" ? \"\" : undefined,\n}\n---\n\n\n
\n
\n {Array.from({ length: thumbCount }).map(() => (\n
\n ))}\n
\n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/switch.json b/public/r/styles/base-vega/switch.json
index 2b587fc4f..ceca23f86 100644
--- a/public/r/styles/base-vega/switch.json
+++ b/public/r/styles/base-vega/switch.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/switch/switch.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n defaultChecked?: boolean\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n name?: string\n size?: \"default\" | \"sm\"\n value?: string\n uncheckedValue?: string\n}\n\nconst {\n class: className,\n defaultChecked,\n disabled,\n readOnly,\n required,\n name,\n size = \"default\",\n value,\n uncheckedValue,\n ...props\n} = Astro.props\n\nconst initialChecked = defaultChecked === true\nconst switchStyle =\n \"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-readonly:cursor-default\"\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/tabs.json b/public/r/styles/base-vega/tabs.json
index fb9731375..abfb73ed8 100644
--- a/public/r/styles/base-vega/tabs.json
+++ b/public/r/styles/base-vega/tabs.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tabs/tabs.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n\n// Show the initial panels in the HTML, the ones Data Slot shows when it\n// starts: those of the default value, or of the first enabled trigger.\n// TabsContent renders hidden, so without this the page shifts when the script\n// starts. Like Data Slot, skip the parts of nested tabs.\nconst html = await Astro.slots.render(\"default\")\nconst entities: Record = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n}\nconst decode = (value: string) =>\n value.replace(\n /&(#x?[\\da-f]+|amp|lt|gt|quot|apos|nbsp);/gi,\n (entity, code: string) =>\n code.startsWith(\"#\")\n ? String.fromCodePoint(Number(code.replace(\"#\", \"0\")))\n : (entities[code] ?? entity)\n )\n// Attribute values can hold \">\", as Tailwind classes do.\nconst tags =\n /|<(script|style|textarea)\\b[\\s\\S]*?<\\/\\1\\s*>|<(\\/?)([a-z][\\w:-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)>/gi\nconst attributes = (source: string) =>\n [\n ...source.matchAll(/([^\\s\"'>/=]+)(?:\\s*=\\s*(\"[^\"]*\"|'[^']*'|[^\\s>]+))?/g),\n ].map(({ 0: text, 1: name, 2: value = \"\", index }) => ({\n name: name.toLowerCase(),\n value: decode(/^[\"']/.test(value) ? value.slice(1, -1) : value),\n index,\n text,\n }))\n// Elements without an end tag.\nconst empty = new Set(\n \"area base br col embed hr img input link meta source track wbr\".split(\" \")\n)\n\nconst triggers: { value: string; disabled: boolean }[] = []\nconst panels: { value: string; hidden: boolean; start: number; end: number }[] =\n []\nconst open: { name: string; tabs: boolean }[] = []\nfor (const { 2: close, 3: tag, 4: source = \"\", index } of html.matchAll(tags)) {\n if (!tag) continue\n const name = tag.toLowerCase()\n if (close) {\n const at = open.findLastIndex((element) => element.name === name)\n if (at >= 0) open.length = at\n continue\n }\n const list = attributes(source)\n const get = (key: string) => list.find((item) => item.name === key)?.value\n const slot = get(\"data-slot\")\n if (!open.some((element) => element.tabs)) {\n const value = get(\"data-value\")?.trim() ?? \"\"\n if (slot === \"tabs-trigger\" && value) {\n triggers.push({\n value,\n disabled:\n get(\"disabled\") !== undefined ||\n get(\"data-disabled\") !== undefined ||\n get(\"aria-disabled\") === \"true\",\n })\n }\n if (slot === \"tabs-content\" && value) {\n const attribute = list.find((item) => item.name === \"hidden\")\n const start = index + 1 + tag.length + (attribute?.index ?? 0)\n const end = start + (attribute?.text.length ?? 0)\n panels.push({ value, hidden: attribute !== undefined, start, end })\n }\n }\n if (!empty.has(name) && !source.trimEnd().endsWith(\"/\")) {\n open.push({ name, tabs: slot === \"tabs\" })\n }\n}\nconst preferred = triggers.findLast(\n (trigger) => trigger.value === defaultValue?.trim()\n)\nconst initial =\n preferred && !preferred.disabled\n ? preferred.value\n : triggers.find((trigger) => !trigger.disabled)?.value\n// Data Slot shows the panels of the initial value and hides the others.\nlet content = html\nfor (const { value, hidden, start, end } of panels.reverse()) {\n if (initial === undefined || hidden !== (value === initial)) continue\n content =\n content.slice(0, start) + (hidden ? \"\" : \" hidden\") + content.slice(end)\n}\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/toast.json b/public/r/styles/base-vega/toast.json
index c087fb469..d2f72c690 100644
--- a/public/r/styles/base-vega/toast.json
+++ b/public/r/styles/base-vega/toast.json
@@ -63,7 +63,7 @@
},
{
"path": "src/components/ui/toast/toast.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/toggle-group.json b/public/r/styles/base-vega/toggle-group.json
index 216166a8e..1a13c9a73 100644
--- a/public/r/styles/base-vega/toggle-group.json
+++ b/public/r/styles/base-vega/toggle-group.json
@@ -22,7 +22,7 @@
},
{
"path": "src/components/ui/toggle-group/toggle-group.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport type { ToggleVariantProps } from \"@/components/ui/toggle\"\n\ntype Props = HTMLAttributes<\"div\"> &\n ToggleVariantProps & {\n defaultValue?: string | string[]\n multiple?: boolean\n orientation?: \"horizontal\" | \"vertical\"\n loop?: boolean\n disabled?: boolean\n spacing?: number\n }\n\nconst {\n class: className,\n style,\n defaultValue,\n multiple,\n orientation = \"horizontal\",\n loop,\n disabled,\n variant,\n size,\n spacing = 2,\n ...props\n} = Astro.props\n\nconst serializedDefaultValue = Array.isArray(defaultValue)\n ? defaultValue.join(\" \")\n : defaultValue\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--gap: ${spacing}; ${style}`\n : { \"--gap\": spacing, ...(style ?? {}) }\n---\n\n[data-slot=toggle-group-item]:not(:first-child)]:border-l-0 [&[data-orientation=vertical][data-spacing='0'][data-variant=outline]>[data-slot=toggle-group-item]:not(:first-child)]:border-t-0 [&[data-spacing='0']>[data-slot=toggle-group-item]]:shadow-none\",\n className\n )}\n {...props}\n>\n \n
\n\n\n",
"type": "registry:ui"
}
],
diff --git a/public/r/styles/base-vega/toggle.json b/public/r/styles/base-vega/toggle.json
index 3b3118847..c8460fd1a 100644
--- a/public/r/styles/base-vega/toggle.json
+++ b/public/r/styles/base-vega/toggle.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/toggle/toggle.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { toggleVariants, type ToggleVariantProps } from \"./toggle-variants\"\n\ntype Props = HTMLAttributes<\"button\"> &\n ToggleVariantProps & {\n defaultPressed?: boolean\n disabled?: boolean\n }\n\nconst {\n class: className,\n variant = \"default\",\n size = \"default\",\n defaultPressed,\n disabled,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n\n \n \n\n\n",
"type": "registry:ui"
},
{
diff --git a/public/r/styles/base-vega/tooltip.json b/public/r/styles/base-vega/tooltip.json
index 9d1754e23..e8c2f3653 100644
--- a/public/r/styles/base-vega/tooltip.json
+++ b/public/r/styles/base-vega/tooltip.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "src/components/ui/tooltip/tooltip.astro",
- "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
+ "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { TooltipAlign, TooltipSide } from \"@data-slot/tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n mountStrategy?: \"lazy\" | \"eager\"\n delay?: number\n skipDelayDuration?: number\n side?: TooltipSide\n align?: TooltipAlign\n sideOffset?: number\n alignOffset?: number\n avoidCollisions?: boolean\n collisionPadding?: number\n portal?: boolean\n}\n\nconst {\n mountStrategy,\n class: className,\n delay = 300,\n skipDelayDuration = 300,\n side = \"top\",\n align = \"center\",\n sideOffset = 4,\n alignOffset = 0,\n avoidCollisions = true,\n collisionPadding = 8,\n portal = true,\n ...props\n} = Astro.props\n---\n\n\n \n
\n\n\n",
"type": "registry:ui"
},
{
diff --git a/registry.json b/registry.json
index 8173d4f45..4298d8a31 100644
--- a/registry.json
+++ b/registry.json
@@ -539,7 +539,7 @@
"categories": ["ui"],
"docs": "https://ui.full.dev/components/dialog/",
"dependencies": ["@data-slot/dialog@^1.1.2", "@lucide/astro"],
- "registryDependencies": ["@fulldev/button", "@fulldev/on-media"],
+ "registryDependencies": ["@fulldev/button"],
"files": [
{
"path": "src/components/ui/dialog/dialog.astro",
@@ -584,10 +584,6 @@
{
"path": "src/components/ui/dialog/index.ts",
"type": "registry:ui"
- },
- {
- "path": "src/lib/dialog.ts",
- "type": "registry:lib"
}
]
},
@@ -1142,7 +1138,6 @@
"categories": ["ui"],
"docs": "https://ui.full.dev/components/navigation-menu/",
"dependencies": ["@data-slot/navigation-menu@^1.1.2", "@lucide/astro"],
- "registryDependencies": ["@fulldev/on-media"],
"files": [
{
"path": "src/components/ui/navigation-menu/navigation-menu.astro",
@@ -4304,18 +4299,6 @@
"@fulldev/sidebar-1"
]
},
- {
- "name": "on-media",
- "type": "registry:lib",
- "title": "On Media",
- "description": "Load and dispose browser behavior while a media query matches.",
- "files": [
- {
- "path": "src/lib/on-media.ts",
- "type": "registry:lib"
- }
- ]
- },
{
"name": "accordion-examples",
"type": "registry:example",
diff --git a/src/components/blocks/header-1.astro b/src/components/blocks/header-1.astro
index 8e65d10a1..48c6e06a2 100644
--- a/src/components/blocks/header-1.astro
+++ b/src/components/blocks/header-1.astro
@@ -64,8 +64,6 @@ const {
...props
} = Astro.props
-const desktopQuery = fold === "xl" ? "(min-width: 80rem)" : "(min-width: 64rem)"
-const mobileQuery = fold === "xl" ? "(width < 80rem)" : "(width < 64rem)"
const desktopClass = fold === "xl" ? "xl:flex" : "lg:flex"
const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
---
@@ -85,7 +83,6 @@ const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
{navigation.length > 0 && (
@@ -115,7 +112,7 @@ const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
))}
-
+
+
+
diff --git a/src/components/blocks/header-2.astro b/src/components/blocks/header-2.astro
index 2b47520f2..2c101fa83 100644
--- a/src/components/blocks/header-2.astro
+++ b/src/components/blocks/header-2.astro
@@ -64,8 +64,6 @@ const {
...props
} = Astro.props
-const desktopQuery = fold === "xl" ? "(min-width: 80rem)" : "(min-width: 64rem)"
-const mobileQuery = fold === "xl" ? "(width < 80rem)" : "(width < 64rem)"
const desktopClass = fold === "xl" ? "xl:flex" : "lg:flex"
const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
---
@@ -84,7 +82,6 @@ const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
))}
-
+
+
+
diff --git a/src/components/blocks/header-3.astro b/src/components/blocks/header-3.astro
index 4b291e308..59636df66 100644
--- a/src/components/blocks/header-3.astro
+++ b/src/components/blocks/header-3.astro
@@ -65,8 +65,6 @@ const {
...props
} = Astro.props
-const desktopQuery = fold === "xl" ? "(min-width: 80rem)" : "(min-width: 64rem)"
-const mobileQuery = fold === "xl" ? "(width < 80rem)" : "(width < 64rem)"
const desktopClass = fold === "xl" ? "xl:flex" : "lg:flex"
const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
---
@@ -86,7 +84,6 @@ const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
@@ -118,7 +115,7 @@ const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
))}
-
+
+
+
diff --git a/src/components/blocks/header-4.astro b/src/components/blocks/header-4.astro
index 91b3011f7..839aa5c60 100644
--- a/src/components/blocks/header-4.astro
+++ b/src/components/blocks/header-4.astro
@@ -79,8 +79,6 @@ const {
...props
} = Astro.props
-const desktopQuery = fold === "xl" ? "(min-width: 80rem)" : "(min-width: 64rem)"
-const mobileQuery = fold === "xl" ? "(width < 80rem)" : "(width < 64rem)"
const desktopClass = fold === "xl" ? "xl:flex" : "lg:flex"
const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
---
@@ -99,7 +97,6 @@ const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
))}
-
+
+
+
diff --git a/src/components/blocks/header-5.astro b/src/components/blocks/header-5.astro
index a6017467b..c0f7db41c 100644
--- a/src/components/blocks/header-5.astro
+++ b/src/components/blocks/header-5.astro
@@ -80,8 +80,6 @@ const {
...props
} = Astro.props
-const desktopQuery = fold === "xl" ? "(min-width: 80rem)" : "(min-width: 64rem)"
-const mobileQuery = fold === "xl" ? "(width < 80rem)" : "(width < 64rem)"
const desktopClass = fold === "xl" ? "xl:flex" : "lg:flex"
const mobileClass = fold === "xl" ? "xl:hidden" : "lg:hidden"
const dividerClass = fold === "xl" ? "xl:block" : "lg:block"
@@ -118,7 +116,7 @@ const dividerClass = fold === "xl" ? "xl:block" : "lg:block"
))}
-
+
+
+
diff --git a/src/components/ui/accordion/accordion.astro b/src/components/ui/accordion/accordion.astro
index dca540513..4d1f29e11 100644
--- a/src/components/ui/accordion/accordion.astro
+++ b/src/components/ui/accordion/accordion.astro
@@ -51,6 +51,7 @@ const serializedDefaultValue = Array.isArray(defaultValue)
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/alert-dialog/alert-dialog.astro b/src/components/ui/alert-dialog/alert-dialog.astro
index 75369038e..85c653d5d 100644
--- a/src/components/ui/alert-dialog/alert-dialog.astro
+++ b/src/components/ui/alert-dialog/alert-dialog.astro
@@ -36,6 +36,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/collapsible/collapsible.astro b/src/components/ui/collapsible/collapsible.astro
index 172c8c5e0..d694aa0e2 100644
--- a/src/components/ui/collapsible/collapsible.astro
+++ b/src/components/ui/collapsible/collapsible.astro
@@ -41,6 +41,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/combobox/combobox.astro b/src/components/ui/combobox/combobox.astro
index e3c750d85..2912ef23e 100644
--- a/src/components/ui/combobox/combobox.astro
+++ b/src/components/ui/combobox/combobox.astro
@@ -72,6 +72,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/command/command.astro b/src/components/ui/command/command.astro
index 1fbff30aa..ad004b5a0 100644
--- a/src/components/ui/command/command.astro
+++ b/src/components/ui/command/command.astro
@@ -48,6 +48,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/dialog/dialog.astro b/src/components/ui/dialog/dialog.astro
index 706d68bc1..5853e8c53 100644
--- a/src/components/ui/dialog/dialog.astro
+++ b/src/components/ui/dialog/dialog.astro
@@ -2,6 +2,8 @@
import type { HTMLAttributes } from "astro/types"
type Props = HTMLAttributes<"div"> & {
+ // No effect: the controller starts with the page. Kept so installs that
+ // pass it still type-check.
media?: string
defaultOpen?: boolean
closeOnClickOutside?: boolean
@@ -23,7 +25,6 @@ const {
---
diff --git a/src/components/ui/drawer/drawer.astro b/src/components/ui/drawer/drawer.astro
index f8cbed3e9..1cc5465ea 100644
--- a/src/components/ui/drawer/drawer.astro
+++ b/src/components/ui/drawer/drawer.astro
@@ -52,6 +52,7 @@ const {
const controllers: ReturnType
= []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/dropdown-menu/dropdown-menu.astro b/src/components/ui/dropdown-menu/dropdown-menu.astro
index a3e3080fe..b28a9ad25 100644
--- a/src/components/ui/dropdown-menu/dropdown-menu.astro
+++ b/src/components/ui/dropdown-menu/dropdown-menu.astro
@@ -70,6 +70,7 @@ const defaultValuesAttr =
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/hover-card/hover-card.astro b/src/components/ui/hover-card/hover-card.astro
index ec84e359b..e07579dbe 100644
--- a/src/components/ui/hover-card/hover-card.astro
+++ b/src/components/ui/hover-card/hover-card.astro
@@ -79,6 +79,7 @@ const {
}
}
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/navigation-menu/navigation-menu.astro b/src/components/ui/navigation-menu/navigation-menu.astro
index 49c6d40cd..69a22b282 100644
--- a/src/components/ui/navigation-menu/navigation-menu.astro
+++ b/src/components/ui/navigation-menu/navigation-menu.astro
@@ -6,6 +6,8 @@ import { cn } from "@/lib/utils"
import NavigationMenuPositioner from "./navigation-menu-positioner.astro"
type Props = HTMLAttributes<"nav"> & {
+ // No effect: the controller starts with the page. Kept so installs that
+ // pass it still type-check.
media?: string
mountStrategy?: "lazy" | "eager"
delayOpen?: number
@@ -43,7 +45,6 @@ const {
{...props}
aria-label={ariaLabel}
data-slot="navigation-menu"
- data-media={media}
data-mount-strategy={mountStrategy}
data-delay-open={delayOpen}
data-delay-close={delayClose}
@@ -65,36 +66,15 @@ const {
diff --git a/src/components/ui/popover/popover.astro b/src/components/ui/popover/popover.astro
index 11ba67ed3..886fab908 100644
--- a/src/components/ui/popover/popover.astro
+++ b/src/components/ui/popover/popover.astro
@@ -59,6 +59,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/radio-group/radio-group.astro b/src/components/ui/radio-group/radio-group.astro
index 99d40edab..9212ff7b8 100644
--- a/src/components/ui/radio-group/radio-group.astro
+++ b/src/components/ui/radio-group/radio-group.astro
@@ -41,6 +41,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/resizable/resizable.astro b/src/components/ui/resizable/resizable.astro
index 2bfb9fcd1..87775e18f 100644
--- a/src/components/ui/resizable/resizable.astro
+++ b/src/components/ui/resizable/resizable.astro
@@ -35,6 +35,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/select/select.astro b/src/components/ui/select/select.astro
index 9dcbdcabd..8e8ef504c 100644
--- a/src/components/ui/select/select.astro
+++ b/src/components/ui/select/select.astro
@@ -193,6 +193,7 @@ for (const [start, end, text] of edits.sort(([a], [b]) => b - a)) {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/sheet/sheet.astro b/src/components/ui/sheet/sheet.astro
index 549b6a8cc..cf3bc97e9 100644
--- a/src/components/ui/sheet/sheet.astro
+++ b/src/components/ui/sheet/sheet.astro
@@ -2,6 +2,8 @@
import type { HTMLAttributes } from "astro/types"
type Props = HTMLAttributes<"div"> & {
+ // No effect: the controller starts with the page. Kept so installs that
+ // pass it still type-check.
media?: string
defaultOpen?: boolean
closeOnClickOutside?: boolean
@@ -21,7 +23,6 @@ const {
---
diff --git a/src/components/ui/slider/slider.astro b/src/components/ui/slider/slider.astro
index 1384e09cd..66c751fd4 100644
--- a/src/components/ui/slider/slider.astro
+++ b/src/components/ui/slider/slider.astro
@@ -87,6 +87,7 @@ const orientationAttributes = {
const controllers: ReturnType
= []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/switch/switch.astro b/src/components/ui/switch/switch.astro
index f23adaa9f..e0bcc1ac8 100644
--- a/src/components/ui/switch/switch.astro
+++ b/src/components/ui/switch/switch.astro
@@ -70,6 +70,7 @@ const switchStyle =
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/tabs/tabs.astro b/src/components/ui/tabs/tabs.astro
index 2f61a5b68..2727aa591 100644
--- a/src/components/ui/tabs/tabs.astro
+++ b/src/components/ui/tabs/tabs.astro
@@ -127,6 +127,7 @@ for (const { value, hidden, start, end } of panels.reverse()) {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/toast/toast.astro b/src/components/ui/toast/toast.astro
index 2b44eace8..635231746 100644
--- a/src/components/ui/toast/toast.astro
+++ b/src/components/ui/toast/toast.astro
@@ -43,6 +43,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/toggle-group/toggle-group.astro b/src/components/ui/toggle-group/toggle-group.astro
index 425f13089..e8b265459 100644
--- a/src/components/ui/toggle-group/toggle-group.astro
+++ b/src/components/ui/toggle-group/toggle-group.astro
@@ -67,6 +67,7 @@ const resolvedStyle =
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/toggle/toggle.astro b/src/components/ui/toggle/toggle.astro
index e5e92d443..3598a4e1e 100644
--- a/src/components/ui/toggle/toggle.astro
+++ b/src/components/ui/toggle/toggle.astro
@@ -41,6 +41,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/components/ui/tooltip/tooltip.astro b/src/components/ui/tooltip/tooltip.astro
index 85bf897b8..29568d55a 100644
--- a/src/components/ui/tooltip/tooltip.astro
+++ b/src/components/ui/tooltip/tooltip.astro
@@ -57,6 +57,7 @@ const {
const controllers: ReturnType = []
const initialize = () => controllers.push(...create())
initialize()
+ document.addEventListener("astro:after-swap", initialize)
document.addEventListener("astro:page-load", initialize)
document.addEventListener("astro:before-swap", () => {
for (const controller of controllers) controller.destroy()
diff --git a/src/content/pages/components/dialog.mdx b/src/content/pages/components/dialog.mdx
index c3fd207ce..ef5cfc7c2 100644
--- a/src/content/pages/components/dialog.mdx
+++ b/src/content/pages/components/dialog.mdx
@@ -87,19 +87,6 @@ Long content can scroll while the header stays in view.
-## Responsive activation
-
-Pass a `media` query to `Dialog` to import and initialize its controller only
-while that query matches. Leaving the query destroys the controller and releases
-its portals and scroll lock. Returning initializes it again. A trigger click
-during the first download is performed once loading finishes, provided the query
-still matches. A modified or non-primary click on a trigger that is a link, such
-as Cmd or Ctrl to open a new tab, keeps its native action instead.
-
-The default has no breakpoint restriction. Keep the query and CSS visibility in
-the owning header block or site. Header blocks use `fold="lg"` by default and
-accept `fold="xl"`; that choice controls both visibility and activation.
-
## API Reference
Source: [`src/components/ui/dialog`](https://github.com/fulldotdev/ui/tree/main/src/components/ui/dialog)
diff --git a/src/content/pages/components/navigation-menu.mdx b/src/content/pages/components/navigation-menu.mdx
index 99551c372..84c23e1e6 100644
--- a/src/content/pages/components/navigation-menu.mdx
+++ b/src/content/pages/components/navigation-menu.mdx
@@ -86,19 +86,6 @@ Use `mountStrategy="eager"` when an integration needs to query closed content
through the document. Both strategies include content in server-rendered HTML;
neither adds a no-JavaScript fallback.
-## Responsive activation
-
-Pass a `media` query to `NavigationMenu` to import and initialize its controller only
-while that query matches. Leaving the query destroys the controller and releases
-its portals and scroll lock. Returning initializes it again. A trigger click
-during the first download is performed once loading finishes, provided the query
-still matches. A modified or non-primary click on a trigger that is a link, such
-as Cmd or Ctrl to open a new tab, keeps its native action instead.
-
-The default has no breakpoint restriction. Keep the query and CSS visibility in
-the owning header block or site. Header blocks use `fold="lg"` by default and
-accept `fold="xl"`; that choice controls both visibility and activation.
-
## API Reference
Source: [`src/components/ui/navigation-menu`](https://github.com/fulldotdev/ui/tree/main/src/components/ui/navigation-menu)
diff --git a/src/content/pages/components/sheet.mdx b/src/content/pages/components/sheet.mdx
index d45b5864d..e367b6404 100644
--- a/src/content/pages/components/sheet.mdx
+++ b/src/content/pages/components/sheet.mdx
@@ -72,19 +72,6 @@ Use `showCloseButton={false}` on `SheetContent` to hide the close button.
-## Responsive activation
-
-Pass a `media` query to `Sheet` to import and initialize its controller only
-while that query matches. Leaving the query destroys the controller and releases
-its portals and scroll lock. Returning initializes it again. A trigger click
-during the first download is performed once loading finishes, provided the query
-still matches. A modified or non-primary click on a trigger that is a link, such
-as Cmd or Ctrl to open a new tab, keeps its native action instead.
-
-The default has no breakpoint restriction. Keep the query and CSS visibility in
-the owning header block or site. Header blocks use `fold="lg"` by default and
-accept `fold="xl"`; that choice controls both visibility and activation.
-
## API Reference
Source: [`src/components/ui/sheet`](https://github.com/fulldotdev/ui/tree/main/src/components/ui/sheet)
diff --git a/src/lib/dialog.ts b/src/lib/dialog.ts
deleted file mode 100644
index 9f2fdc815..000000000
--- a/src/lib/dialog.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { onMedia } from "./on-media"
-
-const roots = new Map void>()
-
-export function initializeDialogs() {
- for (const root of document.querySelectorAll(
- '[data-slot="dialog"]'
- )) {
- if (roots.has(root)) continue
- roots.set(
- root,
- onMedia(
- root.dataset.media ?? "all",
- () => import("@data-slot/dialog"),
- ({ createDialog }) => {
- const controller = createDialog(root)
- return () => controller.destroy()
- },
- { root, selector: '[data-slot="dialog-trigger"]', event: "dialog:set" }
- )
- )
- }
-}
-
-document.addEventListener("astro:page-load", initializeDialogs)
-document.addEventListener("astro:before-swap", () => {
- for (const dispose of roots.values()) dispose()
- roots.clear()
-})
diff --git a/src/lib/on-media.ts b/src/lib/on-media.ts
deleted file mode 100644
index aa37735fa..000000000
--- a/src/lib/on-media.ts
+++ /dev/null
@@ -1,105 +0,0 @@
-type Trigger = { root: Element; selector: string; event?: string }
-
-// A modified or non-primary click on a link keeps its native action, such as
-// opening a new tab, instead of being replayed as a plain click.
-const nativeLinkClick = (event: Event, target: Element) => {
- const { button = 0, metaKey, ctrlKey, shiftKey, altKey } = event as MouseEvent
- return (
- (button !== 0 || metaKey || ctrlKey || shiftKey || altKey) &&
- target.matches("a[href], area[href]")
- )
-}
-
-/** Import and mount only while the query matches; dispose on exit. */
-export function onMedia(
- query: string,
- load: () => Promise,
- mount: (module: T) => () => void,
- trigger?: Trigger
-) {
- const media = window.matchMedia(query)
- let disposed = false
- let epoch = 0
- let cleanup: (() => void) | undefined
- let pendingClick: HTMLElement | undefined
- let pendingEvent: CustomEvent | undefined
-
- const matches = () => {
- const matching = window.matchMedia(query).matches
- if (!matching) {
- pendingClick = undefined
- pendingEvent = undefined
- }
- return matching
- }
-
- const replayClick = () => {
- const target = pendingClick
- const event = pendingEvent
- pendingClick = undefined
- pendingEvent = undefined
- if (event && trigger?.root.isConnected)
- trigger.root.dispatchEvent(
- new CustomEvent(event.type, { detail: event.detail })
- )
- else if (target?.isConnected)
- target.dispatchEvent(new MouseEvent("click", { cancelable: true }))
- }
-
- const update = async () => {
- const current = ++epoch
- cleanup?.()
- cleanup = undefined
- if (!matches() || disposed) {
- pendingClick = undefined
- pendingEvent = undefined
- return
- }
- try {
- const module = await load()
- if (disposed || current !== epoch || !matches()) return
- cleanup = mount(module)
- replayClick()
- } catch (error) {
- if (!disposed && current === epoch) {
- pendingClick = undefined
- pendingEvent = undefined
- console.error(error)
- }
- }
- }
- const click = (event: Event) => {
- if (!trigger || cleanup || disposed || !matches() || event.defaultPrevented)
- return
- if (!(event.target instanceof Element)) return
- const target = event.target.closest(trigger.selector)
- if (!target || !trigger.root.contains(target)) return
- if (nativeLinkClick(event, target)) return
- pendingClick ??= target
- pendingEvent = undefined
- event.preventDefault()
- }
- const request = (event: Event) => {
- if (cleanup || disposed || !matches() || event.target !== trigger?.root)
- return
- if (!(event instanceof CustomEvent)) return
- pendingEvent = event
- pendingClick = undefined
- }
- const change = () => void update()
- media.addEventListener("change", change)
- trigger?.root.addEventListener("click", click, true)
- if (trigger?.event) trigger.root.addEventListener(trigger.event, request)
- change()
- return () => {
- disposed = true
- epoch++
- pendingClick = undefined
- pendingEvent = undefined
- media.removeEventListener("change", change)
- trigger?.root.removeEventListener("click", click, true)
- if (trigger?.event) trigger.root.removeEventListener(trigger.event, request)
- cleanup?.()
- cleanup = undefined
- }
-}
diff --git a/tests/browser/docs-search.test.mjs b/tests/browser/docs-search.test.mjs
index 228f18a69..2adc4ed67 100644
--- a/tests/browser/docs-search.test.mjs
+++ b/tests/browser/docs-search.test.mjs
@@ -7,7 +7,7 @@ import { createReadStream, existsSync, statSync } from "node:fs"
import { createServer } from "node:http"
import { extname, join, resolve } from "node:path"
import { after, before, test } from "node:test"
-import { chromium, firefox, webkit } from "playwright"
+import { chromium } from "playwright"
const root = resolve(process.env.DIST ?? "dist")
const types = {
@@ -74,96 +74,3 @@ test("the docs search lists every page and opens a result", async (t) => {
await page.keyboard.press("Enter")
await page.waitForURL(`${origin}/components/accordion/`)
})
-
-for (const type of [chromium, firefox, webkit])
- test(`${type.name()} search shortcut survives a pending dialog import`, async (t) => {
- const browser = await type.launch()
- t.after(() => browser.close())
- const page = await browser.newPage()
- const delay = await delayDialog(page)
- await page.goto(`${origin}/docs/theming/`, {
- waitUntil: "domcontentloaded",
- })
- await delay.started
- await page.keyboard.press(
- await page.evaluate(() =>
- /Mac|iPhone|iPad|iPod/i.test(navigator.platform || navigator.userAgent)
- ? "Meta+k"
- : "Control+k"
- )
- )
- delay.release()
- await page.locator("[data-slot=command-input]:visible").waitFor()
- assert.equal(
- await page
- .locator("[data-slot=command-input]:visible")
- .evaluate((input) => document.activeElement === input),
- true
- )
- })
-
-for (const type of [chromium, webkit])
- test(`${type.name()} original search tap holds keyboard focus while loading`, async (t) => {
- const browser = await type.launch()
- t.after(() => browser.close())
- const page = await browser.newPage({
- viewport: { width: 390, height: 844 },
- hasTouch: true,
- isMobile: true,
- })
- const delay = await delayDialog(page)
- await page.goto(`${origin}/docs/theming/`, {
- waitUntil: "domcontentloaded",
- })
- await delay.started
- await page.evaluate(() => {
- window.__searchGestures = []
- document.addEventListener("click", (event) => {
- if (
- event.target.closest(
- "[data-search-dialog] [data-slot=dialog-trigger]"
- )
- )
- window.__searchGestures.push({
- trusted: event.isTrusted,
- holder: document.activeElement?.matches(
- 'input[aria-hidden="true"]'
- ),
- })
- })
- })
- await page.getByRole("button", { name: "Search documentation" }).tap()
- assert.deepEqual(await page.evaluate(() => window.__searchGestures), [
- { trusted: true, holder: true },
- ])
- delay.release()
- const input = page.locator("[data-slot=command-input]:visible")
- await input.waitFor()
- await page.waitForFunction(() =>
- document.activeElement?.matches("[data-slot=command-input]")
- )
- assert.deepEqual(await page.evaluate(() => window.__searchGestures), [
- { trusted: true, holder: true },
- ])
- })
-
-async function delayDialog(page) {
- let release
- const pending = new Promise((done) => {
- release = done
- })
- let intercepted
- const started = new Promise((done) => {
- intercepted = done
- })
- await page.route("**/*.js", async (route) => {
- const response = await route.fetch()
- const body = await response.text()
- if (body.includes("Dialog requires dialog-content slot")) {
- intercepted()
- await pending
- }
- await route.fulfill({ response, body })
- })
- return { started, release }
-}
diff --git a/tests/browser/responsive-menu.test.mjs b/tests/browser/responsive-menu.test.mjs
index 54cef3db8..01c917bca 100644
--- a/tests/browser/responsive-menu.test.mjs
+++ b/tests/browser/responsive-menu.test.mjs
@@ -8,7 +8,7 @@ import { chromium, firefox, webkit } from "playwright"
const src = resolve("src")
const root = resolve("node_modules/.cache/responsive-menu-site")
-const page = (dialog, router = false) => `---
+const page = (router = false) => `---
import { ClientRouter } from "astro:transitions"
import { Sheet, SheetTrigger, SheetContent, SheetTitle } from "${src}/components/ui/sheet"
import { Dialog, DialogTrigger, DialogContent, DialogTitle } from "${src}/components/ui/dialog"
@@ -16,11 +16,11 @@ import { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuT
import { SidebarProvider, Sidebar, SidebarTrigger } from "${src}/components/ui/sidebar"
---
Responsive menus ${router ? " " : ""}
-
+
-Menu Mobile navigation Inside sheet
-Products Product one
-${dialog ? "Search Search dialog " : ""}
+Menu Mobile navigation Inside sheet
+Products Product one
+Search Search dialog
Sidebar link
Next page Destination
`
const headerPage = (number, fold) => `---
@@ -30,27 +30,13 @@ import "../header.css"
Header ${number} ${fold}
Destination `
-// A site navigation trigger that is also a link, as on category menus.
-const linkTriggerPage = `---
-import { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent } from "${src}/components/ui/navigation-menu"
----
-Link trigger
-Category Category item
-Destination
`
let server
let origin
before(async () => {
rmSync(root, { recursive: true, force: true })
mkdirSync(join(root, "src/pages"), { recursive: true })
- writeFileSync(join(root, "src/pages/index.astro"), page(true))
- writeFileSync(join(root, "src/pages/pending.astro"), page(false))
- writeFileSync(join(root, "src/pages/router-one.astro"), page(true, true))
- writeFileSync(join(root, "src/pages/router-two.astro"), page(true, true))
- writeFileSync(join(root, "src/pages/link-trigger.astro"), linkTriggerPage)
- writeFileSync(
- join(root, "src/pages/category.astro"),
- `Category Category page`
- )
+ writeFileSync(join(root, "src/pages/router-one.astro"), page(true))
+ writeFileSync(join(root, "src/pages/router-two.astro"), page(true))
writeFileSync(
join(root, "src/header.css"),
`@import "tailwindcss"; @source "${src}/components"; body {min-height:150vh} button {min-width:32px;min-height:32px} [data-slot="dialog-content"] {position:fixed;top:0;right:0;background:white;padding:24px}`
@@ -89,7 +75,6 @@ for (const type of [chromium, firefox, webkit]) {
await page.setViewportSize({ width: boundary - 1, height: 900 })
await page.goto(`${origin}/header-${number}-${fold}/`)
const navigation = page.locator('[data-slot="navigation-menu"]')
- const sheet = page.locator('[data-slot="dialog"][data-media]')
const trigger = page.getByRole("button", { name: "Menu", exact: true })
assert.equal(
await navigation.isVisible(),
@@ -97,10 +82,6 @@ for (const type of [chromium, firefox, webkit]) {
`header ${number} ${fold}: mobile navigation`
)
assert.equal(await trigger.isVisible(), true)
- assert.equal(
- await sheet.getAttribute("data-media"),
- `(width < ${fold === "lg" ? 64 : 80}rem)`
- )
await trigger.click()
await page
.getByRole("dialog", { name: "Mobile navigation", exact: true })
@@ -179,315 +160,30 @@ for (const type of [chromium, firefox, webkit]) {
await page.getByRole("dialog", { name: "Search dialog" }).waitFor()
})
- test(`${type.name()} responsive controllers and portal cleanup`, async (t) => {
+ test(`${type.name()} applies a site's page-load command after ClientRouter navigation`, async (t) => {
const browser = await type.launch()
t.after(() => browser.close())
const page = await browser.newPage({
- viewport: { width: 1440, height: 900 },
- })
- const errors = []
- page.on("pageerror", (e) => errors.push(e.message))
- await page.goto(origin)
- const sheet = page.locator('[data-slot="dialog"][data-media]')
- assert.equal(await sheet.getAttribute("data-state"), null)
- await page.getByRole("button", { name: "Search", exact: true }).click()
- await page
- .getByRole("dialog", { name: "Search dialog" })
- .waitFor({ state: "visible" })
- await page.keyboard.press("Escape")
- await page.setViewportSize({ width: 390, height: 900 })
- await page.getByRole("button", { name: "Menu", exact: true }).click()
- await page
- .getByRole("dialog", { name: "Mobile navigation" })
- .waitFor({ state: "visible" })
- await page.setViewportSize({ width: 1440, height: 900 })
- await page
- .getByRole("dialog", { name: "Mobile navigation" })
- .waitFor({ state: "hidden" })
- assert.equal(await page.evaluate(() => document.body.style.overflow), "")
- await page.getByRole("button", { name: "Products", exact: true }).click()
- await page
- .getByRole("link", { name: "Product one" })
- .waitFor({ state: "visible" })
- await page.setViewportSize({ width: 390, height: 900 })
- await page
- .getByRole("link", { name: "Product one" })
- .waitFor({ state: "hidden" })
- await page.getByRole("button", { name: "Menu", exact: true }).click()
- await page
- .getByRole("dialog", { name: "Mobile navigation" })
- .waitFor({ state: "visible" })
- await page.keyboard.press("Escape")
- await page
- .getByRole("dialog", { name: "Mobile navigation" })
- .waitFor({ state: "hidden" })
- assert.deepEqual(errors, [])
- })
-
- for (const cancel of [false, true])
- test(`${type.name()} first click during import, exit=${cancel}`, async (t) => {
- const browser = await type.launch()
- t.after(() => browser.close())
- const page = await browser.newPage({
- viewport: { width: 390, height: 900 },
- })
- let release
- const delayed = new Promise((resolve) => {
- release = resolve
- })
- let intercepted
- const started = new Promise((resolve) => {
- intercepted = resolve
- })
- await page.route("**/*.js", async (route) => {
- const response = await route.fetch()
- const body = await response.text()
- if (body.includes("Dialog requires dialog-content slot")) {
- intercepted()
- await delayed
- }
- await route.fulfill({ response, body })
- })
- await page.goto(origin + "/pending/", { waitUntil: "domcontentloaded" })
- await started
- await page.evaluate(() => {
- window.__menuClicks = []
- document.addEventListener("click", (event) => {
- if (event.target.closest('[data-slot="dialog-trigger"]'))
- window.__menuClicks.push(event.isTrusted)
- })
- })
- await page.getByRole("button", { name: "Menu", exact: true }).click()
- assert.deepEqual(await page.evaluate(() => window.__menuClicks), [true])
- if (cancel) await page.setViewportSize({ width: 1440, height: 900 })
- release()
- if (cancel) {
- await page.waitForLoadState("networkidle")
- assert.equal(
- await page
- .locator('[data-slot="dialog-content"]:not([hidden])')
- .count(),
- 0
- )
- await page.setViewportSize({ width: 390, height: 900 })
- await page.getByRole("button", { name: "Menu", exact: true }).click()
- }
- await page
- .getByRole("dialog", { name: "Mobile navigation" })
- .waitFor({ state: "visible" })
- assert.ok((await page.evaluate(() => window.__menuClicks)).every(Boolean))
+ viewport: { width: 390, height: 900 },
})
-
- for (const input of ["click", "Enter", "ControlOrMeta", "Shift", "Alt"])
- test(`${type.name()} link trigger during import: ${input}`, async (t) => {
- const browser = await type.launch()
- t.after(() => browser.close())
- const page = await browser.newPage({
- viewport: { width: 1440, height: 900 },
- })
- let release
- const pending = new Promise((done) => {
- release = done
- })
- let intercepted
- const started = new Promise((done) => {
- intercepted = done
- })
- await page.route("**/*.js", async (route) => {
- const response = await route.fetch()
- const body = await response.text()
- if (body.includes("NavigationMenu requires")) {
- intercepted()
- await pending
- }
- await route.fulfill({ response, body })
- })
- await page.goto(origin + "/link-trigger/", {
- waitUntil: "domcontentloaded",
- })
- await started
- const link = page.getByRole("link", { name: "Category", exact: true })
- if (input === "click" || input === "Enter") {
- if (input === "click") await link.click()
- else await link.press("Enter")
- // The first activation waits for the controller, then navigates.
- assert.equal(new URL(page.url()).pathname, "/link-trigger/")
- release()
- await page.waitForURL(origin + "/category/")
- return
- }
- // The browser owns a modified click, such as opening a new tab. The test
- // records and stops it; the helper must neither consume nor replay it.
- // A replayed click does not bubble, so capture records that one.
- await page.evaluate(() => {
- window.__clicks = []
- const record = (event) => {
- window.__clicks.push([event.isTrusted, event.defaultPrevented])
- event.preventDefault()
- }
- window.addEventListener("click", (e) => e.isTrusted || record(e), true)
- window.addEventListener("click", (e) => e.isTrusted && record(e))
- })
- await link.click({ modifiers: [input] })
- release()
- await page.waitForFunction(() =>
+ // Registered before any component script, as a site's own listener is.
+ await page.addInitScript(() => {
+ document.addEventListener("astro:page-load", () => {
+ if (!window.__openSheet) return
+ window.__openSheet = false
document
- .querySelector('[data-slot="navigation-menu-trigger"]')
- .hasAttribute("aria-expanded")
- )
- assert.deepEqual(await page.evaluate(() => window.__clicks), [
- [true, false],
- ])
- assert.equal(new URL(page.url()).pathname, "/link-trigger/")
- })
-
- for (const action of ["open", "click", "latest-close", "exit", "swap"])
- test(`${type.name()} pending programmatic navigation request: ${action}`, async (t) => {
- const browser = await type.launch()
- t.after(() => browser.close())
- const page = await browser.newPage({
- viewport: { width: 1440, height: 900 },
- })
- let release
- const pending = new Promise((done) => {
- release = done
- })
- let intercepted
- const started = new Promise((done) => {
- intercepted = done
- })
- await page.route("**/*.js", async (route) => {
- const response = await route.fetch()
- const body = await response.text()
- if (body.includes("NavigationMenu requires")) {
- intercepted()
- await pending
- }
- await route.fulfill({ response, body })
- })
- await page.goto(origin + "/pending/", { waitUntil: "domcontentloaded" })
- await started
- if (action === "click")
- await page
- .getByRole("button", { name: "Products", exact: true })
- .click()
- else
- await page.evaluate((close) => {
- document.addEventListener(
- "astro:page-load",
- () => {
- const root = document.querySelector(
- '[data-slot="navigation-menu"]'
- )
- root.dispatchEvent(
- new CustomEvent("navigation-menu:set", {
- detail: { value: "products" },
- })
- )
- if (close)
- root.dispatchEvent(
- new CustomEvent("navigation-menu:set", {
- detail: { value: null },
- })
- )
- },
- { once: true }
- )
- document.dispatchEvent(new Event("astro:page-load"))
- }, action === "latest-close")
- if (action === "exit")
- await page.setViewportSize({ width: 390, height: 900 })
- if (action === "swap")
- await page.evaluate(() =>
- document.dispatchEvent(new Event("astro:before-swap"))
- )
- release()
- const link = page.getByRole("link", { name: "Product one", exact: true })
- if (action === "open" || action === "click") await link.waitFor()
- else {
- await page.waitForLoadState("networkidle")
- if (action === "exit")
- await page.setViewportSize({ width: 1440, height: 900 })
- if (action === "swap")
- await page.evaluate(() =>
- document.dispatchEvent(new Event("astro:page-load"))
+ .querySelector('[data-slot="dialog"]')
+ .dispatchEvent(
+ new CustomEvent("dialog:set", { detail: { open: true } })
)
- await page.waitForLoadState("networkidle")
- assert.equal(await link.isVisible(), false)
- await page
- .getByRole("button", { name: "Products", exact: true })
- .click()
- await link.waitFor()
- }
- })
-
- for (const action of ["sidebar", "page-load", "exit"])
- test(`${type.name()} pending programmatic dialog request: ${action}`, async (t) => {
- const browser = await type.launch()
- t.after(() => browser.close())
- const page = await browser.newPage({
- viewport: { width: 390, height: 900 },
})
- let release
- const delayed = new Promise((resolve) => {
- release = resolve
- })
- let intercepted
- const started = new Promise((resolve) => {
- intercepted = resolve
- })
- await page.route("**/*.js", async (route) => {
- const response = await route.fetch()
- const body = await response.text()
- if (body.includes("Dialog requires dialog-content slot")) {
- intercepted()
- await delayed
- }
- await route.fulfill({ response, body })
- })
- await page.goto(origin + "/pending/", { waitUntil: "domcontentloaded" })
- await started
- if (action === "sidebar")
- await page
- .getByRole("button", { name: "Toggle Sidebar", exact: true })
- .click()
- else
- await page.evaluate(() => {
- document.addEventListener(
- "astro:page-load",
- () => {
- document
- .querySelector('[data-slot="dialog"][data-media]')
- .dispatchEvent(
- new CustomEvent("dialog:set", { detail: { open: true } })
- )
- },
- { once: true }
- )
- document.dispatchEvent(new Event("astro:page-load"))
- })
- if (action === "exit")
- await page.setViewportSize({ width: 1440, height: 900 })
- release()
- if (action === "exit") {
- await page.waitForLoadState("networkidle")
- await page.setViewportSize({ width: 390, height: 900 })
- await page.waitForLoadState("networkidle")
- assert.equal(
- await page.getByRole("dialog", { name: "Mobile navigation" }).count(),
- 0
- )
- } else {
- const name = action === "sidebar" ? "Sidebar" : "Mobile navigation"
- await page.getByRole("dialog", { name, exact: true }).waitFor()
- await page.keyboard.press("Escape")
- if (action === "sidebar")
- assert.equal(
- await page
- .locator('[data-slot="sidebar-wrapper"]')
- .getAttribute("data-open-mobile"),
- "false"
- )
- }
})
+ await page.goto(origin + "/router-one/")
+ await page.evaluate(() => {
+ window.__openSheet = true
+ document.querySelector('a[href="/router-two/"]').click()
+ })
+ await page.waitForURL("**/router-two/")
+ await page.getByRole("dialog", { name: "Mobile navigation" }).waitFor()
+ })
}
diff --git a/tests/on-media.test.mjs b/tests/on-media.test.mjs
deleted file mode 100644
index 73be4a690..000000000
--- a/tests/on-media.test.mjs
+++ /dev/null
@@ -1,291 +0,0 @@
-import assert from "node:assert/strict"
-import { test } from "node:test"
-
-const { onMedia } = await import(
- new URL("../src/lib/on-media.ts", import.meta.url)
-)
-
-test("media loading cancels stale imports and recreates on return", async () => {
- const media = new EventTarget()
- media.matches = false
- const previous = globalThis.window
- globalThis.window = { matchMedia: () => media }
- let loads = 0
- let mounts = 0
- let destroys = 0
- const resolve = []
- const dispose = onMedia(
- "test",
- () => {
- loads++
- return new Promise((done) => resolve.push(done))
- },
- () => {
- mounts++
- return () => destroys++
- }
- )
- const change = (matches) => {
- media.matches = matches
- media.dispatchEvent(new Event("change"))
- }
- try {
- assert.equal(loads, 0)
- change(true)
- change(false)
- resolve.shift()({})
- await Promise.resolve()
- assert.equal(mounts, 0)
- change(true)
- resolve.shift()({})
- await Promise.resolve()
- assert.equal(mounts, 1)
- change(false)
- assert.equal(destroys, 1)
- change(true)
- resolve.shift()({})
- await Promise.resolve()
- assert.equal(mounts, 2)
- dispose()
- assert.equal(destroys, 2)
- change(true)
- assert.equal(loads, 3)
- } finally {
- dispose()
- globalThis.window = previous
- }
-})
-
-test("disposing during import prevents a later mount", async () => {
- const previous = globalThis.window
- const media = new EventTarget()
- media.matches = true
- globalThis.window = { matchMedia: () => media }
- let done
- let mounts = 0
- const dispose = onMedia(
- "all",
- () =>
- new Promise((resolve) => {
- done = resolve
- }),
- () => {
- mounts++
- return () => {}
- }
- )
- dispose()
- done({})
- await Promise.resolve()
- assert.equal(mounts, 0)
- globalThis.window = previous
-})
-
-for (const stale of [false, true])
- for (const action of ["click", "request"])
- test(`retains ${action} before the media change event arrives, stale=${stale}`, async () => {
- const previous = {
- window: globalThis.window,
- Element: globalThis.Element,
- MouseEvent: globalThis.MouseEvent,
- }
- class Element extends EventTarget {
- isConnected = true
- closest() {
- return this
- }
- contains(target) {
- return target === this
- }
- }
- const media = new EventTarget()
- media.matches = false
- let current = false
- let reads = 0
- globalThis.window = {
- matchMedia: () => (stale && reads++ > 0 ? { matches: current } : media),
- }
- globalThis.Element = Element
- globalThis.MouseEvent = Event
- const root = new Element()
- const received = []
- const event = action === "click" ? "click" : "dialog:set"
- const receive = (event) => received.push(event.detail?.open ?? "click")
- const dispose = onMedia(
- "mobile",
- async () => ({}),
- () => {
- root.addEventListener(event, receive)
- return () => root.removeEventListener(event, receive)
- },
- { root, selector: "button", event: "dialog:set" }
- )
- try {
- current = true
- if (!stale) media.matches = true
- root.dispatchEvent(
- action === "click"
- ? new Event("click", { cancelable: true })
- : new CustomEvent("dialog:set", { detail: { open: true } })
- )
- assert.deepEqual(received, [])
- media.matches = true
- media.dispatchEvent(new Event("change"))
- await Promise.resolve()
- assert.deepEqual(received, [action === "click" ? "click" : true])
- current = media.matches = false
- media.dispatchEvent(new Event("change"))
- current = media.matches = true
- media.dispatchEvent(new Event("change"))
- await Promise.resolve()
- assert.equal(received.length, 1)
- } finally {
- dispose()
- Object.assign(globalThis, previous)
- }
- })
-
-for (const action of ["click", "request"])
- for (const observer of ["import", "click", "request"])
- test(`discards ${action} when ${observer} observes exit before its notification`, async () => {
- const previous = {
- window: globalThis.window,
- Element: globalThis.Element,
- MouseEvent: globalThis.MouseEvent,
- }
- class Element extends EventTarget {
- isConnected = true
- closest() {
- return this
- }
- contains(target) {
- return target === this
- }
- }
- const media = new EventTarget()
- media.matches = true
- let current = true
- let reads = 0
- globalThis.window = {
- matchMedia: () => (reads++ === 0 ? media : { matches: current }),
- }
- globalThis.Element = Element
- globalThis.MouseEvent = Event
- const root = new Element()
- const received = []
- const resolves = []
- let mounts = 0
- const event = action === "click" ? "click" : "dialog:set"
- const receive = (event) => received.push(event.detail?.open ?? "click")
- const activate = () =>
- root.dispatchEvent(
- action === "click"
- ? new Event("click", { cancelable: true })
- : new CustomEvent("dialog:set", { detail: { open: true } })
- )
- const dispose = onMedia(
- "mobile",
- () => new Promise((done) => resolves.push(done)),
- () => {
- mounts++
- root.addEventListener(event, receive)
- return () => root.removeEventListener(event, receive)
- },
- { root, selector: "button", event: "dialog:set" }
- )
- try {
- activate()
- current = false
- if (observer === "import") {
- resolves.shift()({})
- await Promise.resolve()
- } else {
- root.dispatchEvent(
- observer === "click"
- ? new Event("click", { cancelable: true })
- : new CustomEvent("dialog:set", { detail: { open: false } })
- )
- }
- assert.equal(mounts, 0)
- assert.deepEqual(received, [])
- current = true
- media.dispatchEvent(new Event("change"))
- if (observer !== "import") {
- resolves.shift()({})
- await Promise.resolve()
- assert.equal(mounts, 0)
- }
- resolves.shift()({})
- await Promise.resolve()
- assert.equal(mounts, 1)
- assert.deepEqual(received, [])
- activate()
- assert.deepEqual(received, [action === "click" ? "click" : true])
- } finally {
- dispose()
- Object.assign(globalThis, previous)
- }
- })
-
-for (const link of [true, false])
- for (const input of [
- "plain",
- "metaKey",
- "ctrlKey",
- "shiftKey",
- "altKey",
- "button",
- ])
- test(`pending ${input} click on a ${link ? "link" : "button"} trigger`, async () => {
- const previous = {
- window: globalThis.window,
- Element: globalThis.Element,
- MouseEvent: globalThis.MouseEvent,
- }
- class Element extends EventTarget {
- isConnected = true
- closest() {
- return this
- }
- contains(target) {
- return target === this
- }
- matches(selector) {
- return link && selector === "a[href], area[href]"
- }
- }
- const media = new EventTarget()
- media.matches = true
- globalThis.window = { matchMedia: () => media }
- globalThis.Element = Element
- globalThis.MouseEvent = Event
- const root = new Element()
- const replayed = []
- let done
- const dispose = onMedia(
- "all",
- () => new Promise((resolve) => (done = resolve)),
- () => {
- const receive = (event) => replayed.push(event)
- root.addEventListener("click", receive)
- return () => root.removeEventListener("click", receive)
- },
- { root, selector: "a" }
- )
- try {
- const click = new Event("click", { cancelable: true })
- if (input === "button") click.button = 1
- else if (input !== "plain") click[input] = true
- root.dispatchEvent(click)
- done({})
- await Promise.resolve()
- await Promise.resolve()
- // Only a modified or non-primary link click keeps its native action.
- const native = link && input !== "plain"
- assert.equal(click.defaultPrevented, !native)
- assert.equal(replayed.length, native ? 0 : 1)
- } finally {
- dispose()
- Object.assign(globalThis, previous)
- }
- })