fulldev-ui 0.6.0-beta-4 → 0.6.0-beta-5

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 (52) hide show
  1. package/cloudcannon.config.yml +25 -7
  2. package/package.json +1 -1
  3. package/src/blocks/Banner.astro +2 -2
  4. package/src/blocks/Contact1.astro +2 -2
  5. package/src/blocks/Content1.astro +77 -0
  6. package/src/blocks/Content2.astro +91 -0
  7. package/src/blocks/Content3.astro +70 -0
  8. package/src/blocks/Content4.astro +72 -0
  9. package/src/blocks/Cta1.astro +16 -30
  10. package/src/blocks/Feature1.astro +19 -25
  11. package/src/blocks/Features1.astro +23 -32
  12. package/src/blocks/Footer.astro +2 -2
  13. package/src/blocks/Header.astro +2 -2
  14. package/src/blocks/Hero1.astro +22 -36
  15. package/src/blocks/Logos1.astro +55 -0
  16. package/src/blocks/Products1.astro +2 -2
  17. package/src/blocks/Reviews1.astro +2 -2
  18. package/src/components/Block.astro +5 -24
  19. package/src/components/{Banner.astro → Group.astro} +5 -6
  20. package/src/components/Heading.astro +1 -1
  21. package/src/components/Layout.astro +1 -1
  22. package/src/components/Panel.astro +1 -1
  23. package/src/components/Paragraph.astro +8 -8
  24. package/src/components/Prose.astro +15 -7
  25. package/src/components/Section.astro +1 -1
  26. package/src/components/Stack.astro +25 -0
  27. package/src/components/Tagline.astro +1 -1
  28. package/src/components/Toc.astro +22 -30
  29. package/src/components/Writeup.astro +59 -0
  30. package/src/content/config.ts +2 -3
  31. package/src/layouts/Category.astro +7 -2
  32. package/src/layouts/Doc.astro +4 -20
  33. package/src/layouts/Job.astro +16 -20
  34. package/src/layouts/Page.astro +5 -6
  35. package/src/layouts/Post.astro +39 -7
  36. package/src/layouts/Product.astro +5 -1
  37. package/src/schemas/components/block.ts +57 -19
  38. package/src/schemas/imageSchema.ts +3 -3
  39. package/src/schemas/{pageSchema.ts → page.ts} +10 -2
  40. package/tailwind.config.ts +4 -0
  41. package/src/blocks/Job1.astro +0 -97
  42. package/src/schemas/blocks/banner.ts +0 -10
  43. package/src/schemas/blocks/categories.ts +0 -14
  44. package/src/schemas/blocks/contact.ts +0 -18
  45. package/src/schemas/blocks/cta.ts +0 -19
  46. package/src/schemas/blocks/feature.ts +0 -18
  47. package/src/schemas/blocks/features.ts +0 -24
  48. package/src/schemas/blocks/hero.ts +0 -20
  49. package/src/schemas/blocks/intro.ts +0 -16
  50. package/src/schemas/blocks/products.ts +0 -14
  51. package/src/schemas/blocks/reviews.ts +0 -24
  52. package/src/schemas/layoutSchema.ts +0 -22
@@ -2,20 +2,18 @@
2
2
  import type { ComponentProps } from 'astro/types'
3
3
  import type { CollectionEntry } from 'astro:content'
4
4
  import { getEntries } from 'astro:content'
5
+ import Content3 from 'fulldev-ui/blocks/Content3.astro'
5
6
  import Footer from 'fulldev-ui/blocks/Footer.astro'
6
7
  import Header from 'fulldev-ui/blocks/Header.astro'
7
- import Job1 from 'fulldev-ui/blocks/Job1.astro'
8
- import Blocks from 'fulldev-ui/components/Blocks.astro'
8
+ import Block from 'fulldev-ui/components/Block.astro'
9
9
  import Element from 'fulldev-ui/components/Element.astro'
10
10
  import Layout from 'fulldev-ui/components/Layout.astro'
