fulldev-ui 0.5.0-beta.0 → 0.5.0-beta.2
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 +2 -7
- package/package.json +2 -2
- package/pnpm-lock.yaml +6473 -0
- package/src/components/Sidebar.astro +13 -2
- package/src/components/docs/PropsTable.astro +1 -1
- package/src/content/presets/base.yml +1 -1
- package/src/content/presets/docs.yml +1 -1
- package/src/integration/index.ts +20 -1
- package/src/layouts/OverviewLayout.astro +7 -4
- package/src/schemas/pageSchema.ts +16 -5
- package/.astro/assets.mjs +0 -1
- package/.astro/astro/content.d.ts +0 -547
- package/.astro/collections/blocks.schema.json +0 -851
- package/.astro/collections/collections.json +0 -63
- package/.astro/collections/images.schema.json +0 -22
- package/.astro/collections/layouts.schema.json +0 -826
- package/.astro/collections/pages.schema.json +0 -568
- package/.astro/collections/presets.schema.json +0 -489
- package/.astro/collections/records.schema.json +0 -822
- package/.astro/collections/settings.schema.json +0 -822
- package/.astro/data-store.json +0 -1
- package/.astro/modules.mjs +0 -1
- package/.astro/settings.json +0 -5
- package/.astro/types.d.ts +0 -2
|
@@ -12,11 +12,19 @@ interface Props extends GlobalProps, HTMLAttributes<'aside'> {
|
|
|
12
12
|
size?: 'sm' | 'md' | 'lg' | undefined
|
|
13
13
|
search?: boolean | undefined
|
|
14
14
|
logo?: string | undefined
|
|
15
|
+
company?: string | undefined
|
|
15
16
|
buttons?: any[] | undefined
|
|
16
17
|
open?: boolean | undefined
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
const {
|
|
20
|
+
const {
|
|
21
|
+
size = 'sm',
|
|
22
|
+
open = false,
|
|
23
|
+
logo,
|
|
24
|
+
company,
|
|
25
|
+
buttons,
|
|
26
|
+
search,
|
|
27
|
+
} = Astro.props
|
|
20
28
|
---
|
|
21
29
|
|
|
22
30
|
<input
|
|
@@ -31,7 +39,10 @@ const { size = 'sm', open = false, logo, buttons, search } = Astro.props
|
|
|
31
39
|
{size}
|
|
32
40
|
{open}
|
|
33
41
|
>
|
|
34
|
-
<Logo
|
|
42
|
+
<Logo
|
|
43
|
+
src={logo}
|
|
44
|
+
company={company}
|
|
45
|
+
/>
|
|
35
46
|
{search && <Search />}
|
|
36
47
|
<Element class:list="buttons">
|
|
37
48
|
{
|
|
@@ -6,7 +6,7 @@ import { pascal } from 'radash'
|
|
|
6
6
|
const slug = Astro.url.pathname.replace(/\/$/, '').split('/').pop() || ''
|
|
7
7
|
const componentName = pascal(slug)
|
|
8
8
|
|
|
9
|
-
const allComponents = import.meta.glob('src/**/*.astro', { eager: true })
|
|
9
|
+
const allComponents = import.meta.glob('/src/**/*.astro', { eager: true })
|
|
10
10
|
const foundComponent = Object.entries(allComponents).find(
|
|
11
11
|
([key]) => key.split('/').pop() === `${componentName}.astro`
|
|
12
12
|
)?.[1] as any
|
package/src/integration/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import viteYaml from '@rollup/plugin-yaml'
|
|
2
2
|
import type { AstroIntegration } from 'astro'
|
|
3
|
+
import favicons from 'astro-favicons'
|
|
4
|
+
import type { CollectionEntry } from 'astro:content'
|
|
3
5
|
import merge from 'deepmerge'
|
|
4
6
|
import fs from 'fs/promises'
|
|
5
7
|
import yaml from 'js-yaml'
|
|
@@ -14,9 +16,11 @@ type Color = {
|
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
interface Config {
|
|
19
|
+
favicon?: string
|
|
20
|
+
company?: string
|
|
17
21
|
css?: string
|
|
22
|
+
basePreset?: CollectionEntry<'presets'>['id']
|
|
18
23
|
injectRoutes?: boolean
|
|
19
|
-
overrideComponents?: boolean
|
|
20
24
|
generateImageEntries?: boolean
|
|
21
25
|
colors: {
|
|
22
26
|
theme: 'light' | 'dark'
|
|
@@ -52,6 +56,21 @@ export default function fulldevIntegration(
|
|
|
52
56
|
injectRoute,
|
|
53
57
|
}) => {
|
|
54
58
|
// ----------------------
|
|
59
|
+
// Inject favicon integration
|
|
60
|
+
// ----------------------
|
|
61
|
+
config.favicon &&
|
|
62
|
+
config.company &&
|
|
63
|
+
updateConfig({
|
|
64
|
+
integrations: [
|
|
65
|
+
favicons({
|
|
66
|
+
path: 'favicon',
|
|
67
|
+
masterPicture: config.favicon,
|
|
68
|
+
appName: config.company,
|
|
69
|
+
appShortName: config.company,
|
|
70
|
+
}),
|
|
71
|
+
],
|
|
72
|
+
})
|
|
73
|
+
// ----------------------
|
|
55
74
|
// Inject css
|
|
56
75
|
// ----------------------
|
|
57
76
|
config?.css && injectScript('page-ssr', `import "${config?.css}";`)
|
|
@@ -11,7 +11,7 @@ import { getChildPages } from 'fulldev-ui/utils/getChildPages.ts'
|
|
|
11
11
|
|
|
12
12
|
type Props = ComponentProps<typeof Layout>
|
|
13
13
|
|
|
14
|
-
const { slug,
|
|
14
|
+
const { slug, sections, title, description } = Astro.props
|
|
15
15
|
|
|
16
16
|
const childPages = await getChildPages(slug)
|
|
17
17
|
const categoryPages = await getCategoryPages(slug)
|
|
@@ -19,14 +19,17 @@ const categoryPages = await getCategoryPages(slug)
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
21
|
<Layout {...Astro.props}>
|
|
22
|
-
<Intro
|
|
22
|
+
<Intro
|
|
23
|
+
heading={title}
|
|
24
|
+
text={description}
|
|
25
|
+
/>
|
|
23
26
|
<Categories
|
|
24
|
-
|
|
27
|
+
cards={childPages}
|
|
25
28
|
structure="grid"
|
|
26
29
|
panel
|
|
27
30
|
/>
|
|
28
31
|
<Products
|
|
29
|
-
|
|
32
|
+
cards={categoryPages}
|
|
30
33
|
structure="grid"
|
|
31
34
|
/>
|
|
32
35
|
<Article style={{ '--screen': '768px' }} />
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getEntries, getEntry, z } from 'astro:content'
|
|
2
2
|
import { assign } from 'radash'
|
|
3
|
+
import fulldevConfig from 'virtual:fulldev-ui/config'
|
|
3
4
|
import image from './components/image'
|
|
5
|
+
import images from './components/images'
|
|
4
6
|
import sections from './components/sections'
|
|
5
7
|
import categories from './utils/categories'
|
|
6
8
|
import component from './utils/component'
|
|
@@ -25,12 +27,20 @@ const presets = z
|
|
|
25
27
|
})
|
|
26
28
|
.passthrough()
|
|
27
29
|
.transform(async ({ presets, ...rest }) => {
|
|
28
|
-
if (!presets) return rest
|
|
29
|
-
const entries = await getEntries(presets)
|
|
30
30
|
let mergedData = {}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
|
|
32
|
+
if (fulldevConfig.basePreset) {
|
|
33
|
+
const baseEntry = await getEntry('presets', fulldevConfig.basePreset)
|
|
34
|
+
mergedData = assign(mergedData, baseEntry?.data || {})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (presets) {
|
|
38
|
+
const entries = await getEntries(presets)
|
|
39
|
+
entries.forEach(
|
|
40
|
+
(preset: any) => (mergedData = assign(mergedData, preset.data))
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
34
44
|
mergedData = assign(mergedData, rest)
|
|
35
45
|
return mergedData as typeof rest
|
|
36
46
|
})
|
|
@@ -51,6 +61,7 @@ export default i18n.pipe(presets).pipe(
|
|
|
51
61
|
title: z.string(),
|
|
52
62
|
description: z.string().optional(),
|
|
53
63
|
image,
|
|
64
|
+
images,
|
|
54
65
|
sections,
|
|
55
66
|
header: z.any(),
|
|
56
67
|
footer: z.any(),
|
package/.astro/assets.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default new Map();
|