fulldev-ui 0.9.3 → 0.10.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 +12 -0
- package/README.md +100 -16
- package/package.json +3 -2
- package/public/r/accordion.json +4 -6
- package/public/r/alert-dialog.json +3 -3
- package/public/r/alert.json +0 -5
- package/public/r/article-1.json +1 -1
- package/public/r/article-2.json +1 -1
- package/public/r/articles-1.json +1 -1
- package/public/r/articles-2.json +1 -1
- package/public/r/articles-3.json +1 -1
- package/public/r/avatar.json +1 -16
- package/public/r/badge.json +1 -1
- package/public/r/banner-1.json +5 -3
- package/public/r/banner-2.json +1 -1
- package/public/r/banner.json +5 -3
- package/public/r/blocks-1.json +6 -3
- package/public/r/breadcrumb.json +4 -4
- package/public/r/button.json +1 -1
- package/public/r/card.json +4 -4
- package/public/r/carousel.json +5 -5
- package/public/r/checkbox.json +1 -1
- package/public/r/combobox.json +8 -8
- package/public/r/command.json +6 -6
- package/public/r/components.json +1 -7
- package/public/r/contact-1.json +4 -2
- package/public/r/contact-2.json +4 -2
- package/public/r/contact-3.json +11 -3
- package/public/r/content-1.json +11 -3
- package/public/r/content-2.json +11 -3
- package/public/r/content-3.json +7 -1
- package/public/r/content-4.json +11 -3
- package/public/r/cta-2.json +7 -1
- package/public/r/cta-4.json +7 -1
- package/public/r/cta-5.json +11 -3
- package/public/r/cta-6.json +7 -1
- package/public/r/dialog.json +7 -7
- package/public/r/doc-1.json +6 -3
- package/public/r/dropdown-menu.json +9 -11
- package/public/r/features-1.json +5 -3
- package/public/r/features-2.json +5 -3
- package/public/r/features-4.json +5 -3
- package/public/r/features-5.json +4 -2
- package/public/r/field.json +2 -7
- package/public/r/footer-1.json +5 -3
- package/public/r/footer-2.json +5 -3
- package/public/r/footer-3.json +5 -3
- package/public/r/header-1.json +1 -1
- package/public/r/header.json +3 -0
- package/public/r/hero-13.json +1 -1
- package/public/r/hero-4.json +5 -3
- package/public/r/hero-5.json +5 -3
- package/public/r/hero-6.json +5 -3
- package/public/r/hero-7.json +5 -3
- package/public/r/hero-8.json +1 -1
- package/public/r/hero-9.json +5 -3
- package/public/r/hover-card.json +4 -3
- package/public/r/icon.json +1 -1
- package/public/r/input-group.json +1 -1
- package/public/r/item.json +2 -20
- package/public/r/kbd.json +2 -2
- package/public/r/layout.json +4 -7
- package/public/r/links-2.json +5 -3
- package/public/r/marquee.json +1 -1
- package/public/r/native-select.json +3 -3
- package/public/r/navigation-menu.json +8 -10
- package/public/r/page.json +17 -0
- package/public/r/popover.json +1 -1
- package/public/r/pricing-1.json +5 -3
- package/public/r/pricing-2.json +5 -3
- package/public/r/pricing-3.json +5 -3
- package/public/r/products-1.json +1 -1
- package/public/r/products-4.json +1 -1
- package/public/r/products-5.json +1 -1
- package/public/r/radio-group.json +1 -1
- package/public/r/rating.json +3 -3
- package/public/r/registry.json +186 -450
- package/public/r/reviews-1.json +5 -3
- package/public/r/reviews-2.json +5 -3
- package/public/r/reviews-3.json +5 -3
- package/public/r/reviews-4.json +1 -1
- package/public/r/reviews-5.json +5 -3
- package/public/r/select.json +6 -8
- package/public/r/services-1.json +11 -3
- package/public/r/services-2.json +7 -1
- package/public/r/services-3.json +7 -1
- package/public/r/services-4.json +11 -3
- package/public/r/services-5.json +5 -3
- package/public/r/services-6.json +11 -3
- package/public/r/services-7.json +11 -3
- package/public/r/sheet.json +7 -4
- package/public/r/sidebar-1.json +4 -2
- package/public/r/sidebar.json +10 -7
- package/public/r/slider.json +1 -1
- package/public/r/spinner.json +3 -3
- package/public/r/switch.json +1 -1
- package/public/r/tabs.json +1 -1
- package/public/r/theme-toggle.json +5 -3
- package/public/r/toggle.json +1 -1
- package/public/r/tooltip.json +1 -1
- package/public/r/typography.json +16 -16
- package/public/r/video.json +1 -1
- package/registry.json +186 -450
- package/src/components/blocks/article-1.astro +1 -1
- package/src/components/blocks/article-2.astro +1 -1
- package/src/components/blocks/articles-1.astro +1 -1
- package/src/components/blocks/articles-2.astro +2 -2
- package/src/components/blocks/articles-3.astro +1 -1
- package/src/components/blocks/banner-1.astro +3 -5
- package/src/components/blocks/banner-2.astro +1 -1
- package/src/components/blocks/blocks-1.astro +25 -37
- package/src/components/blocks/contact-3.astro +4 -3
- package/src/components/blocks/content-1.astro +5 -4
- package/src/components/blocks/content-2.astro +6 -5
- package/src/components/blocks/content-3.astro +9 -2
- package/src/components/blocks/content-4.astro +6 -5
- package/src/components/blocks/cta-2.astro +4 -3
- package/src/components/blocks/cta-4.astro +3 -2
- package/src/components/blocks/cta-5.astro +6 -5
- package/src/components/blocks/cta-6.astro +4 -3
- package/src/components/blocks/doc-1.astro +28 -56
- package/src/components/blocks/features-1.astro +3 -1
- package/src/components/blocks/features-2.astro +4 -2
- package/src/components/blocks/features-4.astro +3 -1
- package/src/components/blocks/footer-1.astro +26 -12
- package/src/components/blocks/footer-2.astro +24 -12
- package/src/components/blocks/footer-3.astro +26 -12
- package/src/components/blocks/header-1.astro +2 -3
- package/src/components/blocks/hero-13.astro +1 -1
- package/src/components/blocks/hero-4.astro +2 -2
- package/src/components/blocks/hero-5.astro +3 -3
- package/src/components/blocks/hero-6.astro +3 -3
- package/src/components/blocks/hero-7.astro +3 -3
- package/src/components/blocks/hero-8.astro +1 -1
- package/src/components/blocks/hero-9.astro +2 -2
- package/src/components/blocks/links-2.astro +3 -5
- package/src/components/blocks/pricing-1.astro +3 -2
- package/src/components/blocks/pricing-2.astro +3 -2
- package/src/components/blocks/pricing-3.astro +3 -2
- package/src/components/blocks/products-1.astro +1 -1
- package/src/components/blocks/products-4.astro +2 -2
- package/src/components/blocks/products-5.astro +4 -4
- package/src/components/blocks/reviews-1.astro +2 -2
- package/src/components/blocks/reviews-2.astro +2 -2
- package/src/components/blocks/reviews-3.astro +2 -2
- package/src/components/blocks/reviews-4.astro +4 -4
- package/src/components/blocks/reviews-5.astro +16 -25
- package/src/components/blocks/services-1.astro +7 -9
- package/src/components/blocks/services-2.astro +5 -4
- package/src/components/blocks/services-3.astro +6 -5
- package/src/components/blocks/services-4.astro +7 -9
- package/src/components/blocks/services-5.astro +3 -4
- package/src/components/blocks/services-6.astro +7 -6
- package/src/components/blocks/services-7.astro +7 -9
- package/src/components/blocks/sidebar-1.astro +42 -97
- package/src/components/ui/accordion/accordion-content.astro +2 -1
- package/src/components/ui/accordion/accordion-trigger.astro +7 -8
- package/src/components/ui/alert-dialog/alert-dialog-content.astro +1 -1
- package/src/components/ui/alert-dialog/alert-dialog-overlay.astro +1 -1
- package/src/components/ui/alert-dialog/alert-dialog.astro +23 -3
- package/src/components/ui/avatar/avatar.astro +1 -1
- package/src/components/ui/badge/badge.astro +1 -0
- package/src/components/ui/banner/banner-container.astro +3 -3
- package/src/components/ui/breadcrumb/breadcrumb-ellipsis.astro +2 -2
- package/src/components/ui/breadcrumb/breadcrumb-separator.astro +2 -2
- package/src/components/ui/button/button-variants.ts +8 -7
- package/src/components/ui/card/card-content.astro +1 -1
- package/src/components/ui/card/card-footer.astro +1 -1
- package/src/components/ui/card/card-header.astro +1 -1
- package/src/components/ui/card/card.astro +1 -1
- package/src/components/ui/carousel/carousel-next.astro +3 -3
- package/src/components/ui/carousel/carousel-previous.astro +3 -3
- package/src/components/ui/checkbox/checkbox.astro +1 -1
- package/src/components/ui/combobox/combobox-input.astro +2 -2
- package/src/components/ui/combobox/combobox-item.astro +4 -4
- package/src/components/ui/combobox/combobox-list.astro +1 -1
- package/src/components/ui/combobox/combobox-trigger.astro +2 -5
- package/src/components/ui/combobox/combobox.astro +3 -0
- package/src/components/ui/command/command-dialog.astro +10 -10
- package/src/components/ui/command/command-input.astro +2 -2
- package/src/components/ui/command/command-item.astro +4 -5
- package/src/components/ui/dialog/dialog-close.astro +2 -2
- package/src/components/ui/dialog/dialog-content.astro +3 -3
- package/src/components/ui/dialog/dialog-overlay.astro +1 -1
- package/src/components/ui/dialog/dialog.astro +26 -3
- package/src/components/ui/dropdown-menu/dropdown-menu-checkbox-item.astro +4 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-content.astro +4 -4
- package/src/components/ui/dropdown-menu/dropdown-menu-item.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-label.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu-radio-item.astro +4 -5
- package/src/components/ui/dropdown-menu/dropdown-menu-shortcut.astro +1 -1
- package/src/components/ui/dropdown-menu/dropdown-menu.astro +3 -0
- package/src/components/ui/field/field-label.astro +1 -1
- package/src/components/ui/field/field-title.astro +1 -1
- package/src/components/ui/hover-card/hover-card-content.astro +4 -4
- package/src/components/ui/hover-card/hover-card.astro +8 -5
- package/src/components/ui/icon/icon.astro +8 -17
- package/src/components/ui/input-group/input-group-button.astro +0 -1
- package/src/components/ui/item/item-media.astro +1 -1
- package/src/components/ui/item/item.astro +0 -18
- package/src/components/ui/kbd/kbd-group.astro +1 -1
- package/src/components/ui/kbd/kbd.astro +1 -1
- package/src/components/ui/layout/layout-body.astro +1 -1
- package/src/components/ui/layout/layout-head.astro +3 -2
- package/src/components/ui/layout/layout-main.astro +1 -1
- package/src/components/ui/layout/layout.astro +4 -0
- package/src/components/ui/marquee/marquee.astro +50 -69
- package/src/components/ui/native-select/native-select.astro +2 -3
- package/src/components/ui/navigation-menu/navigation-menu-content.astro +3 -1
- package/src/components/ui/navigation-menu/navigation-menu-indicator.astro +2 -1
- package/src/components/ui/navigation-menu/navigation-menu-list.astro +1 -1
- package/src/components/ui/navigation-menu/navigation-menu-positioner.astro +2 -0
- package/src/components/ui/navigation-menu/navigation-menu-trigger.astro +2 -3
- package/src/components/ui/navigation-menu/navigation-menu.astro +1 -1
- package/src/components/ui/popover/popover-content.astro +1 -1
- package/src/components/ui/radio-group/radio-group-item.astro +3 -3
- package/src/components/ui/rating/rating.astro +3 -3
- package/src/components/ui/select/select-content.astro +1 -1
- package/src/components/ui/select/select-item.astro +4 -4
- package/src/components/ui/select/select-trigger.astro +3 -6
- package/src/components/ui/select/select.astro +6 -0
- package/src/components/ui/sheet/sheet-content.astro +6 -7
- package/src/components/ui/sheet/sheet.astro +1 -89
- package/src/components/ui/sidebar/sidebar-menu-button.astro +13 -11
- package/src/components/ui/sidebar/sidebar-menu-sub-button.astro +10 -8
- package/src/components/ui/sidebar/sidebar-provider.astro +37 -15
- package/src/components/ui/sidebar/sidebar-rail.astro +1 -1
- package/src/components/ui/sidebar/sidebar-trigger.astro +3 -3
- package/src/components/ui/sidebar/sidebar.astro +1 -2
- package/src/components/ui/slider/slider.astro +8 -6
- package/src/components/ui/spinner/spinner.astro +4 -4
- package/src/components/ui/switch/switch.astro +5 -3
- package/src/components/ui/tabs/tabs-content.astro +2 -1
- package/src/components/ui/theme-toggle/theme-toggle.astro +4 -3
- package/src/components/ui/toggle/toggle.astro +2 -0
- package/src/components/ui/tooltip/tooltip-content.astro +1 -1
- package/src/components/ui/typography/typography-a.astro +19 -4
- package/src/components/ui/typography/typography-blockquote.astro +26 -6
- package/src/components/ui/typography/typography-h1.astro +7 -9
- package/src/components/ui/typography/typography-h2.astro +12 -9
- package/src/components/ui/typography/typography-h3.astro +7 -9
- package/src/components/ui/typography/typography-h4.astro +7 -9
- package/src/components/ui/typography/typography-inline-code.astro +28 -12
- package/src/components/ui/typography/typography-lead.astro +29 -4
- package/src/components/ui/typography/typography-list-item.astro +25 -9
- package/src/components/ui/typography/typography-list.astro +29 -11
- package/src/components/ui/typography/typography-p.astro +26 -6
- package/src/components/ui/typography/typography-table-cell.astro +32 -13
- package/src/components/ui/typography/typography-table-head.astro +27 -13
- package/src/components/ui/typography/typography-table-row.astro +23 -13
- package/src/components/ui/typography/typography-table.astro +29 -20
- package/src/components/ui/typography/typography.astro +172 -46
- package/src/components/ui/video/video.astro +11 -27
- package/src/styles/global.css +2 -15
- package/public/r/beta-repo-setup.json +0 -125
- package/public/r/blocks.json +0 -91
- package/public/r/content-5.json +0 -17
- package/public/r/content-6.json +0 -17
- package/public/r/gradient.json +0 -17
- package/public/r/init.json +0 -23
- package/public/r/tile.json +0 -27
- package/src/components/blocks/content-5.astro +0 -115
- package/src/components/blocks/content-6.astro +0 -91
- package/src/components/ui/gradient/gradient.astro +0 -45
- package/src/components/ui/gradient/index.ts +0 -1
- package/src/components/ui/tile/index.ts +0 -3
- package/src/components/ui/tile/tile-content.astro +0 -17
- package/src/components/ui/tile/tile-group.astro +0 -76
- package/src/components/ui/tile/tile.astro +0 -46
|
@@ -3,10 +3,8 @@ import type { HTMLTag, Polymorphic } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
size?: "sm" | "default" | "lg"
|
|
9
|
-
}>
|
|
6
|
+
type Size = "sm" | "default" | "lg"
|
|
7
|
+
type Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag; size?: Size }>
|
|
10
8
|
|
|
11
9
|
const {
|
|
12
10
|
as: Tag = "div",
|
|
@@ -30,15 +28,7 @@ const {
|
|
|
30
28
|
|
|
31
29
|
[data-slot="typography"]
|
|
32
30
|
> :is(
|
|
33
|
-
p,
|
|
34
|
-
blockquote,
|
|
35
|
-
ul,
|
|
36
|
-
ol,
|
|
37
|
-
table,
|
|
38
31
|
[data-slot="typography-lead"],
|
|
39
|
-
[data-slot="typography-p"],
|
|
40
|
-
[data-slot="typography-blockquote"],
|
|
41
|
-
[data-slot="typography-list"],
|
|
42
32
|
[data-slot="typography-table-container"],
|
|
43
33
|
div,
|
|
44
34
|
section,
|
|
@@ -47,7 +37,6 @@ const {
|
|
|
47
37
|
nav,
|
|
48
38
|
figure,
|
|
49
39
|
details,
|
|
50
|
-
.docs-code-block,
|
|
51
40
|
pre,
|
|
52
41
|
small,
|
|
53
42
|
dl,
|
|
@@ -59,39 +48,42 @@ const {
|
|
|
59
48
|
@apply mt-6;
|
|
60
49
|
}
|
|
61
50
|
|
|
62
|
-
[data-slot="typography"]
|
|
63
|
-
|
|
51
|
+
[data-slot="typography"] > h1 {
|
|
52
|
+
@apply scroll-m-20 text-4xl font-semibold tracking-tight text-balance;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[data-slot="typography"] > h2 {
|
|
56
|
+
@apply scroll-m-20 text-3xl font-semibold tracking-tight;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-slot="typography"] > h2:first-child {
|
|
60
|
+
@apply mt-0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-slot="typography"] > h2:not(:first-child) {
|
|
64
64
|
@apply mt-10;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
[data-slot="typography"]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
[data-slot="typography"] > h3 {
|
|
68
|
+
@apply scroll-m-20 text-2xl font-semibold tracking-tight;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-slot="typography"] > h3:not(:first-child) {
|
|
72
|
+
@apply mt-8;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[data-slot="typography"] > h4 {
|
|
76
|
+
@apply scroll-m-20 text-xl font-semibold tracking-tight;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-slot="typography"] > h4:not(:first-child) {
|
|
71
80
|
@apply mt-8;
|
|
72
81
|
}
|
|
73
82
|
|
|
74
83
|
[data-slot="typography"]
|
|
75
|
-
> :is(
|
|
76
|
-
h1,
|
|
77
|
-
h2,
|
|
78
|
-
h3,
|
|
79
|
-
h4,
|
|
80
|
-
[data-slot="typography-h1"],
|
|
81
|
-
[data-slot="typography-h2"],
|
|
82
|
-
[data-slot="typography-h3"],
|
|
83
|
-
[data-slot="typography-h4"]
|
|
84
|
-
)
|
|
84
|
+
> :is(h1, h2, h3, h4)
|
|
85
85
|
+ :is(
|
|
86
|
-
p,
|
|
87
|
-
blockquote,
|
|
88
|
-
ul,
|
|
89
|
-
ol,
|
|
90
|
-
table,
|
|
91
86
|
[data-slot="typography-lead"],
|
|
92
|
-
[data-slot="typography-p"],
|
|
93
|
-
[data-slot="typography-blockquote"],
|
|
94
|
-
[data-slot="typography-list"],
|
|
95
87
|
[data-slot="typography-table-container"],
|
|
96
88
|
div,
|
|
97
89
|
section,
|
|
@@ -100,8 +92,12 @@ const {
|
|
|
100
92
|
nav,
|
|
101
93
|
figure,
|
|
102
94
|
details,
|
|
103
|
-
|
|
95
|
+
p,
|
|
96
|
+
blockquote,
|
|
104
97
|
pre,
|
|
98
|
+
ul,
|
|
99
|
+
ol,
|
|
100
|
+
table,
|
|
105
101
|
small,
|
|
106
102
|
dl,
|
|
107
103
|
img,
|
|
@@ -112,6 +108,31 @@ const {
|
|
|
112
108
|
@apply mt-4;
|
|
113
109
|
}
|
|
114
110
|
|
|
111
|
+
[data-slot="typography"] > p {
|
|
112
|
+
@apply text-base leading-7;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-slot="typography"] > p:not(:first-child) {
|
|
116
|
+
@apply mt-6;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[data-slot="typography"]
|
|
120
|
+
> :is(h1, h2, h3, h4)
|
|
121
|
+
+ :is(p, [data-slot="typography-lead"]):not(:first-child) {
|
|
122
|
+
@apply mt-4;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-slot="typography"] > a:not([data-slot]),
|
|
126
|
+
[data-slot="typography"]
|
|
127
|
+
> :is(p, blockquote, ul, ol, dl, table)
|
|
128
|
+
a:not([data-slot]) {
|
|
129
|
+
@apply text-primary font-medium underline underline-offset-4;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[data-slot="typography"] > blockquote {
|
|
133
|
+
@apply mt-6 border-l-2 pl-6 text-base italic;
|
|
134
|
+
}
|
|
135
|
+
|
|
115
136
|
[data-slot="typography"] > hr {
|
|
116
137
|
@apply border-border my-8;
|
|
117
138
|
}
|
|
@@ -126,16 +147,16 @@ const {
|
|
|
126
147
|
|
|
127
148
|
[data-slot="typography"] > .docs-code-block > pre,
|
|
128
149
|
[data-slot="typography"] > .docs-code-block > pre.astro-code {
|
|
129
|
-
@apply m-0 rounded-none border-0 bg-transparent
|
|
150
|
+
@apply m-0 rounded-none border-0 !bg-transparent p-4 pr-14 text-sm leading-[var(--text-sm--line-height)];
|
|
130
151
|
font-family: var(--font-mono);
|
|
131
152
|
}
|
|
132
153
|
|
|
133
154
|
[data-slot="typography"] > .docs-code-block > pre.astro-code code {
|
|
134
|
-
@apply text-sm leading-(--text-sm--line-height) text-(--shiki-light,var(--foreground))
|
|
155
|
+
@apply text-sm leading-[var(--text-sm--line-height)] !text-[var(--shiki-light,var(--foreground))];
|
|
135
156
|
}
|
|
136
157
|
|
|
137
158
|
.dark [data-slot="typography"] > .docs-code-block > pre.astro-code code {
|
|
138
|
-
@apply text-(--shiki-dark,var(--foreground))
|
|
159
|
+
@apply !text-[var(--shiki-dark,var(--foreground))];
|
|
139
160
|
}
|
|
140
161
|
|
|
141
162
|
.dark
|
|
@@ -143,7 +164,7 @@ const {
|
|
|
143
164
|
> .docs-code-block
|
|
144
165
|
> pre.astro-code
|
|
145
166
|
span[style*="--shiki-dark"] {
|
|
146
|
-
@apply font-(--shiki-dark-font-weight,inherit)!
|
|
167
|
+
@apply ![font-weight:var(--shiki-dark-font-weight,inherit)] !text-[var(--shiki-dark)] ![font-style:var(--shiki-dark-font-style,inherit)] ![text-decoration:var(--shiki-dark-text-decoration,inherit)];
|
|
147
168
|
}
|
|
148
169
|
|
|
149
170
|
[data-slot="typography"] > .docs-code-block > .docs-code-copy {
|
|
@@ -154,6 +175,42 @@ const {
|
|
|
154
175
|
@apply size-4;
|
|
155
176
|
}
|
|
156
177
|
|
|
178
|
+
[data-slot="typography"] > ul,
|
|
179
|
+
[data-slot="typography"] > ol {
|
|
180
|
+
@apply my-6 ml-6 text-base;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
[data-slot="typography"] > ul {
|
|
184
|
+
@apply list-disc;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
[data-slot="typography"] > ol {
|
|
188
|
+
@apply list-decimal;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
[data-slot="typography"] > ul > li,
|
|
192
|
+
[data-slot="typography"] > ol > li {
|
|
193
|
+
@apply mt-2;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
[data-slot="typography"] > [data-slot="typography-lead"] {
|
|
197
|
+
@apply text-muted-foreground;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[data-slot="typography"][data-size="sm"] > [data-slot="typography-lead"] {
|
|
201
|
+
@apply text-base;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[data-slot="typography"] > [data-slot="typography-lead"],
|
|
205
|
+
[data-slot="typography"][data-size="default"]
|
|
206
|
+
> [data-slot="typography-lead"] {
|
|
207
|
+
@apply text-lg;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
[data-slot="typography"][data-size="lg"] > [data-slot="typography-lead"] {
|
|
211
|
+
@apply text-xl;
|
|
212
|
+
}
|
|
213
|
+
|
|
157
214
|
[data-slot="typography"] > small {
|
|
158
215
|
@apply block leading-none font-medium;
|
|
159
216
|
}
|
|
@@ -162,19 +219,88 @@ const {
|
|
|
162
219
|
@apply text-sm;
|
|
163
220
|
}
|
|
164
221
|
|
|
222
|
+
[data-slot="typography"] > table {
|
|
223
|
+
@apply border-border my-6 block w-full overflow-x-auto rounded-lg border;
|
|
224
|
+
border-collapse: separate;
|
|
225
|
+
border-spacing: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
[data-slot="typography"] > table th,
|
|
229
|
+
[data-slot="typography"] > table td {
|
|
230
|
+
@apply border-border border-b px-4 py-2 text-left align-top whitespace-nowrap;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
[data-slot="typography"] > table th {
|
|
234
|
+
@apply text-foreground bg-muted/40 font-medium;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-slot="typography"] > table tr:last-child td {
|
|
238
|
+
@apply border-b-0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[data-slot="typography"] > table thead,
|
|
242
|
+
[data-slot="typography"] > table tbody,
|
|
243
|
+
[data-slot="typography"] > table tr {
|
|
244
|
+
@apply w-full;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
[data-slot="typography"] > table tr {
|
|
248
|
+
@apply grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-slot="typography"] > table tr {
|
|
252
|
+
@apply even:bg-muted/40 m-0 border-t p-0 first:border-t-0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[data-slot="typography"] > table th {
|
|
256
|
+
@apply border-r px-4 py-2 text-left font-bold last:border-r-0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[data-slot="typography"] > table th[align="center"] {
|
|
260
|
+
@apply text-center;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
[data-slot="typography"] > table th[align="right"] {
|
|
264
|
+
@apply text-right;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
[data-slot="typography"] > table td {
|
|
268
|
+
@apply border-r px-4 py-2 text-left last:border-r-0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[data-slot="typography"] > table td[align="center"] {
|
|
272
|
+
@apply text-center;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
[data-slot="typography"] > table td[align="right"] {
|
|
276
|
+
@apply text-right;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
[data-slot="typography"] > table tbody tr:last-child td {
|
|
280
|
+
@apply border-b-0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
[data-slot="typography"] :not(pre) > code {
|
|
284
|
+
@apply bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
[data-slot="typography"] > table :not(pre) > code {
|
|
288
|
+
@apply rounded-md text-sm leading-5 font-normal;
|
|
289
|
+
}
|
|
290
|
+
|
|
165
291
|
[data-slot="typography"] > pre.astro-code {
|
|
166
|
-
@apply border-border bg-muted/60
|
|
292
|
+
@apply border-border !bg-muted/60 rounded-xl border p-4 text-sm leading-[var(--text-sm--line-height)];
|
|
167
293
|
}
|
|
168
294
|
|
|
169
295
|
[data-slot="typography"] > pre.astro-code code {
|
|
170
|
-
@apply text-inherit
|
|
296
|
+
@apply !text-inherit;
|
|
171
297
|
}
|
|
172
298
|
|
|
173
299
|
.dark [data-slot="typography"] > pre.astro-code {
|
|
174
|
-
@apply text-(--shiki-dark,var(--foreground))
|
|
300
|
+
@apply !text-[var(--shiki-dark,var(--foreground))];
|
|
175
301
|
}
|
|
176
302
|
|
|
177
303
|
.dark [data-slot="typography"] > pre.astro-code span[style*="--shiki-dark"] {
|
|
178
|
-
@apply font-(--shiki-dark-font-weight,inherit)!
|
|
304
|
+
@apply ![font-weight:var(--shiki-dark-font-weight,inherit)] !text-[var(--shiki-dark)] ![font-style:var(--shiki-dark-font-style,inherit)] ![text-decoration:var(--shiki-dark-text-decoration,inherit)];
|
|
179
305
|
}
|
|
180
306
|
</style>
|
|
@@ -3,19 +3,13 @@ import type { HTMLAttributes } from "astro/types"
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
type Props = Omit<HTMLAttributes<"
|
|
6
|
+
type Props = Omit<HTMLAttributes<"div">, "src"> & {
|
|
7
7
|
src?: string
|
|
8
|
-
title?: string
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
const {
|
|
12
|
-
class: className,
|
|
13
|
-
src,
|
|
14
|
-
title = "Embedded video",
|
|
15
|
-
...props
|
|
16
|
-
} = Astro.props
|
|
10
|
+
const { class: className, src, ...props } = Astro.props
|
|
17
11
|
|
|
18
|
-
const
|
|
12
|
+
const getEmbedSrc = (value?: string) => {
|
|
19
13
|
if (!value) return undefined
|
|
20
14
|
|
|
21
15
|
try {
|
|
@@ -23,32 +17,25 @@ const getVideoId = (value?: string) => {
|
|
|
23
17
|
const host = url.hostname.replace(/^www\./, "")
|
|
24
18
|
|
|
25
19
|
if (host === "youtube.com" && url.pathname === "/watch") {
|
|
26
|
-
|
|
20
|
+
const id = url.searchParams.get("v")
|
|
21
|
+
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
if (host === "youtube.com" && url.pathname.startsWith("/shorts/")) {
|
|
30
|
-
|
|
25
|
+
const id = url.pathname.split("/")[2]
|
|
26
|
+
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
if (host === "youtu.be") {
|
|
34
|
-
|
|
30
|
+
const id = url.pathname.slice(1)
|
|
31
|
+
return id ? `https://www.youtube.com/embed/${id}` : undefined
|
|
35
32
|
}
|
|
36
33
|
} catch {
|
|
37
34
|
return undefined
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
const
|
|
42
|
-
const embedSrc = videoId
|
|
43
|
-
? `https://www.youtube-nocookie.com/embed/${videoId}`
|
|
44
|
-
: undefined
|
|
45
|
-
const thumbnailSrc = videoId
|
|
46
|
-
? `https://i.ytimg.com/vi/${videoId}/hqdefault.jpg`
|
|
47
|
-
: undefined
|
|
48
|
-
const srcdoc =
|
|
49
|
-
embedSrc && thumbnailSrc
|
|
50
|
-
? `<style>*{box-sizing:border-box}html,body{height:100%;margin:0}body{display:grid;place-items:center;background:#000;font-family:system-ui,sans-serif}a{position:absolute;inset:0;display:grid;place-items:center;color:white;text-decoration:none}img{width:100%;height:100%;object-fit:cover}span{position:absolute;display:grid;place-items:center;width:4.5rem;height:3.25rem;border-radius:1rem;background:rgb(0 0 0 / .72);box-shadow:0 10px 30px rgb(0 0 0 / .25);transition:background .15s ease}span:before{content:"";margin-left:.25rem;border-top:.7rem solid transparent;border-bottom:.7rem solid transparent;border-left:1.1rem solid currentColor}a:hover span{background:#ff0033}</style><a href="${embedSrc}?autoplay=1" aria-label="Play video"><img src="${thumbnailSrc}" alt="" /><span></span></a>`
|
|
51
|
-
: undefined
|
|
38
|
+
const embedSrc = getEmbedSrc(src)
|
|
52
39
|
const isShort = src?.includes("/shorts/")
|
|
53
40
|
---
|
|
54
41
|
|
|
@@ -56,12 +43,9 @@ const isShort = src?.includes("/shorts/")
|
|
|
56
43
|
embedSrc && (
|
|
57
44
|
<iframe
|
|
58
45
|
src={embedSrc}
|
|
59
|
-
|
|
60
|
-
title={title}
|
|
46
|
+
title="Embedded video"
|
|
61
47
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
|
62
48
|
allowfullscreen
|
|
63
|
-
loading="lazy"
|
|
64
|
-
referrerpolicy="strict-origin-when-cross-origin"
|
|
65
49
|
class={cn(
|
|
66
50
|
"bg-muted w-full rounded-lg border",
|
|
67
51
|
isShort ? "aspect-9/16 max-w-xs" : "aspect-video",
|
package/src/styles/global.css
CHANGED
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
--popover: oklch(0.269 0 0);
|
|
69
69
|
--popover-foreground: oklch(0.985 0 0);
|
|
70
70
|
--primary: oklch(0.686 0.2105 41.139);
|
|
71
|
-
--primary-foreground: oklch(
|
|
71
|
+
--primary-foreground: oklch(1 0 0);
|
|
72
72
|
--secondary: oklch(0.269 0 0);
|
|
73
73
|
--secondary-foreground: oklch(0.985 0 0);
|
|
74
74
|
--muted: oklch(0.269 0 0);
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
--sidebar: oklch(0.205 0 0);
|
|
89
89
|
--sidebar-foreground: oklch(0.985 0 0);
|
|
90
90
|
--sidebar-primary: oklch(0.686 0.2105 41.139);
|
|
91
|
-
--sidebar-primary-foreground: oklch(
|
|
91
|
+
--sidebar-primary-foreground: oklch(1 0 0);
|
|
92
92
|
--sidebar-accent: oklch(0.269 0 0);
|
|
93
93
|
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
94
94
|
--sidebar-border: oklch(0.275 0 0);
|
|
@@ -115,19 +115,6 @@
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
@theme inline {
|
|
118
|
-
--font-sans: var(--font-geist-sans, ui-sans-serif, system-ui, sans-serif);
|
|
119
|
-
--font-mono: var(
|
|
120
|
-
--font-geist-mono,
|
|
121
|
-
ui-monospace,
|
|
122
|
-
SFMono-Regular,
|
|
123
|
-
Menlo,
|
|
124
|
-
Monaco,
|
|
125
|
-
Consolas,
|
|
126
|
-
"Liberation Mono",
|
|
127
|
-
"Courier New",
|
|
128
|
-
monospace
|
|
129
|
-
);
|
|
130
|
-
|
|
131
118
|
--color-background: var(--background);
|
|
132
119
|
--color-foreground: var(--foreground);
|
|
133
120
|
--color-card: var(--card);
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "beta-repo-setup",
|
|
4
|
-
"registryDependencies": [
|
|
5
|
-
"@fulldev/blocks",
|
|
6
|
-
"@fulldev/components"
|
|
7
|
-
],
|
|
8
|
-
"files": [
|
|
9
|
-
{
|
|
10
|
-
"path": "src/content.config.ts",
|
|
11
|
-
"content": "import { defineCollection } from \"astro:content\"\nimport { glob } from \"astro/loaders\"\n\nimport { globalSchema } from \"@/schemas/global\"\nimport { pageSchema } from \"@/schemas/page\"\n\nexport const collections = {\n pages: defineCollection({\n loader: glob({\n pattern: \"**/[^_]*.{md,mdx}\",\n base: \"src/content/pages\",\n }),\n schema: pageSchema,\n }),\n globals: defineCollection({\n loader: glob({\n pattern: \"**/[^_]*.{yaml,yml,json}\",\n base: \"src/content/globals\",\n }),\n schema: globalSchema,\n }),\n}\n",
|
|
12
|
-
"type": "registry:file",
|
|
13
|
-
"target": "src/content.config.ts"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"path": "src/lib/pages.ts",
|
|
17
|
-
"content": "import { getCollection, type CollectionEntry } from \"astro:content\"\n\ntype Page = CollectionEntry<\"pages\">\n\nexport type PageSearchItem = {\n label: string\n href: string\n title: string\n path: string\n description: string\n group: string\n}\n\nexport type PageBreadcrumbItem = {\n label: string\n href: string\n}\n\nexport const normalizePath = (path: string) => {\n if (path === \"/\") return path\n\n return path.replace(/\\/$/, \"\")\n}\n\nexport const getPageHref = (page: Page) =>\n page.id === \"index\" ? \"/\" : `/${page.id}/`\n\nexport const formatSlug = (slug: string) =>\n slug\n .split(\"-\")\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \")\n\nconst getPageSearchGroup = (href: string) => {\n const [slug] = href.split(\"/\").filter(Boolean)\n\n return slug ? formatSlug(slug) : \"Overview\"\n}\n\nexport const getPageSearchItems = async (): Promise<PageSearchItem[]> => {\n const pages = await getCollection(\"pages\")\n\n return pages\n .map((page) => ({\n label: page.data.title,\n href: getPageHref(page),\n title: page.data.title,\n path: getPageHref(page),\n description: page.data.description,\n group: getPageSearchGroup(getPageHref(page)),\n }))\n .sort((a, b) => a.label.localeCompare(b.label))\n}\n\nexport const getPageBreadcrumbItems = async (\n pathname: string\n): Promise<PageBreadcrumbItem[]> => {\n const currentPath = normalizePath(pathname)\n const pages = await getCollection(\"pages\")\n const pageTitlesByHref = new Map(\n pages.map((page) => [getPageHref(page), page.data.title])\n )\n const homeLink = {\n label: pageTitlesByHref.get(\"/\") ?? \"Home\",\n href: \"/\",\n }\n\n if (currentPath === \"/\") return [homeLink]\n\n return [\n homeLink,\n ...currentPath\n .split(\"/\")\n .filter(Boolean)\n .map((slug, index, slugs) => {\n const href = `/${slugs.slice(0, index + 1).join(\"/\")}/`\n\n return {\n label: pageTitlesByHref.get(href) ?? formatSlug(slug),\n href,\n }\n }),\n ]\n}\n",
|
|
18
|
-
"type": "registry:file",
|
|
19
|
-
"target": "src/lib/pages.ts"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "src/pages/[...page].astro",
|
|
23
|
-
"content": "---\nimport { getCollection, getEntry, render } from \"astro:content\"\n\nexport const prerender = true\n\nexport async function getStaticPaths() {\n const pages = await getCollection(\"pages\")\n return pages.map((page) => {\n return {\n params: {\n page: page.id === \"index\" ? undefined : page.id,\n },\n props: page,\n }\n })\n}\n\nconst page = Astro.props\nconst pageData = page.data\nconst { Content, headings } = await render(page)\nconst global = await getEntry(\"globals\", Astro.currentLocale || \"en\")\nif (!global) throw new Error(\"Add a global to content/globals\")\nconst globalData = global.data\n\nconst layoutImports = import.meta.glob(\"../layouts/*.astro\", { eager: true })\nconst layoutPath = `../layouts/${pageData.type}.astro`\nconst layoutImport = layoutImports[layoutPath] as { default?: any } | undefined\nconst Layout = layoutImport?.default\n\nif (!Layout) throw new Error(`Add a layout for page type \"${pageData.type}\"`)\n---\n\n<Layout global={globalData} page={pageData} headings={headings}>\n <Content />\n</Layout>\n",
|
|
24
|
-
"type": "registry:file",
|
|
25
|
-
"target": "src/pages/[...page].astro"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "src/pages/[...page].md.ts",
|
|
29
|
-
"content": "import { readFile } from \"node:fs/promises\"\nimport type { APIRoute } from \"astro\"\nimport { getCollection } from \"astro:content\"\n\nexport const prerender = true\n\nconst navigationPreamble = \"Navigation: [/sitemap.md](/sitemap.md)\\n\\n\"\n\nexport async function getStaticPaths() {\n const pages = await getCollection(\"pages\")\n return Promise.all(\n pages\n .filter((page) => page.id !== \"index\")\n .map(async (page) => ({\n params: {\n page: page.id,\n },\n props: {\n source: await readPageSource(page.filePath),\n },\n }))\n )\n}\n\nasync function readPageSource(filePath: string | undefined) {\n if (!filePath) {\n throw new Error(\"Expected content page entry to include a file path.\")\n }\n\n return readFile(filePath, \"utf-8\")\n}\n\nexport const GET: APIRoute = ({ props }) => {\n return new Response(`${navigationPreamble}${props.source}`, {\n headers: {\n \"Content-Type\": \"text/plain; charset=utf-8\",\n },\n })\n}\n",
|
|
30
|
-
"type": "registry:file",
|
|
31
|
-
"target": "src/pages/[...page].md.ts"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"path": "src/pages/index.md.ts",
|
|
35
|
-
"content": "import { readFile } from \"node:fs/promises\"\nimport type { APIRoute } from \"astro\"\nimport { getEntry } from \"astro:content\"\n\nexport const prerender = true\n\nconst agentPreamble = `# Fulldev UI Agent Entry Point\n\nNavigation: [/sitemap.md](/sitemap.md)\n\nIf you are an AI agent, treat this page as the entry point for Fulldev UI. Install the Fulldev skill first if your environment supports skills, then read the relevant Markdown pages before editing a project.\n\n\\`\\`\\`bash\nnpx -y skills add fulldotdev/ui --skill fulldev -y\n\\`\\`\\`\n\nStart here:\n\n- Install Fulldev UI: [/docs/installation.md](/docs/installation.md)\n- Understand the project model: [/docs/introduction.md](/docs/introduction.md)\n- Customize theme tokens: [/docs/theming.md](/docs/theming.md)\n- Browse documentation sections: [/docs.md](/docs.md)\n- Browse installable components: [/components.md](/components.md)\n- Browse installable blocks: [/blocks.md](/blocks.md)\n- Discover all pages: [/sitemap.md](/sitemap.md)\n- Read registry metadata: [/r/registry.json](/r/registry.json)\n\nEvery documentation page has a Markdown version. Add \\`.md\\` to a page URL, for example \\`/components/button.md\\` or \\`/blocks/hero.md\\`.\n\nRecommended agent flow:\n\n1. Read \\`/docs/installation.md\\`.\n2. Install the Fulldev skill if your agent supports skills.\n3. Read the component or block page that matches the user's request.\n4. Install registry items with \\`npx shadcn@latest add @fulldev/<name>\\`.\n5. Use block and component examples as source references, not as hidden sidebar context.\n\n---\n\n## Homepage source\n\n`\n\nexport const GET: APIRoute = async () => {\n const page = await getEntry(\"pages\", \"index\")\n\n if (!page?.filePath) {\n return new Response(\n `${agentPreamble}No homepage content entry exists yet. Add \\`src/content/pages/index.mdx\\` to use this Markdown entry point.`,\n {\n headers: {\n \"Content-Type\": \"text/plain; charset=utf-8\",\n },\n }\n )\n }\n\n return new Response(\n `${agentPreamble}${await readFile(page.filePath, \"utf-8\")}`,\n {\n headers: {\n \"Content-Type\": \"text/plain; charset=utf-8\",\n },\n }\n )\n}\n",
|
|
36
|
-
"type": "registry:file",
|
|
37
|
-
"target": "src/pages/index.md.ts"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"path": "src/pages/sitemap.md.ts",
|
|
41
|
-
"content": "import type { APIRoute } from \"astro\"\nimport { getCollection } from \"astro:content\"\n\nimport { getPageHref } from \"@/lib/pages\"\n\nexport const prerender = true\n\nconst getMarkdownHref = (href: string) =>\n href === \"/\" ? \"/index.md\" : `${href.replace(/\\/$/, \"\")}.md`\n\nexport const GET: APIRoute = async () => {\n const pages = await getCollection(\"pages\")\n const pageLinks = pages\n .map((page) => ({\n title: page.data.title,\n href: getPageHref(page),\n markdownHref: getMarkdownHref(getPageHref(page)),\n description: page.data.description,\n }))\n .sort((a, b) => a.href.localeCompare(b.href))\n\n const body = `# Fulldev UI Sitemap\n\nUse the Markdown URLs when reading pages as an AI agent.\n\n## Core\n\n- [Agent entry point](/index.md)\n- [Registry metadata](/r/registry.json)\n\n## Pages\n\n${pageLinks\n .map(\n (page) =>\n `- [${page.title}](${page.href}) | [Markdown](${page.markdownHref})${\n page.description ? ` - ${page.description}` : \"\"\n }`\n )\n .join(\"\\n\")}\n`\n\n return new Response(body, {\n headers: {\n \"Content-Type\": \"text/plain; charset=utf-8\",\n },\n })\n}\n",
|
|
42
|
-
"type": "registry:file",
|
|
43
|
-
"target": "src/pages/sitemap.md.ts"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"path": "src/schemas/shared.ts",
|
|
47
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nexport const linkSchema = z.object({\n label: z.string(),\n href: z.string(),\n})\n\nexport const buttonSchema = z.object({\n label: z.string(),\n href: z.string(),\n icon: z.string().optional(),\n variant: z.enum([\"default\", \"outline\", \"secondary\", \"ghost\"]).optional(),\n})\n\nexport const imageSchema = ({ image }: SchemaContext) =>\n z.object({\n src: image(),\n alt: z.string(),\n })\n\nexport const seoSchema = (ctx: SchemaContext) =>\n z.object({\n title: z.string(),\n description: z.string(),\n image: imageSchema(ctx).optional(),\n canonical: z.string().optional(),\n noindex: z.boolean().optional(),\n nofollow: z.boolean().optional(),\n })\n",
|
|
48
|
-
"type": "registry:file",
|
|
49
|
-
"target": "src/schemas/shared.ts"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"path": "src/schemas/global.ts",
|
|
53
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nimport { buttonSchema, linkSchema } from \"@/schemas/shared\"\n\nconst nestedLinkSchema = linkSchema.extend({\n links: linkSchema.array().optional(),\n})\n\nexport const globalSchema = ({ image }: SchemaContext) =>\n z.object({\n name: z.string(),\n logo: z\n .object({\n label: z.string(),\n href: z.string(),\n src: image().optional(),\n srcLight: image().optional(),\n srcDark: image().optional(),\n alt: z.string().optional(),\n })\n .refine((logo) => logo.src || (logo.srcLight && logo.srcDark), {\n message: \"Logo must define src or both srcLight and srcDark.\",\n }),\n header: z.object({\n navigation: nestedLinkSchema.array(),\n githubRepo: z.string(),\n }),\n sidebar: z.object({\n search: z.object({\n label: z.string(),\n empty: z.string(),\n }),\n navigation: nestedLinkSchema.array(),\n }),\n docs: z\n .object({\n callout: z.object({\n description: z.string(),\n button: buttonSchema,\n }),\n })\n .optional(),\n })\n\nexport type GlobalSchema = z.infer<ReturnType<typeof globalSchema>>\n",
|
|
54
|
-
"type": "registry:file",
|
|
55
|
-
"target": "src/schemas/global.ts"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"path": "src/schemas/page.ts",
|
|
59
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nimport { blockSchema } from \"@/schemas/layouts/block\"\nimport { docSchema } from \"@/schemas/layouts/doc\"\nimport { homeSchema } from \"@/schemas/layouts/home\"\nimport { overviewSchema } from \"@/schemas/layouts/overview\"\n\nexport const pageSchema = (ctx: SchemaContext) =>\n z.discriminatedUnion(\"type\", [\n blockSchema(ctx).extend({ type: z.literal(\"block\") }),\n docSchema(ctx).extend({ type: z.literal(\"doc\") }),\n homeSchema(ctx).extend({ type: z.literal(\"home\") }),\n overviewSchema(ctx).extend({ type: z.literal(\"overview\") }),\n ])\n",
|
|
60
|
-
"type": "registry:file",
|
|
61
|
-
"target": "src/schemas/page.ts"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"path": "src/schemas/layouts/base.ts",
|
|
65
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nimport { imageSchema, seoSchema } from \"@/schemas/shared\"\n\nexport const baseSchema = (ctx: SchemaContext) =>\n z.object({\n title: z.string(),\n description: z.string(),\n image: imageSchema(ctx).optional(),\n seo: seoSchema(ctx).optional(),\n })\n\nexport type BaseSchema = z.infer<ReturnType<typeof baseSchema>>\n",
|
|
66
|
-
"type": "registry:file",
|
|
67
|
-
"target": "src/schemas/layouts/base.ts"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"path": "src/schemas/layouts/block.ts",
|
|
71
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nimport { baseSchema } from \"@/schemas/layouts/base\"\n\nexport const blockSchema = (ctx: SchemaContext) =>\n baseSchema(ctx)\n .extend({\n category: z.string().optional(),\n })\n .strict()\n\nexport type BlockSchema = z.infer<ReturnType<typeof blockSchema>>\n",
|
|
72
|
-
"type": "registry:file",
|
|
73
|
-
"target": "src/schemas/layouts/block.ts"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"path": "src/schemas/layouts/doc.ts",
|
|
77
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nimport { baseSchema } from \"@/schemas/layouts/base\"\n\nexport const docSchema = (ctx: SchemaContext) => baseSchema(ctx).loose()\n\nexport type DocSchema = z.infer<ReturnType<typeof docSchema>>\n",
|
|
78
|
-
"type": "registry:file",
|
|
79
|
-
"target": "src/schemas/layouts/doc.ts"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"path": "src/schemas/layouts/home.ts",
|
|
83
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nimport { baseSchema } from \"@/schemas/layouts/base\"\n\nexport const homeSchema = (ctx: SchemaContext) =>\n baseSchema(ctx).extend({}).strict()\n\nexport type HomeSchema = z.infer<ReturnType<typeof homeSchema>>\n",
|
|
84
|
-
"type": "registry:file",
|
|
85
|
-
"target": "src/schemas/layouts/home.ts"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"path": "src/schemas/layouts/overview.ts",
|
|
89
|
-
"content": "import { type SchemaContext } from \"astro:content\"\nimport { z } from \"astro/zod\"\n\nimport { baseSchema } from \"@/schemas/layouts/base\"\n\nexport const overviewSchema = (ctx: SchemaContext) => baseSchema(ctx).strict()\n\nexport type OverviewSchema = z.infer<ReturnType<typeof overviewSchema>>\n",
|
|
90
|
-
"type": "registry:file",
|
|
91
|
-
"target": "src/schemas/layouts/overview.ts"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"path": "src/layouts/base.astro",
|
|
95
|
-
"content": "---\nimport { Font } from \"astro:assets\"\n\nimport type { GlobalSchema } from \"@/schemas/global\"\nimport type { BaseSchema } from \"@/schemas/layouts/base\"\nimport { getPageBreadcrumbItems, getPageSearchItems } from \"@/lib/pages\"\nimport Sidebar1 from \"@/components/blocks/sidebar-1.astro\"\nimport {\n Layout,\n LayoutBody,\n LayoutHead,\n LayoutMain,\n} from \"@/components/ui/layout\"\nimport { ThemeProvider } from \"@/components/ui/theme-toggle\"\n\ntype Props = {\n global: GlobalSchema\n page: BaseSchema\n}\n\nconst { global, page }: Props = Astro.props\n\nconst [searchItems, breadcrumbItems] = await Promise.all([\n getPageSearchItems(),\n getPageBreadcrumbItems(Astro.url.pathname),\n])\n---\n\n<Layout>\n <LayoutHead {...global} {...page} {...page.seo}>\n <Fragment slot=\"head\">\n <Font\n cssVariable=\"--font-geist-sans\"\n preload={[{ subset: \"latin\", weight: \"100 900\", style: \"normal\" }]}\n />\n <Font cssVariable=\"--font-geist-mono\" />\n </Fragment>\n <ThemeProvider />\n </LayoutHead>\n <LayoutBody>\n <Sidebar1\n logo={global.logo}\n search={{\n items: searchItems,\n ...global.sidebar.search,\n }}\n breadcrumb={{\n items: breadcrumbItems,\n menu: global.header.navigation,\n }}\n navigation={global.sidebar.navigation}\n githubRepo={global.header.githubRepo}\n >\n <LayoutMain>\n <slot />\n </LayoutMain>\n </Sidebar1>\n </LayoutBody>\n</Layout>\n",
|
|
96
|
-
"type": "registry:file",
|
|
97
|
-
"target": "src/layouts/base.astro"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"path": "src/layouts/block.astro",
|
|
101
|
-
"content": "---\nimport type { MarkdownHeading } from \"astro\"\nimport { getCollection } from \"astro:content\"\n\nimport type { GlobalSchema } from \"@/schemas/global\"\nimport type { BlockSchema } from \"@/schemas/layouts/block\"\nimport Base from \"@/layouts/base.astro\"\nimport BlocksBlock from \"@/components/blocks/blocks-1.astro\"\n\ntype Props = {\n global: GlobalSchema\n page: BlockSchema\n headings: MarkdownHeading[]\n}\n\nconst props: Props = Astro.props\nconst currentPath = Astro.url.pathname\nconst markdownPath =\n currentPath === \"/\" ? \"/index.md\" : `${currentPath.replace(/\\/$/, \"\")}.md`\n\nconst blocks = await getCollection(\"pages\", ({ data }) => {\n return data.type === \"block\"\n})\nconst currentBlock = blocks.find((entry) => `/${entry.id}/` === currentPath)\nconst isBlockCategory = !props.page.category\nconst orderedBlockCategoryLinks = blocks\n .filter((entry) => !(\"category\" in entry.data) || !entry.data.category)\n .map((entry) => ({\n href: `/${entry.id}/`,\n title: entry.data.title,\n }))\n .sort((a, b) => a.href.localeCompare(b.href))\nconst currentPageIndex = orderedBlockCategoryLinks.findIndex(\n (item) => item.href === currentPath\n)\nconst previousPage =\n isBlockCategory && currentPageIndex > 0\n ? orderedBlockCategoryLinks[currentPageIndex - 1]\n : undefined\nconst nextPage =\n isBlockCategory && currentPageIndex >= 0\n ? orderedBlockCategoryLinks[currentPageIndex + 1]\n : undefined\nconst copySource = blocks.find((entry) => `/${entry.id}/` === currentPath)?.body\nconst copyButton = copySource\n ? {\n id: `blocks-copy-page-${crypto.randomUUID()}`,\n source: currentBlock?.body ?? copySource,\n }\n : undefined\n---\n\n<Base global={props.global} page={props.page}>\n <BlocksBlock\n title={props.page.title}\n description={props.page.description}\n copyButton={copyButton}\n markdownUrl={markdownPath}\n previousPage={previousPage}\n nextPage={nextPage}\n labels={{\n copyMarkdown: \"Copy Markdown\",\n openIn: \"Open in\",\n openInMarkdown: \"Open in Markdown\",\n openInChatGPT: \"Open in ChatGPT\",\n openInClaude: \"Open in Claude\",\n openInCursor: \"Open in Cursor\",\n pagination: {\n previous: \"Previous\",\n next: \"Next\",\n ariaLabel: \"Blocks pagination\",\n },\n }}\n >\n <slot />\n </BlocksBlock>\n</Base>\n",
|
|
102
|
-
"type": "registry:file",
|
|
103
|
-
"target": "src/layouts/block.astro"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"path": "src/layouts/doc.astro",
|
|
107
|
-
"content": "---\nimport type { MarkdownHeading } from \"astro\"\nimport { getCollection } from \"astro:content\"\n\nimport type { GlobalSchema } from \"@/schemas/global\"\nimport type { DocSchema } from \"@/schemas/layouts/doc\"\nimport Base from \"@/layouts/base.astro\"\nimport DocBlock from \"@/components/blocks/doc-1.astro\"\n\ntype Props = {\n global: GlobalSchema\n page: DocSchema\n headings: MarkdownHeading[]\n}\n\nconst props: Props = Astro.props\nconst currentPath = Astro.url.pathname\nconst globalCallout = props.global.docs?.callout\nconst markdownPath =\n currentPath === \"/\" ? \"/index.md\" : `${currentPath.replace(/\\/$/, \"\")}.md`\n\nconst docsPages = await getCollection(\"pages\")\nconst orderedDocLinks = [\n \"docs/introduction\",\n \"docs/installation\",\n \"docs/theming\",\n \"docs/dark-mode\",\n \"docs/cli\",\n \"docs/mcp\",\n \"docs/skills\",\n \"components\",\n \"blocks\",\n \"docs/layouts\",\n]\n .map((id) => docsPages.find((entry) => entry.id === id))\n .filter((entry): entry is (typeof docsPages)[number] => Boolean(entry))\n .map((entry) => ({\n href: `/${entry.id}/`,\n title: entry.data.title,\n }))\nconst componentLinks = docsPages\n .filter(\n (entry) => entry.data.type === \"doc\" && entry.id.startsWith(\"components/\")\n )\n .map((entry) => ({\n href: `/${entry.id}/`,\n title: entry.data.title,\n description: entry.data.description,\n }))\n .sort((a, b) => a.title.localeCompare(b.title))\nconst paginationLinks = [...orderedDocLinks, ...componentLinks]\nconst currentPageIndex = paginationLinks.findIndex(\n (item) => item.href === currentPath\n)\nconst previousPage =\n currentPageIndex > 0 ? paginationLinks[currentPageIndex - 1] : undefined\nconst nextPage =\n currentPageIndex >= 0 ? paginationLinks[currentPageIndex + 1] : undefined\nconst currentDoc = await getCollection(\"pages\", ({ data, id }) => {\n return data.type === \"doc\" && `/${id}/` === currentPath\n})\nconst copySource = currentDoc[0]?.body\nconst copyButton = copySource\n ? {\n id: `docs-copy-page-${crypto.randomUUID()}`,\n source: copySource,\n }\n : undefined\n\nconst tocItems = props.headings\n .filter((heading) => heading.depth === 2 || heading.depth === 3)\n .map((heading) => ({\n depth: heading.depth,\n href: `#${heading.slug}`,\n label: heading.text,\n }))\n---\n\n<Base global={props.global} page={props.page}>\n <DocBlock\n title={props.page.title}\n description={props.page.description}\n copyButton={copyButton}\n markdownUrl={markdownPath}\n tocItems={tocItems}\n callout={globalCallout}\n previousPage={previousPage}\n nextPage={nextPage}\n labels={{\n copyMarkdown: \"Copy Markdown\",\n openIn: \"Open in\",\n openInMarkdown: \"Open in Markdown\",\n openInChatGPT: \"Open in ChatGPT\",\n openInClaude: \"Open in Claude\",\n openInCursor: \"Open in Cursor\",\n pagination: {\n previous: \"Previous\",\n next: \"Next\",\n ariaLabel: \"Document pagination\",\n },\n toc: \"On This Page\",\n }}\n >\n <slot />\n </DocBlock>\n</Base>\n",
|
|
108
|
-
"type": "registry:file",
|
|
109
|
-
"target": "src/layouts/doc.astro"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"path": "src/layouts/home.astro",
|
|
113
|
-
"content": "---\nimport type { GlobalSchema } from \"@/schemas/global\"\nimport type { HomeSchema } from \"@/schemas/layouts/home\"\nimport Base from \"@/layouts/base.astro\"\nimport { Typography } from \"@/components/ui/typography\"\n\ntype Props = {\n global: GlobalSchema\n page: HomeSchema\n}\n\nconst { global, page } = Astro.props\n---\n\n<Base global={global} page={page}>\n <Typography\n as=\"article\"\n size=\"lg\"\n class=\"mx-auto w-full max-w-7xl px-4 py-16 lg:px-6 [&>:is(p,ul,ol,blockquote,h1,h2)]:max-w-4xl [&>:is(p,ul,ol,blockquote,h3,h4)]:max-w-3xl [&>[data-slot='tabs']:not(:first-child)]:mt-10\"\n >\n <slot />\n </Typography>\n</Base>\n",
|
|
114
|
-
"type": "registry:file",
|
|
115
|
-
"target": "src/layouts/home.astro"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"path": "src/layouts/overview.astro",
|
|
119
|
-
"content": "---\nimport { getCollection } from \"astro:content\"\n\nimport type { GlobalSchema } from \"@/schemas/global\"\nimport type { OverviewSchema } from \"@/schemas/layouts/overview\"\nimport Base from \"@/layouts/base.astro\"\nimport { SectionContainer } from \"@/components/ui/section\"\nimport { TypographyH1, TypographyLead } from \"@/components/ui/typography\"\n\ntype Props = {\n global: GlobalSchema\n page: OverviewSchema\n}\n\nconst { global, page }: Props = Astro.props\nconst currentPath = Astro.url.pathname\nconst pages = await getCollection(\"pages\")\n\nconst docsIndexOrder = [\n \"docs/introduction\",\n \"docs/installation\",\n \"docs/theming\",\n \"docs/dark-mode\",\n \"docs/cli\",\n \"docs/mcp\",\n \"docs/skills\",\n \"components\",\n \"blocks\",\n \"docs/layouts\",\n]\n\nconst entries =\n currentPath === \"/docs/\"\n ? docsIndexOrder\n .map((id) => pages.find((entry) => entry.id === id))\n .filter((entry): entry is (typeof pages)[number] => Boolean(entry))\n : pages\n .filter(({ data, id }) => {\n if (currentPath === \"/blocks/\") {\n return (\n data.type === \"block\" &&\n (!(\"category\" in data) || !data.category) &&\n id.startsWith(\"blocks/\")\n )\n }\n\n if (currentPath === \"/components/\") {\n return data.type === \"doc\" && id.startsWith(\"components/\")\n }\n\n return false\n })\n .sort((a, b) => a.data.title.localeCompare(b.data.title))\n\nconst overviewLinks = entries.map((entry) => ({\n href: `/${entry.id}/`,\n title: entry.data.title,\n description: entry.data.description,\n}))\n---\n\n<Base global={global} page={page}>\n <SectionContainer class=\"gap-10 pt-10 pb-10 sm:pt-12 sm:pb-12\">\n <div class=\"mx-auto flex w-full max-w-336 flex-col gap-10\">\n <header class=\"flex min-w-0 flex-col gap-4 border-b pb-8\">\n <TypographyH1\n class=\"text-foreground text-left text-3xl tracking-tight sm:text-4xl\"\n >\n {page.title}\n </TypographyH1>\n {\n page.description && (\n <TypographyLead class=\"max-w-2xl text-base leading-7\">\n {page.description}\n </TypographyLead>\n )\n }\n </header>\n\n <section class=\"grid gap-2 md:grid-cols-2 xl:grid-cols-3\">\n {\n overviewLinks.map((item) => (\n <a\n href={item.href}\n class=\"bg-muted/40 hover:bg-muted/60 focus-visible:ring-ring/50 rounded-lg px-4 py-4 transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <span class=\"text-sm font-medium\">{item.title}</span>\n {item.description && (\n <span class=\"text-muted-foreground mt-1 block text-sm leading-5\">\n {item.description}\n </span>\n )}\n </a>\n ))\n }\n </section>\n </div>\n </SectionContainer>\n</Base>\n",
|
|
120
|
-
"type": "registry:file",
|
|
121
|
-
"target": "src/layouts/overview.astro"
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
"type": "registry:file"
|
|
125
|
-
}
|