fulldev-ui 0.5.0-beta.4 → 0.5.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/CONTRIBUTING.md +10 -4
- package/astro.config.ts +0 -2
- package/package.json +4 -2
- package/pnpm-lock.yaml +31 -69
- package/src/blocks/Banner.astro +2 -1
- package/src/blocks/Excerpt.astro +14 -0
- package/src/blocks/Product.astro +51 -22
- package/src/components/Card.astro +1 -1
- package/src/components/Cart.astro +36 -0
- package/src/components/CartForm.astro +121 -0
- package/src/components/CartList.astro +134 -0
- package/src/components/CartSummary.astro +146 -0
- package/src/components/Drawer.astro +119 -52
- package/src/components/Footer.astro +4 -0
- package/src/components/Form.astro +49 -0
- package/src/components/Header.astro +14 -12
- package/src/components/Input.astro +6 -0
- package/src/components/Menu.astro +56 -0
- package/src/components/Price.astro +7 -11
- package/src/components/Search.astro +1 -4
- package/src/components/Section.astro +2 -0
- package/src/components/Sidebar.astro +61 -111
- package/src/components/ThemeSelect.astro +3 -0
- package/src/components/Toc.astro +36 -94
- package/src/components/experimental/Form.astro +29 -5
- package/src/components/experimental/Gallery.astro +50 -126
- package/src/components/experimental/Prose.astro +32 -0
- package/src/content/pages/base/select.mdx +0 -8
- package/src/content/pages/base/textarea.mdx +0 -5
- package/src/content/pages/blocks/_product.mdx +73 -2
- package/src/content/pages/index.mdx +0 -2
- package/src/content/pages/layouts/_layout.mdx +8 -15
- package/src/content/pages/layouts/docslayout.mdx +10 -1
- package/src/content/pages/overview/components.mdx +5 -0
- package/src/content/pages/overview/content-collections.mdx +139 -0
- package/src/content/pages/overview/installation.mdx +25 -26
- package/src/content/pages/overview/introduction.mdx +16 -10
- package/src/content/pages/overview/theming.mdx +69 -0
- package/src/content/pages/schemas/page.mdx +6 -0
- package/src/content/presets/base.yml +57 -43
- package/src/content/presets/blocks.yml +0 -3
- package/src/content/presets/docs.yml +1 -61
- package/src/env.d.ts +1 -1
- package/src/layouts/Layout.astro +28 -14
- package/src/layouts/PostLayout.astro +24 -0
- package/src/layouts/ProductLayout.astro +5 -2
- package/src/schemas/components/header.ts +7 -9
- package/src/schemas/components/menu.ts +13 -0
- package/src/schemas/components/sidebar.ts +15 -0
- package/src/schemas/components/toc.ts +3 -0
- package/src/schemas/pageSchema.ts +54 -30
- package/src/schemas/presetSchema.ts +2 -32
- package/src/schemas/utils/navigation.ts +3 -53
- package/src/stores/cart.ts +23 -0
- package/src/utils/cart.ts +36 -0
- package/tsconfig.json +1 -3
- package/src/components/experimental/GalleryVertical.astro +0 -161
- package/src/content/pages/overview/content-layer.mdx +0 -128
- package/src/content/pages/overview/customization.mdx +0 -83
- /package/src/types/{global-props.d.ts → global-props.ts} +0 -0
|
@@ -5,20 +5,26 @@ title: Introduction
|
|
|
5
5
|
|
|
6
6
|
# Introduction
|
|
7
7
|
|
|
8
|
-
Fulldev UI
|
|
8
|
+
**Fulldev UI** is a full-featured UI library and website theme built on the [Astro](https://astro.build/) framework. Whether starting a new project or enhancing an existing one, this guide will help you get set up. For installation details, see the [installation guide](/getting-started/installation).
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Why we built it
|
|
11
11
|
|
|
12
|
-
Fulldev UI
|
|
12
|
+
We built **Fulldev UI** after repeatedly encountering the same challenges in client projects, covering the core needs of content-focused websites. Initially created for [our own company](https://full.dev), we decided to open-source it for others to use.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Some features
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
- Vanilla HTML and CSS.
|
|
17
|
+
- Seamless integration with TailwindCSS and UnoCSS.
|
|
18
|
+
- Minimal JavaScript.
|
|
19
|
+
- Supports Astro's [Content Collections](https://docs.astro.build/en/guides/content-collections/).
|
|
20
|
+
- Customizable via CSS variables.
|
|
21
|
+
- Reusable components for pages and sections.
|
|
22
|
+
- Includes blocks like Hero, CTA, Features, etc.
|
|
23
|
+
- Page-building tools.
|
|
24
|
+
- And more...
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
## A word of caution
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
**Fulldev UI** includes a wide range of features, some still experimental. While a narrower focus would improve stability, we built it for flexibility in our projects.
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Build entire websites using just content files like Markdown using our components, blocks and layouts.
|
|
30
|
+
This isn't just a single-purpose library; it's a framework for building blog, marketing, and portfolio websites—similar to how [Starlight](https://starlight.astro.build/) serves documentation. As it evolves, its focus will sharpen. In the meantime, feel free to use it and share feedback on [Discord](https://discord.gg/fulldev)!
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
presets: [docs]
|
|
3
|
+
title: Theming
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import Link from 'fulldev-ui/components/Link.astro'
|
|
7
|
+
|
|
8
|
+
# Theming
|
|
9
|
+
|
|
10
|
+
With the fulldev-ui integration you can easily set a theme and generate a palette based on <Link href="https://www.radix-ui.com/colors">Radix Colors.</Link>
|
|
11
|
+
|
|
12
|
+
## Configuration
|
|
13
|
+
|
|
14
|
+
### Generating a color palette
|
|
15
|
+
|
|
16
|
+
- **css** is the path to your custom css file that applies to all pages on your site.
|
|
17
|
+
- **colors** is an object that defines the colors for your site.
|
|
18
|
+
- **theme** is the default theme for your site.
|
|
19
|
+
- **dark** and **light** are objects that define the colors for the dark and light themes, these three properties are used to generate a color pallete using radix colors.
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { defineConfig } from 'astro/config'
|
|
23
|
+
import fulldev from 'fulldev-ui/integration'
|
|
24
|
+
|
|
25
|
+
// https://astro.build/config
|
|
26
|
+
export default defineConfig({
|
|
27
|
+
integrations: [
|
|
28
|
+
fulldev({
|
|
29
|
+
css: '/src/css/custom.css',
|
|
30
|
+
colors: {
|
|
31
|
+
theme: 'dark',
|
|
32
|
+
dark: {
|
|
33
|
+
background: '#111110',
|
|
34
|
+
base: '#6F6D66',
|
|
35
|
+
brand: '#F50',
|
|
36
|
+
},
|
|
37
|
+
light: {
|
|
38
|
+
background: '#EEEEEC',
|
|
39
|
+
base: '#6F6D66',
|
|
40
|
+
brand: '#F50',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Generating favicons
|
|
49
|
+
|
|
50
|
+
We've integrated <Link href="https://github.com/ACP-CODE/astro-favicons">astro-favicons</Link> into fulldev-ui to generate favicons from a svg file.
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
import { defineConfig } from 'astro/config'
|
|
54
|
+
import fulldev from 'fulldev-ui/integration'
|
|
55
|
+
|
|
56
|
+
// https://astro.build/config
|
|
57
|
+
export default defineConfig({
|
|
58
|
+
integrations: [
|
|
59
|
+
fulldev({
|
|
60
|
+
favicon: 'src/images/favicon.svg', // can also be png, webp, jpg, etc.
|
|
61
|
+
// other options here
|
|
62
|
+
}),
|
|
63
|
+
],
|
|
64
|
+
})
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Overwriting styles
|
|
68
|
+
|
|
69
|
+
Since Fulldev UI uses just regular CSS with low specificity, you can customize anything else using custom CSS.
|
|
@@ -9,3 +9,9 @@ title: page
|
|
|
9
9
|
Objects in the page schema are used to define the structure of a page. They are used to define the information, content and components that are used to render the page.
|
|
10
10
|
|
|
11
11
|
import { Code } from 'astro:components'
|
|
12
|
+
import { zodToTs, createTypeAlias, printNode } from 'zod-to-ts'
|
|
13
|
+
import pageSchema from 'fulldev-ui/schemas/pageSchema'
|
|
14
|
+
|
|
15
|
+
export const identifier = 'Page'
|
|
16
|
+
export const node = zodToTs(pageSchema, identifier)
|
|
17
|
+
export const typeAlias = createTypeAlias(node, identifier)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
theme: dark
|
|
2
|
+
|
|
1
3
|
seo:
|
|
2
4
|
image: /images/og-image.png
|
|
3
5
|
|
|
@@ -8,11 +10,9 @@ code:
|
|
|
8
10
|
posthog.init('phc_mVacbe8Xydu0UZlh4bNw5EGisvzyRcpqXEEuEEp5lOY',{api_host:'https://eu.i.posthog.com', person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well
|
|
9
11
|
})
|
|
10
12
|
</script>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
header:
|
|
13
|
+
header: true
|
|
14
|
+
navigation:
|
|
15
|
+
cart: Winkelwagen
|
|
16
16
|
company: Fulldev UI
|
|
17
17
|
buttons:
|
|
18
18
|
- text: Docs
|
|
@@ -30,41 +30,55 @@ header:
|
|
|
30
30
|
target: _blank
|
|
31
31
|
icon: brand-discord
|
|
32
32
|
variant: secondary
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
33
|
+
menu:
|
|
34
|
+
- heading: Get Started
|
|
35
|
+
buttons:
|
|
36
|
+
- overview/introduction
|
|
37
|
+
- overview/installation
|
|
38
|
+
- overview/theming
|
|
39
|
+
- overview/frameworks
|
|
40
|
+
- overview/components
|
|
41
|
+
- overview/content-collections
|
|
42
|
+
- heading: Typography
|
|
43
|
+
buttons:
|
|
44
|
+
- typography/heading
|
|
45
|
+
- typography/label
|
|
46
|
+
- typography/link
|
|
47
|
+
- typography/list
|
|
48
|
+
- typography/text
|
|
49
|
+
- heading: Base
|
|
50
|
+
buttons:
|
|
51
|
+
- base/badge
|
|
52
|
+
- base/button
|
|
53
|
+
- base/card
|
|
54
|
+
- base/checkbox
|
|
55
|
+
- base/icon
|
|
56
|
+
- base/input
|
|
57
|
+
- base/rating
|
|
58
|
+
- base/section
|
|
59
|
+
- base/select
|
|
60
|
+
- base/table
|
|
61
|
+
- base/textarea
|
|
62
|
+
- base/theme-select
|
|
63
|
+
- base/image
|
|
64
|
+
- heading: Blocks
|
|
65
|
+
buttons:
|
|
66
|
+
- blocks/banner
|
|
67
|
+
- blocks/colleagues
|
|
68
|
+
- blocks/contact
|
|
69
|
+
- blocks/content
|
|
70
|
+
- blocks/cta
|
|
71
|
+
- blocks/features
|
|
72
|
+
- blocks/hero
|
|
73
|
+
- blocks/intro
|
|
74
|
+
- blocks/posts
|
|
75
|
+
- blocks/reviews
|
|
76
|
+
- heading: Schemas
|
|
77
|
+
buttons:
|
|
78
|
+
- schemas/page
|
|
79
|
+
- schemas/preset
|
|
80
|
+
- heading: More
|
|
81
|
+
buttons:
|
|
82
|
+
- showcase
|
|
83
|
+
- text: Changelog
|
|
84
|
+
href: https://github.com/fulldotdev/ui/releases
|
|
@@ -2,64 +2,4 @@ component: DocsLayout
|
|
|
2
2
|
|
|
3
3
|
sidebar: true
|
|
4
4
|
header: false
|
|
5
|
-
|
|
6
|
-
toc: true
|
|
7
|
-
|
|
8
|
-
navigation:
|
|
9
|
-
company: Fulldev UI
|
|
10
|
-
buttons:
|
|
11
|
-
- heading: Get Started
|
|
12
|
-
buttons:
|
|
13
|
-
- overview/introduction
|
|
14
|
-
- overview/installation
|
|
15
|
-
- overview/customization
|
|
16
|
-
- overview/frameworks
|
|
17
|
-
- overview/components
|
|
18
|
-
- overview/content-layer
|
|
19
|
-
- heading: Typography
|
|
20
|
-
buttons:
|
|
21
|
-
- typography/heading
|
|
22
|
-
- typography/label
|
|
23
|
-
- typography/link
|
|
24
|
-
- typography/list
|
|
25
|
-
- typography/text
|
|
26
|
-
- heading: Base
|
|
27
|
-
buttons:
|
|
28
|
-
- base/badge
|
|
29
|
-
- base/button
|
|
30
|
-
- base/card
|
|
31
|
-
- base/checkbox
|
|
32
|
-
- base/icon
|
|
33
|
-
- base/input
|
|
34
|
-
- base/rating
|
|
35
|
-
- base/section
|
|
36
|
-
- base/select
|
|
37
|
-
- base/table
|
|
38
|
-
- base/textarea
|
|
39
|
-
- base/theme-select
|
|
40
|
-
- base/image
|
|
41
|
-
- heading: Blocks
|
|
42
|
-
buttons:
|
|
43
|
-
- blocks/banner
|
|
44
|
-
- blocks/colleagues
|
|
45
|
-
- blocks/contact
|
|
46
|
-
- blocks/content
|
|
47
|
-
- blocks/cta
|
|
48
|
-
- blocks/features
|
|
49
|
-
- blocks/hero
|
|
50
|
-
- blocks/intro
|
|
51
|
-
- blocks/posts
|
|
52
|
-
- blocks/reviews
|
|
53
|
-
# - heading: Layouts
|
|
54
|
-
# buttons:
|
|
55
|
-
# - layouts/layout
|
|
56
|
-
# - layouts/docslayout
|
|
57
|
-
- heading: Schemas
|
|
58
|
-
buttons:
|
|
59
|
-
- schemas/page
|
|
60
|
-
- schemas/preset
|
|
61
|
-
- heading: More
|
|
62
|
-
buttons:
|
|
63
|
-
- showcase
|
|
64
|
-
- text: Changelog
|
|
65
|
-
href: https://github.com/fulldotdev/ui/releases
|
|
5
|
+
toc: 'On this page'
|
package/src/env.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="astro/client" />
|
|
2
|
-
/// <reference path="../.astro/types.d.ts" />
|
|
2
|
+
/// <reference path="../.astro/types.d.ts" />
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -7,6 +7,7 @@ import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
|
7
7
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
8
8
|
import Head from 'fulldev-ui/components/Head.astro'
|
|
9
9
|
import Header from 'fulldev-ui/components/Header.astro'
|
|
10
|
+
import Section from 'fulldev-ui/components/Section.astro'
|
|
10
11
|
import Sections from 'fulldev-ui/components/sections.astro'
|
|
11
12
|
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
12
13
|
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
@@ -19,6 +20,7 @@ type Props = GlobalProps &
|
|
|
19
20
|
header?: ComponentProps<typeof Header>
|
|
20
21
|
footer?: ComponentProps<typeof Footer>
|
|
21
22
|
sections?: ComponentProps<typeof Sections>['sections']
|
|
23
|
+
section?: ComponentProps<typeof Section> | undefined
|
|
22
24
|
banner?: any
|
|
23
25
|
toc?: any
|
|
24
26
|
sidebar?: any
|
|
@@ -47,6 +49,7 @@ const {
|
|
|
47
49
|
toc,
|
|
48
50
|
sections,
|
|
49
51
|
theme,
|
|
52
|
+
section,
|
|
50
53
|
banner,
|
|
51
54
|
code,
|
|
52
55
|
themeselect,
|
|
@@ -57,41 +60,43 @@ const {
|
|
|
57
60
|
<!doctype html>
|
|
58
61
|
<html {...rest}>
|
|
59
62
|
<Head {...Astro.props} />
|
|
60
|
-
<Element
|
|
63
|
+
<Element
|
|
64
|
+
as="body"
|
|
65
|
+
{theme}
|
|
66
|
+
>
|
|
61
67
|
<slot name="banner">
|
|
62
68
|
<Banner text={banner} />
|
|
63
69
|
</slot>
|
|
64
70
|
<slot name="header">
|
|
65
71
|
<Header
|
|
66
|
-
|
|
72
|
+
class:list={{
|
|
73
|
+
'for-sidebar': sidebar,
|
|
74
|
+
}}
|
|
75
|
+
if={navigation || header}
|
|
67
76
|
{...navigation}
|
|
68
|
-
{themeselect}
|
|
69
77
|
{...header}
|
|
70
78
|
/>
|
|
71
79
|
</slot>
|
|
72
80
|
<div class="core">
|
|
73
81
|
<slot name="sidebar">
|
|
74
82
|
<Sidebar
|
|
75
|
-
|
|
83
|
+
if={sidebar}
|
|
76
84
|
{...navigation}
|
|
77
85
|
{...sidebar}
|
|
78
86
|
/>
|
|
79
87
|
</slot>
|
|
80
88
|
<main data-pagefind-body>
|
|
81
89
|
<slot>
|
|
90
|
+
<Section {...section} />
|
|
82
91
|
<Article />
|
|
83
92
|
<Sections {sections} />
|
|
84
93
|
</slot>
|
|
85
94
|
</main>
|
|
86
95
|
<slot name="toc">
|
|
87
|
-
|
|
88
|
-
toc
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{...toc}
|
|
92
|
-
/>
|
|
93
|
-
)
|
|
94
|
-
}
|
|
96
|
+
<Toc
|
|
97
|
+
heading={toc}
|
|
98
|
+
{render}
|
|
99
|
+
/>
|
|
95
100
|
</slot>
|
|
96
101
|
</div>
|
|
97
102
|
<slot name="footer">
|
|
@@ -114,12 +119,21 @@ const {
|
|
|
114
119
|
--screen: 100vw;
|
|
115
120
|
display: flex;
|
|
116
121
|
flex-direction: column;
|
|
117
|
-
|
|
118
|
-
background-color: var(--base-2);
|
|
122
|
+
background-color: var(--base-background);
|
|
119
123
|
width: 100%;
|
|
120
124
|
min-height: 100vh;
|
|
121
125
|
color: var(--base-11);
|
|
122
126
|
|
|
127
|
+
.for-sidebar {
|
|
128
|
+
@media (min-width: 1024px) {
|
|
129
|
+
display: none;
|
|
130
|
+
|
|
131
|
+
~ * {
|
|
132
|
+
--header-height: 0px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
123
137
|
.core {
|
|
124
138
|
display: flex;
|
|
125
139
|
position: relative;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Article from 'fulldev-ui/blocks/Article.astro'
|
|
4
|
+
import Sections from 'fulldev-ui/components/sections.astro'
|
|
5
|
+
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
6
|
+
import Excerpt from '../blocks/Excerpt.astro'
|
|
7
|
+
|
|
8
|
+
type Props = ComponentProps<typeof Layout>
|
|
9
|
+
|
|
10
|
+
const { sections, title, description, ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<Layout {...Astro.props}>
|
|
14
|
+
<Excerpt
|
|
15
|
+
heading={title}
|
|
16
|
+
align="start"
|
|
17
|
+
text={description}
|
|
18
|
+
style={{ '--screen': '768px' }}
|
|
19
|
+
{...rest}
|
|
20
|
+
/>
|
|
21
|
+
<Article />
|
|
22
|
+
<Sections {sections} />
|
|
23
|
+
<slot />
|
|
24
|
+
</Layout>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps } from 'astro/types'
|
|
3
3
|
import Article from 'fulldev-ui/blocks/Article.astro'
|
|
4
|
-
import
|
|
4
|
+
import Section from 'fulldev-ui/components/Section.astro'
|
|
5
5
|
import Sections from 'fulldev-ui/components/sections.astro'
|
|
6
6
|
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
7
7
|
|
|
@@ -11,7 +11,10 @@ const { render, sections, ...rest } = Astro.props
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
<Layout {...Astro.props}>
|
|
14
|
-
<
|
|
14
|
+
<Section
|
|
15
|
+
component="Product"
|
|
16
|
+
{...rest as any}
|
|
17
|
+
/>
|
|
15
18
|
<Article />
|
|
16
19
|
<Sections {sections} />
|
|
17
20
|
<slot />
|
|
@@ -2,12 +2,10 @@ import { z } from 'astro:content'
|
|
|
2
2
|
import buttons from './buttons'
|
|
3
3
|
import logo from './logo'
|
|
4
4
|
|
|
5
|
-
export default z
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.passthrough()
|
|
13
|
-
)
|
|
5
|
+
export default z
|
|
6
|
+
.object({
|
|
7
|
+
logo,
|
|
8
|
+
buttons,
|
|
9
|
+
})
|
|
10
|
+
.partial()
|
|
11
|
+
.passthrough()
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import logo from '../components/logo'
|
|
3
|
+
import menu from '../components/menu'
|
|
4
|
+
import heading from './heading'
|
|
5
|
+
import toc from './toc'
|
|
6
|
+
|
|
7
|
+
export default z
|
|
8
|
+
.object({
|
|
9
|
+
logo,
|
|
10
|
+
heading,
|
|
11
|
+
menu,
|
|
12
|
+
toc,
|
|
13
|
+
})
|
|
14
|
+
.partial()
|
|
15
|
+
.passthrough()
|
|
@@ -5,13 +5,17 @@ import footer from './components/footer'
|
|
|
5
5
|
import header from './components/header'
|
|
6
6
|
import image from './components/image'
|
|
7
7
|
import images from './components/images'
|
|
8
|
+
import price from './components/price'
|
|
9
|
+
import section from './components/section'
|
|
8
10
|
import sections from './components/sections'
|
|
11
|
+
import sidebar from './components/sidebar'
|
|
12
|
+
import toc from './components/toc'
|
|
9
13
|
import component from './utils/component'
|
|
10
14
|
import navigation from './utils/navigation'
|
|
11
15
|
import parents from './utils/parents'
|
|
12
16
|
import pathSchema from './utils/pathSchema'
|
|
13
17
|
|
|
14
|
-
const i18n = z
|
|
18
|
+
export const i18n = z
|
|
15
19
|
.object({
|
|
16
20
|
i18n: pathSchema('pages').optional(),
|
|
17
21
|
})
|
|
@@ -23,7 +27,7 @@ const i18n = z
|
|
|
23
27
|
return merged as typeof rest
|
|
24
28
|
})
|
|
25
29
|
|
|
26
|
-
const presets = z
|
|
30
|
+
export const presets = z
|
|
27
31
|
.object({
|
|
28
32
|
presets: z.array(pathSchema('presets')).optional(),
|
|
29
33
|
})
|
|
@@ -47,31 +51,51 @@ const presets = z
|
|
|
47
51
|
return mergedData as typeof rest
|
|
48
52
|
})
|
|
49
53
|
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
54
|
+
export const basePreset = z
|
|
55
|
+
.object({})
|
|
56
|
+
.passthrough()
|
|
57
|
+
.transform(async (data) => {
|
|
58
|
+
if (!fulldevConfig.basePreset) return data
|
|
59
|
+
const baseEntry = await getEntry('presets', fulldevConfig.basePreset)
|
|
60
|
+
const mergedData = assign(baseEntry?.data ?? {}, data)
|
|
61
|
+
return mergedData as typeof data
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
export const page = z
|
|
65
|
+
.object({
|
|
66
|
+
component,
|
|
67
|
+
parents,
|
|
68
|
+
theme: z.enum(['light', 'dark']),
|
|
69
|
+
lang: z.string(),
|
|
70
|
+
seo: z
|
|
71
|
+
.object({
|
|
72
|
+
title: z.string().optional(),
|
|
73
|
+
description: z.string().optional(),
|
|
74
|
+
})
|
|
75
|
+
.optional(),
|
|
76
|
+
title: z.string(),
|
|
77
|
+
description: z.string().optional(),
|
|
78
|
+
image,
|
|
79
|
+
images,
|
|
80
|
+
section,
|
|
81
|
+
sections,
|
|
82
|
+
footer,
|
|
83
|
+
header: z.boolean().or(header),
|
|
84
|
+
sidebar: z.boolean().or(sidebar),
|
|
85
|
+
navigation,
|
|
86
|
+
toc,
|
|
87
|
+
price,
|
|
88
|
+
code: z.any(),
|
|
89
|
+
sizes: z.any(),
|
|
90
|
+
banner: z.any(),
|
|
91
|
+
_schema: z.any(),
|
|
92
|
+
uitverkocht: z.any(),
|
|
93
|
+
rating: z.any(),
|
|
94
|
+
variants: z.any(),
|
|
95
|
+
heading: z.any(),
|
|
96
|
+
href: z.any(),
|
|
97
|
+
})
|
|
98
|
+
.partial()
|
|
99
|
+
.strict()
|
|
100
|
+
|
|
101
|
+
export default i18n.pipe(basePreset).pipe(presets).pipe(page)
|
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import footer from './components/footer'
|
|
3
|
-
import header from './components/header'
|
|
4
|
-
import image from './components/image'
|
|
5
|
-
import sections from './components/sections'
|
|
6
|
-
import component from './utils/component'
|
|
7
|
-
import navigation from './utils/navigation'
|
|
8
|
-
import parents from './utils/parents'
|
|
1
|
+
import { page } from './pageSchema'
|
|
9
2
|
|
|
10
|
-
export default
|
|
11
|
-
.object({
|
|
12
|
-
component,
|
|
13
|
-
parents,
|
|
14
|
-
theme: z.enum(['light', 'dark']),
|
|
15
|
-
lang: z.string(),
|
|
16
|
-
seo: z
|
|
17
|
-
.object({
|
|
18
|
-
title: z.string().optional(),
|
|
19
|
-
description: z.string().optional(),
|
|
20
|
-
})
|
|
21
|
-
.optional(),
|
|
22
|
-
title: z.string(),
|
|
23
|
-
description: z.string().optional(),
|
|
24
|
-
image,
|
|
25
|
-
sections,
|
|
26
|
-
header,
|
|
27
|
-
footer,
|
|
28
|
-
navigation,
|
|
29
|
-
toc: z.any(),
|
|
30
|
-
sidebar: z.any(),
|
|
31
|
-
})
|
|
32
|
-
.partial()
|
|
33
|
-
.passthrough()
|
|
3
|
+
export default page
|