fulldev-ui 0.6.0-beta.6 → 0.6.0-beta.8
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/.vscode/settings.json +2 -0
- package/astro.config.ts +1 -3
- package/cloudcannon.config.yml +2 -3
- package/package.json +1 -1
- package/src/blocks/Banner.astro +3 -3
- package/src/blocks/Colleagues1.astro +16 -16
- package/src/blocks/Contact1.astro +5 -10
- package/src/blocks/Content1.astro +22 -39
- package/src/blocks/Content2.astro +21 -45
- package/src/blocks/Content3.astro +36 -31
- package/src/blocks/Content4.astro +28 -35
- package/src/blocks/Content5.astro +72 -0
- package/src/blocks/Cta1.astro +6 -6
- package/src/blocks/Features1.astro +9 -5
- package/src/blocks/Footer.astro +13 -5
- package/src/blocks/Header.astro +19 -15
- package/src/blocks/Hero1.astro +8 -5
- package/src/blocks/Industries1.astro +86 -0
- package/src/blocks/Intro1.astro +7 -9
- package/src/blocks/Jobs1.astro +28 -24
- package/src/blocks/Logos1.astro +4 -4
- package/src/blocks/Products1.astro +4 -4
- package/src/blocks/Projects1.astro +103 -0
- package/src/blocks/Reviews1.astro +9 -7
- package/src/{components → blocks}/Subheader.astro +1 -2
- package/src/components/Badge.astro +8 -20
- package/src/components/Badges.astro +3 -3
- package/src/components/Block.astro +1 -1
- package/src/components/Button.astro +9 -18
- package/src/components/Cart.astro +6 -6
- package/src/components/CartSummary.astro +1 -0
- package/src/components/Channel.astro +9 -3
- package/src/components/Channels.astro +11 -42
- package/src/components/Checkbox.astro +8 -14
- package/src/components/Element.astro +2 -1
- package/src/components/Form.astro +1 -2
- package/src/components/Gallery.astro +6 -5
- package/src/components/Head.astro +14 -4
- package/src/components/Heading.astro +21 -17
- package/src/components/Icon.astro +2 -3
- package/src/components/Image.astro +6 -2
- package/src/components/Input.astro +11 -14
- package/src/components/Label.astro +6 -6
- package/src/components/Link.astro +13 -16
- package/src/components/Links.astro +1 -2
- package/src/components/List.astro +3 -5
- package/src/components/Logo.astro +9 -16
- package/src/components/Menu.astro +7 -3
- package/src/components/Paragraph.astro +6 -7
- package/src/components/Price.astro +1 -4
- package/src/components/Rating.astro +4 -2
- package/src/components/Search.astro +1 -6
- package/src/components/Select.astro +3 -4
- package/src/components/Sidebar.astro +6 -6
- package/src/components/Social.astro +3 -1
- package/src/components/Socials.astro +18 -34
- package/src/components/Switch.astro +4 -69
- package/src/components/Table.astro +2 -3
- package/src/components/Tagline.astro +6 -7
- package/src/components/Textarea.astro +5 -5
- package/src/components/Themer.astro +3 -3
- package/src/components/Toc.astro +7 -11
- package/src/components/Toggle.astro +45 -0
- package/src/components/{Breadcrumb.astro → _Breadcrumb.astro} +3 -3
- package/src/components/_Image.astro +2 -2
- package/src/components/docs/Props.astro +21 -0
- package/src/content/layouts/base.yml +131 -19
- package/src/content/pages/base/toggle.mdx +28 -0
- package/src/content/pages/{blocks → docs/blocks}/banner.mdx +1 -0
- package/src/content/pages/docs/blocks/colleagues.mdx +49 -0
- package/src/content/pages/docs/blocks/content.mdx +155 -0
- package/src/content/pages/docs/blocks/cta.mdx +16 -0
- package/src/content/pages/docs/blocks/feature.mdx +17 -0
- package/src/content/pages/docs/blocks/features.mdx +35 -0
- package/src/content/pages/docs/blocks/footer.mdx +46 -0
- package/src/content/pages/docs/blocks/header.mdx +60 -0
- package/src/content/pages/docs/blocks/hero.mdx +18 -0
- package/src/content/pages/docs/blocks/intro.mdx +16 -0
- package/src/content/pages/docs/blocks/logos.mdx +37 -0
- package/src/content/pages/docs/blocks/projects.mdx +36 -0
- package/src/content/pages/docs/blocks/reviews.mdx +65 -0
- package/src/content/pages/docs/blocks.mdx +45 -20
- package/src/content/pages/docs/collections/pages.mdx +2 -2
- package/src/content/pages/docs/components/{table.mdx → _table.mdx} +2 -4
- package/src/content/pages/docs/components/{themer.mdx → _themer.mdx} +2 -4
- package/src/content/pages/docs/components/_toggle.mdx +2 -2
- package/src/content/pages/docs/components/badge.mdx +2 -4
- package/src/content/pages/docs/components/badges.mdx +3 -4
- package/src/content/pages/docs/components/button.mdx +2 -4
- package/src/content/pages/docs/components/buttons.mdx +3 -4
- package/src/content/pages/docs/components/channel.mdx +2 -4
- package/src/content/pages/docs/components/channels.mdx +3 -2
- package/src/content/pages/docs/components/checkbox.mdx +2 -4
- package/src/content/pages/docs/components/heading.mdx +11 -21
- package/src/content/pages/docs/components/icon.mdx +2 -4
- package/src/content/pages/docs/components/image.mdx +3 -9
- package/src/content/pages/docs/components/input.mdx +2 -4
- package/src/content/pages/docs/components/label.mdx +2 -4
- package/src/content/pages/docs/components/link.mdx +2 -4
- package/src/content/pages/docs/components/links.mdx +3 -4
- package/src/content/pages/docs/components/list.mdx +2 -4
- package/src/content/pages/docs/components/logo.mdx +9 -21
- package/src/content/pages/docs/components/menu.mdx +20 -48
- package/src/content/pages/docs/components/paragraph.mdx +44 -0
- package/src/content/pages/docs/components/rating.mdx +9 -42
- package/src/content/pages/docs/components/select.mdx +2 -4
- package/src/content/pages/docs/components/social.mdx +2 -4
- package/src/content/pages/docs/components/socials.mdx +3 -2
- package/src/content/pages/docs/components/switch.mdx +2 -4
- package/src/content/pages/docs/components/tagline.mdx +2 -6
- package/src/content/pages/docs/components/textarea.mdx +2 -4
- package/src/content/pages/docs/components.mdx +3 -4
- package/src/content/pages/docs/customization.mdx +52 -20
- package/src/content/pages/docs/frameworks.mdx +12 -11
- package/src/content/pages/docs/index.mdx +3 -2
- package/src/content/pages/docs/installation.mdx +9 -6
- package/src/content/pages/docs/layouts/doc.mdx +15 -0
- package/src/content/pages/docs/layouts/page.mdx +15 -0
- package/src/content/pages/docs/layouts.mdx +66 -19
- package/src/content/pages/docs/{generating-pages.mdx → pages.mdx} +1 -0
- package/src/content/pages/docs/{components → structures}/_card.mdx +6 -6
- package/src/content/pages/docs/{components → structures}/_drawer.mdx +1 -1
- package/src/content/pages/docs/structures/card.mdx +15 -0
- package/src/content/pages/docs/{components → structures}/code.mdx +4 -7
- package/src/content/pages/docs/structures/container.mdx +15 -0
- package/src/content/pages/docs/structures/drawer.mdx +15 -0
- package/src/content/pages/docs/structures/group.mdx +15 -0
- package/src/content/pages/docs/structures/layout.mdx +15 -0
- package/src/content/pages/docs/structures/masonry.mdx +15 -0
- package/src/content/pages/docs/structures/matrix.mdx +15 -0
- package/src/content/pages/docs/structures/panel.mdx +15 -0
- package/src/content/pages/docs/{components → structures}/prose.mdx +3 -6
- package/src/content/pages/docs/structures/section.mdx +15 -0
- package/src/content/pages/docs/structures/stack.mdx +15 -0
- package/src/content/pages/docs/structures/writeup.mdx +15 -0
- package/src/content/pages/docs/structures.mdx +7 -0
- package/src/content/pages/index.mdx +7 -4
- package/src/content/pages/showcase.mdx +1 -4
- package/src/css/theme.css +9 -42
- package/src/integration/index.ts +1 -3
- package/src/layouts/Block.astro +81 -0
- package/src/layouts/Category.astro +6 -6
- package/src/layouts/Doc.astro +50 -24
- package/src/layouts/Job.astro +5 -7
- package/src/layouts/Jobs.astro +14 -14
- package/src/layouts/Page.astro +4 -4
- package/src/layouts/Post.astro +7 -6
- package/src/layouts/Product.astro +3 -2
- package/src/schemas/badge.ts +14 -0
- package/src/schemas/block.ts +58 -0
- package/src/schemas/{components/button.ts → button.ts} +3 -7
- package/src/schemas/channel.ts +14 -0
- package/src/schemas/checkbox.ts +13 -0
- package/src/schemas/footer.ts +17 -0
- package/src/schemas/{components/head.ts → head.ts} +5 -5
- package/src/schemas/header.ts +21 -0
- package/src/schemas/{components/image.ts → image.ts} +22 -9
- package/src/schemas/input.ts +13 -0
- package/src/schemas/link.ts +14 -0
- package/src/schemas/logo.ts +13 -0
- package/src/schemas/menu.ts +11 -0
- package/src/schemas/page.ts +11 -14
- package/src/schemas/{utils/pathSchema.ts → path.ts} +1 -1
- package/src/schemas/textarea.ts +11 -0
- package/src/stores/cart.svelte.ts +0 -1
- package/src/{components → structures}/Card.astro +5 -1
- package/src/{components → structures}/Code.astro +7 -6
- package/src/{components → structures}/Container.astro +1 -1
- package/src/{components → structures}/Drawer.astro +4 -4
- package/src/{components → structures}/Layout.astro +2 -3
- package/src/structures/Matrix.astro +39 -0
- package/src/{components → structures}/Prose.astro +17 -6
- package/src/structures/Sidebar.astro +37 -0
- package/src/{components → structures}/Stack.astro +1 -1
- package/src/{components → structures}/Writeup.astro +9 -1
- package/src/structures/_Bento.astro +34 -0
- package/src/utils/cart.ts +1 -1
- package/tailwind.config.ts +5 -7
- package/tsconfig.json +3 -1
- package/public/favicon/favicon-16x16-dark.png +0 -0
- package/public/favicon/favicon-32x32-dark.png +0 -0
- package/public/favicon/favicon-48x48-dark.png +0 -0
- package/public/favicon/favicon-dark.ico +0 -0
- package/src/blocks/Feature1.astro +0 -61
- package/src/components/Avatar.astro +0 -45
- package/src/components/Avatars.astro +0 -36
- package/src/components/Cards.astro +0 -133
- package/src/components/Dialog.astro +0 -67
- package/src/components/DrawerOld.astro +0 -143
- package/src/components/Grid.astro +0 -39
- package/src/components/Header.astro +0 -32
- package/src/components/Navigation.astro +0 -39
- package/src/components/_Author.astro +0 -90
- package/src/components/_Header.astro +0 -129
- package/src/components/_Prose copy.astro +0 -172
- package/src/components/_Sidebar copy.astro +0 -87
- package/src/components/docs/DecorativeBox.astro +0 -15
- package/src/components/docs/PropsTable.astro +0 -49
- package/src/components/experimental/Video.astro +0 -32
- package/src/components/experimental/Window.astro +0 -122
- package/src/content/pages/blocks/_footer.mdx +0 -75
- package/src/content/pages/blocks/_header.mdx +0 -183
- package/src/content/pages/blocks/_prices.mdx +0 -122
- package/src/content/pages/blocks/_product.mdx +0 -97
- package/src/content/pages/blocks/_products.mdx +0 -52
- package/src/content/pages/blocks/colleagues.mdx +0 -37
- package/src/content/pages/blocks/content.mdx +0 -77
- package/src/content/pages/blocks/cta.mdx +0 -159
- package/src/content/pages/blocks/features.mdx +0 -128
- package/src/content/pages/blocks/hero.mdx +0 -94
- package/src/content/pages/blocks/intro.mdx +0 -124
- package/src/content/pages/blocks/reviews.mdx +0 -251
- package/src/content/pages/categories/category.md +0 -7
- package/src/content/pages/docs/_internationalization.mdx +0 -55
- package/src/content/pages/docs/_using-blocks.mdx +0 -33
- package/src/content/pages/docs/_using-presets.mdx +0 -49
- package/src/content/pages/docs/collections.mdx +0 -42
- package/src/content/pages/docs/components/_switch.mdx +0 -31
- package/src/content/pages/docs/components/avatar.mdx +0 -34
- package/src/content/pages/docs/components/section.mdx +0 -35
- package/src/content/pages/docs/components/text.mdx +0 -48
- package/src/content/pages/products/product.md +0 -20
- package/src/css/color.css +0 -76
- package/src/css/size.css +0 -131
- 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 +0 -9
- 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 +0 -16
- package/src/images/favicon/manifest.webmanifest +0 -30
- package/src/images/favicon/mstile-150x150.png +0 -0
- package/src/images/favicon/safari-pinned-tab.svg +0 -16
- package/src/images/favicon/yandex-browser-50x50.png +0 -0
- package/src/images/favicon/yandex-browser-manifest.json +0 -9
- package/src/pages/test.astro +0 -35
- package/src/schemas/components/avatar.ts +0 -6
- package/src/schemas/components/badge.ts +0 -18
- package/src/schemas/components/block.ts +0 -61
- package/src/schemas/components/channel.ts +0 -19
- package/src/schemas/components/footer.ts +0 -19
- package/src/schemas/components/header.ts +0 -23
- package/src/schemas/components/heading.ts +0 -9
- package/src/schemas/components/icon.ts +0 -9
- package/src/schemas/components/link.ts +0 -17
- package/src/schemas/components/logo.ts +0 -13
- package/src/schemas/components/menu.ts +0 -14
- package/src/schemas/components/navigation.ts +0 -10
- package/src/schemas/components/paragraph.ts +0 -9
- package/src/schemas/components/price.ts +0 -9
- package/src/schemas/components/rating.ts +0 -10
- package/src/schemas/components/sidebar.ts +0 -18
- package/src/schemas/components/social.ts +0 -18
- package/src/schemas/components/tagline.ts +0 -9
- package/src/schemas/imageSchema.ts +0 -41
- package/src/schemas/utils/component.ts +0 -17
- package/src/types/global-props.ts +0 -7
- package/src/utils/_archive/Childmorphic.ts +0 -8
- package/src/utils/_archive/getAllCollections.ts +0 -10
- package/src/utils/_archive/getCollectionCascade.ts +0 -33
- package/src/utils/_archive/getPathname.ts +0 -18
- package/src/utils/_archive/mergeEntries.ts +0 -28
- package/src/utils/_archive/staticPageSchema.ts +0 -124
- package/src/utils/_archive/transform/transform.ts +0 -25
- package/src/utils/_archive/transform/transformCasing.ts +0 -24
- package/src/utils/_archive/transform/transformReferences.ts +0 -54
- package/src/utils/_archive/transform/transformSelfs.ts +0 -20
- package/src/utils/_archive/transform/transformUnderscores.ts +0 -19
- package/src/utils/formatEntries.ts +0 -8
- package/src/utils/formatEntry.ts +0 -29
- package/src/utils/getDeepReferenceChildren.ts +0 -14
- package/src/utils/getFolderChildren.ts +0 -18
- package/src/utils/getReferenceChildren.ts +0 -14
- package/src/utils/getSiblingPages.ts +0 -14
- package/src/utils/setTheme.ts +0 -18
- /package/{src → public}/images/anti-slip-profiles.webp +0 -0
- /package/{src → public}/images/avatar-1.jpeg +0 -0
- /package/{src → public}/images/avatar-2.jpeg +0 -0
- /package/{src → public}/images/avatar-3.jpeg +0 -0
- /package/{src → public}/images/avatar-4.jpeg +0 -0
- /package/{src → public}/images/avatar-placeholder.jpg +0 -0
- /package/{src → public}/images/block-code.png +0 -0
- /package/{src → public}/images/component-code.png +0 -0
- /package/{src → public}/images/favicon.svg +0 -0
- /package/{src → public}/images/fulldev-ui.webp +0 -0
- /package/{src → public}/images/lavis-detailing.webp +0 -0
- /package/{src → public}/images/leren-trainingsacteren.webp +0 -0
- /package/{src → public}/images/logo-1.svg +0 -0
- /package/{src → public}/images/logo-2.svg +0 -0
- /package/{src → public}/images/logo-basic.svg +0 -0
- /package/{src → public}/images/logo-simple.svg +0 -0
- /package/{src → public}/images/logo-thin.svg +0 -0
- /package/{src → public}/images/logo.svg +0 -0
- /package/{src → public}/images/logofat.svg +0 -0
- /package/{src → public}/images/miele-witgoedcenter-amsterdam.webp +0 -0
- /package/{src → public}/images/og-image.png +0 -0
- /package/{src → public}/images/placeholder-center.webp +0 -0
- /package/{src → public}/images/placeholder-landscape-dark.png +0 -0
- /package/{src → public}/images/placeholder-landscape.webp +0 -0
- /package/{src → public}/images/placeholder-portrait.webp +0 -0
- /package/{src → public}/images/placeholder-right.webp +0 -0
- /package/{src → public}/images/placeholder.webp +0 -0
- /package/{src → public}/images/sloepverhuur-bolsward.webp +0 -0
- /package/{src → public}/images/stark-vulcanising-products.webp +0 -0
- /package/{src → public}/images/the-gym-haren.webp +0 -0
- /package/{src → public}/images/van-dillen-antieke-bouwmaterialen.webp +0 -0
- /package/src/components/{LocaleSwitcher.astro → _LocaleSwitcher.astro} +0 -0
- /package/src/content/pages/{showcase → _showcase}/anti-slip-profiles.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/fulldev-ui.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/lavis-detailing.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/leren-trainingsacteren.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/miele-witgoedcenter-amsterdam.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/sloepverhuur-bolsward.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/stark-vulcanising-products.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/the-gym-haren.md +0 -0
- /package/src/content/pages/{showcase → _showcase}/van-dillen-antieke-bouwmaterialen.md +0 -0
- /package/src/content/pages/{blocks → docs/blocks}/_categories.mdx +0 -0
- /package/src/content/pages/{blocks/contact.mdx → docs/blocks/_contact.mdx} +0 -0
- /package/src/content/pages/{blocks → docs/blocks}/_jobs.mdx +0 -0
- /package/src/content/pages/{blocks/posts.mdx → docs/blocks/_posts.mdx} +0 -0
- /package/src/content/pages/{blocks → docs/blocks}/_stats.mdx +0 -0
- /package/src/content/pages/docs/{components → structures}/_dialog.mdx +0 -0
- /package/src/{components → structures}/Carousel.astro +0 -0
- /package/src/{components → structures}/Group.astro +0 -0
- /package/src/{components → structures}/Masonry.astro +0 -0
- /package/src/{components → structures}/Panel.astro +0 -0
- /package/src/{components → structures}/Section.astro +0 -0
- /package/{src/types/virtual.d.ts → virtual.d.ts} +0 -0
package/src/layouts/Doc.astro
CHANGED
|
@@ -3,23 +3,34 @@ import type { ComponentProps } from 'astro/types'
|
|
|
3
3
|
import type { CollectionEntry } from 'astro:content'
|
|
4
4
|
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
5
5
|
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
6
|
-
import Container from 'fulldev-ui/components/Container.astro'
|
|
7
|
-
import Element from 'fulldev-ui/components/Element.astro'
|
|
8
6
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
9
|
-
import
|
|
7
|
+
import Menu from 'fulldev-ui/components/Menu.astro'
|
|
8
|
+
import Menus from 'fulldev-ui/components/Menus.astro'
|
|
10
9
|
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
11
|
-
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
12
|
-
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
13
|
-
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
14
10
|
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
11
|
+
import Container from 'fulldev-ui/structures/Container.astro'
|
|
12
|
+
import Layout from 'fulldev-ui/structures/Layout.astro'
|
|
13
|
+
import Prose from 'fulldev-ui/structures/Prose.astro'
|
|
14
|
+
import Sidebar from 'fulldev-ui/structures/Sidebar.astro'
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
type Props = ComponentProps<typeof Layout> &
|
|
17
|
+
PageSchema & {
|
|
18
|
+
render: CollectionEntry<'pages'>['render']
|
|
19
|
+
}
|
|
19
20
|
|
|
20
21
|
const { header, sidebar, render, title, description, footer } = Astro.props
|
|
21
22
|
|
|
22
|
-
const { Content } = await render()
|
|
23
|
+
const { Content, headings } = await render()
|
|
24
|
+
|
|
25
|
+
const filteredHeadings = headings?.filter(
|
|
26
|
+
(heading: any) => heading.depth >= 2 && heading.depth <= 4
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
const links = filteredHeadings?.map((button: any) => ({
|
|
30
|
+
text: button.text,
|
|
31
|
+
href: `#${button.slug}`,
|
|
32
|
+
class: `depth-${button.depth}`,
|
|
33
|
+
}))
|
|
23
34
|
---
|
|
24
35
|
|
|
25
36
|
<Layout
|
|
@@ -30,27 +41,34 @@ const { Content } = await render()
|
|
|
30
41
|
{...sidebar}
|
|
31
42
|
{...header}
|
|
32
43
|
/>
|
|
33
|
-
<Container
|
|
34
|
-
<Sidebar
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
<Container as="main">
|
|
45
|
+
<Sidebar>
|
|
46
|
+
<Menus
|
|
47
|
+
size="sm"
|
|
48
|
+
menus={sidebar?.menus}
|
|
49
|
+
/>
|
|
50
|
+
</Sidebar>
|
|
51
|
+
<Container>
|
|
39
52
|
<Prose>
|
|
40
53
|
<Heading
|
|
41
|
-
as="h1"
|
|
42
54
|
size="4xl"
|
|
55
|
+
as="h1"
|
|
43
56
|
text={title}
|
|
44
57
|
/>
|
|
45
58
|
<Paragraph
|
|
46
59
|
muted
|
|
47
|
-
size="lg"
|
|
48
60
|
text={description}
|
|
49
61
|
/>
|
|
50
62
|
<Content />
|
|
51
63
|
</Prose>
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
</Container>
|
|
65
|
+
<Sidebar class:list="doc-toc">
|
|
66
|
+
<Menu
|
|
67
|
+
size="sm"
|
|
68
|
+
heading={title}
|
|
69
|
+
{links}
|
|
70
|
+
/>
|
|
71
|
+
</Sidebar>
|
|
54
72
|
</Container>
|
|
55
73
|
<Footer {...footer} />
|
|
56
74
|
</Layout>
|
|
@@ -58,12 +76,20 @@ const { Content } = await render()
|
|
|
58
76
|
<style is:global>
|
|
59
77
|
@layer fulldev {
|
|
60
78
|
.doc {
|
|
61
|
-
|
|
62
|
-
@apply flex
|
|
79
|
+
main {
|
|
80
|
+
@apply flex w-full items-start justify-between !px-0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sidebar {
|
|
84
|
+
@apply hidden lg:flex;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.doc-toc {
|
|
88
|
+
@apply hidden xl:flex;
|
|
63
89
|
}
|
|
64
90
|
|
|
65
|
-
.
|
|
66
|
-
@apply
|
|
91
|
+
.prose {
|
|
92
|
+
@apply mx-auto py-8;
|
|
67
93
|
}
|
|
68
94
|
}
|
|
69
95
|
}
|
package/src/layouts/Job.astro
CHANGED
|
@@ -5,15 +5,15 @@ import { getEntries } from 'astro:content'
|
|
|
5
5
|
import Content3 from 'fulldev-ui/blocks/Content3.astro'
|
|
6
6
|
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
7
7
|
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
8
|
-
import Block from 'fulldev-ui/components/Block.astro'
|
|
9
8
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
10
|
-
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
11
9
|
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
10
|
+
import Layout from 'fulldev-ui/structures/Layout.astro'
|
|
12
11
|
import { getHref } from 'fulldev-ui/utils/getHref.ts'
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
type Props = ComponentProps<typeof Layout> &
|
|
14
|
+
PageSchema & {
|
|
15
|
+
render: CollectionEntry<'pages'>['render']
|
|
16
|
+
}
|
|
17
17
|
|
|
18
18
|
const {
|
|
19
19
|
title,
|
|
@@ -25,7 +25,6 @@ const {
|
|
|
25
25
|
sidebar,
|
|
26
26
|
render,
|
|
27
27
|
parents,
|
|
28
|
-
blocks,
|
|
29
28
|
footer,
|
|
30
29
|
} = Astro.props
|
|
31
30
|
|
|
@@ -56,7 +55,6 @@ const { Content } = await render()
|
|
|
56
55
|
>
|
|
57
56
|
<Content />
|
|
58
57
|
</Content3>
|
|
59
|
-
{blocks?.map((block) => <Block {...block} />)}
|
|
60
58
|
</Element>
|
|
61
59
|
<Footer {...footer} />
|
|
62
60
|
</Layout>
|
package/src/layouts/Jobs.astro
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps } from 'astro/types'
|
|
3
3
|
import type { CollectionEntry } from 'astro:content'
|
|
4
|
-
import { getCollection } from 'astro:content'
|
|
5
4
|
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
6
5
|
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
7
6
|
import Intro1 from 'fulldev-ui/blocks/Intro1.astro'
|
|
8
7
|
import Jobs1 from 'fulldev-ui/blocks/Jobs1.astro'
|
|
9
|
-
import Container from 'fulldev-ui/components/Container.astro'
|
|
10
8
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
11
|
-
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
12
|
-
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
13
9
|
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
14
10
|
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
11
|
+
import Container from 'fulldev-ui/structures/Container.astro'
|
|
12
|
+
import Layout from 'fulldev-ui/structures/Layout.astro'
|
|
13
|
+
import Prose from 'fulldev-ui/structures/Prose.astro'
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
type Props = ComponentProps<typeof Layout> &
|
|
16
|
+
PageSchema & {
|
|
17
|
+
slug: CollectionEntry<'pages'>['slug']
|
|
18
|
+
render: CollectionEntry<'pages'>['render']
|
|
19
|
+
}
|
|
20
20
|
|
|
21
21
|
const { slug, header, sidebar, render, title, description, footer } =
|
|
22
22
|
Astro.props
|
|
23
23
|
|
|
24
24
|
const { Content } = await render()
|
|
25
25
|
|
|
26
|
-
const children = (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)?.map(({ collection, slug }) => ({ collection, slug }))
|
|
26
|
+
// const children = (
|
|
27
|
+
// await getCollection('pages', ({ data }) =>
|
|
28
|
+
// data.parents?.some((p) => p.slug.includes(slug))
|
|
29
|
+
// )
|
|
30
|
+
// )?.map(({ collection, slug }) => ({ collection, slug }))
|
|
31
31
|
---
|
|
32
32
|
|
|
33
33
|
<Layout
|
|
@@ -48,7 +48,7 @@ const children = (
|
|
|
48
48
|
heading={title}
|
|
49
49
|
paragraph={description}
|
|
50
50
|
/>
|
|
51
|
-
<Jobs1 pages={children} />
|
|
51
|
+
<!-- <Jobs1 pages={children} /> -->
|
|
52
52
|
<Prose>
|
|
53
53
|
<Content />
|
|
54
54
|
</Prose>
|
package/src/layouts/Page.astro
CHANGED
|
@@ -5,12 +5,12 @@ import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
|
5
5
|
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
6
6
|
import Block from 'fulldev-ui/components/Block.astro'
|
|
7
7
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
8
|
-
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
9
8
|
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
9
|
+
import Layout from 'fulldev-ui/structures/Layout.astro'
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
type Props = ComponentProps<typeof Layout> & PageSchema
|
|
12
12
|
|
|
13
|
-
const { banner, sidebar, header,
|
|
13
|
+
const { banner, sidebar, header, sections, footer } = Astro.props
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
<Layout
|
|
@@ -23,7 +23,7 @@ const { banner, sidebar, header, blocks, footer } = Astro.props
|
|
|
23
23
|
{...header}
|
|
24
24
|
/>
|
|
25
25
|
<Element as="main">
|
|
26
|
-
{
|
|
26
|
+
{sections?.map((section) => <Block {...section} />)}
|
|
27
27
|
</Element>
|
|
28
28
|
<Footer {...footer} />
|
|
29
29
|
</Layout>
|
package/src/layouts/Post.astro
CHANGED
|
@@ -6,12 +6,13 @@ import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
|
6
6
|
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
7
7
|
import Block from 'fulldev-ui/components/Block.astro'
|
|
8
8
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
9
|
-
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
10
9
|
import type { PageSchema } from 'fulldev-ui/schemas/page'
|
|
10
|
+
import Layout from 'fulldev-ui/structures/Layout.astro'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
type Props = ComponentProps<typeof Layout> &
|
|
13
|
+
PageSchema & {
|
|
14
|
+
render: CollectionEntry<'pages'>['render']
|
|
15
|
+
}
|
|
15
16
|
|
|
16
17
|
const {
|
|
17
18
|
title,
|
|
@@ -20,7 +21,7 @@ const {
|
|
|
20
21
|
button,
|
|
21
22
|
header,
|
|
22
23
|
sidebar,
|
|
23
|
-
|
|
24
|
+
sections,
|
|
24
25
|
footer,
|
|
25
26
|
render,
|
|
26
27
|
} = Astro.props
|
|
@@ -46,7 +47,7 @@ const { Content, headings } = await render()
|
|
|
46
47
|
>
|
|
47
48
|
<Content />
|
|
48
49
|
</Content1>
|
|
49
|
-
{
|
|
50
|
+
{sections?.map((section) => <Block {...section} />)}
|
|
50
51
|
</Element>
|
|
51
52
|
<Footer {...footer} />
|
|
52
53
|
</Layout>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
// @ts-nocheck
|
|
2
3
|
import type { ComponentProps } from 'astro/types'
|
|
3
4
|
import { getImage } from 'astro:assets'
|
|
4
5
|
import type { CollectionEntry } from 'astro:content'
|
|
@@ -8,11 +9,11 @@ import CartForm from 'fulldev-ui/components/CartForm.svelte'
|
|
|
8
9
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
9
10
|
import Gallery from 'fulldev-ui/components/Gallery.astro'
|
|
10
11
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
11
|
-
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
12
12
|
import List from 'fulldev-ui/components/List.astro'
|
|
13
13
|
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
14
|
-
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
15
14
|
import type { PageSchema } from 'fulldev-ui/schemas/page'
|
|
15
|
+
import Layout from 'fulldev-ui/structures/Layout.astro'
|
|
16
|
+
import Prose from 'fulldev-ui/structures/Prose.astro'
|
|
16
17
|
|
|
17
18
|
interface Props extends ComponentProps<typeof Layout>, PageSchema {
|
|
18
19
|
render: CollectionEntry<'pages'>['render']
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import type Badge from 'fulldev-ui/components/Badge.astro'
|
|
4
|
+
|
|
5
|
+
export const badgeSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
icon: z.string().optional(),
|
|
8
|
+
text: z.string().optional(),
|
|
9
|
+
href: z.string().optional(),
|
|
10
|
+
target: z.literal('_blank').optional(),
|
|
11
|
+
size: z.enum(['sm', 'md', 'lg']).optional(),
|
|
12
|
+
variant: z.enum(['primary', 'secondary', 'outline']).optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Badge>>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import { badgeSchema } from 'fulldev-ui/schemas/badge.ts'
|
|
3
|
+
import { buttonSchema } from 'fulldev-ui/schemas/button.ts'
|
|
4
|
+
import { channelSchema } from 'fulldev-ui/schemas/channel.ts'
|
|
5
|
+
import { imageSchema } from 'fulldev-ui/schemas/image.ts'
|
|
6
|
+
import { linkSchema } from 'fulldev-ui/schemas/link.ts'
|
|
7
|
+
import { logoSchema } from 'fulldev-ui/schemas/logo.ts'
|
|
8
|
+
import { menuSchema } from 'fulldev-ui/schemas/menu.ts'
|
|
9
|
+
import { pathSchema } from 'fulldev-ui/schemas/path.ts'
|
|
10
|
+
|
|
11
|
+
export const blockSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
_block: z.string().optional(),
|
|
14
|
+
dark: z.boolean().optional(),
|
|
15
|
+
themer: z.boolean().optional(),
|
|
16
|
+
search: z.boolean().optional(),
|
|
17
|
+
cart: z.boolean().optional(),
|
|
18
|
+
text: z.string().optional(),
|
|
19
|
+
content: z.string().optional(),
|
|
20
|
+
tagline: z.string().optional(),
|
|
21
|
+
heading: z.string().optional(),
|
|
22
|
+
paragraph: z.string().optional(),
|
|
23
|
+
list: z.string().array().optional(),
|
|
24
|
+
socials: z.string().array().optional(),
|
|
25
|
+
logo: logoSchema.optional(),
|
|
26
|
+
link: linkSchema.optional(),
|
|
27
|
+
links: linkSchema.array().optional(),
|
|
28
|
+
menus: menuSchema.array().optional(),
|
|
29
|
+
badge: badgeSchema.optional(),
|
|
30
|
+
badges: badgeSchema.array().optional(),
|
|
31
|
+
button: buttonSchema.optional(),
|
|
32
|
+
buttons: buttonSchema.array().optional(),
|
|
33
|
+
image: imageSchema.optional(),
|
|
34
|
+
images: imageSchema.array().optional(),
|
|
35
|
+
channels: channelSchema.array().optional(),
|
|
36
|
+
pages: pathSchema('pages').array().optional(),
|
|
37
|
+
products: pathSchema('pages').array().optional(),
|
|
38
|
+
cards: z
|
|
39
|
+
.object({
|
|
40
|
+
icon: z.string().optional(),
|
|
41
|
+
rating: z.number().optional(),
|
|
42
|
+
tagline: z.string().optional(),
|
|
43
|
+
heading: z.string().optional(),
|
|
44
|
+
paragraph: z.string().optional(),
|
|
45
|
+
list: z.string().array().optional(),
|
|
46
|
+
badge: badgeSchema.optional(),
|
|
47
|
+
badges: badgeSchema.array().optional(),
|
|
48
|
+
button: buttonSchema.optional(),
|
|
49
|
+
buttons: buttonSchema.array().optional(),
|
|
50
|
+
image: imageSchema.optional(),
|
|
51
|
+
})
|
|
52
|
+
.strict()
|
|
53
|
+
.array()
|
|
54
|
+
.optional(),
|
|
55
|
+
})
|
|
56
|
+
.strict()
|
|
57
|
+
|
|
58
|
+
export type BlockSchema = z.infer<typeof blockSchema>
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import { iconSchema } from './icon'
|
|
3
2
|
|
|
4
3
|
export const buttonSchema = z
|
|
5
4
|
.object({
|
|
6
|
-
icon:
|
|
5
|
+
icon: z.string().optional(),
|
|
7
6
|
text: z.string().optional(),
|
|
8
7
|
href: z.string().optional(),
|
|
9
8
|
target: z.literal('_blank').optional(),
|
|
10
|
-
size: z.enum(['sm', 'md', 'lg']).
|
|
9
|
+
size: z.enum(['sm', 'md', 'lg']).optional(),
|
|
11
10
|
reverse: z.boolean().optional(),
|
|
12
|
-
variant: z
|
|
13
|
-
.enum(['primary', 'secondary', 'outline', 'ghost'])
|
|
14
|
-
.default('primary')
|
|
15
|
-
.optional(),
|
|
11
|
+
variant: z.enum(['primary', 'secondary', 'outline', 'ghost']).optional(),
|
|
16
12
|
})
|
|
17
13
|
.strict()
|
|
18
14
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import Channel from 'fulldev-ui/components/Channel.astro'
|
|
4
|
+
|
|
5
|
+
export const channelSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
icon: z.string().optional(),
|
|
8
|
+
heading: z.string().optional(),
|
|
9
|
+
text: z.string().optional(),
|
|
10
|
+
href: z.string().optional(),
|
|
11
|
+
size: z.enum(['sm', 'md', 'lg']).optional(),
|
|
12
|
+
variant: z.enum(['secondary', 'outline']).optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Channel>>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import type Checkbox from 'fulldev-ui/components/Checkbox.astro'
|
|
4
|
+
|
|
5
|
+
export const checkboxSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
name: z.string().optional(),
|
|
8
|
+
label: z.string().optional(),
|
|
9
|
+
id: z.string().optional(),
|
|
10
|
+
value: z.string().optional(),
|
|
11
|
+
size: z.enum(['sm', 'md', 'lg']).optional(),
|
|
12
|
+
})
|
|
13
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Checkbox>>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import { channelSchema } from 'fulldev-ui/schemas/channel.ts'
|
|
3
|
+
import { logoSchema } from 'fulldev-ui/schemas/logo.ts'
|
|
4
|
+
import { menuSchema } from 'fulldev-ui/schemas/menu.ts'
|
|
5
|
+
|
|
6
|
+
export const footerSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
logo: logoSchema.optional(),
|
|
9
|
+
heading: z.string().optional(),
|
|
10
|
+
paragraph: z.string().optional(),
|
|
11
|
+
socials: z.string().url().array().optional(),
|
|
12
|
+
channels: channelSchema.array().optional(),
|
|
13
|
+
menus: menuSchema.array().optional(),
|
|
14
|
+
})
|
|
15
|
+
.strict()
|
|
16
|
+
|
|
17
|
+
export type FooterSchema = z.infer<typeof footerSchema>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
1
2
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
+
import type Head from 'fulldev-ui/components/Head.astro'
|
|
4
|
+
import { imageSchema } from 'fulldev-ui/schemas/image.ts'
|
|
3
5
|
|
|
4
6
|
export const headSchema = z
|
|
5
7
|
.object({
|
|
6
8
|
title: z.string().optional(),
|
|
7
9
|
description: z.string().optional(),
|
|
8
10
|
image: imageSchema.optional(),
|
|
9
|
-
theme: z.enum(['light', 'dark', 'system']).
|
|
11
|
+
theme: z.enum(['light', 'dark', 'system']).optional(),
|
|
10
12
|
favicon: z.string().optional(),
|
|
11
13
|
company: z.string().optional(),
|
|
12
14
|
scripts: z.string().array().optional(),
|
|
13
15
|
code: z.string().optional(),
|
|
14
16
|
})
|
|
15
|
-
.strict()
|
|
16
|
-
|
|
17
|
-
export type HeadSchema = z.infer<typeof headSchema>
|
|
17
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Head>>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import { buttonSchema } from 'fulldev-ui/schemas/button.ts'
|
|
3
|
+
import { linkSchema } from 'fulldev-ui/schemas/link.ts'
|
|
4
|
+
import { logoSchema } from 'fulldev-ui/schemas/logo.ts'
|
|
5
|
+
import { menuSchema } from 'fulldev-ui/schemas/menu.ts'
|
|
6
|
+
|
|
7
|
+
export const headerSchema = z
|
|
8
|
+
.object({
|
|
9
|
+
logo: logoSchema.optional(),
|
|
10
|
+
heading: z.string().optional(),
|
|
11
|
+
links: linkSchema.array().optional(),
|
|
12
|
+
socials: z.string().array().optional(),
|
|
13
|
+
buttons: buttonSchema.array().optional(),
|
|
14
|
+
menus: menuSchema.array().optional(),
|
|
15
|
+
themer: z.boolean().optional(),
|
|
16
|
+
cart: z.boolean().optional(),
|
|
17
|
+
search: z.boolean().optional(),
|
|
18
|
+
})
|
|
19
|
+
.strict()
|
|
20
|
+
|
|
21
|
+
export type HeaderSchema = z.infer<typeof headerSchema>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
1
2
|
import { z } from 'astro:content'
|
|
3
|
+
import type Image from 'fulldev-ui/components/Image.astro'
|
|
2
4
|
|
|
3
5
|
// const imagePath = z.preprocess((data: unknown) => {
|
|
4
6
|
// if (typeof data === 'string') {
|
|
@@ -25,16 +27,27 @@ import { z } from 'astro:content'
|
|
|
25
27
|
// )
|
|
26
28
|
// .optional()
|
|
27
29
|
|
|
30
|
+
// export const imageSchema = z
|
|
31
|
+
// .object({
|
|
32
|
+
// src: z.string().optional(),
|
|
33
|
+
// alt: z.string().optional(),
|
|
34
|
+
// width: z.number().optional(),
|
|
35
|
+
// height: z.number().optional(),
|
|
36
|
+
// })
|
|
37
|
+
// .strict() satisfies z.ZodType<ComponentProps<typeof Image>>
|
|
38
|
+
|
|
39
|
+
const image = z
|
|
40
|
+
.object({
|
|
41
|
+
src: z.string().optional(),
|
|
42
|
+
alt: z.string().optional(),
|
|
43
|
+
width: z.number().optional(),
|
|
44
|
+
height: z.number().optional(),
|
|
45
|
+
})
|
|
46
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Image>>
|
|
47
|
+
|
|
28
48
|
export const imageSchema = z
|
|
29
49
|
.preprocess(
|
|
30
50
|
(data: unknown) => (typeof data === 'string' ? { src: data } : data),
|
|
31
|
-
|
|
32
|
-
.object({
|
|
33
|
-
src: z.string().optional(),
|
|
34
|
-
alt: z.string().optional(),
|
|
35
|
-
width: z.number().optional(),
|
|
36
|
-
height: z.number().optional(),
|
|
37
|
-
})
|
|
38
|
-
.strict()
|
|
51
|
+
image
|
|
39
52
|
)
|
|
40
|
-
.optional()
|
|
53
|
+
.optional() as z.ZodType<ComponentProps<typeof Image>>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import Input from 'fulldev-ui/components/Input.astro'
|
|
4
|
+
|
|
5
|
+
export const inputSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
icon: z.string().optional(),
|
|
8
|
+
label: z.string().optional(),
|
|
9
|
+
placeholder: z.string().optional(),
|
|
10
|
+
value: z.string().optional(),
|
|
11
|
+
size: z.enum(['sm', 'md', 'lg']).optional(),
|
|
12
|
+
})
|
|
13
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Input>>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import Link from 'fulldev-ui/components/Link.astro'
|
|
4
|
+
|
|
5
|
+
export const linkSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
text: z.string().optional(),
|
|
8
|
+
href: z.string().optional(),
|
|
9
|
+
icon: z.string().optional(),
|
|
10
|
+
target: z.literal('_blank').optional(),
|
|
11
|
+
size: z.enum(['sm', 'md', 'lg']).optional(),
|
|
12
|
+
variant: z.enum(['primary', 'underline', 'muted']).optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Link>>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import Logo from 'fulldev-ui/components/Logo.astro'
|
|
4
|
+
import { imageSchema } from 'fulldev-ui/schemas/image.ts'
|
|
5
|
+
|
|
6
|
+
export const logoSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
image: imageSchema.optional(),
|
|
9
|
+
text: z.string().optional(),
|
|
10
|
+
href: z.string().optional(),
|
|
11
|
+
size: z.enum(['sm', 'md', 'lg']).optional(),
|
|
12
|
+
})
|
|
13
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Logo>>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import Menu from 'fulldev-ui/components/Menu.astro'
|
|
4
|
+
import { linkSchema } from 'fulldev-ui/schemas/link.ts'
|
|
5
|
+
|
|
6
|
+
export const menuSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
heading: z.string().optional(),
|
|
9
|
+
links: linkSchema.array().optional(),
|
|
10
|
+
})
|
|
11
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Menu>>
|
package/src/schemas/page.ts
CHANGED
|
@@ -1,39 +1,36 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import { blockSchema } from 'fulldev-ui/schemas/
|
|
3
|
-
import { buttonSchema } from 'fulldev-ui/schemas/
|
|
4
|
-
import { headSchema } from 'fulldev-ui/schemas/
|
|
5
|
-
import { imageSchema } from 'fulldev-ui/schemas/
|
|
6
|
-
import {
|
|
7
|
-
import pathSchema from 'fulldev-ui/schemas/utils/pathSchema.ts'
|
|
2
|
+
import { blockSchema } from 'fulldev-ui/schemas/block.ts'
|
|
3
|
+
import { buttonSchema } from 'fulldev-ui/schemas/button.ts'
|
|
4
|
+
import { headSchema } from 'fulldev-ui/schemas/head.ts'
|
|
5
|
+
import { imageSchema } from 'fulldev-ui/schemas/image.ts'
|
|
6
|
+
import { pathSchema } from 'fulldev-ui/schemas/path.ts'
|
|
8
7
|
|
|
9
8
|
export const pageSchema = z
|
|
10
9
|
.object({
|
|
11
|
-
_layout: z.string().
|
|
10
|
+
_layout: z.string().optional(),
|
|
12
11
|
_schema: z.string().optional(),
|
|
13
12
|
href: z.string().optional(),
|
|
14
13
|
draft: z.boolean().optional(),
|
|
15
14
|
title: z.string().optional(),
|
|
16
15
|
description: z.string().optional(),
|
|
17
16
|
list: z.string().array().optional(),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
price: priceSchema.shape.amount,
|
|
17
|
+
price: z.number().optional(),
|
|
18
|
+
soldout: z.boolean().optional(),
|
|
21
19
|
order: z.number().optional(),
|
|
22
20
|
variants: z.record(z.string(), z.string().array()).optional(),
|
|
23
|
-
|
|
21
|
+
image: imageSchema.optional(),
|
|
22
|
+
images: imageSchema.array().optional(),
|
|
24
23
|
head: headSchema.optional(),
|
|
25
24
|
button: buttonSchema.optional(),
|
|
26
25
|
buttons: buttonSchema.array().optional(),
|
|
27
26
|
banner: blockSchema.optional(),
|
|
28
27
|
navigation: blockSchema.optional(),
|
|
29
28
|
header: blockSchema.optional(),
|
|
30
|
-
|
|
29
|
+
sections: blockSchema.array().optional(),
|
|
31
30
|
subheader: blockSchema.array().optional(),
|
|
32
31
|
sidebar: blockSchema.optional(),
|
|
33
32
|
footer: blockSchema.optional(),
|
|
34
33
|
parents: pathSchema('pages').array().optional(),
|
|
35
|
-
children: pathSchema('pages').array().optional(),
|
|
36
|
-
siblings: pathSchema('pages').array().optional(),
|
|
37
34
|
})
|
|
38
35
|
.strict()
|
|
39
36
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { reference, z, type AnyEntryMap } from 'astro:content'
|
|
2
2
|
|
|
3
3
|
// TODO: preprocess instead
|
|
4
|
-
export
|
|
4
|
+
export const pathSchema = <C extends keyof AnyEntryMap>(collection: C) =>
|
|
5
5
|
z
|
|
6
6
|
.string()
|
|
7
7
|
.transform((value) => {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
|
+
import { z } from 'astro:content'
|
|
3
|
+
import type Textarea from 'fulldev-ui/components/Textarea.astro'
|
|
4
|
+
|
|
5
|
+
export const textareaSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
label: z.string().optional(),
|
|
8
|
+
placeholder: z.string().optional(),
|
|
9
|
+
value: z.string().optional(),
|
|
10
|
+
})
|
|
11
|
+
.strict() satisfies z.ZodType<ComponentProps<typeof Textarea>>
|