fulldev-ui 0.18.0 → 0.18.1
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 +6 -0
- package/package.json +1 -1
- package/public/r/navigation-menu.json +1 -1
- package/public/r/styles/base-luma/navigation-menu.json +1 -1
- package/public/r/styles/base-luma/video.json +1 -1
- package/public/r/styles/base-lyra/navigation-menu.json +1 -1
- package/public/r/styles/base-lyra/video.json +1 -1
- package/public/r/styles/base-maia/navigation-menu.json +1 -1
- package/public/r/styles/base-maia/video.json +1 -1
- package/public/r/styles/base-mira/navigation-menu.json +1 -1
- package/public/r/styles/base-mira/video.json +1 -1
- package/public/r/styles/base-nova/navigation-menu.json +1 -1
- package/public/r/styles/base-nova/video.json +1 -1
- package/public/r/styles/base-rhea/navigation-menu.json +1 -1
- package/public/r/styles/base-rhea/video.json +1 -1
- package/public/r/styles/base-sera/navigation-menu.json +1 -1
- package/public/r/styles/base-sera/video.json +1 -1
- package/public/r/styles/base-vega/navigation-menu.json +1 -1
- package/public/r/styles/base-vega/video.json +1 -1
- package/public/r/video.json +1 -1
- package/src/components/ui/navigation-menu/navigation-menu-content.astro +1 -1
- package/src/components/ui/video/video.astro +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#256](https://github.com/fulldotdev/ui/pull/256) [`3ac9a53`](https://github.com/fulldotdev/ui/commit/3ac9a530dec89c07ea381da932dea517a074936b) Thanks [@silveltman](https://github.com/silveltman)! - Embed YouTube videos from the privacy-enhanced `youtube-nocookie.com` domain, and show the focus ring on navigation menu links inside menu content for keyboard users.
|
|
8
|
+
|
|
3
9
|
## 0.18.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-2 pr-2.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-2 pr-2.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/5 group-data-[viewport=false]/navigation-menu:dark:ring-foreground/10 p-2.5 pr-3 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-3xl group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/5 group-data-[viewport=false]/navigation-menu:dark:ring-foreground/10 p-2.5 pr-3 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-3xl group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-3xl border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-3xl border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-none group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-none group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-none border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-none border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/5 p-2.5 pr-3 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-2xl group-data-[viewport=false]/navigation-menu:shadow-2xl group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 isolate z-50 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/5 p-2.5 pr-3 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-2xl group-data-[viewport=false]/navigation-menu:shadow-2xl group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 isolate z-50 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-2xl border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-2xl border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-1.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-xl group-data-[viewport=false]/navigation-menu:shadow-md group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-1.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-xl group-data-[viewport=false]/navigation-menu:shadow-md group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-md border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-md border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-lg border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-lg border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/5 group-data-[viewport=false]/navigation-menu:dark:ring-foreground/10 p-1.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-2xl group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/5 group-data-[viewport=false]/navigation-menu:dark:ring-foreground/10 p-1.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-2xl group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-2xl border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-2xl border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-2.5 pr-3 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-none group-data-[viewport=false]/navigation-menu:shadow-md group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-2.5 pr-3 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-none group-data-[viewport=false]/navigation-menu:shadow-md group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-none border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-none border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"path": "src/components/ui/navigation-menu/navigation-menu-content.astro",
|
|
18
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-2 pr-2.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
18
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = {\n class?: string\n align?: \"start\" | \"center\" | \"end\"\n alignOffset?: number\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n sideOffset?: number\n} & HTMLAttributes<\"div\">\n\nconst {\n class: className = \"\",\n hidden = true,\n align,\n alignOffset,\n side,\n sideOffset,\n ...props\n} = Astro.props\n---\n\n<div\n {...props}\n data-slot=\"navigation-menu-content\"\n hidden={hidden}\n data-align={align}\n data-align-offset={alignOffset}\n data-side={side}\n data-side-offset={sideOffset}\n class={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-2 pr-2.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]\",\n className\n )}\n>\n <slot />\n</div>\n",
|
|
19
19
|
"type": "registry:ui"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-lg border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-lg border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
package/public/r/video.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "src/components/ui/video/video.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-lg border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
9
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = Omit<HTMLAttributes<\"div\">, \"src\"> & {\n src?: string\n}\n\nconst { class: className, src, ...props } = Astro.props\n\nconst getEmbedSrc = (value?: string) => {\n if (!value) return undefined\n\n try {\n const url = new URL(value)\n const host = url.hostname.replace(/^www\\./, \"\")\n\n if (host === \"youtube.com\" && url.pathname === \"/watch\") {\n const id = url.searchParams.get(\"v\")\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtube.com\" && url.pathname.startsWith(\"/shorts/\")) {\n const id = url.pathname.split(\"/\")[2]\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1)\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined\n }\n } catch {\n return undefined\n }\n}\n\nconst embedSrc = getEmbedSrc(src)\nconst isShort = src?.includes(\"/shorts/\")\n---\n\n{\n embedSrc && (\n <iframe\n src={embedSrc}\n title=\"Embedded video\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n allowfullscreen\n class={cn(\n \"bg-muted rounded-lg border w-full\",\n isShort ? \"aspect-9/16 max-w-xs\" : \"aspect-video\",\n className\n )}\n {...props}\n />\n )\n}\n",
|
|
10
10
|
"type": "registry:ui"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -31,7 +31,7 @@ const {
|
|
|
31
31
|
data-side={side}
|
|
32
32
|
data-side-offset={sideOffset}
|
|
33
33
|
class={cn(
|
|
34
|
-
"cn-navigation-menu-content h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]
|
|
34
|
+
"cn-navigation-menu-content h-full w-auto transition-[opacity,transform,translate] duration-[0.35s] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%]",
|
|
35
35
|
className
|
|
36
36
|
)}
|
|
37
37
|
>
|
|
@@ -18,17 +18,17 @@ const getEmbedSrc = (value?: string) => {
|
|
|
18
18
|
|
|
19
19
|
if (host === "youtube.com" && url.pathname === "/watch") {
|
|
20
20
|
const id = url.searchParams.get("v")
|
|
21
|
-
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
21
|
+
return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if (host === "youtube.com" && url.pathname.startsWith("/shorts/")) {
|
|
25
25
|
const id = url.pathname.split("/")[2]
|
|
26
|
-
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
26
|
+
return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
if (host === "youtu.be") {
|
|
30
30
|
const id = url.pathname.slice(1)
|
|
31
|
-
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
31
|
+
return id ? `https://www.youtube-nocookie.com/embed/${id}` : undefined
|
|
32
32
|
}
|
|
33
33
|
} catch {
|
|
34
34
|
return undefined
|