fulldev-ui 0.6.0-beta.2 → 0.6.0-beta.3

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.
Files changed (183) hide show
  1. package/package.json +1 -1
  2. package/src/blocks/Banner1.astro +35 -0
  3. package/src/blocks/Contact1.astro +92 -0
  4. package/src/blocks/Cta1.astro +72 -0
  5. package/src/blocks/Feature1.astro +67 -0
  6. package/src/blocks/Footer.astro +47 -54
  7. package/src/blocks/Header1.astro +192 -0
  8. package/src/blocks/Hero1.astro +74 -0
  9. package/src/blocks/Intro1.astro +56 -0
  10. package/src/blocks/Products1.astro +90 -0
  11. package/src/blocks/{Hero.astro → _Hero.astro} +7 -6
  12. package/src/components/Badge.astro +10 -18
  13. package/src/components/Banner.astro +26 -0
  14. package/src/components/Block.astro +49 -0
  15. package/src/components/Blocks.astro +26 -0
  16. package/src/components/Button.astro +10 -23
  17. package/src/components/Card.astro +8 -150
  18. package/src/components/Cart.astro +1 -0
  19. package/src/components/CartSummary.astro +3 -3
  20. package/src/components/Channel.astro +5 -14
  21. package/src/components/Container.astro +25 -0
  22. package/src/components/Drawer.astro +57 -118
  23. package/src/components/DrawerOld.astro +143 -0
  24. package/src/components/Element.astro +2 -0
  25. package/src/components/Form.astro +5 -3
  26. package/src/components/Head.astro +18 -32
  27. package/src/components/Header.astro +8 -105
  28. package/src/components/Heading.astro +29 -70
  29. package/src/components/Icon.astro +6 -4
  30. package/src/components/Link.astro +12 -18
  31. package/src/components/Logo.astro +31 -18
  32. package/src/components/Navigation.astro +39 -0
  33. package/src/components/Panel.astro +25 -0
  34. package/src/components/Paragraph.astro +24 -7
  35. package/src/components/Price.astro +4 -4
  36. package/src/components/Prose.astro +41 -132
  37. package/src/components/Rating.astro +24 -75
  38. package/src/components/Search.astro +4 -3
  39. package/src/components/Section.astro +20 -29
  40. package/src/components/Sidebar.astro +44 -64
  41. package/src/components/Social.astro +9 -2
  42. package/src/components/Tagline.astro +21 -31
  43. package/src/components/Toc.astro +12 -3
  44. package/src/components/_Author.astro +90 -0
  45. package/src/components/_Header.astro +129 -0
  46. package/src/components/_Prose copy.astro +172 -0
  47. package/src/components/_Sidebar copy.astro +87 -0
  48. package/src/content/categories/category.md +7 -0
  49. package/src/content/config.ts +7 -8
  50. package/src/content/docs/components/text.mdx +47 -0
  51. package/src/content/docs/components.mdx +1 -4
  52. package/src/content/docs/index.mdx +1 -4
  53. package/src/content/layouts/base.yml +41 -80
  54. package/src/content/layouts/docs.yml +2 -70
  55. package/src/content/pages/index.mdx +17 -25
  56. package/src/content/{categories/mugs.md → posts/post.md} +1 -1
  57. package/src/content/products/product.md +3 -3
  58. package/src/css/theme.css +2 -0
  59. package/src/images/favicon/android-chrome-192x192.png +0 -0
  60. package/src/images/favicon/android-chrome-512x512.png +0 -0
  61. package/src/images/favicon/apple-touch-icon.png +0 -0
  62. package/src/images/favicon/browserconfig.xml +9 -0
  63. package/src/images/favicon/favicon-16x16.png +0 -0
  64. package/src/images/favicon/favicon-32x32.png +0 -0
  65. package/src/images/favicon/favicon-48x48.png +0 -0
  66. package/src/images/favicon/favicon.ico +0 -0
  67. package/src/images/favicon/favicon.svg +16 -0
  68. package/src/images/favicon/manifest.webmanifest +30 -0
  69. package/src/images/favicon/mstile-150x150.png +0 -0
  70. package/src/images/favicon/safari-pinned-tab.svg +16 -0
  71. package/src/images/favicon/yandex-browser-50x50.png +0 -0
  72. package/src/images/favicon/yandex-browser-manifest.json +9 -0
  73. package/src/integration/index.ts +10 -1
  74. package/src/layouts/CategoryLayout.astro +16 -9
  75. package/src/layouts/DocLayout.astro +49 -7
  76. package/src/layouts/Layout.astro +55 -27
  77. package/src/layouts/PageLayout.astro +12 -5
  78. package/src/layouts/PostLayout.astro +7 -5
  79. package/src/layouts/ProductLayout.astro +12 -7
  80. package/src/pages/test.astro +7 -1
  81. package/src/schemas/blocks/banner.ts +10 -0
  82. package/src/schemas/blocks/categories.ts +14 -0
  83. package/src/schemas/blocks/contact.ts +18 -0
  84. package/src/schemas/blocks/cta.ts +18 -0
  85. package/src/schemas/blocks/feature.ts +18 -0
  86. package/src/schemas/blocks/hero.ts +20 -0
  87. package/src/schemas/blocks/intro.ts +16 -0
  88. package/src/schemas/blocks/products.ts +14 -0
  89. package/src/schemas/categorySchema.ts +8 -8
  90. package/src/schemas/components/avatar.ts +4 -1
  91. package/src/schemas/components/badge.ts +16 -11
  92. package/src/schemas/components/block.ts +18 -0
  93. package/src/schemas/components/button.ts +13 -19
  94. package/src/schemas/components/channel.ts +15 -9
  95. package/src/schemas/components/footer.ts +15 -14
  96. package/src/schemas/components/head.ts +17 -0
  97. package/src/schemas/components/header.ts +19 -16
  98. package/src/schemas/components/heading.ts +7 -1
  99. package/src/schemas/components/icon.ts +7 -1
  100. package/src/schemas/components/image.ts +17 -14
  101. package/src/schemas/components/link.ts +10 -16
  102. package/src/schemas/components/logo.ts +12 -2
  103. package/src/schemas/components/menu.ts +11 -13
  104. package/src/schemas/components/navigation.ts +10 -0
  105. package/src/schemas/components/paragraph.ts +9 -0
  106. package/src/schemas/components/price.ts +9 -0
  107. package/src/schemas/components/rating.ts +8 -13
  108. package/src/schemas/components/sidebar.ts +14 -12
  109. package/src/schemas/components/social.ts +16 -1
  110. package/src/schemas/components/tagline.ts +7 -1
  111. package/src/schemas/docSchema.ts +6 -2
  112. package/src/schemas/imageSchema.ts +30 -1
  113. package/src/schemas/layoutSchema.ts +14 -20
  114. package/src/schemas/pageSchema.ts +9 -12
  115. package/src/schemas/postSchema.ts +6 -8
  116. package/src/schemas/productSchema.ts +18 -18
  117. package/src/types/global-props.ts +0 -9
  118. package/src/types/{virtual-modules.d.ts → virtual.d.ts} +1 -1
  119. package/src/utils/getHref.ts +3 -2
  120. package/tsconfig.json +1 -3
  121. package/example.svelte +0 -0
  122. package/parent.svelte +0 -0
  123. package/src/App.svelte +0 -0
  124. package/src/blocks/Banner.astro +0 -35
  125. package/src/blocks/Categories.astro +0 -12
  126. package/src/blocks/Colleagues.astro +0 -12
  127. package/src/blocks/Contact.astro +0 -117
  128. package/src/blocks/Content.astro +0 -130
  129. package/src/blocks/Cta.astro +0 -13
  130. package/src/blocks/Excerpt.astro +0 -12
  131. package/src/blocks/Features.astro +0 -11
  132. package/src/blocks/Header.astro +0 -7
  133. package/src/blocks/Intro.astro +0 -101
  134. package/src/blocks/Jobs.astro +0 -12
  135. package/src/blocks/Posts.astro +0 -11
  136. package/src/blocks/Prices.astro +0 -24
  137. package/src/blocks/Product.astro +0 -89
  138. package/src/blocks/Products.astro +0 -101
  139. package/src/blocks/Reviews.astro +0 -12
  140. package/src/blocks/_Contact.astro +0 -112
  141. package/src/components/CartForm.astro +0 -120
  142. package/src/components/CartList.astro +0 -122
  143. package/src/components/Lead.astro +0 -46
  144. package/src/components/ProductCard.astro +0 -52
  145. package/src/components/Text.astro +0 -43
  146. package/src/components/Writeup.astro +0 -108
  147. package/src/components/_CartList backup.astro +0 -125
  148. package/src/components/_CartList copy.astro +0 -213
  149. package/src/components/_CartListSimple.astro +0 -148
  150. package/src/components/sections.astro +0 -28
  151. package/src/content/docs/components/lead.mdx +0 -49
  152. package/src/content/docs/components/paragraph.mdx +0 -49
  153. package/src/loaders/imageLoader.ts +0 -26
  154. package/src/schemas/archive/_pageSchema.ts +0 -94
  155. package/src/schemas/components/avatars.ts +0 -4
  156. package/src/schemas/components/banner.ts +0 -3
  157. package/src/schemas/components/buttons.ts +0 -4
  158. package/src/schemas/components/card.ts +0 -43
  159. package/src/schemas/components/cards.ts +0 -4
  160. package/src/schemas/components/channels.ts +0 -4
  161. package/src/schemas/components/global.ts +0 -16
  162. package/src/schemas/components/links.ts +0 -4
  163. package/src/schemas/components/list.ts +0 -3
  164. package/src/schemas/components/section.ts +0 -17
  165. package/src/schemas/components/sections.ts +0 -3
  166. package/src/schemas/components/socials.ts +0 -4
  167. package/src/schemas/components/subheader.ts +0 -10
  168. package/src/schemas/components/text.ts +0 -3
  169. package/src/schemas/components/themer.ts +0 -3
  170. package/src/schemas/components/toc.ts +0 -3
  171. package/src/schemas/components/writeup.ts +0 -20
  172. package/src/schemas/fields/categories.ts +0 -3
  173. package/src/schemas/fields/description.ts +0 -3
  174. package/src/schemas/fields/href.ts +0 -3
  175. package/src/schemas/fields/image.ts +0 -24
  176. package/src/schemas/fields/images.ts +0 -4
  177. package/src/schemas/fields/order.ts +0 -3
  178. package/src/schemas/fields/price.ts +0 -3
  179. package/src/schemas/fields/products.ts +0 -5
  180. package/src/schemas/fields/seo.ts +0 -12
  181. package/src/schemas/fields/soldout.ts +0 -3
  182. package/src/schemas/fields/title.ts +0 -3
  183. package/src/schemas/fields/variants.ts +0 -3