11
- import type { LayoutSchema } from 'fulldev-ui/schemas/layoutSchema.ts'
12
- import type { PageSchema } from 'fulldev-ui/schemas/pageSchema.ts'
13
- import { getHref } from 'fulldev-ui/utils/getHref'
11
+ import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
12
+ import { getHref } from 'fulldev-ui/utils/getHref.ts'
14
13
 
15
- type Props = ComponentProps<typeof Layout> &
16
- LayoutSchema &
17
- PageSchema &
18
- Pick<CollectionEntry<'pages'>, 'render'>
14
+ interface Props extends ComponentProps<typeof Layout>, PageSchema {
15
+ render: CollectionEntry<'pages'>['render']
16
+ }
19
17
 
20
18
  const {
21
19
  title,
@@ -31,6 +29,8 @@ const {
31
29
  } = Astro.props
32
30
 
33
31
  const categoriesEntries = categories && (await getEntries(categories))
32
+
33
+ const { Content } = await render()
34
34
  ---
35
35
 
36
36
  <Layout
@@ -42,23 +42,19 @@ const categoriesEntries = categories && (await getEntries(categories))
42
42
  {...header}
43
43
  />
44
44
  <Element as="main">
45
- <Job1
45
+ <Content3
46
46
  badges={categoriesEntries?.map((category) => ({
47
47
  text: category.data.title,
48
48
  href: getHref(category.slug),
49
49
  }))}
50
50
  heading={title}
51
51
  paragraph={description}
52
- list={list}
53
- button={button}
54
- render={render}
55
- />
56
- <Blocks {blocks} />
52
+ {list}
53
+ {button}
54
+ >
55
+ <Content />
56
+ </Content3>
57
+ {blocks?.map((block) => <Block {...block} />)}
57
58
  </Element>
58
59
  <Footer {...footer} />
59
60
  </Layout>
60
-
61
- <style is:global>
62
- @layer fulldev {
63
- }
64
- </style>
@@ -1,15 +1,14 @@
1
1
  ---
2
2
  import type { ComponentProps } from 'astro/types'
3
+ import Banner from 'fulldev-ui/blocks/Banner.astro'
3
4
  import Footer from 'fulldev-ui/blocks/Footer.astro'
4
5
  import Header from 'fulldev-ui/blocks/Header.astro'
5
- import Banner from 'fulldev-ui/components/Banner.astro'
6
- import Blocks from 'fulldev-ui/components/Blocks.astro'
6
+ import Block from 'fulldev-ui/components/Block.astro'
7
7
  import Element from 'fulldev-ui/components/Element.astro'
8
8
  import Layout from 'fulldev-ui/components/Layout.astro'
9
- import type { LayoutSchema } from 'fulldev-ui/schemas/layoutSchema.ts'
10
- import type { PageSchema } from 'fulldev-ui/schemas/pageSchema.ts'
9
+ import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
11
10
 
12
- type Props = ComponentProps<typeof Layout> & LayoutSchema & PageSchema
11
+ interface Props extends ComponentProps<typeof Layout>, PageSchema {}
13
12
 
14
13
  const { banner, sidebar, header, blocks, footer } = Astro.props
15
14
  ---
@@ -24,7 +23,7 @@ const { banner, sidebar, header, blocks, footer } = Astro.props
24
23
  {...header}
25
24
  />
26
25
  <Element as="main">
27
- <Blocks {blocks} />
26
+ {blocks?.map((block) => <Block {...block} />)}
28
27
  </Element>
29
28
  <Footer {...footer} />
30
29
  </Layout>
@@ -1,20 +1,52 @@
1
1
  ---
2
2
  import type { ComponentProps } from 'astro/types'
3
+ import type { CollectionEntry } from 'astro:content'
4
+ import Content1 from 'fulldev-ui/blocks/Content1.astro'
5
+ import Footer from 'fulldev-ui/blocks/Footer.astro'
6
+ import Header from 'fulldev-ui/blocks/Header.astro'
7
+ import Block from 'fulldev-ui/components/Block.astro'
8
+ import Element from 'fulldev-ui/components/Element.astro'
3
9
  import Layout from 'fulldev-ui/components/Layout.astro'
4
- import Prose from 'fulldev-ui/components/Prose.astro'
10
+ import type { PageSchema } from 'fulldev-ui/schemas/page'
5
11
 
6
- type Props = ComponentProps<typeof Layout>
12
+ interface Props extends ComponentProps<typeof Layout>, PageSchema {
13
+ render: CollectionEntry<'pages'>['render']
14
+ }
7
15
 
8
- const { render } = Astro.props
16
+ const {
17
+ title,
18
+ description,
19
+ list,
20
+ button,
21
+ header,
22
+ sidebar,
23
+ blocks,
24
+ footer,
25
+ render,
26
+ } = Astro.props
27
+
28
+ const { Content, headings } = await render()
9
29
  ---
10
30
 
11
31
  <Layout
12
32
  class:list="post"
13
33
  {...Astro.props}
14
34
  >
15
- <Prose
16
- {render}
17
- toc={true}
35
+ <Header
36
+ {...sidebar}
37
+ {...header}
18
38
  />
19
- <slot />
39
+ <Element as="main">
40
+ <Content1
41
+ heading={title}
42
+ paragraph={description}
43
+ {list}
44
+ {button}
45
+ {headings}
46
+ >
47
+ <Content />
48
+ </Content1>
49
+ {blocks?.map((block) => <Block {...block} />)}
50
+ </Element>
51
+ <Footer {...footer} />
20
52
  </Layout>
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  import type { ComponentProps } from 'astro/types'
3
3
  import { getImage } from 'astro:assets'
4
+ import type { CollectionEntry } from 'astro:content'
4
5
  import { getCollection, getEntry } from 'astro:content'
5
6
  import Products1 from 'fulldev-ui/blocks/Products1.astro'
6
7
  import CartForm from 'fulldev-ui/components/CartForm.svelte'
@@ -11,8 +12,11 @@ import Layout from 'fulldev-ui/components/Layout.astro'
11
12
  import List from 'fulldev-ui/components/List.astro'
12
13
  import Paragraph from 'fulldev-ui/components/Paragraph.astro'
13
14
  import Prose from 'fulldev-ui/components/Prose.astro'
15
+ import type { PageSchema } from 'fulldev-ui/schemas/page'
14
16
 
15
- type Props = ComponentProps<typeof Layout>
17
+ interface Props extends ComponentProps<typeof Layout>, PageSchema {
18
+ render: CollectionEntry<'pages'>['render']
19
+ }
16
20
 
17
21
  const {
18
22
  render,
@@ -1,22 +1,60 @@
1
1
  import { z } from 'astro:content'
2
- import { categoriesSchema } from 'fulldev-ui/schemas/blocks/categories'
3
- import { ctaSchema } from 'fulldev-ui/schemas/blocks/cta'
4
- import { featuresSchema } from 'fulldev-ui/schemas/blocks/features'
5
- import { heroSchema } from 'fulldev-ui/schemas/blocks/hero'
6
- import { productsSchema } from 'fulldev-ui/schemas/blocks/products'
7
- import { featureSchema } from '../blocks/feature'
8
- import { reviewsSchema } from '../blocks/reviews'
9
- import { headerSchema } from './header'
2
+ import pathSchema from '../utils/pathSchema'
3
+ import { badgeSchema } from './badge'
4
+ import { buttonSchema } from './button'
5
+ import { channelSchema } from './channel'
6
+ import { headingSchema } from './heading'
7
+ import { iconSchema } from './icon'
8
+ import { imageSchema } from './image'
9
+ import { linkSchema } from './link'
10
+ import { logoSchema } from './logo'
11
+ import { menuSchema } from './menu'
12
+ import { paragraphSchema } from './paragraph'
13
+ import { socialSchema } from './social'
14
+ import { taglineSchema } from './tagline'
10
15
 
11
- const _block = { _block: z.string() }
16
+ export const blockSchema = z.object({
17
+ _block: z.string().optional(),
18
+ dark: z.boolean().optional(),
19
+ logo: logoSchema.optional(),
20
+ link: linkSchema.optional(),
21
+ links: linkSchema.array().optional(),
22
+ menus: menuSchema.array().optional(),
23
+ themer: z.boolean().optional(),
24
+ search: z.boolean().optional(),
25
+ cart: z.boolean().optional(),
26
+ text: z.string().optional(),
27
+ tagline: taglineSchema.shape.text,
28
+ badge: badgeSchema.optional(),
29
+ badges: badgeSchema.array().optional(),
30
+ heading: headingSchema.shape.text,
31
+ paragraph: paragraphSchema.shape.text,
32
+ list: z.string().array().optional(),
33
+ content: z.string().optional(),
34
+ button: buttonSchema.optional(),
35
+ buttons: buttonSchema.array().optional(),
36
+ image: imageSchema.optional(),
37
+ images: imageSchema.array().optional(),
38
+ channels: channelSchema.array().optional(),
39
+ socials: socialSchema.shape.href.array().optional(),
40
+ pages: pathSchema('pages').array().optional(),
41
+ products: pathSchema('pages').array().optional(),
42
+ cards: z
43
+ .object({
44
+ image: imageSchema.optional(),
45
+ icon: iconSchema.shape.name,
46
+ tagline: taglineSchema.shape.text,
47
+ badge: badgeSchema.optional(),
48
+ badges: badgeSchema.array().optional(),
49
+ heading: headingSchema.shape.text,
50
+ paragraph: paragraphSchema.shape.text,
51
+ list: z.string().array().optional(),
52
+ button: buttonSchema.optional(),
53
+ buttons: buttonSchema.array().optional(),
54
+ })
55
+ .strict()
56
+ .array()
57
+ .optional(),
58
+ })
12
59
 
13
- export const blockSchema = z.union([
14
- heroSchema.extend(_block),
15
- ctaSchema.extend(_block),
16
- featureSchema.extend(_block),
17
- productsSchema.extend(_block),
18
- categoriesSchema.extend(_block),
19
- headerSchema.extend(_block),
20
- featuresSchema.extend(_block),
21
- reviewsSchema.extend(_block),
22
- ])
60
+ export type BlockSchema = z.infer<typeof blockSchema>
@@ -5,9 +5,9 @@ export const imageSchema = z
5
5
  id: z.string(),
6
6
  src: z.string(),
7
7
  alt: z.string().default(''),
8
- width: z.number(),
9
- height: z.number(),
10
- format: z.string(),
8
+ width: z.number().optional(),
9
+ height: z.number().optional(),
10
+ format: z.string().optional(),
11
11
  })
