fulldev-ui 0.6.0-beta.2 → 0.6.0-beta.6
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 +1 -7
- package/cloudcannon.config.yml +269 -0
- package/package.json +1 -1
- package/src/blocks/Banner.astro +13 -15
- package/src/blocks/Colleagues1.astro +73 -0
- package/src/blocks/Contact1.astro +100 -0
- package/src/blocks/Content1.astro +79 -0
- package/src/blocks/Content2.astro +94 -0
- package/src/blocks/Content3.astro +70 -0
- package/src/blocks/Content4.astro +75 -0
- package/src/blocks/Cta1.astro +73 -0
- package/src/blocks/Feature1.astro +61 -0
- package/src/blocks/Features1.astro +66 -0
- package/src/blocks/Footer.astro +36 -68
- package/src/blocks/Header.astro +150 -3
- package/src/blocks/Hero1.astro +74 -0
- package/src/blocks/Intro1.astro +70 -0
- package/src/blocks/Jobs1.astro +73 -0
- package/src/blocks/Logos1.astro +55 -0
- package/src/blocks/Products1.astro +90 -0
- package/src/blocks/Reviews1.astro +79 -0
- package/src/blocks/{Hero.astro → _Hero.astro} +7 -6
- package/src/components/Badge.astro +10 -18
- package/src/components/Badges.astro +12 -35
- package/src/components/Block.astro +30 -0
- package/src/components/Blocks.astro +26 -0
- package/src/components/Button.astro +11 -25
- package/src/components/Buttons.astro +12 -43
- package/src/components/Card.astro +8 -150
- package/src/components/Cart.astro +6 -11
- package/src/components/CartSummary.astro +3 -3
- package/src/components/Channel.astro +5 -14
- package/src/components/Container.astro +25 -0
- package/src/components/Drawer.astro +55 -117
- package/src/components/DrawerOld.astro +143 -0
- package/src/components/Element.astro +2 -0
- package/src/components/Form.astro +3 -1
- package/src/components/Grid.astro +39 -0
- package/src/components/Group.astro +25 -0
- package/src/components/Head.astro +18 -32
- package/src/components/Header.astro +8 -105
- package/src/components/Heading.astro +34 -71
- package/src/components/Icon.astro +5 -4
- package/src/components/Image.astro +15 -50
- package/src/components/Layout.astro +35 -0
- package/src/components/Link.astro +12 -18
- package/src/components/Links.astro +14 -35
- package/src/components/Logo.astro +26 -15
- package/src/components/Masonry.astro +42 -0
- package/src/components/Menu.astro +17 -38
- package/src/components/Menus.astro +20 -0
- package/src/components/Navigation.astro +39 -0
- package/src/components/Panel.astro +25 -0
- package/src/components/Paragraph.astro +24 -7
- package/src/components/Price.astro +4 -4
- package/src/components/Prose.astro +47 -130
- package/src/components/Rating.astro +24 -75
- package/src/components/Search.astro +5 -4
- package/src/components/Section.astro +20 -29
- package/src/components/Sidebar.astro +18 -69
- package/src/components/Social.astro +9 -2
- package/src/components/Stack.astro +25 -0
- package/src/components/Tagline.astro +21 -31
- package/src/components/Toc.astro +22 -21
- package/src/components/Writeup.astro +33 -82
- package/src/components/_Author.astro +90 -0
- package/src/components/_Header.astro +129 -0
- package/src/components/_Image.astro +79 -0
- package/src/components/_Prose copy.astro +172 -0
- package/src/components/_Sidebar copy.astro +87 -0
- package/src/content/config.ts +2 -29
- package/src/content/layouts/base.yml +42 -80
- package/src/content/pages/categories/category.md +7 -0
- package/src/content/{docs → pages/docs}/_internationalization.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/images.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_card.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_dialog.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_drawer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_localeswitcher.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_tagline.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_toggle.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/avatar.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badge.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badges.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/button.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/buttons.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channel.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channels.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/checkbox.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/code.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/heading.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/icon.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/image.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/input.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/label.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/link.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/links.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/list.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/logo.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/menu.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/prose.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/rating.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/section.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/select.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/social.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/socials.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/table.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/tagline.mdx +1 -0
- package/src/content/pages/docs/components/text.mdx +48 -0
- package/src/content/{docs → pages/docs}/components/textarea.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/themer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components.mdx +2 -4
- package/src/content/{docs → pages/docs}/customization.mdx +1 -0
- package/src/content/{docs → pages/docs}/frameworks.mdx +1 -0
- package/src/content/{docs → pages/docs}/generating-pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/index.mdx +2 -4
- package/src/content/{docs → pages/docs}/installation.mdx +1 -0
- package/src/content/{docs → pages/docs}/layouts.mdx +1 -0
- package/src/content/pages/index.mdx +20 -28
- package/src/content/{categories/mugs.md → pages/posts/post.md} +1 -1
- package/src/content/{products → pages/products}/product.md +4 -4
- package/src/css/theme.css +2 -0
- package/src/images/favicon/android-chrome-192x192.png +0 -0
- package/src/images/favicon/android-chrome-512x512.png +0 -0
- package/src/images/favicon/apple-touch-icon.png +0 -0
- package/src/images/favicon/browserconfig.xml +9 -0
- package/src/images/favicon/favicon-16x16.png +0 -0
- package/src/images/favicon/favicon-32x32.png +0 -0
- package/src/images/favicon/favicon-48x48.png +0 -0
- package/src/images/favicon/favicon.ico +0 -0
- package/src/images/favicon/favicon.svg +16 -0
- package/src/images/favicon/manifest.webmanifest +30 -0
- package/src/images/favicon/mstile-150x150.png +0 -0
- package/src/images/favicon/safari-pinned-tab.svg +16 -0
- package/src/images/favicon/yandex-browser-50x50.png +0 -0
- package/src/images/favicon/yandex-browser-manifest.json +9 -0
- package/src/integration/index.ts +48 -17
- package/src/layouts/{CategoryLayout.astro → Category.astro} +21 -15
- package/src/layouts/Doc.astro +70 -0
- package/src/layouts/Job.astro +62 -0
- package/src/layouts/Jobs.astro +72 -0
- package/src/layouts/Page.astro +29 -0
- package/src/layouts/Post.astro +52 -0
- package/src/layouts/{ProductLayout.astro → Product.astro} +25 -11
- package/src/pages/[...page].astro +36 -4
- package/src/pages/test.astro +32 -2
- package/src/schemas/components/avatar.ts +4 -1
- package/src/schemas/components/badge.ts +16 -11
- package/src/schemas/components/block.ts +61 -0
- package/src/schemas/components/button.ts +14 -19
- package/src/schemas/components/channel.ts +15 -9
- package/src/schemas/components/footer.ts +15 -14
- package/src/schemas/components/head.ts +17 -0
- package/src/schemas/components/header.ts +19 -16
- package/src/schemas/components/heading.ts +7 -1
- package/src/schemas/components/icon.ts +7 -1
- package/src/schemas/components/image.ts +38 -21
- package/src/schemas/components/link.ts +10 -16
- package/src/schemas/components/logo.ts +12 -2
- package/src/schemas/components/menu.ts +12 -13
- package/src/schemas/components/navigation.ts +10 -0
- package/src/schemas/components/paragraph.ts +9 -0
- package/src/schemas/components/price.ts +9 -0
- package/src/schemas/components/rating.ts +8 -13
- package/src/schemas/components/sidebar.ts +14 -12
- package/src/schemas/components/social.ts +16 -1
- package/src/schemas/components/tagline.ts +7 -1
- package/src/schemas/imageSchema.ts +33 -4
- package/src/schemas/page.ts +40 -0
- package/src/types/global-props.ts +0 -9
- package/src/types/{virtual-modules.d.ts → virtual.d.ts} +1 -1
- package/src/utils/getHref.ts +4 -20
- package/tailwind.config.ts +4 -0
- package/tsconfig.json +1 -3
- package/example.svelte +0 -0
- package/parent.svelte +0 -0
- package/src/App.svelte +0 -0
- package/src/blocks/Categories.astro +0 -12
- package/src/blocks/Colleagues.astro +0 -12
- package/src/blocks/Contact.astro +0 -117
- package/src/blocks/Content.astro +0 -130
- package/src/blocks/Cta.astro +0 -13
- package/src/blocks/Excerpt.astro +0 -12
- package/src/blocks/Features.astro +0 -11
- package/src/blocks/Intro.astro +0 -101
- package/src/blocks/Jobs.astro +0 -12
- package/src/blocks/Posts.astro +0 -11
- package/src/blocks/Prices.astro +0 -24
- package/src/blocks/Product.astro +0 -89
- package/src/blocks/Products.astro +0 -101
- package/src/blocks/Reviews.astro +0 -12
- package/src/blocks/_Contact.astro +0 -112
- package/src/components/CartForm.astro +0 -120
- package/src/components/CartList.astro +0 -122
- package/src/components/Lead.astro +0 -46
- package/src/components/ProductCard.astro +0 -52
- package/src/components/Text.astro +0 -43
- package/src/components/_CartList backup.astro +0 -125
- package/src/components/_CartList copy.astro +0 -213
- package/src/components/_CartListSimple.astro +0 -148
- package/src/components/sections.astro +0 -28
- package/src/content/docs/components/lead.mdx +0 -49
- package/src/content/docs/components/paragraph.mdx +0 -49
- package/src/content/layouts/docs.yml +0 -70
- package/src/layouts/DocLayout.astro +0 -17
- package/src/layouts/Layout.astro +0 -79
- package/src/layouts/PageLayout.astro +0 -20
- package/src/layouts/PostLayout.astro +0 -20
- package/src/loaders/imageLoader.ts +0 -26
- package/src/pages/[...category].astro +0 -17
- package/src/pages/[...doc].astro +0 -17
- package/src/pages/[...post].astro +0 -17
- package/src/pages/[...product].astro +0 -17
- package/src/schemas/archive/_pageSchema.ts +0 -94
- package/src/schemas/categorySchema.ts +0 -16
- package/src/schemas/components/avatars.ts +0 -4
- package/src/schemas/components/banner.ts +0 -3
- package/src/schemas/components/buttons.ts +0 -4
- package/src/schemas/components/card.ts +0 -43
- package/src/schemas/components/cards.ts +0 -4
- package/src/schemas/components/channels.ts +0 -4
- package/src/schemas/components/global.ts +0 -16
- package/src/schemas/components/links.ts +0 -4
- package/src/schemas/components/list.ts +0 -3
- package/src/schemas/components/section.ts +0 -17
- package/src/schemas/components/sections.ts +0 -3
- package/src/schemas/components/socials.ts +0 -4
- package/src/schemas/components/subheader.ts +0 -10
- package/src/schemas/components/text.ts +0 -3
- package/src/schemas/components/themer.ts +0 -3
- package/src/schemas/components/toc.ts +0 -3
- package/src/schemas/components/writeup.ts +0 -20
- package/src/schemas/docSchema.ts +0 -10
- package/src/schemas/fields/categories.ts +0 -3
- package/src/schemas/fields/description.ts +0 -3
- package/src/schemas/fields/href.ts +0 -3
- package/src/schemas/fields/image.ts +0 -24
- package/src/schemas/fields/images.ts +0 -4
- package/src/schemas/fields/order.ts +0 -3
- package/src/schemas/fields/price.ts +0 -3
- package/src/schemas/fields/products.ts +0 -5
- package/src/schemas/fields/seo.ts +0 -12
- package/src/schemas/fields/soldout.ts +0 -3
- package/src/schemas/fields/title.ts +0 -3
- package/src/schemas/fields/variants.ts +0 -3
- package/src/schemas/layoutSchema.ts +0 -28
- package/src/schemas/pageSchema.ts +0 -20
- package/src/schemas/postSchema.ts +0 -16
- package/src/schemas/productSchema.ts +0 -22
|
@@ -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,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { getCollection } from 'astro:content'
|
|
3
|
-
import CategoryLayout from 'fulldev-ui/layouts/CategoryLayout.astro'
|
|
4
|
-
import { getHref } from 'fulldev-ui/utils/getHref.ts'
|
|
5
|
-
|
|
6
|
-
export async function getStaticPaths() {
|
|
7
|
-
const collection = await getCollection('categories')
|
|
8
|
-
return collection.map((entry) => ({
|
|
9
|
-
params: {
|
|
10
|
-
category: getHref(entry.collection, entry.slug),
|
|
11
|
-
},
|
|
12
|
-
props: entry,
|
|
13
|
-
}))
|
|
14
|
-
}
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<CategoryLayout {...Astro.props} />
|
package/src/pages/[...doc].astro
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { getCollection } from 'astro:content'
|
|
3
|
-
import DocLayout from 'fulldev-ui/layouts/DocLayout.astro'
|
|
4
|
-
import { getHref } from 'fulldev-ui/utils/getHref.ts'
|
|
5
|
-
|
|
6
|
-
export async function getStaticPaths() {
|
|
7
|
-
const collection = await getCollection('docs')
|
|
8
|
-
return collection.map((entry) => ({
|
|
9
|
-
params: {
|
|
10
|
-
doc: getHref(entry.collection, entry.slug),
|
|
11
|
-
},
|
|
12
|
-
props: entry,
|
|
13
|
-
}))
|
|
14
|
-
}
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<DocLayout {...Astro.props} />
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { getCollection } from 'astro:content'
|
|
3
|
-
import PostLayout from 'fulldev-ui/layouts/PostLayout.astro'
|
|
4
|
-
import { getHref } from 'fulldev-ui/utils/getHref.ts'
|
|
5
|
-
|
|
6
|
-
export async function getStaticPaths() {
|
|
7
|
-
const collection = await getCollection('posts')
|
|
8
|
-
return collection.map((entry) => ({
|
|
9
|
-
params: {
|
|
10
|
-
post: getHref(entry.collection, entry.slug),
|
|
11
|
-
},
|
|
12
|
-
props: entry,
|
|
13
|
-
}))
|
|
14
|
-
}
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<PostLayout {...Astro.props} />
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { getCollection } from 'astro:content'
|
|
3
|
-
import ProductLayout from 'fulldev-ui/layouts/ProductLayout.astro'
|
|
4
|
-
import { getHref } from 'fulldev-ui/utils/getHref.ts'
|
|
5
|
-
|
|
6
|
-
export async function getStaticPaths() {
|
|
7
|
-
const collection = await getCollection('products')
|
|
8
|
-
return collection.map((entry) => ({
|
|
9
|
-
params: {
|
|
10
|
-
product: getHref(entry.collection, entry.slug),
|
|
11
|
-
},
|
|
12
|
-
props: entry,
|
|
13
|
-
}))
|
|
14
|
-
}
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<ProductLayout {...Astro.props} />
|
|
@@ -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,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'astro:content'
|
|
2
|
-
import categories from 'fulldev-ui/schemas/fields/categories'
|
|
3
|
-
import description from 'fulldev-ui/schemas/fields/description'
|
|
4
|
-
import image from 'fulldev-ui/schemas/fields/image'
|
|
5
|
-
import title from 'fulldev-ui/schemas/fields/title'
|
|
6
|
-
|
|
7
|
-
export const categorySchema = z
|
|
8
|
-
.object({
|
|
9
|
-
title,
|
|
10
|
-
description,
|
|
11
|
-
image,
|
|
12
|
-
categories,
|
|
13
|
-
})
|
|
14
|
-
.strict()
|
|
15
|
-
|
|
16
|
-
export type CategorySchema = z.infer<typeof categorySchema>
|
|
@@ -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,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,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,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()
|
package/src/schemas/docSchema.ts
DELETED
|
@@ -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,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,28 +0,0 @@
|
|
|
1
|
-
import { z } from 'astro:content'
|
|
2
|
-
import banner from 'fulldev-ui/schemas/components/banner'
|
|
3
|
-
import footer from 'fulldev-ui/schemas/components/footer'
|
|
4
|
-
import header from 'fulldev-ui/schemas/components/header'
|
|
5
|
-
import sidebar from 'fulldev-ui/schemas/components/sidebar'
|
|
6
|
-
import subheader from 'fulldev-ui/schemas/components/subheader'
|
|
7
|
-
import seo from './fields/seo'
|
|
8
|
-
|
|
9
|
-
export const layoutSchema = z
|
|
10
|
-
.object({
|
|
11
|
-
theme: z.any(),
|
|
12
|
-
code: z
|
|
13
|
-
.object({
|
|
14
|
-
head: z.string().optional(),
|
|
15
|
-
body: z.string().optional(),
|
|
16
|
-
})
|
|
17
|
-
.optional(),
|
|
18
|
-
seo,
|
|
19
|
-
banner,
|
|
20
|
-
header,
|
|
21
|
-
subheader,
|
|
22
|
-
footer,
|
|
23
|
-
sidebar,
|
|
24
|
-
})
|
|
25
|
-
.strict()
|
|
26
|
-
.nullable()
|
|
27
|
-
|
|
28
|
-
export type LayoutSchema = z.infer<typeof layoutSchema>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'astro:content'
|
|
2
|
-
import title from 'fulldev-ui/schemas/fields/title'
|
|
3
|
-
import sections from './components/sections'
|
|
4
|
-
import description from './fields/description'
|
|
5
|
-
import href from './fields/href'
|
|
6
|
-
import image from './fields/image'
|
|
7
|
-
import seo from './fields/seo'
|
|
8
|
-
|
|
9
|
-
export const pageSchema = z
|
|
10
|
-
.object({
|
|
11
|
-
seo,
|
|
12
|
-
title,
|
|
13
|
-
description,
|
|
14
|
-
image,
|
|
15
|
-
sections,
|
|
16
|
-
href,
|
|
17
|
-
})
|
|
18
|
-
.strict()
|
|
19
|
-
|
|
20
|
-
export type PageSchema = z.infer<typeof pageSchema>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'astro:content'
|
|
2
|
-
import image from 'fulldev-ui/schemas/components/image'
|
|
3
|
-
import sections from 'fulldev-ui/schemas/components/sections'
|
|
4
|
-
import description from 'fulldev-ui/schemas/fields/description'
|
|
5
|
-
import title from 'fulldev-ui/schemas/fields/title'
|
|
6
|
-
|
|
7
|
-
export const postSchema = z
|
|
8
|
-
.object({
|
|
9
|
-
title,
|
|
10
|
-
description,
|
|
11
|
-
image,
|
|
12
|
-
sections,
|
|
13
|
-
})
|
|
14
|
-
.strict()
|
|
15
|
-
|
|
16
|
-
export type PostSchema = z.infer<typeof postSchema>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from 'astro:content'
|
|
2
|
-
import categories from 'fulldev-ui/schemas/fields/categories'
|
|
3
|
-
import description from 'fulldev-ui/schemas/fields/description'
|
|
4
|
-
import images from 'fulldev-ui/schemas/fields/images'
|
|
5
|
-
import title from 'fulldev-ui/schemas/fields/title'
|
|
6
|
-
import order from './fields/order'
|
|
7
|
-
import price from './fields/price'
|
|
8
|
-
import soldout from './fields/soldout'
|
|
9
|
-
import variants from './fields/variants'
|
|
10
|
-
|
|
11
|
-
export const productSchema = z.object({
|
|
12
|
-
soldout,
|
|
13
|
-
order,
|
|
14
|
-
title,
|
|
15
|
-
description,
|
|
16
|
-
price,
|
|
17
|
-
categories,
|
|
18
|
-
images,
|
|
19
|
-
variants,
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
export type ProductSchema = z.infer<typeof productSchema>
|