fulldev-ui 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +24 -20
- package/public/r/accordion.json +1 -1
- package/public/r/alert-dialog.json +1 -1
- package/public/r/aspect-ratio.json +23 -0
- package/public/r/attachment.json +66 -0
- package/public/r/button-group.json +41 -0
- package/public/r/carousel.json +8 -8
- package/public/r/collapsible.json +1 -1
- package/public/r/combobox.json +4 -4
- package/public/r/command.json +2 -2
- package/public/r/components.json +8 -0
- package/public/r/dialog.json +1 -1
- package/public/r/doc-1.json +1 -1
- package/public/r/drawer.json +109 -0
- package/public/r/dropdown-menu.json +1 -1
- package/public/r/hover-card.json +2 -2
- package/public/r/init.json +1 -1
- package/public/r/navigation-menu.json +2 -2
- package/public/r/pagination.json +59 -0
- package/public/r/popover.json +1 -1
- package/public/r/radio-group.json +1 -1
- package/public/r/registry.json +414 -24
- package/public/r/resizable.json +36 -0
- package/public/r/reviews-3.json +1 -1
- package/public/r/select.json +1 -1
- package/public/r/sheet.json +1 -1
- package/public/r/sidebar.json +1 -1
- package/public/r/slider.json +2 -2
- package/public/r/switch.json +1 -1
- package/public/r/tabs.json +1 -1
- package/public/r/toast.json +80 -0
- package/public/r/toggle-group.json +34 -0
- package/public/r/toggle.json +1 -1
- package/public/r/tooltip.json +1 -1
- package/public/r/typography.json +21 -16
- package/registry/init/global.css +2 -0
- package/registry.json +375 -24
- package/src/components/blocks/doc-1.astro +76 -0
- package/src/components/blocks/reviews-3.astro +1 -1
- package/src/components/ui/aspect-ratio/aspect-ratio.astro +25 -0
- package/src/components/ui/aspect-ratio/index.ts +1 -0
- package/src/components/ui/attachment/attachment-action.astro +20 -0
- package/src/components/ui/attachment/attachment-actions.astro +20 -0
- package/src/components/ui/attachment/attachment-content.astro +20 -0
- package/src/components/ui/attachment/attachment-description.astro +20 -0
- package/src/components/ui/attachment/attachment-group.astro +20 -0
- package/src/components/ui/attachment/attachment-media.astro +36 -0
- package/src/components/ui/attachment/attachment-title.astro +20 -0
- package/src/components/ui/attachment/attachment-trigger.astro +24 -0
- package/src/components/ui/attachment/attachment.astro +52 -0
- package/src/components/ui/attachment/index.ts +9 -0
- package/src/components/ui/button-group/button-group-separator.astro +29 -0
- package/src/components/ui/button-group/button-group-text.astro +20 -0
- package/src/components/ui/button-group/button-group-variants.ts +20 -0
- package/src/components/ui/button-group/button-group.astro +30 -0
- package/src/components/ui/button-group/index.ts +7 -0
- package/src/components/ui/carousel/carousel-content.astro +11 -13
- package/src/components/ui/carousel/carousel-item.astro +2 -5
- package/src/components/ui/carousel/carousel-next.astro +0 -3
- package/src/components/ui/carousel/carousel-previous.astro +0 -3
- package/src/components/ui/carousel/carousel.astro +19 -219
- package/src/components/ui/carousel/index.ts +1 -5
- package/src/components/ui/combobox/combobox-input.astro +11 -4
- package/src/components/ui/combobox/combobox-trigger.astro +7 -7
- package/src/components/ui/drawer/drawer-close.astro +13 -0
- package/src/components/ui/drawer/drawer-content.astro +43 -0
- package/src/components/ui/drawer/drawer-description.astro +17 -0
- package/src/components/ui/drawer/drawer-footer.astro +17 -0
- package/src/components/ui/drawer/drawer-header.astro +17 -0
- package/src/components/ui/drawer/drawer-indent-background.astro +11 -0
- package/src/components/ui/drawer/drawer-indent.astro +11 -0
- package/src/components/ui/drawer/drawer-overlay.astro +21 -0
- package/src/components/ui/drawer/drawer-popup.astro +36 -0
- package/src/components/ui/drawer/drawer-portal.astro +27 -0
- package/src/components/ui/drawer/drawer-provider.astro +11 -0
- package/src/components/ui/drawer/drawer-swipe-handle.astro +20 -0
- package/src/components/ui/drawer/drawer-title.astro +17 -0
- package/src/components/ui/drawer/drawer-trigger.astro +21 -0
- package/src/components/ui/drawer/drawer-viewport.astro +21 -0
- package/src/components/ui/drawer/drawer-virtual-keyboard-provider.astro +11 -0
- package/src/components/ui/drawer/drawer.astro +60 -0
- package/src/components/ui/drawer/index.ts +28 -0
- package/src/components/ui/navigation-menu/navigation-menu.astro +2 -2
- package/src/components/ui/pagination/index.ts +7 -0
- package/src/components/ui/pagination/pagination-content.astro +17 -0
- package/src/components/ui/pagination/pagination-ellipsis.astro +22 -0
- package/src/components/ui/pagination/pagination-item.astro +11 -0
- package/src/components/ui/pagination/pagination-link.astro +41 -0
- package/src/components/ui/pagination/pagination-next.astro +27 -0
- package/src/components/ui/pagination/pagination-previous.astro +27 -0
- package/src/components/ui/pagination/pagination.astro +19 -0
- package/src/components/ui/resizable/index.ts +4 -0
- package/src/components/ui/resizable/resizable-handle.astro +32 -0
- package/src/components/ui/resizable/resizable-panel.astro +36 -0
- package/src/components/ui/resizable/resizable.astro +43 -0
- package/src/components/ui/slider/slider.astro +1 -1
- package/src/components/ui/toast/index.ts +26 -0
- package/src/components/ui/toast/toast-action.astro +25 -0
- package/src/components/ui/toast/toast-close.astro +27 -0
- package/src/components/ui/toast/toast-content.astro +20 -0
- package/src/components/ui/toast/toast-description.astro +18 -0
- package/src/components/ui/toast/toast-icon.astro +37 -0
- package/src/components/ui/toast/toast-item.astro +28 -0
- package/src/components/ui/toast/toast-template.astro +11 -0
- package/src/components/ui/toast/toast-title.astro +17 -0
- package/src/components/ui/toast/toast-viewport.astro +20 -0
- package/src/components/ui/toast/toast.astro +51 -0
- package/src/components/ui/toast/toaster.astro +37 -0
- package/src/components/ui/toggle-group/index.ts +2 -0
- package/src/components/ui/toggle-group/toggle-group-item.astro +44 -0
- package/src/components/ui/toggle-group/toggle-group.astro +74 -0
- package/src/components/ui/typography/typeset.css +441 -0
- package/src/components/ui/typography/typography-a.astro +13 -22
- package/src/components/ui/typography/typography-blockquote.astro +4 -23
- package/src/components/ui/typography/typography-h1.astro +13 -26
- package/src/components/ui/typography/typography-h2.astro +13 -31
- package/src/components/ui/typography/typography-h3.astro +9 -26
- package/src/components/ui/typography/typography-h4.astro +9 -26
- package/src/components/ui/typography/typography-inline-code.astro +8 -27
- package/src/components/ui/typography/typography-lead.astro +4 -26
- package/src/components/ui/typography/typography-list-item.astro +4 -24
- package/src/components/ui/typography/typography-list.astro +10 -40
- package/src/components/ui/typography/typography-p.astro +9 -28
- package/src/components/ui/typography/typography-table-cell.astro +9 -40
- package/src/components/ui/typography/typography-table-head.astro +9 -35
- package/src/components/ui/typography/typography-table-row.astro +4 -23
- package/src/components/ui/typography/typography-table.astro +8 -28
- package/src/components/ui/typography/typography.astro +10 -283
- package/src/styles/global.css +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#197](https://github.com/fulldotdev/ui/pull/197) [`9ca89fb`](https://github.com/fulldotdev/ui/commit/9ca89fbb09bcf99fb380b9ddc6f1637759bd7a2d) Thanks [@silveltman](https://github.com/silveltman)! - Complete Data Slot component coverage with Drawer, Toast, Toggle Group and Resizable, and upgrade all Data Slot packages to 1.0.2. Add Attachment, Button Group, Pagination and Aspect Ratio as Astro components without their own client scripts.
|
|
8
|
+
|
|
9
|
+
Replace the Embla Carousel with Data Slot's native scrolling carousel. This is a breaking change: replace `opts` with `defaultIndex`, `orientation`, `drag` and `loop`; use `CarouselController` and `CarouselOptions` instead of Embla types; replace `carousel:init` and `carousel:select` with `carousel:change` and `carousel:set`. Carousel now displays one full-width slide at a time. Remove fractional slide widths and the old content/item spacing pattern. Examples and the reviews block use the new API.
|
|
10
|
+
|
|
11
|
+
Adopt shadcn Typeset for rendered prose while preserving the existing Typography component exports. Typography sizes now control the prose rhythm, with updated heading spacing, nested content styling and semantic tables. Keep docs-specific code controls out of installable Typography styles.
|
|
12
|
+
|
|
13
|
+
Improve Combobox trigger and clear focus styling, align Select popper placement and Slider thumb positioning with shadcn, and use a consistent 8px default Navigation Menu gap.
|
|
14
|
+
|
|
3
15
|
## 0.12.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fulldev-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"description": "Open-source Astro UI components and blocks",
|
|
6
6
|
"homepage": "https://ui.full.dev",
|
|
7
7
|
"bugs": "https://github.com/fulldotdev/ui/issues",
|
|
@@ -50,24 +50,29 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@astrojs/mdx": "^5.0.6",
|
|
52
52
|
"@astrojs/sitemap": "^3.7.3",
|
|
53
|
-
"@data-slot/accordion": "^1.0.
|
|
54
|
-
"@data-slot/alert-dialog": "^1.0.
|
|
55
|
-
"@data-slot/
|
|
56
|
-
"@data-slot/
|
|
57
|
-
"@data-slot/
|
|
58
|
-
"@data-slot/
|
|
59
|
-
"@data-slot/
|
|
60
|
-
"@data-slot/
|
|
61
|
-
"@data-slot/
|
|
62
|
-
"@data-slot/
|
|
63
|
-
"@data-slot/
|
|
64
|
-
"@data-slot/
|
|
65
|
-
"@data-slot/
|
|
66
|
-
"@data-slot/
|
|
67
|
-
"@data-slot/
|
|
68
|
-
"@data-slot/
|
|
69
|
-
"@data-slot/
|
|
70
|
-
"@data-slot/
|
|
53
|
+
"@data-slot/accordion": "^1.0.2",
|
|
54
|
+
"@data-slot/alert-dialog": "^1.0.2",
|
|
55
|
+
"@data-slot/carousel": "^1.0.2",
|
|
56
|
+
"@data-slot/collapsible": "^1.0.2",
|
|
57
|
+
"@data-slot/combobox": "^1.0.2",
|
|
58
|
+
"@data-slot/command": "^1.0.2",
|
|
59
|
+
"@data-slot/core": "^1.0.2",
|
|
60
|
+
"@data-slot/dialog": "^1.0.2",
|
|
61
|
+
"@data-slot/drawer": "^1.0.2",
|
|
62
|
+
"@data-slot/dropdown-menu": "^1.0.2",
|
|
63
|
+
"@data-slot/hover-card": "^1.0.2",
|
|
64
|
+
"@data-slot/navigation-menu": "^1.0.2",
|
|
65
|
+
"@data-slot/popover": "^1.0.2",
|
|
66
|
+
"@data-slot/radio-group": "^1.0.2",
|
|
67
|
+
"@data-slot/resizable": "^1.0.2",
|
|
68
|
+
"@data-slot/select": "^1.0.2",
|
|
69
|
+
"@data-slot/slider": "^1.0.2",
|
|
70
|
+
"@data-slot/switch": "^1.0.2",
|
|
71
|
+
"@data-slot/tabs": "^1.0.2",
|
|
72
|
+
"@data-slot/toast": "^1.0.2",
|
|
73
|
+
"@data-slot/toggle": "^1.0.2",
|
|
74
|
+
"@data-slot/toggle-group": "^1.0.2",
|
|
75
|
+
"@data-slot/tooltip": "^1.0.2",
|
|
71
76
|
"@fontsource-variable/geist": "^5.2.9",
|
|
72
77
|
"@fontsource-variable/geist-mono": "^5.2.8",
|
|
73
78
|
"@lexingtonthemes/seo": "^0.2.0",
|
|
@@ -79,7 +84,6 @@
|
|
|
79
84
|
"astro-robots-txt": "^1.0.0",
|
|
80
85
|
"class-variance-authority": "^0.7.1",
|
|
81
86
|
"clsx": "^2.1.1",
|
|
82
|
-
"embla-carousel": "^8.6.0",
|
|
83
87
|
"lucide-static": "^1.22.0",
|
|
84
88
|
"shadcn": "^4.12.0",
|
|
85
89
|
"simple-icons": "^16.24.1",
|
package/public/r/accordion.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "aspect-ratio",
|
|
4
|
+
"title": "Aspect Ratio",
|
|
5
|
+
"description": "Displays content within a desired ratio.",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"path": "src/components/ui/aspect-ratio/aspect-ratio.astro",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n ratio: number\n}\n\nconst { class: className, ratio, style, ...props } = Astro.props\n\nconst resolvedStyle =\n typeof style === \"string\"\n ? `--ratio: ${ratio}; ${style}`\n : { \"--ratio\": ratio, ...(style ?? {}) }\n---\n\n<div\n data-slot=\"aspect-ratio\"\n style={resolvedStyle}\n class={cn(\"relative aspect-(--ratio)\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
10
|
+
"type": "registry:ui"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "src/components/ui/aspect-ratio/index.ts",
|
|
14
|
+
"content": "export { default as AspectRatio } from \"./aspect-ratio.astro\"\n",
|
|
15
|
+
"type": "registry:ui"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"docs": "https://ui.full.dev/components/aspect-ratio/",
|
|
19
|
+
"categories": [
|
|
20
|
+
"ui"
|
|
21
|
+
],
|
|
22
|
+
"type": "registry:ui"
|
|
23
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "attachment",
|
|
4
|
+
"title": "Attachment",
|
|
5
|
+
"description": "Displays a file or image attachment with media, metadata, state, and actions.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@fulldev/button"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "src/components/ui/attachment/attachment-action.astro",
|
|
12
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { Button, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> &\n ButtonVariantProps\n\nconst { as, variant = \"ghost\", size = \"icon-xs\", ...props } = Astro.props\n---\n\n<Button\n as={as}\n data-slot=\"attachment-action\"\n variant={variant}\n size={size}\n {...props}\n>\n <slot />\n</Button>\n",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "src/components/ui/attachment/attachment-actions.astro",
|
|
17
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"attachment-actions\"\n class={cn(\n \"relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
18
|
+
"type": "registry:ui"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "src/components/ui/attachment/attachment-content.astro",
|
|
22
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"attachment-content\"\n class={cn(\n \"max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
23
|
+
"type": "registry:ui"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "src/components/ui/attachment/attachment-description.astro",
|
|
27
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-description\"\n class={cn(\n \"text-muted-foreground group-data-[state=error]/attachment:text-destructive/80 mt-0.5 block max-w-full min-w-0 truncate text-xs\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
28
|
+
"type": "registry:ui"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "src/components/ui/attachment/attachment-group.astro",
|
|
32
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"attachment-group\"\n class={cn(\n \"flex min-w-0 snap-x snap-mandatory scroll-px-1 gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
33
|
+
"type": "registry:ui"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "src/components/ui/attachment/attachment-media.astro",
|
|
37
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst attachmentMediaVariants = cva(\n \"bg-muted text-foreground group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5\",\n {\n variants: {\n variant: {\n icon: \"\",\n image:\n \"opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"icon\",\n },\n }\n)\n\ntype Props = HTMLAttributes<\"div\"> &\n VariantProps<typeof attachmentMediaVariants>\n\nconst { class: className, variant = \"icon\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"attachment-media\"\n data-variant={variant}\n class={cn(attachmentMediaVariants({ variant }), className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
38
|
+
"type": "registry:ui"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "src/components/ui/attachment/attachment-title.astro",
|
|
42
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"attachment-title\"\n class={cn(\n \"block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:animate-pulse group-data-[state=uploading]/attachment:animate-pulse\",\n className\n )}\n {...props}\n>\n <slot />\n</span>\n",
|
|
43
|
+
"type": "registry:ui"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "src/components/ui/attachment/attachment-trigger.astro",
|
|
47
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }>\n\nconst {\n as: Tag = \"href\" in Astro.props ? \"a\" : \"button\",\n class: className,\n ...props\n} = Astro.props\n\nconst attributes: Record<string, unknown> = { ...props }\nif (Tag === \"button\") attributes.type ??= \"button\"\n---\n\n<Tag\n data-slot=\"attachment-trigger\"\n class={cn(\"absolute inset-0 z-10 outline-none\", className)}\n {...attributes}\n>\n <slot />\n</Tag>\n",
|
|
48
|
+
"type": "registry:ui"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "src/components/ui/attachment/attachment.astro",
|
|
52
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst attachmentVariants = cva(\n \"group/attachment bg-card text-card-foreground focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border transition-colors focus-within:ring-1 data-[state=idle]:border-dashed\",\n {\n variants: {\n size: {\n default:\n \"gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2\",\n sm: \"gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5\",\n xs: \"gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1\",\n },\n orientation: {\n horizontal: \"min-w-40 items-center\",\n vertical: \"w-24 flex-col has-data-[slot=attachment-content]:w-30\",\n },\n },\n defaultVariants: {\n size: \"default\",\n orientation: \"horizontal\",\n },\n }\n)\n\ntype Props = HTMLAttributes<\"div\"> &\n VariantProps<typeof attachmentVariants> & {\n state?: \"idle\" | \"uploading\" | \"processing\" | \"error\" | \"done\"\n }\n\nconst {\n class: className,\n state = \"done\",\n size = \"default\",\n orientation = \"horizontal\",\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"attachment\"\n data-state={state}\n data-size={size}\n data-orientation={orientation}\n class={cn(attachmentVariants({ size, orientation }), className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
53
|
+
"type": "registry:ui"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"path": "src/components/ui/attachment/index.ts",
|
|
57
|
+
"content": "export { default as Attachment } from \"./attachment.astro\"\nexport { default as AttachmentAction } from \"./attachment-action.astro\"\nexport { default as AttachmentActions } from \"./attachment-actions.astro\"\nexport { default as AttachmentContent } from \"./attachment-content.astro\"\nexport { default as AttachmentDescription } from \"./attachment-description.astro\"\nexport { default as AttachmentGroup } from \"./attachment-group.astro\"\nexport { default as AttachmentMedia } from \"./attachment-media.astro\"\nexport { default as AttachmentTitle } from \"./attachment-title.astro\"\nexport { default as AttachmentTrigger } from \"./attachment-trigger.astro\"\n",
|
|
58
|
+
"type": "registry:ui"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"docs": "https://ui.full.dev/components/attachment/",
|
|
62
|
+
"categories": [
|
|
63
|
+
"ui"
|
|
64
|
+
],
|
|
65
|
+
"type": "registry:ui"
|
|
66
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "button-group",
|
|
4
|
+
"title": "Button Group",
|
|
5
|
+
"description": "Groups related controls with connected edges and consistent focus behavior.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@fulldev/separator"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "src/components/ui/button-group/button-group-separator.astro",
|
|
12
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\"\n decorative?: boolean\n}\n\nconst {\n class: className,\n orientation = \"vertical\",\n decorative = true,\n ...props\n} = Astro.props\n---\n\n<Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n decorative={decorative}\n class={cn(\n \"bg-input relative self-stretch data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto\",\n className\n )}\n {...props}\n/>\n",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "src/components/ui/button-group/button-group-text.astro",
|
|
17
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }>\n\nconst { as: Tag = \"div\", class: className, ...props } = Astro.props\n---\n\n<Tag\n data-slot=\"button-group-text\"\n class={cn(\n \"bg-muted flex items-center gap-2 rounded-md border px-2.5 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
18
|
+
"type": "registry:ui"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "src/components/ui/button-group/button-group-variants.ts",
|
|
22
|
+
"content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const buttonGroupVariants = cva(\n \"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0\",\n vertical:\n \"flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n }\n)\n\nexport type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>\n",
|
|
23
|
+
"type": "registry:ui"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "src/components/ui/button-group/button-group.astro",
|
|
27
|
+
"content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport {\n buttonGroupVariants,\n type ButtonGroupVariantProps,\n} from \"./button-group-variants\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }> &\n ButtonGroupVariantProps\n\nconst {\n as: Tag = \"div\",\n class: className,\n orientation = \"horizontal\",\n ...props\n} = Astro.props\n---\n\n<Tag\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n class={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n>\n <slot />\n</Tag>\n",
|
|
28
|
+
"type": "registry:ui"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "src/components/ui/button-group/index.ts",
|
|
32
|
+
"content": "export { default as ButtonGroup } from \"./button-group.astro\"\nexport { default as ButtonGroupSeparator } from \"./button-group-separator.astro\"\nexport { default as ButtonGroupText } from \"./button-group-text.astro\"\nexport {\n buttonGroupVariants,\n type ButtonGroupVariantProps,\n} from \"./button-group-variants\"\n",
|
|
33
|
+
"type": "registry:ui"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"docs": "https://ui.full.dev/components/button-group/",
|
|
37
|
+
"categories": [
|
|
38
|
+
"ui"
|
|
39
|
+
],
|
|
40
|
+
"type": "registry:ui"
|
|
41
|
+
}
|
package/public/r/carousel.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
3
|
"name": "carousel",
|
|
4
4
|
"title": "Carousel",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "An accessible carousel built on native scrolling with Data Slot.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"
|
|
7
|
+
"@data-slot/carousel@^1.0.2",
|
|
8
8
|
"@lucide/astro"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
@@ -13,32 +13,32 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "src/components/ui/carousel/carousel.astro",
|
|
16
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\
|
|
16
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultIndex?: number\n orientation?: \"horizontal\" | \"vertical\"\n drag?: boolean\n loop?: boolean\n}\n\nconst {\n class: className,\n defaultIndex,\n orientation = \"horizontal\",\n drag,\n loop,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"carousel\"\n data-default-index={defaultIndex}\n data-orientation={orientation}\n data-drag={drag}\n data-loop={loop}\n class={cn(\"group/carousel relative\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/carousel\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
17
17
|
"type": "registry:ui"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "src/components/ui/carousel/carousel-content.astro",
|
|
21
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div
|
|
21
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"carousel-content\"\n class={cn(\n \"no-scrollbar flex snap-x snap-mandatory overflow-x-auto overscroll-x-contain\",\n \"group-data-[dragging=true]/carousel:cursor-grabbing\",\n \"group-data-[orientation=vertical]/carousel:snap-y group-data-[orientation=vertical]/carousel:flex-col group-data-[orientation=vertical]/carousel:overflow-x-hidden group-data-[orientation=vertical]/carousel:overflow-y-auto group-data-[orientation=vertical]/carousel:overscroll-y-contain\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
22
22
|
"type": "registry:ui"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"path": "src/components/ui/carousel/carousel-item.astro",
|
|
26
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"carousel-item\"\n
|
|
26
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"carousel-item\"\n class={cn(\n \"min-w-0 shrink-0 grow-0 basis-full snap-start\",\n \"group-data-[orientation=vertical]/carousel:min-h-0\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
27
27
|
"type": "registry:ui"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"path": "src/components/ui/carousel/carousel-next.astro",
|
|
31
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronRightIcon from \"@lucide/astro/icons/chevron-right\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n
|
|
31
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronRightIcon from \"@lucide/astro/icons/chevron-right\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n} = Astro.props\n---\n\n<button\n type=\"button\"\n data-slot=\"carousel-next\"\n class={cn(\n buttonVariants({ variant, size }),\n \"absolute touch-manipulation rounded-full group-data-[orientation=horizontal]/carousel:inset-y-0 group-data-[orientation=horizontal]/carousel:-right-12 group-data-[orientation=horizontal]/carousel:my-auto\",\n \"group-data-[orientation=vertical]/carousel:right-auto group-data-[orientation=vertical]/carousel:-bottom-12 group-data-[orientation=vertical]/carousel:left-1/2 group-data-[orientation=vertical]/carousel:-translate-x-1/2 group-data-[orientation=vertical]/carousel:translate-y-0 group-data-[orientation=vertical]/carousel:rotate-90\",\n className\n )}\n {...props}\n>\n <slot>\n <ChevronRightIcon aria-hidden=\"true\" />\n <span class=\"sr-only\">Next slide</span>\n </slot>\n</button>\n",
|
|
32
32
|
"type": "registry:ui"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "src/components/ui/carousel/carousel-previous.astro",
|
|
36
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronLeftIcon from \"@lucide/astro/icons/chevron-left\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n
|
|
36
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronLeftIcon from \"@lucide/astro/icons/chevron-left\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants, type ButtonVariantProps } from \"@/components/ui/button\"\n\ntype Props = Omit<HTMLAttributes<\"button\">, \"type\"> & ButtonVariantProps\n\nconst {\n class: className,\n variant = \"outline\",\n size = \"icon-sm\",\n ...props\n} = Astro.props\n---\n\n<button\n type=\"button\"\n data-slot=\"carousel-previous\"\n class={cn(\n buttonVariants({ variant, size }),\n \"absolute touch-manipulation rounded-full group-data-[orientation=horizontal]/carousel:inset-y-0 group-data-[orientation=horizontal]/carousel:-left-12 group-data-[orientation=horizontal]/carousel:my-auto\",\n \"group-data-[orientation=vertical]/carousel:-top-12 group-data-[orientation=vertical]/carousel:left-1/2 group-data-[orientation=vertical]/carousel:-translate-x-1/2 group-data-[orientation=vertical]/carousel:translate-y-0 group-data-[orientation=vertical]/carousel:rotate-90\",\n className\n )}\n {...props}\n>\n <slot>\n <ChevronLeftIcon aria-hidden=\"true\" />\n <span class=\"sr-only\">Previous slide</span>\n </slot>\n</button>\n",
|
|
37
37
|
"type": "registry:ui"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "src/components/ui/carousel/index.ts",
|
|
41
|
-
"content": "export type {
|
|
41
|
+
"content": "export type { CarouselController, CarouselOptions } from \"@data-slot/carousel\"\n\nexport { default as Carousel } from \"./carousel.astro\"\nexport { default as CarouselContent } from \"./carousel-content.astro\"\nexport { default as CarouselItem } from \"./carousel-item.astro\"\nexport { default as CarouselPrevious } from \"./carousel-previous.astro\"\nexport { default as CarouselNext } from \"./carousel-next.astro\"\n",
|
|
42
42
|
"type": "registry:ui"
|
|
43
43
|
}
|
|
44
44
|
],
|
package/public/r/combobox.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"title": "Combobox",
|
|
5
5
|
"description": "Autocomplete input with a list of suggestions.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/combobox@^1.0.
|
|
8
|
-
"@data-slot/core@^1.0.
|
|
7
|
+
"@data-slot/combobox@^1.0.2",
|
|
8
|
+
"@data-slot/core@^1.0.2",
|
|
9
9
|
"@lucide/astro"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "src/components/ui/combobox/combobox-input.astro",
|
|
37
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport InputGroupAddon from \"@/components/ui/input-group/input-group-addon.astro\"\nimport InputGroupInput from \"@/components/ui/input-group/input-group-input.astro\"\nimport InputGroup from \"@/components/ui/input-group/input-group.astro\"\n\nimport ComboboxTrigger from \"./combobox-trigger.astro\"\n\ntype Props = HTMLAttributes<\"input\"> & {\n showTrigger?: boolean\n showClear?: boolean\n}\n\nconst {\n class: className,\n type = \"text\",\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n} = Astro.props\n---\n\n<InputGroup
|
|
37
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport InputGroupAddon from \"@/components/ui/input-group/input-group-addon.astro\"\nimport InputGroupButton from \"@/components/ui/input-group/input-group-button.astro\"\nimport InputGroupInput from \"@/components/ui/input-group/input-group-input.astro\"\nimport InputGroup from \"@/components/ui/input-group/input-group.astro\"\n\nimport ComboboxTrigger from \"./combobox-trigger.astro\"\n\ntype Props = HTMLAttributes<\"input\"> & {\n showTrigger?: boolean\n showClear?: boolean\n}\n\nconst {\n class: className,\n type = \"text\",\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n} = Astro.props\n---\n\n<InputGroup\n class={cn(\n \"has-[[data-slot=combobox-input]:focus-visible]:border-ring has-[[data-slot=combobox-input]:focus-visible]:ring-ring/50 w-auto has-[[data-slot=combobox-input]:focus-visible]:ring-3\",\n className\n )}\n>\n <InputGroupInput\n type={type}\n data-slot=\"combobox-input\"\n disabled={disabled}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {\n showTrigger && (\n <ComboboxTrigger\n class=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )\n }\n {\n showClear && (\n <InputGroupButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-clear\"\n disabled={disabled}\n >\n <XIcon class=\"pointer-events-none\" />\n </InputGroupButton>\n )\n }\n </InputGroupAddon>\n <slot />\n</InputGroup>\n",
|
|
38
38
|
"type": "registry:ui"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"path": "src/components/ui/combobox/combobox-trigger.astro",
|
|
62
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n---\n\n<
|
|
62
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\nimport InputGroupButton from \"@/components/ui/input-group/input-group-button.astro\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n showIcon?: boolean\n}\n\nconst {\n class: className,\n type = \"button\",\n showIcon = true,\n ...props\n} = Astro.props\n---\n\n<InputGroupButton\n type={type ?? \"button\"}\n variant=\"ghost\"\n size=\"icon-xs\"\n data-slot=\"combobox-trigger\"\n class={cn(\"[&_svg]:text-muted-foreground\", className)}\n {...props}\n>\n <slot />\n {\n showIcon && (\n <ChevronDownIcon class=\"text-muted-foreground pointer-events-none size-4\" />\n )\n }\n</InputGroupButton>\n",
|
|
63
63
|
"type": "registry:ui"
|
|
64
64
|
},
|
|
65
65
|
{
|
package/public/r/command.json
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"title": "Command",
|
|
5
5
|
"description": "Command menu for search and quick actions.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/command@^1.0.
|
|
7
|
+
"@data-slot/command@^1.0.2",
|
|
8
8
|
"@lucide/astro",
|
|
9
|
-
"@data-slot/core@^1.0.
|
|
9
|
+
"@data-slot/core@^1.0.2"
|
|
10
10
|
],
|
|
11
11
|
"registryDependencies": [
|
|
12
12
|
"@fulldev/dialog"
|
package/public/r/components.json
CHANGED
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
"@fulldev/accordion",
|
|
8
8
|
"@fulldev/alert",
|
|
9
9
|
"@fulldev/alert-dialog",
|
|
10
|
+
"@fulldev/aspect-ratio",
|
|
11
|
+
"@fulldev/attachment",
|
|
10
12
|
"@fulldev/avatar",
|
|
11
13
|
"@fulldev/badge",
|
|
12
14
|
"@fulldev/banner",
|
|
13
15
|
"@fulldev/breadcrumb",
|
|
14
16
|
"@fulldev/button",
|
|
17
|
+
"@fulldev/button-group",
|
|
15
18
|
"@fulldev/card",
|
|
16
19
|
"@fulldev/carousel",
|
|
17
20
|
"@fulldev/checkbox",
|
|
@@ -19,6 +22,7 @@
|
|
|
19
22
|
"@fulldev/combobox",
|
|
20
23
|
"@fulldev/command",
|
|
21
24
|
"@fulldev/dialog",
|
|
25
|
+
"@fulldev/drawer",
|
|
22
26
|
"@fulldev/dropdown-menu",
|
|
23
27
|
"@fulldev/empty",
|
|
24
28
|
"@fulldev/field",
|
|
@@ -36,10 +40,12 @@
|
|
|
36
40
|
"@fulldev/marquee",
|
|
37
41
|
"@fulldev/native-select",
|
|
38
42
|
"@fulldev/navigation-menu",
|
|
43
|
+
"@fulldev/pagination",
|
|
39
44
|
"@fulldev/popover",
|
|
40
45
|
"@fulldev/price",
|
|
41
46
|
"@fulldev/radio-group",
|
|
42
47
|
"@fulldev/rating",
|
|
48
|
+
"@fulldev/resizable",
|
|
43
49
|
"@fulldev/section",
|
|
44
50
|
"@fulldev/select",
|
|
45
51
|
"@fulldev/separator",
|
|
@@ -53,8 +59,10 @@
|
|
|
53
59
|
"@fulldev/tabs",
|
|
54
60
|
"@fulldev/textarea",
|
|
55
61
|
"@fulldev/theme-toggle",
|
|
62
|
+
"@fulldev/toast",
|
|
56
63
|
"@fulldev/toc",
|
|
57
64
|
"@fulldev/toggle",
|
|
65
|
+
"@fulldev/toggle-group",
|
|
58
66
|
"@fulldev/tooltip",
|
|
59
67
|
"@fulldev/typography",
|
|
60
68
|
"@fulldev/video"
|
package/public/r/dialog.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Dialog",
|
|
5
5
|
"description": "A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"@data-slot/dialog@^1.0.
|
|
7
|
+
"@data-slot/dialog@^1.0.2",
|
|
8
8
|
"@lucide/astro"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
package/public/r/doc-1.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
{
|
|
20
20
|
"path": "src/components/blocks/doc-1.astro",
|
|
21
|
-
"content": "---\nimport ArrowLeft from \"@lucide/astro/icons/arrow-left\"\nimport ArrowRight from \"@lucide/astro/icons/arrow-right\"\nimport Check from \"@lucide/astro/icons/check\"\nimport ChevronDown from \"@lucide/astro/icons/chevron-down\"\nimport Copy from \"@lucide/astro/icons/copy\"\nimport ExternalLink from \"@lucide/astro/icons/external-link\"\nimport Claude from \"simple-icons-astro/Claude\"\nimport Cursor from \"simple-icons-astro/Cursor\"\nimport Markdown from \"simple-icons-astro/Markdown\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { buttonVariants } from \"@/components/ui/button/button-variants\"\nimport {\n Card,\n CardDescription,\n CardFooter,\n CardHeader,\n} from \"@/components/ui/card\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport { SectionContainer } from \"@/components/ui/section\"\nimport {\n Toc,\n TocMenu,\n TocMenuItem,\n TocMenuLink,\n TocTitle,\n} from \"@/components/ui/toc\"\nimport {\n Typography,\n TypographyH1,\n TypographyLead,\n} from \"@/components/ui/typography\"\n\ntype Props = {\n class?: string\n title: string\n description?: string\n copyButton?: {\n id: string\n source: string\n }\n markdownUrl?: string\n tocItems: {\n depth: number\n href: string\n label: string\n }[]\n callout?: {\n description: string\n button: {\n label: string\n href: string\n variant?: \"default\" | \"outline\" | \"secondary\" | \"ghost\"\n }\n }\n previousPage?: {\n href: string\n title: string\n }\n nextPage?: {\n href: string\n title: string\n }\n labels: {\n copyMarkdown: string\n openIn: string\n openInMarkdown: string\n openInChatGPT: string\n openInClaude: string\n openInCursor: string\n pagination: {\n previous: string\n next: string\n ariaLabel: string\n }\n toc: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n copyButton,\n markdownUrl,\n tocItems,\n callout,\n previousPage,\n nextPage,\n labels,\n} = Astro.props\nconst showCopyButton = Boolean(copyButton)\nconst showOpenButton = Boolean(markdownUrl)\nconst showPagination = Boolean(previousPage || nextPage)\nconst assistantPrompt = markdownUrl\n ? `Read ${new URL(markdownUrl, Astro.site ?? Astro.url.origin).href}, I want to ask questions about it.`\n : \"\"\nconst openLinks = markdownUrl\n ? [\n {\n label: labels.openInMarkdown,\n href: markdownUrl,\n icon: \"markdown\",\n },\n {\n label: labels.openInChatGPT,\n href: `https://chatgpt.com/?hints=search&q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"chatgpt\",\n },\n {\n label: labels.openInClaude,\n href: `https://claude.ai/new?q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"claude\",\n },\n {\n label: labels.openInCursor,\n href: `https://cursor.com/link/prompt?text=${encodeURIComponent(assistantPrompt)}`,\n icon: \"cursor\",\n },\n ]\n : []\n---\n\n<SectionContainer\n class={cn(\n \"gap-10 pt-10 pb-8 sm:pt-12 sm:pb-10 xl:grid xl:grid-cols-[minmax(0,1fr)_16rem] xl:items-start xl:gap-x-16\",\n className\n )}\n>\n <div class=\"mx-auto flex w-full max-w-3xl min-w-0 flex-col gap-10\">\n <header\n class=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\"\n >\n <div class=\"flex min-w-0 flex-1 flex-col gap-2\">\n <TypographyH1\n size=\"sm\"\n class=\"text-foreground text-left tracking-tight\"\n >\n {title}\n </TypographyH1>\n {\n description && (\n <TypographyLead size=\"sm\" class=\"max-w-2xl leading-7\">\n {description}\n </TypographyLead>\n )\n }\n </div>\n <div class=\"flex shrink-0 items-center gap-2 self-start\">\n {\n showCopyButton && (\n <Button\n id={copyButton?.id}\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n data-source={copyButton?.source}\n aria-label={labels.copyMarkdown}\n >\n <Copy data-copy-icon class=\"docs-copy-icon size-3.5\" />\n <Check data-check-icon class=\"docs-check-icon hidden size-3.5\" />\n <span>{labels.copyMarkdown}</span>\n </Button>\n )\n }\n {\n showOpenButton && (\n <DropdownMenu>\n <DropdownMenuTrigger\n class={buttonVariants({ variant: \"outline\", size: \"xs\" })}\n >\n <span>{labels.openIn}</span>\n <ChevronDown class=\"size-3.5 opacity-70\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" sideOffset={6} class=\"w-56\">\n {openLinks.map((link) => (\n <DropdownMenuItem\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n >\n {link.icon === \"markdown\" && <Markdown class=\"size-4\" />}\n {link.icon === \"chatgpt\" && (\n <svg\n role=\"img\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"size-4\"\n aria-hidden=\"true\"\n >\n <path d=\"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.182a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .511 4.91 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.989 5.989 0 0 0 3.998-2.9 6.056 6.056 0 0 0-.748-7.073ZM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.142-.081 4.778-2.758a.795.795 0 0 0 .393-.681v-6.737l2.02 1.169a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.495 4.494Zm-9.66-4.125a4.471 4.471 0 0 1-.535-3.014l.142.085 4.783 2.758a.771.771 0 0 0 .781 0l5.843-3.368v2.332a.08.08 0 0 1-.034.062L9.74 19.95a4.499 4.499 0 0 1-6.14-1.646ZM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.814 3.354-2.02 1.169a.076.076 0 0 1-.071 0l-4.83-2.787A4.504 4.504 0 0 1 2.34 7.872Zm16.596 3.856-5.833-3.388L15.12 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.104v-5.677a.79.79 0 0 0-.407-.667Zm2.011-3.024-.142-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.499 4.499 0 0 1 6.68 4.66ZM8.307 12.863l-2.02-1.164a.08.08 0 0 1-.038-.057V6.074a4.499 4.499 0 0 1 7.376-3.453l-.142.08-4.778 2.758a.795.795 0 0 0-.393.681Zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5Z\" />\n </svg>\n )}\n {link.icon === \"claude\" && <Claude class=\"size-4\" />}\n {link.icon === \"cursor\" && <Cursor class=\"size-4\" />}\n <span>{link.label}</span>\n <ExternalLink class=\"text-muted-foreground ml-auto size-3.5\" />\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n }\n </div>\n </header>\n\n <Typography as=\"article\" size=\"sm\">\n <slot />\n </Typography>\n\n {\n showPagination && (\n <nav\n class=\"flex items-center justify-between gap-3\"\n aria-label={labels.pagination.ariaLabel}\n >\n {previousPage ? (\n <Button\n as=\"a\"\n href={previousPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-start gap-2 px-3 py-2 whitespace-normal\"\n >\n <ArrowLeft class=\"size-4\" />\n <span class=\"truncate text-sm font-medium\">\n {previousPage.title}\n </span>\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n\n {nextPage ? (\n <Button\n as=\"a\"\n href={nextPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-end gap-2 px-3 py-2 text-right whitespace-normal\"\n >\n <span class=\"truncate text-sm font-medium\">{nextPage.title}</span>\n <ArrowRight class=\"size-4\" />\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n </nav>\n )\n }\n </div>\n\n {\n (tocItems.length > 0 || callout) && (\n <aside class=\"hidden w-64 xl:sticky xl:top-12 xl:mr-0 xl:ml-auto xl:block xl:self-start\">\n <div class=\"flex flex-col gap-6\">\n {tocItems.length > 0 && (\n <Toc aria-label={labels.toc}>\n <TocTitle>{labels.toc}</TocTitle>\n <TocMenu>\n {tocItems.map((item) => (\n <TocMenuItem>\n <TocMenuLink href={item.href} depth={item.depth}>\n {item.label}\n </TocMenuLink>\n </TocMenuItem>\n ))}\n </TocMenu>\n </Toc>\n )}\n\n {callout && (\n <Card size=\"sm\">\n <CardHeader>\n <CardDescription>{callout.description}</CardDescription>\n </CardHeader>\n <CardFooter>\n <Button\n as=\"a\"\n href={callout.button.href}\n variant={callout.button.variant}\n size=\"sm\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {callout.button.label}\n </Button>\n </CardFooter>\n </Card>\n )}\n </div>\n </aside>\n )\n }\n</SectionContainer>\n\n<script>\n const copyIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg>`\n const checkIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"></path></svg>`\n const initializeCodeBlocks = () => {\n document\n .querySelectorAll(\"[data-slot='typography'] > pre\")\n .forEach((pre) => {\n if (pre.closest(\".docs-code-block\")) return\n const wrapper = document.createElement(\"div\")\n const button = document.createElement(\"button\")\n wrapper.className = \"docs-code-block\"\n button.type = \"button\"\n button.className = \"docs-code-copy\"\n button.ariaLabel = \"Copy code\"\n button.innerHTML = `<span data-copy-icon>${copyIcon}</span><span data-check-icon class=\"hidden\">${checkIcon}</span>`\n pre.before(wrapper)\n wrapper.append(pre, button)\n })\n }\n\n initializeCodeBlocks()\n document.addEventListener(\"astro:page-load\", initializeCodeBlocks)\n\n document.addEventListener(\"click\", async (event) => {\n if (!(event.target instanceof Element)) return\n const button = event.target.closest(\n \"[id^='docs-copy-page-'], .docs-code-copy\"\n )\n if (!(button instanceof HTMLButtonElement)) return\n const source =\n button.dataset.source ??\n button\n .closest(\".docs-code-block\")\n ?.querySelector(\"pre\")\n ?.textContent?.replace(/\\n$/, \"\")\n\n try {\n await navigator.clipboard.writeText(source ?? \"\")\n button.querySelector(\"[data-copy-icon]\")?.classList.add(\"hidden\")\n button.querySelector(\"[data-check-icon]\")?.classList.remove(\"hidden\")\n setTimeout(() => {\n button.querySelector(\"[data-copy-icon]\")?.classList.remove(\"hidden\")\n button.querySelector(\"[data-check-icon]\")?.classList.add(\"hidden\")\n }, 1200)\n } catch {\n // Keep the copy state unchanged so the action can be retried.\n }\n })\n</script>\n",
|
|
21
|
+
"content": "---\nimport ArrowLeft from \"@lucide/astro/icons/arrow-left\"\nimport ArrowRight from \"@lucide/astro/icons/arrow-right\"\nimport Check from \"@lucide/astro/icons/check\"\nimport ChevronDown from \"@lucide/astro/icons/chevron-down\"\nimport Copy from \"@lucide/astro/icons/copy\"\nimport ExternalLink from \"@lucide/astro/icons/external-link\"\nimport Claude from \"simple-icons-astro/Claude\"\nimport Cursor from \"simple-icons-astro/Cursor\"\nimport Markdown from \"simple-icons-astro/Markdown\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { buttonVariants } from \"@/components/ui/button/button-variants\"\nimport {\n Card,\n CardDescription,\n CardFooter,\n CardHeader,\n} from \"@/components/ui/card\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport { SectionContainer } from \"@/components/ui/section\"\nimport {\n Toc,\n TocMenu,\n TocMenuItem,\n TocMenuLink,\n TocTitle,\n} from \"@/components/ui/toc\"\nimport {\n Typography,\n TypographyH1,\n TypographyLead,\n} from \"@/components/ui/typography\"\n\ntype Props = {\n class?: string\n title: string\n description?: string\n copyButton?: {\n id: string\n source: string\n }\n markdownUrl?: string\n tocItems: {\n depth: number\n href: string\n label: string\n }[]\n callout?: {\n description: string\n button: {\n label: string\n href: string\n variant?: \"default\" | \"outline\" | \"secondary\" | \"ghost\"\n }\n }\n previousPage?: {\n href: string\n title: string\n }\n nextPage?: {\n href: string\n title: string\n }\n labels: {\n copyMarkdown: string\n openIn: string\n openInMarkdown: string\n openInChatGPT: string\n openInClaude: string\n openInCursor: string\n pagination: {\n previous: string\n next: string\n ariaLabel: string\n }\n toc: string\n }\n}\n\nconst {\n class: className,\n title,\n description,\n copyButton,\n markdownUrl,\n tocItems,\n callout,\n previousPage,\n nextPage,\n labels,\n} = Astro.props\nconst showCopyButton = Boolean(copyButton)\nconst showOpenButton = Boolean(markdownUrl)\nconst showPagination = Boolean(previousPage || nextPage)\nconst assistantPrompt = markdownUrl\n ? `Read ${new URL(markdownUrl, Astro.site ?? Astro.url.origin).href}, I want to ask questions about it.`\n : \"\"\nconst openLinks = markdownUrl\n ? [\n {\n label: labels.openInMarkdown,\n href: markdownUrl,\n icon: \"markdown\",\n },\n {\n label: labels.openInChatGPT,\n href: `https://chatgpt.com/?hints=search&q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"chatgpt\",\n },\n {\n label: labels.openInClaude,\n href: `https://claude.ai/new?q=${encodeURIComponent(assistantPrompt)}`,\n icon: \"claude\",\n },\n {\n label: labels.openInCursor,\n href: `https://cursor.com/link/prompt?text=${encodeURIComponent(assistantPrompt)}`,\n icon: \"cursor\",\n },\n ]\n : []\n---\n\n<SectionContainer\n class={cn(\n \"gap-10 pt-10 pb-8 sm:pt-12 sm:pb-10 xl:grid xl:grid-cols-[minmax(0,1fr)_16rem] xl:items-start xl:gap-x-16\",\n className\n )}\n>\n <div class=\"mx-auto flex w-full max-w-3xl min-w-0 flex-col gap-10\">\n <header\n class=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\"\n >\n <div class=\"flex min-w-0 flex-1 flex-col gap-2\">\n <TypographyH1\n size=\"sm\"\n class=\"text-foreground text-left tracking-tight\"\n >\n {title}\n </TypographyH1>\n {\n description && (\n <TypographyLead size=\"sm\" class=\"max-w-2xl leading-7\">\n {description}\n </TypographyLead>\n )\n }\n </div>\n <div class=\"flex shrink-0 items-center gap-2 self-start\">\n {\n showCopyButton && (\n <Button\n id={copyButton?.id}\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n data-source={copyButton?.source}\n aria-label={labels.copyMarkdown}\n >\n <Copy data-copy-icon class=\"docs-copy-icon size-3.5\" />\n <Check data-check-icon class=\"docs-check-icon hidden size-3.5\" />\n <span>{labels.copyMarkdown}</span>\n </Button>\n )\n }\n {\n showOpenButton && (\n <DropdownMenu>\n <DropdownMenuTrigger\n class={buttonVariants({ variant: \"outline\", size: \"xs\" })}\n >\n <span>{labels.openIn}</span>\n <ChevronDown class=\"size-3.5 opacity-70\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" sideOffset={6} class=\"w-56\">\n {openLinks.map((link) => (\n <DropdownMenuItem\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n >\n {link.icon === \"markdown\" && <Markdown class=\"size-4\" />}\n {link.icon === \"chatgpt\" && (\n <svg\n role=\"img\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"size-4\"\n aria-hidden=\"true\"\n >\n <path d=\"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.182a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .511 4.91 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.989 5.989 0 0 0 3.998-2.9 6.056 6.056 0 0 0-.748-7.073ZM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.142-.081 4.778-2.758a.795.795 0 0 0 .393-.681v-6.737l2.02 1.169a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.495 4.494Zm-9.66-4.125a4.471 4.471 0 0 1-.535-3.014l.142.085 4.783 2.758a.771.771 0 0 0 .781 0l5.843-3.368v2.332a.08.08 0 0 1-.034.062L9.74 19.95a4.499 4.499 0 0 1-6.14-1.646ZM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.814 3.354-2.02 1.169a.076.076 0 0 1-.071 0l-4.83-2.787A4.504 4.504 0 0 1 2.34 7.872Zm16.596 3.856-5.833-3.388L15.12 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.104v-5.677a.79.79 0 0 0-.407-.667Zm2.011-3.024-.142-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.499 4.499 0 0 1 6.68 4.66ZM8.307 12.863l-2.02-1.164a.08.08 0 0 1-.038-.057V6.074a4.499 4.499 0 0 1 7.376-3.453l-.142.08-4.778 2.758a.795.795 0 0 0-.393.681Zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5Z\" />\n </svg>\n )}\n {link.icon === \"claude\" && <Claude class=\"size-4\" />}\n {link.icon === \"cursor\" && <Cursor class=\"size-4\" />}\n <span>{link.label}</span>\n <ExternalLink class=\"text-muted-foreground ml-auto size-3.5\" />\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n }\n </div>\n </header>\n\n <Typography as=\"article\" size=\"sm\">\n <slot />\n </Typography>\n\n {\n showPagination && (\n <nav\n class=\"flex items-center justify-between gap-3\"\n aria-label={labels.pagination.ariaLabel}\n >\n {previousPage ? (\n <Button\n as=\"a\"\n href={previousPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-start gap-2 px-3 py-2 whitespace-normal\"\n >\n <ArrowLeft class=\"size-4\" />\n <span class=\"truncate text-sm font-medium\">\n {previousPage.title}\n </span>\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n\n {nextPage ? (\n <Button\n as=\"a\"\n href={nextPage.href}\n variant=\"outline\"\n class=\"h-auto min-w-0 items-center justify-end gap-2 px-3 py-2 text-right whitespace-normal\"\n >\n <span class=\"truncate text-sm font-medium\">{nextPage.title}</span>\n <ArrowRight class=\"size-4\" />\n </Button>\n ) : (\n <div aria-hidden=\"true\" />\n )}\n </nav>\n )\n }\n </div>\n\n {\n (tocItems.length > 0 || callout) && (\n <aside class=\"hidden w-64 xl:sticky xl:top-12 xl:mr-0 xl:ml-auto xl:block xl:self-start\">\n <div class=\"flex flex-col gap-6\">\n {tocItems.length > 0 && (\n <Toc aria-label={labels.toc}>\n <TocTitle>{labels.toc}</TocTitle>\n <TocMenu>\n {tocItems.map((item) => (\n <TocMenuItem>\n <TocMenuLink href={item.href} depth={item.depth}>\n {item.label}\n </TocMenuLink>\n </TocMenuItem>\n ))}\n </TocMenu>\n </Toc>\n )}\n\n {callout && (\n <Card size=\"sm\">\n <CardHeader>\n <CardDescription>{callout.description}</CardDescription>\n </CardHeader>\n <CardFooter>\n <Button\n as=\"a\"\n href={callout.button.href}\n variant={callout.button.variant}\n size=\"sm\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {callout.button.label}\n </Button>\n </CardFooter>\n </Card>\n )}\n </div>\n </aside>\n )\n }\n</SectionContainer>\n\n<style is:global>\n .docs-code-block {\n position: relative;\n overflow: hidden;\n margin-block-start: var(--typeset-flow);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-xl);\n background: color-mix(in oklab, var(--color-muted) 60%, transparent);\n }\n\n .docs-code-block > pre,\n .docs-code-block > pre.astro-code {\n margin: 0;\n overflow-x: auto;\n border: 0;\n border-radius: 0;\n background: transparent !important;\n padding: 1rem 3.5rem 1rem 1rem;\n font-family: var(--font-mono);\n font-size: var(--text-sm);\n line-height: var(--text-sm--line-height);\n }\n\n .docs-code-block > pre.astro-code code {\n color: var(--shiki-light, var(--color-foreground)) !important;\n font: inherit;\n }\n\n .dark .docs-code-block > pre.astro-code code {\n color: var(--shiki-dark, var(--color-foreground)) !important;\n }\n\n .dark .docs-code-block > pre.astro-code span[style*=\"--shiki-dark\"] {\n color: var(--shiki-dark) !important;\n font-style: var(--shiki-dark-font-style, inherit) !important;\n font-weight: var(--shiki-dark-font-weight, inherit) !important;\n text-decoration: var(--shiki-dark-text-decoration, inherit) !important;\n }\n\n .docs-code-copy {\n position: absolute;\n z-index: 10;\n top: 0.75rem;\n right: 0.75rem;\n display: inline-flex;\n width: 2rem;\n height: 2rem;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n background: var(--color-background);\n color: var(--color-muted-foreground);\n box-shadow: var(--shadow-sm);\n transition:\n color 150ms,\n background-color 150ms;\n }\n\n .docs-code-copy:hover {\n background: var(--color-accent);\n color: var(--color-accent-foreground);\n }\n\n .docs-code-copy:focus-visible {\n outline: 2px solid var(--color-ring);\n outline-offset: 2px;\n }\n\n .docs-code-copy svg {\n width: 1rem;\n height: 1rem;\n }\n</style>\n\n<script>\n const copyIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg>`\n const checkIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6 9 17l-5-5\"></path></svg>`\n const initializeCodeBlocks = () => {\n document\n .querySelectorAll(\"[data-slot='typography'] > pre\")\n .forEach((pre) => {\n if (pre.closest(\".docs-code-block\")) return\n const wrapper = document.createElement(\"div\")\n const button = document.createElement(\"button\")\n wrapper.className = \"docs-code-block\"\n wrapper.dataset.notTypeset = \"\"\n button.type = \"button\"\n button.className = \"docs-code-copy\"\n button.ariaLabel = \"Copy code\"\n button.innerHTML = `<span data-copy-icon>${copyIcon}</span><span data-check-icon class=\"hidden\">${checkIcon}</span>`\n pre.before(wrapper)\n wrapper.append(pre, button)\n })\n }\n\n initializeCodeBlocks()\n document.addEventListener(\"astro:page-load\", initializeCodeBlocks)\n\n document.addEventListener(\"click\", async (event) => {\n if (!(event.target instanceof Element)) return\n const button = event.target.closest(\n \"[id^='docs-copy-page-'], .docs-code-copy\"\n )\n if (!(button instanceof HTMLButtonElement)) return\n const source =\n button.dataset.source ??\n button\n .closest(\".docs-code-block\")\n ?.querySelector(\"pre\")\n ?.textContent?.replace(/\\n$/, \"\")\n\n try {\n await navigator.clipboard.writeText(source ?? \"\")\n button.querySelector(\"[data-copy-icon]\")?.classList.add(\"hidden\")\n button.querySelector(\"[data-check-icon]\")?.classList.remove(\"hidden\")\n setTimeout(() => {\n button.querySelector(\"[data-copy-icon]\")?.classList.remove(\"hidden\")\n button.querySelector(\"[data-check-icon]\")?.classList.add(\"hidden\")\n }, 1200)\n } catch {\n // Keep the copy state unchanged so the action can be retried.\n }\n })\n</script>\n",
|
|
22
22
|
"type": "registry:block"
|
|
23
23
|
}
|
|
24
24
|
],
|