12
12
  .passthrough()
13
13
 
@@ -18,13 +18,21 @@ export const pageSchema = z
18
18
  image: imageSchema.optional(),
19
19
  images: imageSchema.array().optional(),
20
20
  price: priceSchema.shape.amount,
21
- categories: pathSchema('pages').array().optional(),
22
- blocks: blockSchema.array().optional(),
23
21
  order: z.number().optional(),
24
22
  variants: z.record(z.string(), z.string().array()).optional(),
25
23
  soldout: z.boolean().optional(),
26
24
  head: headSchema.optional(),
27
25
  button: buttonSchema.optional(),
26
+ banner: blockSchema.optional(),
27
+ navigation: blockSchema.optional(),
28
+ header: blockSchema.optional(),
29
+ blocks: blockSchema.array().optional(),
30
+ subheader: blockSchema.array().optional(),
31
+ sidebar: blockSchema.optional(),
32
+ footer: blockSchema.optional(),
33
+ parents: pathSchema('pages').array().optional(),
34
+ children: pathSchema('pages').array().optional(),
35
+ siblings: pathSchema('pages').array().optional(),
28
36
  })
29
37
  .strict()
30
38
 
@@ -16,6 +16,10 @@ export default {
16
16
  gutter: 'clamp(16px, 4vw, 32px)',
17
17
  container: 'var(--container, 1536px)',
18
18
  hero: 'calc(100vh - var(--header-height, 0px) - var(--subheader-height, 0px) - var(--banner-height, 0px))',
19
+ 'sticky-8':
20
+ 'calc(var(--header-height, 0px) + var(--subheader-height, 0px) + 2rem)',
21
+ 'sticky-16':
22
+ 'calc(var(--header-height, 0px) + var(--subheader-height, 0px) + 4rem)',
19
23
  },
