fulldev-ui 0.5.0-beta.2 → 0.5.0-beta.4
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/astro.config.ts +0 -1
- package/package.json +1 -1
- package/pnpm-lock.yaml +23 -58
- package/src/blocks/Contact.astro +7 -30
- package/src/blocks/Intro.astro +3 -1
- package/src/components/Card.astro +10 -4
- package/src/components/Footer.astro +2 -2
- package/src/components/Header.astro +1 -2
- package/src/components/Sidebar.astro +2 -2
- package/src/components/Social.astro +7 -0
- package/src/components/experimental/Form.astro +2 -0
- package/src/content/pages/index.mdx +0 -1
- package/src/content/presets/docs.yml +5 -5
- package/src/integration/index.ts +29 -32
- package/src/layouts/Layout.astro +18 -8
- package/src/layouts/OverviewLayout.astro +8 -7
- package/src/schemas/components/footer.ts +1 -0
- package/src/schemas/components/header.ts +9 -6
- package/src/schemas/pageSchema.ts +7 -4
- package/src/schemas/presetSchema.ts +9 -5
- package/src/schemas/utils/navigation.ts +2 -1
- package/src/utils/{getChildPages.ts → getFolderChildren.ts} +3 -1
- package/src/utils/{getCategoryPages.ts → getReferenceChildren.ts} +6 -3
- package/src/content/pages/layouts/pagelayout.mdx +0 -21
- package/src/layouts/ContentLayout.astro +0 -16
- package/src/layouts/PageLayout.astro +0 -15
- package/src/layouts/PostLayout.astro +0 -21
- /package/src/content/pages/layouts/{layout.mdx → _layout.mdx} +0 -0
- /package/src/schemas/utils/{categories.ts → parents.ts} +0 -0
package/astro.config.ts
CHANGED
package/package.json
CHANGED
package/pnpm-lock.yaml
CHANGED
|
@@ -20,6 +20,9 @@ dependencies:
|
|
|
20
20
|
'@radix-ui/colors':
|
|
21
21
|
specifier: ^3.0.0
|
|
22
22
|
version: 3.0.0
|
|
23
|
+
'@rollup/plugin-yaml':
|
|
24
|
+
specifier: ^4.1.2
|
|
25
|
+
version: 4.1.2
|
|
23
26
|
'@types/js-yaml':
|
|
24
27
|
specifier: ^4.0.9
|
|
25
28
|
version: 4.0.9
|
|
@@ -82,13 +85,13 @@ dependencies:
|
|
|
82
85
|
version: 5.6.3
|
|
83
86
|
unocss:
|
|
84
87
|
specifier: ^0.63.4
|
|
85
|
-
version: 0.63.4(postcss@8.4.45)(vite@5.4.
|
|
88
|
+
version: 0.63.4(postcss@8.4.45)(vite@5.4.9)
|
|
86
89
|
url:
|
|
87
90
|
specifier: ^0.11.4
|
|
88
91
|
version: 0.11.4
|
|
89
92
|
vite-plugin-virtual:
|
|
90
93
|
specifier: ^0.3.0
|
|
91
|
-
version: 0.3.0(vite@5.4.
|
|
94
|
+
version: 0.3.0(vite@5.4.9)
|
|
92
95
|
zod:
|
|
93
96
|
specifier: ^3.23.8
|
|
94
97
|
version: 3.23.8
|
|
@@ -100,9 +103,6 @@ devDependencies:
|
|
|
100
103
|
'@astrojs/check':
|
|
101
104
|
specifier: ^0.9.4
|
|
102
105
|
version: 0.9.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.3)
|
|
103
|
-
'@rollup/plugin-yaml':
|
|
104
|
-
specifier: ^4.1.2
|
|
105
|
-
version: 4.1.2
|
|
106
106
|
prettier:
|
|
107
107
|
specifier: 3.3.3
|
|
108
108
|
version: 3.3.3
|
|
@@ -1523,7 +1523,7 @@ packages:
|
|
|
1523
1523
|
'@rollup/pluginutils': 5.1.0
|
|
1524
1524
|
js-yaml: 4.1.0
|
|
1525
1525
|
tosource: 2.0.0-alpha.3
|
|
1526
|
-
dev:
|
|
1526
|
+
dev: false
|
|
1527
1527
|
|
|
1528
1528
|
/@rollup/pluginutils@5.1.0:
|
|
1529
1529
|
resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==}
|
|
@@ -1537,7 +1537,7 @@ packages:
|
|
|
1537
1537
|
'@types/estree': 1.0.5
|
|
1538
1538
|
estree-walker: 2.0.2
|
|
1539
1539
|
picomatch: 2.3.1
|
|
1540
|
-
dev:
|
|
1540
|
+
dev: false
|
|
1541
1541
|
|
|
1542
1542
|
/@rollup/pluginutils@5.1.2:
|
|
1543
1543
|
resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==}
|
|
@@ -1771,6 +1771,7 @@ packages:
|
|
|
1771
1771
|
|
|
1772
1772
|
/@types/estree@1.0.5:
|
|
1773
1773
|
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
|
|
1774
|
+
dev: false
|
|
1774
1775
|
|
|
1775
1776
|
/@types/hast@3.0.4:
|
|
1776
1777
|
resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
|
|
@@ -1824,7 +1825,7 @@ packages:
|
|
|
1824
1825
|
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
|
1825
1826
|
dev: false
|
|
1826
1827
|
|
|
1827
|
-
/@unocss/astro@0.63.4(vite@5.4.
|
|
1828
|
+
/@unocss/astro@0.63.4(vite@5.4.9):
|
|
1828
1829
|
resolution: {integrity: sha512-qu1uMDUT8lXU3mm5EjZpnizvjSYtfY0TTDivR5QNm1i3Xd+ErHfdfOpXdJ2mYvxv+X7C570//KUugkTI3Mb3kQ==}
|
|
1829
1830
|
peerDependencies:
|
|
1830
1831
|
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0
|
|
@@ -1834,8 +1835,8 @@ packages:
|
|
|
1834
1835
|
dependencies:
|
|
1835
1836
|
'@unocss/core': 0.63.4
|
|
1836
1837
|
'@unocss/reset': 0.63.4
|
|
1837
|
-
'@unocss/vite': 0.63.4(vite@5.4.
|
|
1838
|
-
vite: 5.4.
|
|
1838
|
+
'@unocss/vite': 0.63.4(vite@5.4.9)
|
|
1839
|
+
vite: 5.4.9(sass@1.80.2)
|
|
1839
1840
|
transitivePeerDependencies:
|
|
1840
1841
|
- rollup
|
|
1841
1842
|
- supports-color
|
|
@@ -2008,7 +2009,7 @@ packages:
|
|
|
2008
2009
|
'@unocss/core': 0.63.4
|
|
2009
2010
|
dev: false
|
|
2010
2011
|
|
|
2011
|
-
/@unocss/vite@0.63.4(vite@5.4.
|
|
2012
|
+
/@unocss/vite@0.63.4(vite@5.4.9):
|
|
2012
2013
|
resolution: {integrity: sha512-YK0L177GD8Kx+JtfiCJy4YyBYckAXo4ogC8LZ+pYVNXDMN+F+XItpGI/ofLRaGIaewNg+MJgGY+CQZceABEAfg==}
|
|
2013
2014
|
peerDependencies:
|
|
2014
2015
|
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0
|
|
@@ -2021,7 +2022,7 @@ packages:
|
|
|
2021
2022
|
chokidar: 3.6.0
|
|
2022
2023
|
magic-string: 0.30.11
|
|
2023
2024
|
tinyglobby: 0.2.9
|
|
2024
|
-
vite: 5.4.
|
|
2025
|
+
vite: 5.4.9(sass@1.80.2)
|
|
2025
2026
|
transitivePeerDependencies:
|
|
2026
2027
|
- rollup
|
|
2027
2028
|
- supports-color
|
|
@@ -2226,6 +2227,7 @@ packages:
|
|
|
2226
2227
|
|
|
2227
2228
|
/argparse@2.0.1:
|
|
2228
2229
|
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
|
2230
|
+
dev: false
|
|
2229
2231
|
|
|
2230
2232
|
/aria-query@5.3.2:
|
|
2231
2233
|
resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}
|
|
@@ -3020,6 +3022,7 @@ packages:
|
|
|
3020
3022
|
|
|
3021
3023
|
/estree-walker@2.0.2:
|
|
3022
3024
|
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
|
|
3025
|
+
dev: false
|
|
3023
3026
|
|
|
3024
3027
|
/estree-walker@3.0.3:
|
|
3025
3028
|
resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
|
|
@@ -3660,6 +3663,7 @@ packages:
|
|
|
3660
3663
|
hasBin: true
|
|
3661
3664
|
dependencies:
|
|
3662
3665
|
argparse: 2.0.1
|
|
3666
|
+
dev: false
|
|
3663
3667
|
|
|
3664
3668
|
/jsesc@3.0.2:
|
|
3665
3669
|
resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
|
|
@@ -5693,7 +5697,7 @@ packages:
|
|
|
5693
5697
|
/tosource@2.0.0-alpha.3:
|
|
5694
5698
|
resolution: {integrity: sha512-KAB2lrSS48y91MzFPFuDg4hLbvDiyTjOVgaK7Erw+5AmZXNq4sFRVn8r6yxSLuNs15PaokrDRpS61ERY9uZOug==}
|
|
5695
5699
|
engines: {node: '>=10'}
|
|
5696
|
-
dev:
|
|
5700
|
+
dev: false
|
|
5697
5701
|
|
|
5698
5702
|
/totalist@3.0.1:
|
|
5699
5703
|
resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
|
|
@@ -5858,7 +5862,7 @@ packages:
|
|
|
5858
5862
|
unist-util-visit-parents: 6.0.1
|
|
5859
5863
|
dev: false
|
|
5860
5864
|
|
|
5861
|
-
/unocss@0.63.4(postcss@8.4.45)(vite@5.4.
|
|
5865
|
+
/unocss@0.63.4(postcss@8.4.45)(vite@5.4.9):
|
|
5862
5866
|
resolution: {integrity: sha512-MQ/ktuJ2MoXBsd117DEONFubJRQN6Og4mQJLbT+0nna2aTW4jYJESJ479mJYWq/ajonxEaM+zrf8M92VIWxzEw==}
|
|
5863
5867
|
engines: {node: '>=14'}
|
|
5864
5868
|
peerDependencies:
|
|
@@ -5870,7 +5874,7 @@ packages:
|
|
|
5870
5874
|
vite:
|
|
5871
5875
|
optional: true
|
|
5872
5876
|
dependencies:
|
|
5873
|
-
'@unocss/astro': 0.63.4(vite@5.4.
|
|
5877
|
+
'@unocss/astro': 0.63.4(vite@5.4.9)
|
|
5874
5878
|
'@unocss/cli': 0.63.4
|
|
5875
5879
|
'@unocss/core': 0.63.4
|
|
5876
5880
|
'@unocss/postcss': 0.63.4(postcss@8.4.45)
|
|
@@ -5886,8 +5890,8 @@ packages:
|
|
|
5886
5890
|
'@unocss/transformer-compile-class': 0.63.4
|
|
5887
5891
|
'@unocss/transformer-directives': 0.63.4
|
|
5888
5892
|
'@unocss/transformer-variant-group': 0.63.4
|
|
5889
|
-
'@unocss/vite': 0.63.4(vite@5.4.
|
|
5890
|
-
vite: 5.4.
|
|
5893
|
+
'@unocss/vite': 0.63.4(vite@5.4.9)
|
|
5894
|
+
vite: 5.4.9(sass@1.80.2)
|
|
5891
5895
|
transitivePeerDependencies:
|
|
5892
5896
|
- postcss
|
|
5893
5897
|
- rollup
|
|
@@ -5938,51 +5942,12 @@ packages:
|
|
|
5938
5942
|
vfile-message: 4.0.2
|
|
5939
5943
|
dev: false
|
|
5940
5944
|
|
|
5941
|
-
/vite-plugin-virtual@0.3.0(vite@5.4.
|
|
5945
|
+
/vite-plugin-virtual@0.3.0(vite@5.4.9):
|
|
5942
5946
|
resolution: {integrity: sha512-TOtrWw6jKrJNXfxhGRUiQzfAP1gRkYkVzMkJNjHUJ8idLuxf8eeeDKZKZHhdeYfaCc/87rv+KvWE2iCy1QInWA==}
|
|
5943
5947
|
peerDependencies:
|
|
5944
5948
|
vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0
|
|
5945
5949
|
dependencies:
|
|
5946
|
-
vite: 5.4.
|
|
5947
|
-
dev: false
|
|
5948
|
-
|
|
5949
|
-
/vite@5.4.3(sass@1.80.2):
|
|
5950
|
-
resolution: {integrity: sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==}
|
|
5951
|
-
engines: {node: ^18.0.0 || >=20.0.0}
|
|
5952
|
-
hasBin: true
|
|
5953
|
-
peerDependencies:
|
|
5954
|
-
'@types/node': ^18.0.0 || >=20.0.0
|
|
5955
|
-
less: '*'
|
|
5956
|
-
lightningcss: ^1.21.0
|
|
5957
|
-
sass: '*'
|
|
5958
|
-
sass-embedded: '*'
|
|
5959
|
-
stylus: '*'
|
|
5960
|
-
sugarss: '*'
|
|
5961
|
-
terser: ^5.4.0
|
|
5962
|
-
peerDependenciesMeta:
|
|
5963
|
-
'@types/node':
|
|
5964
|
-
optional: true
|
|
5965
|
-
less:
|
|
5966
|
-
optional: true
|
|
5967
|
-
lightningcss:
|
|
5968
|
-
optional: true
|
|
5969
|
-
sass:
|
|
5970
|
-
optional: true
|
|
5971
|
-
sass-embedded:
|
|
5972
|
-
optional: true
|
|
5973
|
-
stylus:
|
|
5974
|
-
optional: true
|
|
5975
|
-
sugarss:
|
|
5976
|
-
optional: true
|
|
5977
|
-
terser:
|
|
5978
|
-
optional: true
|
|
5979
|
-
dependencies:
|
|
5980
|
-
esbuild: 0.21.5
|
|
5981
|
-
postcss: 8.4.45
|
|
5982
|
-
rollup: 4.21.2
|
|
5983
|
-
sass: 1.80.2
|
|
5984
|
-
optionalDependencies:
|
|
5985
|
-
fsevents: 2.3.3
|
|
5950
|
+
vite: 5.4.9(sass@1.80.2)
|
|
5986
5951
|
dev: false
|
|
5987
5952
|
|
|
5988
5953
|
/vite@5.4.9(sass@1.80.2):
|
package/src/blocks/Contact.astro
CHANGED
|
@@ -13,35 +13,6 @@ import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
|
13
13
|
import Text from 'fulldev-ui/components/Text.astro'
|
|
14
14
|
import Textarea from 'fulldev-ui/components/Textarea.astro'
|
|
15
15
|
|
|
16
|
-
// interface Channel {
|
|
17
|
-
// type: 'tel' | 'email' | 'address'
|
|
18
|
-
// text: string
|
|
19
|
-
// heading?: string
|
|
20
|
-
// icon?: string
|
|
21
|
-
// href?: string
|
|
22
|
-
// }
|
|
23
|
-
|
|
24
|
-
// interface FormField {
|
|
25
|
-
// type: 'text' | 'email' | 'tel' | 'textarea'
|
|
26
|
-
// name: string
|
|
27
|
-
// label: string
|
|
28
|
-
// required?: boolean
|
|
29
|
-
// }
|
|
30
|
-
|
|
31
|
-
// interface Form {
|
|
32
|
-
// fields: FormField[]
|
|
33
|
-
// button: string
|
|
34
|
-
// }
|
|
35
|
-
|
|
36
|
-
// type Props<As extends HTMLTag = 'section'> = ComponentProps<
|
|
37
|
-
// typeof Section<As>
|
|
38
|
-
// > & {
|
|
39
|
-
// form: Form
|
|
40
|
-
// googleMaps?: string
|
|
41
|
-
// socials?: any
|
|
42
|
-
// channels: Channel[]
|
|
43
|
-
// }
|
|
44
|
-
|
|
45
16
|
const {
|
|
46
17
|
heading,
|
|
47
18
|
form,
|
|
@@ -53,7 +24,7 @@ const {
|
|
|
53
24
|
position,
|
|
54
25
|
image,
|
|
55
26
|
channels,
|
|
56
|
-
level =
|
|
27
|
+
level = 1,
|
|
57
28
|
...rest
|
|
58
29
|
} = Astro.props
|
|
59
30
|
---
|
|
@@ -69,6 +40,7 @@ const {
|
|
|
69
40
|
text={tagline}
|
|
70
41
|
/>
|
|
71
42
|
<Heading
|
|
43
|
+
size={'sm'}
|
|
72
44
|
level={level}
|
|
73
45
|
text={heading}
|
|
74
46
|
/>
|
|
@@ -106,6 +78,7 @@ const {
|
|
|
106
78
|
<Button
|
|
107
79
|
type="submit"
|
|
108
80
|
color="brand"
|
|
81
|
+
variant="primary"
|
|
109
82
|
text={form.button}
|
|
110
83
|
/>
|
|
111
84
|
</Form>
|
|
@@ -126,6 +99,10 @@ const {
|
|
|
126
99
|
align-items: flex-start;
|
|
127
100
|
}
|
|
128
101
|
|
|
102
|
+
> .column {
|
|
103
|
+
gap: var(--space-5);
|
|
104
|
+
}
|
|
105
|
+
|
|
129
106
|
.channel + .channel {
|
|
130
107
|
margin-top: var(--space-3) !important;
|
|
131
108
|
}
|
package/src/blocks/Intro.astro
CHANGED
|
@@ -8,7 +8,7 @@ const { image, ...rest } = Astro.props
|
|
|
8
8
|
class:list="intro"
|
|
9
9
|
structure="column"
|
|
10
10
|
size="sm"
|
|
11
|
-
level={
|
|
11
|
+
level={1}
|
|
12
12
|
{...rest}
|
|
13
13
|
/>
|
|
14
14
|
|
|
@@ -16,6 +16,8 @@ const { image, ...rest } = Astro.props
|
|
|
16
16
|
@layer fulldev {
|
|
17
17
|
.intro {
|
|
18
18
|
border-bottom: 1px solid var(--base-6);
|
|
19
|
+
padding-top: var(--space-7);
|
|
20
|
+
padding-bottom: var(--space-7);
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
</style>
|
|
@@ -9,6 +9,7 @@ import Image from 'fulldev-ui/components/Image.astro'
|
|
|
9
9
|
import Writeup from 'fulldev-ui/components/Writeup.astro'
|
|
10
10
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
11
11
|
import Icon from './Icon.astro'
|
|
12
|
+
import Price from './Price.astro'
|
|
12
13
|
|
|
13
14
|
interface Props
|
|
14
15
|
extends GlobalProps,
|
|
@@ -22,9 +23,11 @@ interface Props
|
|
|
22
23
|
variant?: ComponentProps<typeof Button>['variant']
|
|
23
24
|
align?: ComponentProps<typeof Writeup>['align']
|
|
24
25
|
icon?: ComponentProps<typeof Icon>['name']
|
|
26
|
+
price?: ComponentProps<typeof Price>['value']
|
|
25
27
|
slug?: CollectionEntry<'pages'>['slug'] | undefined
|
|
26
28
|
id?: any
|
|
27
29
|
panel?: boolean | undefined
|
|
30
|
+
title?: ComponentProps<typeof Writeup>['heading']
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
const { slug } = Astro.props
|
|
@@ -47,12 +50,14 @@ const {
|
|
|
47
50
|
heading,
|
|
48
51
|
text,
|
|
49
52
|
variant,
|
|
53
|
+
price,
|
|
50
54
|
list,
|
|
51
55
|
button,
|
|
52
56
|
buttons,
|
|
53
57
|
panel,
|
|
54
58
|
image,
|
|
55
59
|
icon,
|
|
60
|
+
title,
|
|
56
61
|
images,
|
|
57
62
|
position,
|
|
58
63
|
...rest
|
|
@@ -81,14 +86,15 @@ const {
|
|
|
81
86
|
</slot>
|
|
82
87
|
<slot name="writeup">
|
|
83
88
|
<Writeup
|
|
89
|
+
heading={heading || title}
|
|
84
90
|
{level}
|
|
85
91
|
{rating}
|
|
86
92
|
{badge}
|
|
87
93
|
{tagline}
|
|
88
|
-
{heading}
|
|
89
94
|
{text}
|
|
90
95
|
{list}
|
|
91
96
|
/>
|
|
97
|
+
<Price value={price} />
|
|
92
98
|
</slot>
|
|
93
99
|
<slot name="buttons">
|
|
94
100
|
<Button
|
|
@@ -121,12 +127,12 @@ const {
|
|
|
121
127
|
&[href] {
|
|
122
128
|
cursor: pointer;
|
|
123
129
|
|
|
124
|
-
> .
|
|
125
|
-
transition: all;
|
|
130
|
+
> .image {
|
|
131
|
+
transition: all 0.2s ease;
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
&:hover {
|
|
129
|
-
> .
|
|
135
|
+
> .image {
|
|
130
136
|
opacity: 0.8;
|
|
131
137
|
}
|
|
132
138
|
}
|
|
@@ -53,9 +53,8 @@ const {
|
|
|
53
53
|
>
|
|
54
54
|
<Element class:list="column">
|
|
55
55
|
<Logo
|
|
56
|
-
id={logo}
|
|
57
|
-
src={logo}
|
|
58
56
|
{company}
|
|
57
|
+
{...typeof logo === 'string' ? { src: logo } : logo}
|
|
59
58
|
/>
|
|
60
59
|
<Text
|
|
61
60
|
color="base"
|
|
@@ -110,6 +109,7 @@ const {
|
|
|
110
109
|
align-items: flex-start;
|
|
111
110
|
gap: var(--space-6);
|
|
112
111
|
margin-top: auto;
|
|
112
|
+
margin-top: auto;
|
|
113
113
|
border-top-width: 1px;
|
|
114
114
|
border-color: var(--base-a6);
|
|
115
115
|
background-color: var(--base-2);
|
|
@@ -3,6 +3,7 @@ component: DocsLayout
|
|
|
3
3
|
sidebar: true
|
|
4
4
|
header: false
|
|
5
5
|
banner: false
|
|
6
|
+
toc: true
|
|
6
7
|
|
|
7
8
|
navigation:
|
|
8
9
|
company: Fulldev UI
|
|
@@ -49,11 +50,10 @@ navigation:
|
|
|
49
50
|
- blocks/intro
|
|
50
51
|
- blocks/posts
|
|
51
52
|
- blocks/reviews
|
|
52
|
-
- heading: Layouts
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- layouts/docslayout
|
|
53
|
+
# - heading: Layouts
|
|
54
|
+
# buttons:
|
|
55
|
+
# - layouts/layout
|
|
56
|
+
# - layouts/docslayout
|
|
57
57
|
- heading: Schemas
|
|
58
58
|
buttons:
|
|
59
59
|
- schemas/page
|
package/src/integration/index.ts
CHANGED
|
@@ -3,9 +3,6 @@ import type { AstroIntegration } from 'astro'
|
|
|
3
3
|
import favicons from 'astro-favicons'
|
|
4
4
|
import type { CollectionEntry } from 'astro:content'
|
|
5
5
|
import merge from 'deepmerge'
|
|
6
|
-
import fs from 'fs/promises'
|
|
7
|
-
import yaml from 'js-yaml'
|
|
8
|
-
import path from 'path'
|
|
9
6
|
import virtual from 'vite-plugin-virtual'
|
|
10
7
|
import { generateRadixColors } from './generate-colors'
|
|
11
8
|
|
|
@@ -21,7 +18,7 @@ interface Config {
|
|
|
21
18
|
css?: string
|
|
22
19
|
basePreset?: CollectionEntry<'presets'>['id']
|
|
23
20
|
injectRoutes?: boolean
|
|
24
|
-
generateImageEntries?: boolean
|
|
21
|
+
// generateImageEntries?: boolean
|
|
25
22
|
colors: {
|
|
26
23
|
theme: 'light' | 'dark'
|
|
27
24
|
light?: Color | undefined
|
|
@@ -38,7 +35,7 @@ const defaultConfig: Config = {
|
|
|
38
35
|
brand: '#000',
|
|
39
36
|
},
|
|
40
37
|
},
|
|
41
|
-
generateImageEntries: false,
|
|
38
|
+
// generateImageEntries: false,
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
export default function fulldevIntegration(
|
|
@@ -174,33 +171,33 @@ export default function fulldevIntegration(
|
|
|
174
171
|
// ----------------------
|
|
175
172
|
// Generate image YAML files
|
|
176
173
|
// ----------------------
|
|
177
|
-
if (config.generateImageEntries) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
174
|
+
// if (config.generateImageEntries) {
|
|
175
|
+
// const srcDir = path.join(process.cwd(), 'src')
|
|
176
|
+
// const filesDir = path.join(srcDir, 'images')
|
|
177
|
+
// const entriesDir = path.join(srcDir, 'content', 'images')
|
|
178
|
+
|
|
179
|
+
// try {
|
|
180
|
+
// await fs.mkdir(filesDir, { recursive: true })
|
|
181
|
+
// await fs.mkdir(entriesDir, { recursive: true })
|
|
182
|
+
|
|
183
|
+
// const files = await fs.readdir(filesDir)
|
|
184
|
+
// files.forEach(async (file) => {
|
|
185
|
+
// const filename = path.parse(file).name
|
|
186
|
+
// const yamlPath = path.join(entriesDir, `${filename}.yml`)
|
|
187
|
+
|
|
188
|
+
// try {
|
|
189
|
+
// await fs.access(yamlPath)
|
|
190
|
+
// } catch {
|
|
191
|
+
// const yamlContent = yaml.dump({
|
|
192
|
+
// alt: '',
|
|
193
|
+
// })
|
|
194
|
+
// await fs.writeFile(yamlPath, yamlContent, 'utf8')
|
|
195
|
+
// }
|
|
196
|
+
// })
|
|
197
|
+
// } catch (error) {
|
|
198
|
+
// console.error('Error generating image YAML files:', error)
|
|
199
|
+
// }
|
|
200
|
+
// }
|
|
204
201
|
|
|
205
202
|
// ----------------------
|
|
206
203
|
// Inject routes
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
3
|
import type { CollectionEntry } from 'astro:content'
|
|
4
|
+
import Article from 'fulldev-ui/blocks/Article.astro'
|
|
4
5
|
import Banner from 'fulldev-ui/blocks/Banner.astro'
|
|
5
6
|
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
6
7
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
@@ -77,14 +78,20 @@ const {
|
|
|
77
78
|
/>
|
|
78
79
|
</slot>
|
|
79
80
|
<main data-pagefind-body>
|
|
80
|
-
<slot
|
|
81
|
-
|
|
81
|
+
<slot>
|
|
82
|
+
<Article />
|
|
83
|
+
<Sections {sections} />
|
|
84
|
+
</slot>
|
|
82
85
|
</main>
|
|
83
86
|
<slot name="toc">
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
{
|
|
88
|
+
toc && (
|
|
89
|
+
<Toc
|
|
90
|
+
{render}
|
|
91
|
+
{...toc}
|
|
92
|
+
/>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
88
95
|
</slot>
|
|
89
96
|
</div>
|
|
90
97
|
<slot name="footer">
|
|
@@ -105,25 +112,28 @@ const {
|
|
|
105
112
|
|
|
106
113
|
body {
|
|
107
114
|
--screen: 100vw;
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
108
117
|
|
|
109
118
|
background-color: var(--base-2);
|
|
110
119
|
width: 100%;
|
|
120
|
+
min-height: 100vh;
|
|
111
121
|
color: var(--base-11);
|
|
112
122
|
|
|
113
123
|
.core {
|
|
114
124
|
display: flex;
|
|
115
125
|
position: relative;
|
|
126
|
+
flex-grow: 1;
|
|
127
|
+
height: 100%;
|
|
116
128
|
|
|
117
129
|
main {
|
|
118
130
|
--screen: 1280px;
|
|
119
|
-
|
|
120
131
|
display: flex;
|
|
121
132
|
flex: 1;
|
|
122
133
|
flex-direction: column;
|
|
123
134
|
background-color: var(--color-background);
|
|
124
135
|
width: 100%;
|
|
125
136
|
max-width: 100vw;
|
|
126
|
-
min-height: 100vh;
|
|
127
137
|
overflow-x: hidden;
|
|
128
138
|
}
|
|
129
139
|
}
|
|
@@ -6,16 +6,15 @@ import Intro from 'fulldev-ui/blocks/Intro.astro'
|
|
|
6
6
|
import Products from 'fulldev-ui/blocks/Products.astro'
|
|
7
7
|
import Sections from 'fulldev-ui/components/sections.astro'
|
|
8
8
|
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { getFolderChildren } from 'fulldev-ui/utils/getFolderChildren.ts'
|
|
10
|
+
import { getReferenceChildren } from 'fulldev-ui/utils/getReferenceChildren'
|
|
11
11
|
|
|
12
12
|
type Props = ComponentProps<typeof Layout>
|
|
13
13
|
|
|
14
14
|
const { slug, sections, title, description } = Astro.props
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
// const siblingPages = await getSiblingPages(slug)
|
|
16
|
+
const folderChildren = await getFolderChildren(slug)
|
|
17
|
+
const referenceChildren = await getReferenceChildren(slug)
|
|
19
18
|
---
|
|
20
19
|
|
|
21
20
|
<Layout {...Astro.props}>
|
|
@@ -24,12 +23,14 @@ const categoryPages = await getCategoryPages(slug)
|
|
|
24
23
|
text={description}
|
|
25
24
|
/>
|
|
26
25
|
<Categories
|
|
27
|
-
|
|
26
|
+
component="Categories"
|
|
27
|
+
cards={folderChildren}
|
|
28
28
|
structure="grid"
|
|
29
29
|
panel
|
|
30
30
|
/>
|
|
31
31
|
<Products
|
|
32
|
-
|
|
32
|
+
component="Products"
|
|
33
|
+
cards={referenceChildren}
|
|
33
34
|
structure="grid"
|
|
34
35
|
/>
|
|
35
36
|
<Article style={{ '--screen': '768px' }} />
|
|
@@ -2,9 +2,12 @@ import { z } from 'astro:content'
|
|
|
2
2
|
import buttons from './buttons'
|
|
3
3
|
import logo from './logo'
|
|
4
4
|
|
|
5
|
-
export default z
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export default z.boolean().or(
|
|
6
|
+
z
|
|
7
|
+
.object({
|
|
8
|
+
logo,
|
|
9
|
+
buttons,
|
|
10
|
+
})
|
|
11
|
+
.partial()
|
|
12
|
+
.passthrough()
|
|
13
|
+
)
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { getEntries, getEntry, z } from 'astro:content'
|
|
2
2
|
import { assign } from 'radash'
|
|
3
3
|
import fulldevConfig from 'virtual:fulldev-ui/config'
|
|
4
|
+
import footer from './components/footer'
|
|
5
|
+
import header from './components/header'
|
|
4
6
|
import image from './components/image'
|
|
5
7
|
import images from './components/images'
|
|
6
8
|
import sections from './components/sections'
|
|
7
|
-
import categories from './utils/categories'
|
|
8
9
|
import component from './utils/component'
|
|
9
10
|
import navigation from './utils/navigation'
|
|
11
|
+
import parents from './utils/parents'
|
|
10
12
|
import pathSchema from './utils/pathSchema'
|
|
11
13
|
|
|
12
14
|
const i18n = z
|
|
@@ -49,7 +51,7 @@ export default i18n.pipe(presets).pipe(
|
|
|
49
51
|
z
|
|
50
52
|
.object({
|
|
51
53
|
component,
|
|
52
|
-
|
|
54
|
+
parents,
|
|
53
55
|
theme: z.enum(['light', 'dark']),
|
|
54
56
|
lang: z.string(),
|
|
55
57
|
seo: z
|
|
@@ -63,11 +65,12 @@ export default i18n.pipe(presets).pipe(
|
|
|
63
65
|
image,
|
|
64
66
|
images,
|
|
65
67
|
sections,
|
|
66
|
-
header
|
|
67
|
-
footer
|
|
68
|
+
header,
|
|
69
|
+
footer,
|
|
68
70
|
navigation,
|
|
69
71
|
toc: z.any(),
|
|
70
72
|
sidebar: z.any(),
|
|
73
|
+
banner: z.any(),
|
|
71
74
|
})
|
|
72
75
|
.partial()
|
|
73
76
|
.passthrough()
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
+
import footer from './components/footer'
|
|
3
|
+
import header from './components/header'
|
|
2
4
|
import image from './components/image'
|
|
3
5
|
import sections from './components/sections'
|
|
4
|
-
import categories from './utils/categories'
|
|
5
6
|
import component from './utils/component'
|
|
7
|
+
import navigation from './utils/navigation'
|
|
8
|
+
import parents from './utils/parents'
|
|
6
9
|
|
|
7
10
|
export default z
|
|
8
11
|
.object({
|
|
9
12
|
component,
|
|
10
|
-
|
|
13
|
+
parents,
|
|
11
14
|
theme: z.enum(['light', 'dark']),
|
|
12
15
|
lang: z.string(),
|
|
13
16
|
seo: z
|
|
@@ -20,10 +23,11 @@ export default z
|
|
|
20
23
|
description: z.string().optional(),
|
|
21
24
|
image,
|
|
22
25
|
sections,
|
|
23
|
-
header
|
|
24
|
-
footer
|
|
25
|
-
navigation
|
|
26
|
+
header,
|
|
27
|
+
footer,
|
|
28
|
+
navigation,
|
|
26
29
|
toc: z.any(),
|
|
27
30
|
sidebar: z.any(),
|
|
28
31
|
})
|
|
29
32
|
.partial()
|
|
33
|
+
.passthrough()
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// })
|
|
18
18
|
|
|
19
19
|
import { z } from 'astro:content'
|
|
20
|
+
import logo from '../components/logo'
|
|
20
21
|
import pathSchema from '../utils/pathSchema'
|
|
21
22
|
|
|
22
23
|
const button = pathSchema('pages').or(
|
|
@@ -43,7 +44,7 @@ const group = z
|
|
|
43
44
|
|
|
44
45
|
export default z
|
|
45
46
|
.object({
|
|
46
|
-
logo
|
|
47
|
+
logo,
|
|
47
48
|
search: z.boolean(),
|
|
48
49
|
sidebar: z.boolean(),
|
|
49
50
|
toc: z.boolean(),
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { getCollection, type CollectionEntry } from 'astro:content'
|
|
2
2
|
|
|
3
3
|
// Records that are in a folder with the current page's slug
|
|
4
|
-
export const
|
|
4
|
+
export const getFolderChildren = async (
|
|
5
|
+
slug: CollectionEntry<'pages'>['slug']
|
|
6
|
+
) =>
|
|
5
7
|
(
|
|
6
8
|
await getCollection(
|
|
7
9
|
'pages',
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { getCollection, type CollectionEntry } from 'astro:content'
|
|
2
2
|
|
|
3
3
|
// Pages that reference the current page
|
|
4
|
-
export const
|
|
4
|
+
export const getReferenceChildren = async (
|
|
5
5
|
slug: CollectionEntry<'pages'>['slug']
|
|
6
6
|
) =>
|
|
7
7
|
(
|
|
8
8
|
await getCollection('pages', (page) =>
|
|
9
|
-
page.data?.
|
|
9
|
+
page.data?.parents?.some((p: any) => p.slug === slug)
|
|
10
10
|
)
|
|
11
|
-
)?.map((
|
|
11
|
+
)?.map(({ slug, data }) => ({
|
|
12
|
+
...data,
|
|
13
|
+
href: `/${slug}/`,
|
|
14
|
+
}))
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
presets: [docs, blocks]
|
|
3
|
-
|
|
4
|
-
title: PageLayout
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
```astro live
|
|
8
|
-
---
|
|
9
|
-
import Hero from 'fulldev-ui/blocks/Hero.astro'
|
|
10
|
-
import PageLayout from 'fulldev-ui/layouts/PageLayout.astro'
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<PageLayout>
|
|
14
|
-
<Hero
|
|
15
|
-
heading="PageLayout"
|
|
16
|
-
text="The PageLayout component is used to wrap the content of a page."
|
|
17
|
-
align="center"
|
|
18
|
-
frame="viewport"
|
|
19
|
-
/>
|
|
20
|
-
</PageLayout>
|
|
21
|
-
```
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps } from 'astro/types'
|
|
3
|
-
import Article from 'fulldev-ui/blocks/Article.astro'
|
|
4
|
-
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
5
|
-
|
|
6
|
-
type Props = ComponentProps<typeof Layout>
|
|
7
|
-
|
|
8
|
-
const { sections, ...rest } = Astro.props
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<Layout
|
|
12
|
-
class:list="content-layout"
|
|
13
|
-
{...rest}
|
|
14
|
-
>
|
|
15
|
-
<Article />
|
|
16
|
-
</Layout>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps } from 'astro/types'
|
|
3
|
-
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
4
|
-
|
|
5
|
-
type Props = ComponentProps<typeof Layout>
|
|
6
|
-
|
|
7
|
-
const { ...rest } = Astro.props
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Layout
|
|
11
|
-
class:list="page-layout"
|
|
12
|
-
{...rest}
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
15
|
-
</Layout>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps } from 'astro/types'
|
|
3
|
-
import Article from 'fulldev-ui/blocks/Article.astro'
|
|
4
|
-
import Intro from 'fulldev-ui/blocks/Intro.astro'
|
|
5
|
-
import Sections from 'fulldev-ui/components/sections.astro'
|
|
6
|
-
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
7
|
-
|
|
8
|
-
type Props = ComponentProps<typeof Layout>
|
|
9
|
-
|
|
10
|
-
const { render, sections, ...rest } = Astro.props
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<Layout {...Astro.props}>
|
|
14
|
-
<Intro
|
|
15
|
-
align="start"
|
|
16
|
-
{...rest}
|
|
17
|
-
/>
|
|
18
|
-
<Article />
|
|
19
|
-
<Sections {sections} />
|
|
20
|
-
<slot />
|
|
21
|
-
</Layout>
|
|
File without changes
|
|
File without changes
|