@@ -1,148 +0,0 @@
1
- ---
2
- // import { getCollection } from 'astro:content'
3
- // import Element from 'fulldev-ui/components/Element.astro'
4
- // import Image from 'fulldev-ui/components/Image.astro'
5
- // import Button from './Button.astro'
6
- // import Heading from './Heading.astro'
7
- // import Input from './Input.astro'
8
- // import Price from './Price.astro'
9
-
10
- // const products = await getCollection('products')
11
- ---
12
-
13
- <!-- <RootElement>
14
- <Element
15
- data-target="container"
16
- if={true}
17
- class:list="cart-list"
18
- />
19
-
20
- {
21
- products.map((product) => (
22
- <template data-target={product.slug}>
23
- <Element
24
- data-target="card"
25
- class="cart-list-card"
26
- >
27
- <Image
28
- data-target="image"
29
- src="/placeholder-portrait.webp"
30
- />
31
- <Element class="cart-list-card-segment">
32
- <Element class="cart-list-card-content">
33
- <Heading
34
- data-target="heading"
35
- level={6}
36
- text="Product title"
37
- />
38
- <Price
39
- data-target="price"
40
- value={999}
41
- />
42
- </Element>
43
- <Element class="cart-list-card-actions">
44
- <Input
45
- data-target="input"
46
- type="number"
47
- name="quantity"
48
- value={1}
49
- min={0}
50
- />
51
- <Button
52
- data-target="button"
53
- variant="outline"
54
- icon="trash"
55
- type="button"
56
- />
57
- </Element>
58
- </Element>
59
- </Element>
60
- </template>
61
- ))
62
- }
63
- </RootElement> --><!-- <RootElement>
64
- <Element
65
- data-target="container"
66
- if={true}
67
- class:list="cart-list"
68
- >
69
- {
70
- products.map((product) => (
71
- <Element
72
- data-target={product.slug}
73
- class="cart-list-card"
74
- >
75
- <Image
76
- data-target="image"
77
- src="/placeholder-portrait.webp"
78
- />
79
- <Element class="cart-list-card-segment">
80
- <Element class="cart-list-card-content">
81
- <Heading
82
- data-target="heading"
83
- level={6}
84
- text="Product title"
85
- />
86
- <Price
87
- data-target="price"
88
- value={999}
89
- />
90
- </Element>
91
- <Element class="cart-list-card-actions">
92
- <Input
93
- data-target="input"
94
- type="number"
95
- name="quantity"
96
- value={1}
97
- min={0}
98
- />
99
- <Button
100
- data-target="button"
101
- variant="outline"
102
- icon="trash"
103
- type="button"
104
- />
105
- </Element>
106
- </Element>
107
- </Element>
108
- ))
109
- }
110
- </Element>
111
- </RootElement> --><!-- <script>
112
- RootElement.ready(($) => {
113
- const card = $('151-booster-box')
114
- console.log(card)
115
- })
116
- </script> -->
117
- <style is:global>
118
- @layer fulldev {
119
- .cart-list {
120
- @apply flex flex-col text-foreground;
121
-
122
- .cart-list-card {
123
- @apply flex w-full gap-5;
124
-
125
- &:not(:first-child) {
126
- @apply mt-5 border-t pt-5;
127
- }
128
- }
129
-
130
- .image {
131
- @apply block h-auto w-24;
132
- }
133
-
134
- .cart-list-card-segment {
135
- @apply flex h-full w-full flex-col justify-between gap-4;
136
- }
137
-
138
- .cart-list-card-content,
139
- .cart-list-card-actions {
140
- @apply flex justify-between gap-2;
141
- }
142
-
143
- .input {
144
- @apply w-16;
145
- }
146
- }
147
- }
148
- </style>
@@ -1,28 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLAttributes } from 'astro/types'
3
- import Element from 'fulldev-ui/components/Element.astro'
4
- import type { GlobalProps } from 'fulldev-ui/types/global-props'
5
- import Section from './Section.astro'
6
-
7
- interface Props extends GlobalProps, HTMLAttributes<'div'> {
8
- sections?: ComponentProps<typeof Section>[] | undefined
9
- }
10
-
11
- const { sections, ...rest } = Astro.props
12
- ---
13
-
14
- <Element
15
- class:list="sections"
16
- {...rest}
17
- >
18
- {sections?.map((section) => <Section {...section} />)}
19
- </Element>
20
-
21
- <style is:global >
22
- @layer fulldev {
23
- .sections {
24
- display: flex;
25
- flex-direction: column;
26
- }
27
- }
28
- </style>
@@ -1,49 +0,0 @@
1
- ---
2
- title: Lead
3
- ---
4
-
5
- # Lead
6
-
7
- import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro'
8
-
9
- ```astro live
10
- ---
11
- import Lead from 'fulldev-ui/components/Lead.astro'
12
- ---
13
-
14
- <Lead>The quick brown fox jumps over the lazy dog</Lead>
15
- ```
16
-
17
- ## Props
18
-
19
- <PropsTable />
20
-
21
- ## Examples
22
-
23
- ### `size`
24
-
25
- ```astro live
26
- ---
27
- import Lead from 'fulldev-ui/components/Lead.astro'
28
- ---
29
-
30
- <Lead size="sm">
31
- The quick brown fox jumps over the lazy dog because he is quick
32
- </Lead>
33
- <Lead size="md">
34
- The quick brown fox jumps over the lazy dog because he is quick
35
- </Lead>
36
- <Lead size="lg">
37
- The quick brown fox jumps over the lazy dog because he is quick
38
- </Lead>
39
- ```
40
-
41
- ### `text`
42
-
43
- ```astro live
44
- ---
45
- import Lead from 'fulldev-ui/components/Lead.astro'
46
- ---
47
-
48
- <Lead text="The quick brown fox jumps over the lazy dog" />
49
- ```
@@ -1,49 +0,0 @@
1
- ---
2
- title: Paragraph
3
- ---
4
-
5
- # Paragraph
6
-
7
- import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro'
8
-
9
- ```astro live
10
- ---
11
- import Paragraph from 'fulldev-ui/components/Paragraph.astro'
12
- ---
13
-
14
- <Paragraph>The quick brown fox jumps over the lazy dog</Paragraph>
15
- ```
16
-
17
- ## Props
18
-
19
- <PropsTable />
20
-
21
- ## Examples
22
-
23
- ### `size`
24
-
25
- ```astro live
26
- ---
27
- import Paragraph from 'fulldev-ui/components/Paragraph.astro'
28
- ---
29
-
30
- <Paragraph size="sm">
31
- The quick brown fox jumps over the lazy dog because he is quick
32
- </Paragraph>
33
- <Paragraph size="md">
34
- The quick brown fox jumps over the lazy dog because he is quick
35
- </Paragraph>
36
- <Paragraph size="lg">
37
- The quick brown fox jumps over the lazy dog because he is quick
38
- </Paragraph>
39
- ```
40
-
41
- ### `text`
42
-
43
- ```astro live
44
- ---
45
- import Paragraph from 'fulldev-ui/components/Paragraph.astro'
46
- ---
47
-
48
- <Paragraph text="The quick brown fox jumps over the lazy dog" />
49
- ```
@@ -1,26 +0,0 @@
1
- export default async () => {
2
- const files = import.meta.glob('/src/images/**/*.{webp,png,jpg,jpeg,svg}', {
3
- eager: true,
4
- })
5
- const entries = import.meta.glob('/src/images/**/*.{yml,yaml,json}', {
6
- eager: true,
7
- })
8
-
9
- const allImages = Object.entries(files).map(([src, file]) => {
10
- const id = src.split('/images/').pop()
11
- const matchPath = Object.keys(entries).find(
12
- (entry) => entry.split('.').shift() === src
13
- ) as any
14
- const matchFile = entries[matchPath]
15
- const matchData = matchFile ? (matchFile as any).default : {}
16
- const fileData = file ? (file as any).default : {}
17
- return {
18
- id,
19
- ...fileData,
20
- src,
21
- ...matchData,
22
- }
23
- })
24
-
25
- return allImages as any
26
- }
@@ -1,94 +0,0 @@
1
- // import { getEntries, getEntry, z } from 'astro:content'
2
- // import { assign } from 'radash'
3
- // import footer from '../components/footer'
4
- // import header from '../components/header'
5
- // import image from '../components/image'
6
- // import section from '../components/section'
7
- // import sections from '../components/sections'
8
- // import sidebar from '../components/sidebar'
9
- // import subheader from '../components/subheader'
10
- // import toc from '../components/toc'
11
- // import images from '../fields/images'
12
- // import price from '../fields/price'
13
- // import component from '../utils/component'
14
- // import navigation from '../utils/navigation'
15
- // import pathSchema from '../utils/pathSchema'
16
- // import categories from './utils/categories'
17
-
18
- // export const i18n = z
19
- // .object({
20
- // i18n: pathSchema('pages').optional(),
21
- // })
22
- // .passthrough()
23
- // .transform(async ({ i18n, ...rest }) => {
24
- // if (!i18n) return rest
25
- // const entry = await getEntry(i18n)
26
- // const merged = assign(entry.data, rest) as typeof rest
27
- // return merged as typeof rest
28
- // })
29
-
30
- // export const presets = z
31
- // .object({
32
- // presets: z.array(pathSchema('presets')).optional(),
33
- // })
34
- // .passthrough()
35
- // .transform(async ({ presets, ...rest }) => {
36
- // let mergedData = {}
37
-
38
- // const baseEntry = await getEntry('presets', 'base')
39
- // mergedData = assign(mergedData, baseEntry?.data || {})
40
-
41
- // if (presets) {
42
- // const entries = await getEntries(presets)
43
- // entries.forEach(
44
- // (preset: any) => (mergedData = assign(mergedData, preset.data))
45
- // )
46
- // }
47
-
48
- // mergedData = assign(mergedData, rest)
49
- // return mergedData as typeof rest
50
- // })
51
-
52
- // export const page = z
53
- // .object({
54
- // component,
55
- // categories,
56
- // order: z.number().optional(),
57
- // theme: z.enum(['light', 'dark', 'system']),
58
- // lang: z.string(),
59
- // seo: z
60
- // .object({
61
- // title: z.string().optional(),
62
- // description: z.string().optional(),
63
- // })
64
- // .optional(),
65
- // title: z.string(),
66
- // description: z.string().optional(),
67
- // paragraph: z.string().optional(),
68
- // image,
69
- // images,
70
- // section,
71
- // sections,
72
- // footer,
73
- // header,
74
- // sidebar,
75
- // subheader,
76
- // navigation,
77
- // toc,
78
- // price,
79
- // code: z.any(),
80
- // sizes: z.any(),
81
- // banner: z.any(),
82
- // _schema: z.any(),
83
- // uitverkocht: z.any(),
84
- // rating: z.any(),
85
- // variants: z.any(),
86
- // heading: z.any(),
87
- // href: z.any(),
88
- // next: z.any(),
89
- // prev: z.any(),
90
- // })
91
- // .partial()
92
- // .strict()
93
-
94
- // export default i18n.pipe(presets).pipe(page)
@@ -1,4 +0,0 @@
1
- import { z } from 'astro:content'
2
- import avatar from './avatar'
3
-
4
- export default z.array(avatar)
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.string().optional()
@@ -1,4 +0,0 @@
1
- import { z } from 'astro:content'
2
- import button from './button'
3
-
4
- export default z.array(button)
@@ -1,43 +0,0 @@
1
- import { z } from 'astro:content'
2
- import images from '../fields/images'
3
- import pathSchema from '../utils/pathSchema'
4
- import button from './button'
5
- import buttons from './buttons'
6
- import globalSchema from './global'
7
- import icon from './icon'
8
- import image from './image'
9
-
10
- export const cardSchema = z
11
- .union([pathSchema('pages'), z.object({}).passthrough()])
12
- .pipe(
13
- globalSchema
14
- .extend({
15
- slug: z
16
- .string()
17
- .refine(async (data) => await pathSchema('pages').parseAsync(data)),
18
- image: image,
19
- images: images,
20
- position: z.enum(['background', 'cover', 'inset']),
21
- buttons: buttons,
22
- button: button,
23
- variant: z.string(),
24
- align: z.string().default('start'),
25
- icon: icon,
26
- price: z.number(),
27
- panel: z.boolean().default(true),
28
- title: z.string(),
29
- heading: z.string(),
30
- level: z.number().min(1).max(6).default(4),
31
- badge: z.any(),
32
- tagline: z.string(),
33
- rating: z.number(),
34
- text: z.string(),
35
- list: z.array(z.any()),
36
- })
37
- .partial()
38
- .passthrough()
39
- )
40
-
41
- export type CardSchema = z.infer<typeof cardSchema>
42
-
43
- export default cardSchema
@@ -1,4 +0,0 @@
1
- import { z } from 'astro:content'
2
- import card from './card'
3
-
4
- export default z.array(card)
@@ -1,4 +0,0 @@
1
- import { z } from 'astro:content'
2
- import channel from './channel'
3
-
4
- export default z.array(channel)
@@ -1,16 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export const globalSchema = z
4
- .object({
5
- if: z.any(),
6
- theme: z.enum(['light', 'dark']),
7
- color: z.enum(['base', 'brand']),
8
- size: z.enum(['sm', 'md', 'lg']),
9
- contrast: z.boolean(),
10
- })
11
- .partial()
12
- .passthrough()
13
-
14
- export type GlobalSchema = z.infer<typeof globalSchema>
15
-
16
- export default globalSchema
@@ -1,4 +0,0 @@
1
- import { z } from 'astro:content'
2
- import link from './link'
3
-
4
- export default z.array(link)
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.array(z.string())
@@ -1,17 +0,0 @@
1
- import { reference } from 'astro:content'
2
- import component from '../utils/component'
3
- import buttons from './buttons'
4
- import cards from './cards'
5
- import image from './image'
6
- import writeup from './writeup'
7
-
8
- export default writeup
9
- .extend({
10
- component,
11
- image,
12
- buttons,
13
- cards,
14
- products: reference('products').array().optional(),
15
- })
16
- .partial()
17
- .passthrough()
@@ -1,3 +0,0 @@
1
- import section from './section'
2
-
3
- export default section.array().optional()
@@ -1,4 +0,0 @@
1
- import { z } from 'astro:content'
2
- import social from './social'
3
-
4
- export default z.array(social)
@@ -1,10 +0,0 @@
1
- import { z } from 'astro:content'
2
- import links from './links'
3
-
4
- export default z
5
- .object({
6
- links,
7
- })
8
- .partial()
9
- .passthrough()
10
- .optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.string()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.boolean().optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.string()
@@ -1,20 +0,0 @@
1
- import { z } from 'astro:content'
2
- import price from '../fields/price'
3
- import badge from './badge'
4
- import heading from './heading'
5
- import list from './list'
6
- import rating from './rating'
7
- import tagline from './tagline'
8
- import text from './text'
9
-
10
- export default z
11
- .object({
12
- rating,
13
- badge,
14
- tagline,
15
- heading,
16
- text,
17
- list,
18
- price,
19
- })
20
- .partial()
@@ -1,3 +0,0 @@
1
- import pathSchema from '../utils/pathSchema'
2
-
3
- export default pathSchema('categories').array().optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.string().optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.string().optional()
@@ -1,24 +0,0 @@
1
- import { reference, z } from 'astro:content'
2
-
3
- const imagePath = z.preprocess((data: unknown) => {
4
- if (typeof data === 'string') {
5
- return data.split('/').pop()
6
- }
7
- return data
8
- }, reference('images').optional())
9
-
10
- export default z.union([imagePath, z.object({}).passthrough()]).pipe(
11
- z
12
- .object({
13
- id: z
14
- .string()
15
- .refine(async (data) => await reference('images').parseAsync(data)),
16
- src: z.string(),
17
- alt: z.string(),
18
- width: z.number(),
19
- height: z.number(),
20
- })
21
- .partial()
22
- .passthrough()
23
- .optional()
24
- )
@@ -1,4 +0,0 @@
1
- import { z } from 'astro:content'
2
- import image from '../components/image'
3
-
4
- export default z.array(image).optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.number().optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.number().optional()
@@ -1,5 +0,0 @@
1
- import { reference, z } from 'astro:content'
2
-
3
- export const productsSchema = reference('products').array().optional()
4
-
5
- export type ProductReferences = z.infer<typeof productsSchema>
@@ -1,12 +0,0 @@
1
- import { z } from 'astro:content'
2
- import image from 'fulldev-ui/schemas/components/image'
3
- import description from 'fulldev-ui/schemas/fields/description'
4
- import title from 'fulldev-ui/schemas/fields/title'
5
-
6
- export default z
7
- .object({
8
- title: title.optional(),
9
- description,
10
- image,
11
- })
12
- .optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.boolean().optional()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.string()
@@ -1,3 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export default z.record(z.string(), z.string().array()).optional()