20
24
  colors: {
21
25
  border: 'hsl(var(--border))',
@@ -1,97 +0,0 @@
1
- ---
2
- import type { ComponentProps } from 'astro/types'
3
- import type { CollectionEntry } from 'astro:content'
4
- import Badge from 'fulldev-ui/components/Badge.astro'
5
- import Button from 'fulldev-ui/components/Button.astro'
6
- import Container from 'fulldev-ui/components/Container.astro'
7
- import Element from 'fulldev-ui/components/Element.astro'
8
- import Heading from 'fulldev-ui/components/Heading.astro'
9
- import List from 'fulldev-ui/components/List.astro'
10
- import Paragraph from 'fulldev-ui/components/Paragraph.astro'
11
- import Prose from 'fulldev-ui/components/Prose.astro'
12
- import Section from 'fulldev-ui/components/Section.astro'
13
-
14
- interface Props extends ComponentProps<typeof Section> {
15
- badges?: ComponentProps<typeof Badge>[] | undefined
16
- heading?: string | undefined
17
- paragraph?: string | undefined
18
- list?: ComponentProps<typeof List>['items'] | undefined
19
- button?: ComponentProps<typeof Button> | undefined
20
- render: CollectionEntry<'pages'>['render']
21
- }
22
-
23
- const { badges, heading, paragraph, list, button, render, ...rest } =
24
- Astro.props
25
-
26
- const { Content } = await render()
27
- ---
28
-
29
- <Section
30
- class:list="job-1"
31
- {...rest}
32
- >
33
- <Container class:list="job-1-container">
34
- <Element class:list="job-1-segment">
35
- <Element class:list="job-1-content">
36
- <Element class:list="job-1-badges">
37
- {
38
- badges?.map((badge) => (
39
- <Badge
40
- size="sm"
41
- {...badge}
42
- />
43
- ))
44
- }
45
- </Element>
46
- <Heading
47
- as="h1"
48
- size="4xl"
49
- text={heading}
50
- />
51
- <Paragraph
52
- size="lg"
53
- muted
54
- text={paragraph}
55
- />
56
- <List items={list} />
57
- </Element>
58
- <Button
59
- size="lg"
60
- {...button}
61
- />
62
- </Element>
63
- <Prose>
64
- <Content />
65
- </Prose>
66
- </Container>
67
- </Section>
68
-
69
- <style is:global>
70
- @layer fulldev {
71
- .job-1 {
72
- .container {
73
- @apply flex flex-col items-start gap-x-gutter lg:grid lg:grid-cols-2;
74
- }
75
-
76
- .job-1-segment {
77
- @apply sticky top-0 flex max-w-xl flex-col items-start gap-8 py-16;
78
-
79
- top: var(--header-height, 0px);
80
- width: var(--sidebar-width);
81
- height: calc(100vh - var(--headers));
82
- }
83
-
84
- .job-1-content {
85
- @apply flex flex-col items-start gap-4;
86
- }
87
-
88
- .job-1-badges {
89
- @apply flex flex-wrap gap-2;
90
- }
91
-
92
- .prose {
93
- @apply py-16;
94
- }
95
- }
96
- }
97
- </style>
@@ -1,10 +0,0 @@
1
- import { z } from 'astro:content'
2
-
3
- export const bannerSchema = z.preprocess(
4
- (data: unknown) => (typeof data === 'string' ? { text: data } : data),
5
- z.object({
6
- text: z.string().optional(),
7
- })
8
- )
9
-
10
- export type BannerSchema = z.infer<typeof bannerSchema>
@@ -1,14 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
3
- import { headingSchema } from '../components/heading'
4
- import pathSchema from '../utils/pathSchema'
5
-
6
- export const categoriesSchema = z
7
- .object({
8
- heading: headingSchema.shape.text,
9
- button: buttonSchema.optional(),
10
- categories: pathSchema('categories').array().optional(),
11
- })
12
- .strict()
13
-
14
- export type CategoriesSchema = z.infer<typeof categoriesSchema>
@@ -1,18 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { headingSchema } from 'fulldev-ui/schemas/components/heading'
3
- import { taglineSchema } from 'fulldev-ui/schemas/components/tagline'
4
- import { channelSchema } from '../components/channel'
5
- import { paragraphSchema } from '../components/paragraph'
6
- import { socialSchema } from '../components/social'
7
-
8
- export const contactSchema = z
9
- .object({
10
- tagline: taglineSchema.shape.text,
11
- heading: headingSchema.shape.text,
12
- paragraph: paragraphSchema.shape.text,
13
- channels: channelSchema.array().optional(),
14
- socials: socialSchema.shape.href.array().optional(),
15
- })
16
- .strict()
17
-
18
- export type ContactSchema = z.infer<typeof contactSchema>
@@ -1,19 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
3
- import { imageSchema } from 'fulldev-ui/schemas/components/image.ts'
4
- import { headingSchema } from '../components/heading'
5
- import { paragraphSchema } from '../components/paragraph'
6
- import { taglineSchema } from '../components/tagline'
7
-
8
- export const ctaSchema = z
9
- .object({
10
- tagline: taglineSchema.shape.text,
11
- heading: headingSchema.shape.text,
12
- paragraph: paragraphSchema.shape.text,
13
- buttons: buttonSchema.array().optional(),
14
- image: imageSchema.optional(),
15
- dark: z.boolean().optional(),
16
- })
17
- .strict()
18
-
19
- export type CtaSchema = z.infer<typeof ctaSchema>
@@ -1,18 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
3
- import { imageSchema } from 'fulldev-ui/schemas/components/image.ts'
4
- import { headingSchema } from '../components/heading'
5
- import { paragraphSchema } from '../components/paragraph'
6
- import { taglineSchema } from '../components/tagline'
7
-
8
- export const featureSchema = z
9
- .object({
10
- tagline: taglineSchema.shape.text,
11
- heading: headingSchema.shape.text,
12
- paragraph: paragraphSchema.shape.text,
13
- buttons: buttonSchema.array().optional(),
14
- image: imageSchema.optional(),
15
- })
16
- .strict()
17
-
18
- export type FeatureSchema = z.infer<typeof featureSchema>
@@ -1,24 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { headingSchema } from 'fulldev-ui/schemas/components/heading'
3
- import { iconSchema } from '../components/icon'
4
- import { paragraphSchema } from '../components/paragraph'
5
- import { taglineSchema } from '../components/tagline'
6
-
7
- export const featuresSchema = z
8
- .object({
9
- tagline: taglineSchema.shape.text,
10
- heading: headingSchema.shape.text,
11
- paragraph: paragraphSchema.shape.text,
12
- cards: z
13
- .object({
14
- icon: iconSchema.shape.name,
15
- heading: headingSchema.shape.text,
16
- paragraph: paragraphSchema.shape.text,
17
- })
18
- .strict()
19
- .array()
20
- .optional(),
21
- })
22
- .strict()
23
-
24
- export type FeaturesSchema = z.infer<typeof featuresSchema>
@@ -1,20 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { badgeSchema } from 'fulldev-ui/schemas/components/badge.ts'
3
- import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
4
- import { headingSchema } from 'fulldev-ui/schemas/components/heading'
5
- import { imageSchema } from 'fulldev-ui/schemas/components/image.ts'
6
- import { taglineSchema } from 'fulldev-ui/schemas/components/tagline'
7
- import { paragraphSchema } from '../components/paragraph'
8
-
9
- export const heroSchema = z
10
- .object({
11
- badge: badgeSchema.optional(),
12
- tagline: taglineSchema.shape.text,
13
- heading: headingSchema.shape.text,
14
- paragraph: paragraphSchema.shape.text,
15
- buttons: buttonSchema.array().optional(),
16
- image: imageSchema.optional(),
17
- })
18
- .strict()
19
-
20
- export type HeroSchema = z.infer<typeof heroSchema>
@@ -1,16 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
3
- import { headingSchema } from 'fulldev-ui/schemas/components/heading'
4
- import { taglineSchema } from 'fulldev-ui/schemas/components/tagline'
5
- import { paragraphSchema } from '../components/paragraph'
6
-
7
- export const introSchema = z
8
- .object({
9
- tagline: taglineSchema.shape.text,
10
- heading: headingSchema.shape.text,
11
- paragraph: paragraphSchema.shape.text,
12
- buttons: buttonSchema.array().optional(),
13
- })
14
- .strict()
15
-
16
- export type IntroSchema = z.infer<typeof introSchema>
@@ -1,14 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
3
- import { headingSchema } from 'fulldev-ui/schemas/components/heading'
4
- import pathSchema from '../utils/pathSchema'
5
-
6
- export const productsSchema = z
7
- .object({
8
- heading: headingSchema.shape.text,
9
- button: buttonSchema.optional(),
10
- products: pathSchema('products').array().optional(),
11
- })
12
- .strict()
13
-
14
- export type ProductsSchema = z.infer<typeof productsSchema>
@@ -1,24 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { headingSchema } from 'fulldev-ui/schemas/components/heading'
3
- import { paragraphSchema } from '../components/paragraph'
4
- import { ratingSchema } from '../components/rating'
5
- import { taglineSchema } from '../components/tagline'
6
-
7
- export const reviewsSchema = z
8
- .object({
9
- tagline: taglineSchema.shape.text,
10
- heading: headingSchema.shape.text,
11
- paragraph: paragraphSchema.shape.text,
12
- cards: z
13
- .object({
14
- rating: ratingSchema.shape.score,
15
- heading: headingSchema.shape.text,
16
- paragraph: paragraphSchema.shape.text,
17
- })
18
- .strict()
19
- .array()
20
- .optional(),
21
- })
22
- .strict()
23
-
24
- export type ReviewsSchema = z.infer<typeof reviewsSchema>
@@ -1,22 +0,0 @@
1
- import { z } from 'astro:content'
2
- import { bannerSchema } from 'fulldev-ui/schemas/blocks/banner.ts'
3
- import { footerSchema } from 'fulldev-ui/schemas/components/footer.ts'
4
- import { headSchema } from 'fulldev-ui/schemas/components/head.ts'
5
- import { headerSchema } from 'fulldev-ui/schemas/components/header.ts'
6
- import { linkSchema } from 'fulldev-ui/schemas/components/link.ts'
7
- import { navigationSchema } from 'fulldev-ui/schemas/components/navigation.ts'
8
- import { sidebarSchema } from 'fulldev-ui/schemas/components/sidebar.ts'
9
-
10
- export const layoutSchema = z
11
- .object({
12
- head: headSchema.optional(),
13
- banner: bannerSchema.optional(),
14
- navigation: navigationSchema.optional(),
15
- header: headerSchema.optional(),
16
- subheader: linkSchema.array().optional(),
17
- sidebar: sidebarSchema.optional(),
18
- footer: footerSchema.optional(),
19
- })
20
- .strict()
21
-
22
- export type LayoutSchema = z.infer<typeof layoutSchema>