fulldev-ui 0.3.36 → 0.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +57 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +39 -0
  4. package/.github/pull_request_template.md +23 -0
  5. package/.github/workflows/github-releases-to-discord.yml +21 -0
  6. package/.prettierignore +15 -0
  7. package/.prettierrc.yaml +34 -0
  8. package/.vscode/extensions.json +4 -0
  9. package/.vscode/launch.json +11 -0
  10. package/.vscode/settings.json +23 -0
  11. package/CHANGELOG.md +100 -0
  12. package/CONTRIBUTING.md +102 -0
  13. package/LICENCE +21 -0
  14. package/README.md +9 -7
  15. package/astro.config.ts +44 -0
  16. package/package.json +42 -27
  17. package/pnpm-lock.yaml +5515 -0
  18. package/public/favicon/android-chrome-192x192.png +0 -0
  19. package/public/favicon/android-chrome-512x512.png +0 -0
  20. package/public/favicon/apple-touch-icon.png +0 -0
  21. package/public/favicon/browserconfig.xml +9 -0
  22. package/public/favicon/favicon-16x16.png +0 -0
  23. package/public/favicon/favicon-32x32.png +0 -0
  24. package/public/favicon/favicon.ico +0 -0
  25. package/public/favicon/mstile-150x150.png +0 -0
  26. package/public/favicon/safari-pinned-tab.svg +17 -0
  27. package/public/favicon/site.webmanifest +19 -0
  28. package/public/images/avatar-placeholder.jpg +0 -0
  29. package/public/images/avatars/1.jpeg +0 -0
  30. package/public/images/avatars/2.jpeg +0 -0
  31. package/public/images/avatars/3.jpeg +0 -0
  32. package/public/images/avatars/300/1.jpeg +0 -0
  33. package/public/images/avatars/300/2.jpeg +0 -0
  34. package/public/images/avatars/300/3.jpeg +0 -0
  35. package/public/images/avatars/300/4.jpeg +0 -0
  36. package/public/images/avatars/4.jpeg +0 -0
  37. package/public/images/avatars/5.jpeg +0 -0
  38. package/public/images/avatars/500/1.jpeg +0 -0
  39. package/public/images/avatars/500/2.jpeg +0 -0
  40. package/public/images/avatars/500/3.jpeg +0 -0
  41. package/public/images/avatars/500/4.jpeg +0 -0
  42. package/public/images/avatars/6.jpeg +0 -0
  43. package/public/images/avatars/7.jpeg +0 -0
  44. package/public/images/avatars/8.jpeg +0 -0
  45. package/public/images/block-code.png +0 -0
  46. package/public/images/blocks/colleagues.png +0 -0
  47. package/public/images/blocks/content.png +0 -0
  48. package/public/images/blocks/cta.png +0 -0
  49. package/public/images/blocks/features.png +0 -0
  50. package/public/images/blocks/footer.png +0 -0
  51. package/public/images/blocks/header.png +0 -0
  52. package/public/images/blocks/hero.png +0 -0
  53. package/public/images/blocks/intro.png +0 -0
  54. package/public/images/blocks/posts.png +0 -0
  55. package/public/images/blocks/prices.png +0 -0
  56. package/public/images/blocks/reviews.png +0 -0
  57. package/public/images/component-code.png +0 -0
  58. package/public/images/logo-placeholder.svg +1 -0
  59. package/public/images/placeholder-center.webp +0 -0
  60. package/public/images/placeholder-landscape-dark.png +0 -0
  61. package/public/images/placeholder-landscape.webp +0 -0
  62. package/public/images/placeholder-portrait.webp +0 -0
  63. package/public/images/placeholder-right.webp +0 -0
  64. package/public/images/placeholder.webp +0 -0
  65. package/siteicon.png +0 -0
  66. package/src/blocks/Categories.astro +12 -0
  67. package/src/blocks/Colleagues.astro +12 -0
  68. package/src/blocks/Contact.astro +152 -0
  69. package/src/blocks/Content.astro +12 -0
  70. package/src/blocks/Cta.astro +14 -0
  71. package/src/blocks/Features.astro +11 -0
  72. package/src/blocks/Footer.astro +7 -0
  73. package/src/blocks/Header.astro +7 -0
  74. package/src/blocks/Hero.astro +16 -0
  75. package/src/blocks/Intro.astro +19 -0
  76. package/src/blocks/Jobs.astro +12 -0
  77. package/src/blocks/Posts.astro +11 -0
  78. package/src/blocks/Prices.astro +22 -0
  79. package/src/blocks/Product.astro +64 -0
  80. package/src/blocks/Products.astro +11 -0
  81. package/src/blocks/Reviews.astro +13 -0
  82. package/src/components/{base/Avatar.astro → Avatar.astro} +7 -11
  83. package/src/components/{base/Badge.astro → Badge.astro} +36 -22
  84. package/src/components/{structure/Bento.astro → Bento.astro} +6 -9
  85. package/src/components/Block.astro +157 -0
  86. package/src/components/Blocks.astro +5 -0
  87. package/src/components/Box.astro +60 -0
  88. package/src/components/Button.astro +140 -0
  89. package/src/components/Card.astro +212 -0
  90. package/src/components/{structure/Carousel.astro → Carousel.astro} +13 -16
  91. package/src/components/Checkbox.astro +63 -0
  92. package/src/components/{structure/Column.astro → Column.astro} +14 -9
  93. package/src/components/Dialog.astro +65 -0
  94. package/src/components/Drawer.astro +99 -0
  95. package/src/components/Footer.astro +144 -0
  96. package/src/components/{structure/Grid.astro → Grid.astro} +7 -10
  97. package/src/components/Head.astro +85 -0
  98. package/src/components/Header.astro +204 -0
  99. package/src/components/Heading.astro +79 -0
  100. package/src/components/{base/Icon.astro → Icon.astro} +7 -9
  101. package/src/components/{base/Image.astro → Image.astro} +32 -30
  102. package/src/components/Input.astro +119 -0
  103. package/src/components/{typography/Label.astro → Label.astro} +12 -12
  104. package/src/components/{typography/Link.astro → Link.astro} +15 -13
  105. package/src/components/List.astro +41 -0
  106. package/src/components/{structure/Masonry.astro → Masonry.astro} +9 -11
  107. package/src/components/Rating.astro +82 -0
  108. package/src/components/{_Component.astro → Root.astro} +7 -11
  109. package/src/components/{structure/Row.astro → Row.astro} +6 -9
  110. package/src/components/Search.astro +62 -0
  111. package/src/components/Section.astro +274 -0
  112. package/src/components/Select.astro +144 -0
  113. package/src/components/Sidebar.astro +71 -0
  114. package/src/components/{structure/Split.astro → Split.astro} +6 -9
  115. package/src/components/{structure/Spread.astro → Spread.astro} +6 -9
  116. package/src/components/Switch.astro +114 -0
  117. package/src/components/Table.astro +121 -0
  118. package/src/components/Tagline.astro +35 -0
  119. package/src/components/Text.astro +43 -0
  120. package/src/components/Textarea.astro +105 -0
  121. package/src/components/Toc.astro +52 -0
  122. package/src/components/{structure/Wrap.astro → Wrap.astro} +5 -10
  123. package/src/components/docs/DecorativeBox.astro +15 -0
  124. package/src/components/docs/PropsTable.astro +95 -0
  125. package/src/components/experimental/Channel.astro +15 -10
  126. package/src/components/experimental/Form.astro +34 -0
  127. package/src/components/experimental/Gallery.astro +180 -0
  128. package/src/components/experimental/GalleryVertical.astro +161 -0
  129. package/src/components/{base → experimental}/Logo.astro +3 -5
  130. package/src/components/experimental/Price.astro +17 -17
  131. package/src/components/experimental/Prose.astro +154 -0
  132. package/src/components/{base → experimental}/Video.astro +1 -1
  133. package/src/components/experimental/Window.astro +173 -0
  134. package/src/content/config.ts +16 -13
  135. package/src/content/pages/_changelog.mdx +10 -0
  136. package/src/content/pages/_segment/footer.mdx +244 -0
  137. package/src/content/pages/_segment/header.mdx +210 -0
  138. package/src/content/pages/base/_dialog.mdx +17 -0
  139. package/src/content/pages/base/_drawer.mdx +17 -0
  140. package/src/content/pages/base/_image.mdx +14 -0
  141. package/src/content/pages/base/_switch.mdx +33 -0
  142. package/src/content/pages/base/badge.mdx +70 -0
  143. package/src/content/pages/base/button.mdx +71 -0
  144. package/src/content/pages/base/card.mdx +114 -0
  145. package/src/content/pages/base/checkbox.mdx +43 -0
  146. package/src/content/pages/base/icon.mdx +54 -0
  147. package/src/content/pages/base/input.mdx +67 -0
  148. package/src/content/pages/base/rating.mdx +66 -0
  149. package/src/content/pages/base/section.mdx +79 -0
  150. package/src/content/pages/base/select.mdx +77 -0
  151. package/src/content/pages/base/table.mdx +133 -0
  152. package/src/content/pages/base/textarea.mdx +73 -0
  153. package/src/content/pages/blocks/_banner.mdx +13 -0
  154. package/src/content/pages/blocks/_categories.mdx +149 -0
  155. package/src/content/pages/blocks/_jobs.mdx +37 -0
  156. package/src/content/pages/blocks/_product.mdx +29 -0
  157. package/src/content/pages/blocks/_products.mdx +55 -0
  158. package/src/content/pages/blocks/_stats.mdx +34 -0
  159. package/src/content/pages/blocks/colleagues.mdx +42 -0
  160. package/src/content/pages/blocks/content.mdx +101 -0
  161. package/src/content/pages/blocks/cta.mdx +192 -0
  162. package/src/content/pages/blocks/features.mdx +134 -0
  163. package/src/content/pages/blocks/footer.mdx +71 -0
  164. package/src/content/pages/blocks/header.mdx +192 -0
  165. package/src/content/pages/blocks/hero.mdx +97 -0
  166. package/src/content/pages/blocks/intro.mdx +132 -0
  167. package/src/content/pages/blocks/posts.mdx +40 -0
  168. package/src/content/pages/blocks/prices.mdx +126 -0
  169. package/src/content/pages/blocks/reviews.mdx +249 -0
  170. package/src/content/pages/blocks.mdx +10 -0
  171. package/src/content/pages/index.mdx +65 -0
  172. package/src/content/pages/overview/frameworks.mdx +180 -0
  173. package/src/content/pages/overview/installation.mdx +20 -0
  174. package/src/content/pages/overview/integration.mdx +37 -0
  175. package/src/content/pages/overview/introduction.mdx +20 -0
  176. package/src/content/pages/overview/theming.mdx +83 -0
  177. package/src/content/pages/structure/_row.mdx +23 -0
  178. package/src/content/pages/structure/_wrap.mdx +25 -0
  179. package/src/content/pages/structure/carousel.mdx +31 -0
  180. package/src/content/pages/structure/column.mdx +21 -0
  181. package/src/content/pages/structure/grid.mdx +26 -0
  182. package/src/content/pages/structure/masonry.mdx +32 -0
  183. package/src/content/pages/structure/split.mdx +21 -0
  184. package/src/content/pages/structure/spread.mdx +21 -0
  185. package/src/content/pages/typography/_tagline.mdx +36 -0
  186. package/src/content/pages/typography/heading.mdx +74 -0
  187. package/src/content/pages/typography/label.mdx +42 -0
  188. package/src/content/pages/typography/link.mdx +63 -0
  189. package/src/content/pages/typography/list.mdx +52 -0
  190. package/src/content/pages/typography/text.mdx +62 -0
  191. package/src/content/records/record.yml +1 -0
  192. package/src/content/settings/base.yml +48 -0
  193. package/src/content/settings/components.yml +27 -0
  194. package/src/css/color.css +6 -67
  195. package/src/css/custom.css +59 -0
  196. package/src/css/size.css +130 -0
  197. package/src/css/space.css +47 -26
  198. package/src/css/styles.css +4 -2
  199. package/src/env.d.ts +1 -1
  200. package/src/integration/generate-colors.ts +637 -0
  201. package/src/integration/index.ts +158 -0
  202. package/src/integration/tailwind-plugin.ts +80 -0
  203. package/src/integration/unocss-preset.ts +84 -0
  204. package/src/layouts/BlockLayout.astro +24 -0
  205. package/src/layouts/BlockOverviewLayout.astro +39 -0
  206. package/src/layouts/ComponentLayout.astro +23 -0
  207. package/src/layouts/JobsLayout.astro +40 -0
  208. package/src/layouts/Layout.astro +168 -0
  209. package/src/layouts/OverviewLayout.astro +45 -0
  210. package/src/layouts/PageLayout.astro +32 -0
  211. package/src/layouts/PostLayout.astro +32 -0
  212. package/src/layouts/ProductLayout.astro +31 -0
  213. package/src/pages/[...page].astro +41 -0
  214. package/src/schemas/base.ts +81 -0
  215. package/src/schemas/block.ts +15 -0
  216. package/src/schemas/card.ts +3 -0
  217. package/src/schemas/page.ts +43 -0
  218. package/src/schemas/utils.ts +22 -0
  219. package/src/utils/mergeEntries.ts +28 -0
  220. package/tsconfig.json +10 -1
  221. package/.astro/settings.json +0 -5
  222. package/.astro/types.d.ts +0 -147
  223. package/.env +0 -1
  224. package/astro.config.mjs +0 -6
  225. package/src/components/_Block.astro +0 -20
  226. package/src/components/_Blocks.astro +0 -11
  227. package/src/components/_Children.astro +0 -31
  228. package/src/components/_archive/Body.astro +0 -37
  229. package/src/components/_archive/Main.astro +0 -28
  230. package/src/components/_archive/Nav.astro +0 -50
  231. package/src/components/_todo/Form.astro +0 -36
  232. package/src/components/_todo/Prose.astro +0 -139
  233. package/src/components/_todo/Writeup.astro +0 -24
  234. package/src/components/base/Button.astro +0 -123
  235. package/src/components/base/Rating.astro +0 -47
  236. package/src/components/base/checkbox/Checkbox.astro +0 -52
  237. package/src/components/base/checkbox/CheckboxElement.astro +0 -31
  238. package/src/components/base/input/Input.astro +0 -79
  239. package/src/components/base/input/InputElement.astro +0 -69
  240. package/src/components/base/radio/Radio.astro +0 -66
  241. package/src/components/base/radio/RadioElement.astro +0 -34
  242. package/src/components/base/select/Select.astro +0 -90
  243. package/src/components/base/select/SelectElement.astro +0 -56
  244. package/src/components/base/select/SelectOption.astro +0 -32
  245. package/src/components/base/switch/Switch.astro +0 -55
  246. package/src/components/base/switch/SwitchElement.astro +0 -84
  247. package/src/components/base/table/Table.astro +0 -57
  248. package/src/components/base/table/TableBody.astro +0 -38
  249. package/src/components/base/table/TableCell.astro +0 -30
  250. package/src/components/base/table/TableFooter.astro +0 -48
  251. package/src/components/base/table/TableHead.astro +0 -31
  252. package/src/components/base/table/TableHeader.astro +0 -44
  253. package/src/components/base/table/TableRow.astro +0 -46
  254. package/src/components/base/textarea/Textarea.astro +0 -79
  255. package/src/components/base/textarea/TextareaElement.astro +0 -68
  256. package/src/components/segment/Box.astro +0 -46
  257. package/src/components/segment/Card.astro +0 -114
  258. package/src/components/segment/Footer.astro +0 -94
  259. package/src/components/segment/Header.astro +0 -100
  260. package/src/components/segment/Section.astro +0 -103
  261. package/src/components/segment/_regels.md +0 -32
  262. package/src/components/typography/Heading.astro +0 -66
  263. package/src/components/typography/List.astro +0 -47
  264. package/src/components/typography/ListItem.astro +0 -36
  265. package/src/components/typography/Paragraph.astro +0 -36
  266. package/src/components/typography/Tagline.astro +0 -36
  267. package/src/components/typography/Text.astro +0 -37
  268. package/src/components/utility/Head.astro +0 -83
  269. package/src/components/utility/Layout.astro +0 -46
  270. package/src/content/pages/index.md +0 -2
  271. package/src/css/color.scss +0 -289
  272. package/src/css/size.scss +0 -296
  273. package/src/css/utils.scss +0 -16
  274. package/src/index.ts +0 -71
  275. package/src/integration/integration.ts +0 -88
  276. package/src/integration/tailwind.ts +0 -34
  277. package/src/integration/unocss.ts +0 -38
  278. /package/src/{_archive → utils/_archive}/Childmorphic.ts +0 -0
  279. /package/src/{_archive → utils/_archive}/getAllCollections.ts +0 -0
  280. /package/src/{_archive → utils/_archive}/getCollectionCascade.ts +0 -0
  281. /package/src/{_archive → utils/_archive}/getPathname.ts +0 -0
  282. /package/src/{_archive → utils/_archive}/staticPageSchema.ts +0 -0
  283. /package/src/{_archive → utils/_archive}/transform/transform.ts +0 -0
  284. /package/src/{_archive → utils/_archive}/transform/transformCasing.ts +0 -0
  285. /package/src/{_archive → utils/_archive}/transform/transformReferences.ts +0 -0
  286. /package/src/{_archive → utils/_archive}/transform/transformSelfs.ts +0 -0
  287. /package/src/{_archive → utils/_archive}/transform/transformUnderscores.ts +0 -0
@@ -0,0 +1,32 @@
1
+ ---
2
+ import type { CollectionEntry } from 'astro:content'
3
+ import Intro from 'fulldev-ui/blocks/Intro.astro'
4
+ import Blocks from 'fulldev-ui/components/Blocks.astro'
5
+ import Prose from 'fulldev-ui/components/experimental/Prose.astro'
6
+ import Section from 'fulldev-ui/components/Section.astro'
7
+ import Layout from 'fulldev-ui/layouts/Layout.astro'
8
+
9
+ type Props = CollectionEntry<'pages'>
10
+
11
+ const { data, render } = Astro.props
12
+ const { section, sections, blocks } = data
13
+ const { Content } = await render()
14
+ ---
15
+
16
+ <Layout {...Astro.props}>
17
+ <Intro
18
+ _bookshop_name="Intro"
19
+ style={{ '--screen': '768px' }}
20
+ align="start"
21
+ {...section}
22
+ {...data}
23
+ />
24
+ <Section>
25
+ <Prose id="prose">
26
+ <Content />
27
+ </Prose>
28
+ </Section>
29
+ <Blocks {...sections} />
30
+ <Blocks {...blocks} />
31
+ <slot />
32
+ </Layout>
@@ -0,0 +1,31 @@
1
+ ---
2
+ import type { CollectionEntry } from 'astro:content'
3
+ import Block from 'fulldev-ui/components/Block.astro'
4
+ import Blocks from 'fulldev-ui/components/Blocks.astro'
5
+ import Prose from 'fulldev-ui/components/experimental/Prose.astro'
6
+ import Section from 'fulldev-ui/components/Section.astro'
7
+ import Layout from 'fulldev-ui/layouts/Layout.astro'
8
+
9
+ type Props = CollectionEntry<'pages'>
10
+
11
+ const { data, render } = Astro.props
12
+ const { section, sections, block, blocks } = data
13
+ const { Content } = await render()
14
+ ---
15
+
16
+ <Layout {...Astro.props}>
17
+ <Block
18
+ _bookshop_name="ProductSection"
19
+ {...data}
20
+ />
21
+ <Block {...section} />
22
+ <Block {...block} />
23
+ <Section style={{ '--screen': '768px' }}>
24
+ <Prose id="prose">
25
+ <Content />
26
+ </Prose>
27
+ </Section>
28
+ <Blocks {...sections} />
29
+ <Blocks {...blocks} />
30
+ <slot />
31
+ </Layout>
@@ -0,0 +1,41 @@
1
+ ---
2
+ import { getCollection } from 'astro:content'
3
+ import PageLayout from 'fulldev-ui/layouts/PageLayout.astro'
4
+ import { mapKeys } from 'radash'
5
+ import { mergeEntries } from '../utils/mergeEntries'
6
+
7
+ export async function getStaticPaths() {
8
+ const pages = await getCollection('pages')
9
+ return pages.map((page: any) => ({
10
+ params: {
11
+ page: page.slug === 'index' ? undefined : page.slug,
12
+ },
13
+ props: page,
14
+ }))
15
+ }
16
+
17
+ // @ts-ignore
18
+ const { data, slug, ...rest } = Astro.props
19
+
20
+ const merged = (await mergeEntries({ data, slug })) as any
21
+
22
+ const packageLayouts = import.meta.glob('../layouts/**/*.astro')
23
+ const userLayouts = import.meta.glob('/src/layouts/**/*.astro')
24
+
25
+ const mapBlockKeys = (blocks: any) =>
26
+ mapKeys(blocks, (key: any) => key.split('/').pop().split('.').shift())
27
+
28
+ const components = {
29
+ ...mapBlockKeys(packageLayouts),
30
+ ...mapBlockKeys(userLayouts),
31
+ }
32
+
33
+ const found = components[(merged.data._layout ?? 'PageLayout') as string] as any
34
+ const functioncomp = found && (await found())
35
+ const Layout = functioncomp?.default ?? PageLayout
36
+ ---
37
+
38
+ <Layout
39
+ data={merged.data}
40
+ {...rest}
41
+ />
@@ -0,0 +1,81 @@
1
+ import { z } from 'astro:content'
2
+
3
+ export const button = z
4
+ .object({
5
+ text: z.string(),
6
+ href: z.string(),
7
+ icon: z.string(),
8
+ })
9
+ .partial()
10
+ .passthrough()
11
+
12
+ export const link = z
13
+ .object({
14
+ text: z.string(),
15
+ href: z.string(),
16
+ })
17
+ .partial()
18
+ .passthrough()
19
+
20
+ export const base = z
21
+ .object({
22
+ tagline: z.string(),
23
+ icon: z.string(),
24
+ badge: z.string().or(
25
+ z.object({
26
+ text: z.string(),
27
+ href: z.string(),
28
+ })
29
+ ),
30
+ heading: z.string(),
31
+ text: z.string(),
32
+ html: z.string(),
33
+ image: z.string(),
34
+ images: z.string().array(),
35
+ rating: z.number(),
36
+ button: button,
37
+ buttons: button.array(),
38
+ link: link,
39
+ links: link.array(),
40
+ list: z.string().array(),
41
+ avatar: z.string(),
42
+ price: z.number(),
43
+ input: z
44
+ .object({
45
+ placeholder: z.string(),
46
+ submit: z.string(),
47
+ })
48
+ .partial()
49
+ .passthrough(),
50
+ logos: z.string().array(),
51
+ logo: z.string(),
52
+ channels: z
53
+ .object({
54
+ phone: z.string(),
55
+ email: z.string(),
56
+ address: z.string(),
57
+ })
58
+ .partial()
59
+ .passthrough(),
60
+ socials: z
61
+ .object({
62
+ facebook: z.string(),
63
+ instagram: z.string(),
64
+ })
65
+ .partial()
66
+ .passthrough(),
67
+ hours: z
68
+ .object({
69
+ monday: z.string(),
70
+ tuesday: z.string(),
71
+ wednesday: z.string(),
72
+ thursday: z.string(),
73
+ friday: z.string(),
74
+ saturday: z.string(),
75
+ sunday: z.string(),
76
+ })
77
+ .partial()
78
+ .passthrough(),
79
+ })
80
+ .partial()
81
+ .passthrough()
@@ -0,0 +1,15 @@
1
+ import { z } from 'astro:content'
2
+ import { base } from './base'
3
+ import { card } from './card'
4
+ import { pathSchema } from './utils'
5
+
6
+ export const block = base
7
+ .extend({
8
+ columns: card.array(),
9
+ cards: z.array(card),
10
+ source: z.enum(['children', 'references']),
11
+ pages: pathSchema('pages').array(),
12
+ records: pathSchema('records').array(),
13
+ })
14
+ .partial()
15
+ .passthrough()
@@ -0,0 +1,3 @@
1
+ import { base } from './base'
2
+
3
+ export const card = base
@@ -0,0 +1,43 @@
1
+ import { z } from 'astro:content'
2
+ import { base } from './base'
3
+ import { block } from './block'
4
+ import { pathSchema } from './utils'
5
+
6
+ export const page = base
7
+ .extend({
8
+ i18n: pathSchema('pages'),
9
+ settings: pathSchema('settings'),
10
+ seo: z
11
+ .object({
12
+ title: z.string(),
13
+ description: z.string(),
14
+ image: z.string(),
15
+ })
16
+ .partial()
17
+ .passthrough(),
18
+ code: z
19
+ .object({
20
+ head: z.string(),
21
+ body: z.string(),
22
+ })
23
+ .partial()
24
+ .passthrough(),
25
+ pages: pathSchema('pages').array(),
26
+ records: pathSchema('records').array(),
27
+ title: z.string(),
28
+ description: z.string(),
29
+ header: block.or(z.literal(false)),
30
+ headers: block.array().or(z.literal(false)),
31
+ hero: block.or(z.literal(false)),
32
+ block: block.or(z.literal(false)),
33
+ section: block.or(z.literal(false)),
34
+ blocks: block.array().or(z.object({}).catchall(block)),
35
+ sections: block.array().or(z.object({}).catchall(block)),
36
+ cta: block.or(z.literal(false)),
37
+ footer: block.or(z.literal(false)),
38
+ footers: block.array().or(z.literal(false)),
39
+ })
40
+ .partial()
41
+ .passthrough()
42
+
43
+ export type Page = z.infer<typeof page>
@@ -0,0 +1,22 @@
1
+ import { reference, z, type AnyEntryMap } from 'astro:content'
2
+
3
+ // export const pagesPath = z
4
+ // .string()
5
+ // .transform((value) => {
6
+ // const fullpath = value?.split(`pages/`).pop()
7
+ // const slug = fullpath?.split('.').shift()
8
+ // return slug
9
+ // })
10
+ // .pipe(reference('pages'))
11
+
12
+ export const pathSchema = <C extends keyof AnyEntryMap>(collection: C) =>
13
+ z
14
+ .string()
15
+ .transform((value) => {
16
+ // @ts-ignore
17
+ const fullpath = value?.split(`${collection}/`).pop()
18
+ const slug = fullpath?.split('.').shift()
19
+ const noIndexEnding = slug?.replace('/index', '')
20
+ return noIndexEnding
21
+ })
22
+ .pipe(reference(collection))
@@ -0,0 +1,28 @@
1
+ import { getEntry } from 'astro:content'
2
+ import { assign } from 'radash'
3
+
4
+ export const mergeEntries = async (entry: any) => {
5
+ if (!entry) return entry
6
+ const { data, slug } = entry
7
+ const baseSettings = await getEntry('settings', 'base')
8
+ const enSettings = await getEntry('settings', 'en')
9
+ const deSettings = await getEntry('settings', 'de')
10
+ const frSettings = await getEntry('settings', 'fr')
11
+ const pageSettings = data.settings && (await getEntry(data.settings))
12
+ const i18nSettings = data.i18n && (await getEntry(data.i18n))
13
+
14
+ let merged = {}
15
+ merged = assign(merged, baseSettings?.data ?? {})
16
+ slug?.startsWith('en') && (merged = assign(merged, enSettings?.data ?? {}))
17
+ slug?.startsWith('de') && (merged = assign(merged, deSettings?.data ?? {}))
18
+ slug?.startsWith('fr') && (merged = assign(merged, frSettings?.data ?? {}))
19
+ merged = assign(merged, i18nSettings?.data ?? {})
20
+ merged = assign(merged, pageSettings?.data ?? {})
21
+ merged = assign(merged, data)
22
+
23
+ const newEntry = {
24
+ ...entry,
25
+ data: merged,
26
+ }
27
+ return newEntry
28
+ }
package/tsconfig.json CHANGED
@@ -2,5 +2,14 @@
2
2
  "extends": "astro/tsconfigs/strict",
3
3
  "compilerOptions": {
4
4
  "jsx": "preserve",
5
- }
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "fulldev-ui/*": [
8
+ "src/*"
9
+ ]
10
+ }
11
+ },
12
+ "exclude": [
13
+ "dist"
14
+ ]
6
15
  }
@@ -1,5 +0,0 @@
1
- {
2
- "_variables": {
3
- "lastUpdateCheck": 1721808035237
4
- }
5
- }
package/.astro/types.d.ts DELETED
@@ -1,147 +0,0 @@
1
- declare module 'astro:content' {
2
- interface Render {
3
- '.md': Promise<{
4
- Content: import('astro').MarkdownInstance<{}>['Content'];
5
- headings: import('astro').MarkdownHeading[];
6
- remarkPluginFrontmatter: Record<string, any>;
7
- }>;
8
- }
9
- }
10
-
11
- declare module 'astro:content' {
12
- type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
13
-
14
- export type CollectionKey = keyof AnyEntryMap;
15
- export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
16
-
17
- export type ContentCollectionKey = keyof ContentEntryMap;
18
- export type DataCollectionKey = keyof DataEntryMap;
19
-
20
- type AllValuesOf<T> = T extends any ? T[keyof T] : never;
21
- type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
22
- ContentEntryMap[C]
23
- >['slug'];
24
-
25
- export function getEntryBySlug<
26
- C extends keyof ContentEntryMap,
27
- E extends ValidContentEntrySlug<C> | (string & {}),
28
- >(
29
- collection: C,
30
- // Note that this has to accept a regular string too, for SSR
31
- entrySlug: E
32
- ): E extends ValidContentEntrySlug<C>
33
- ? Promise<CollectionEntry<C>>
34
- : Promise<CollectionEntry<C> | undefined>;
35
-
36
- export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
37
- collection: C,
38
- entryId: E
39
- ): Promise<CollectionEntry<C>>;
40
-
41
- export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
42
- collection: C,
43
- filter?: (entry: CollectionEntry<C>) => entry is E
44
- ): Promise<E[]>;
45
- export function getCollection<C extends keyof AnyEntryMap>(
46
- collection: C,
47
- filter?: (entry: CollectionEntry<C>) => unknown
48
- ): Promise<CollectionEntry<C>[]>;
49
-
50
- export function getEntry<
51
- C extends keyof ContentEntryMap,
52
- E extends ValidContentEntrySlug<C> | (string & {}),
53
- >(entry: {
54
- collection: C;
55
- slug: E;
56
- }): E extends ValidContentEntrySlug<C>
57
- ? Promise<CollectionEntry<C>>
58
- : Promise<CollectionEntry<C> | undefined>;
59
- export function getEntry<
60
- C extends keyof DataEntryMap,
61
- E extends keyof DataEntryMap[C] | (string & {}),
62
- >(entry: {
63
- collection: C;
64
- id: E;
65
- }): E extends keyof DataEntryMap[C]
66
- ? Promise<DataEntryMap[C][E]>
67
- : Promise<CollectionEntry<C> | undefined>;
68
- export function getEntry<
69
- C extends keyof ContentEntryMap,
70
- E extends ValidContentEntrySlug<C> | (string & {}),
71
- >(
72
- collection: C,
73
- slug: E
74
- ): E extends ValidContentEntrySlug<C>
75
- ? Promise<CollectionEntry<C>>
76
- : Promise<CollectionEntry<C> | undefined>;
77
- export function getEntry<
78
- C extends keyof DataEntryMap,
79
- E extends keyof DataEntryMap[C] | (string & {}),
80
- >(
81
- collection: C,
82
- id: E
83
- ): E extends keyof DataEntryMap[C]
84
- ? Promise<DataEntryMap[C][E]>
85
- : Promise<CollectionEntry<C> | undefined>;
86
-
87
- /** Resolve an array of entry references from the same collection */
88
- export function getEntries<C extends keyof ContentEntryMap>(
89
- entries: {
90
- collection: C;
91
- slug: ValidContentEntrySlug<C>;
92
- }[]
93
- ): Promise<CollectionEntry<C>[]>;
94
- export function getEntries<C extends keyof DataEntryMap>(
95
- entries: {
96
- collection: C;
97
- id: keyof DataEntryMap[C];
98
- }[]
99
- ): Promise<CollectionEntry<C>[]>;
100
-
101
- export function reference<C extends keyof AnyEntryMap>(
102
- collection: C
103
- ): import('astro/zod').ZodEffects<
104
- import('astro/zod').ZodString,
105
- C extends keyof ContentEntryMap
106
- ? {
107
- collection: C;
108
- slug: ValidContentEntrySlug<C>;
109
- }
110
- : {
111
- collection: C;
112
- id: keyof DataEntryMap[C];
113
- }
114
- >;
115
- // Allow generic `string` to avoid excessive type errors in the config
116
- // if `dev` is not running to update as you edit.
117
- // Invalid collection names will be caught at build time.
118
- export function reference<C extends string>(
119
- collection: C
120
- ): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
121
-
122
- type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
123
- type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
124
- ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
125
- >;
126
-
127
- type ContentEntryMap = {
128
- "pages": {
129
- "index.md": {
130
- id: "index.md";
131
- slug: "index";
132
- body: string;
133
- collection: "pages";
134
- data: any
135
- } & { render(): Render[".md"] };
136
- };
137
-
138
- };
139
-
140
- type DataEntryMap = {
141
-
142
- };
143
-
144
- type AnyEntryMap = ContentEntryMap & DataEntryMap;
145
-
146
- export type ContentConfig = never;
147
- }
package/.env DELETED
@@ -1 +0,0 @@
1
- TEST='HOI
package/astro.config.mjs DELETED
@@ -1,6 +0,0 @@
1
- import { defineConfig } from 'astro/config'
2
-
3
- // https://astro.build/config
4
- export default defineConfig({
5
- integrations: [],
6
- })
@@ -1,20 +0,0 @@
1
- ---
2
- interface Props {
3
- _block?: string
4
- [key: string | number | symbol]: any
5
- }
6
-
7
- const libraryComponents = await Astro.glob('../blocks/**/*.astro')
8
- const userComponents = await Astro.glob('/src/blocks/**/*.astro')
9
- const components = [...userComponents, ...libraryComponents]
10
-
11
- const { _block, ...rest } = Astro.props
12
-
13
- const Component = components.find((component) => {
14
- const fileName = component.default.moduleId?.split('/').pop()
15
- const componentName = fileName?.split('.')[0]
16
- return componentName === _block
17
- })?.default
18
- ---
19
-
20
- {Component && <Component {...rest} />}
@@ -1,11 +0,0 @@
1
- ---
2
- import Block from './_Block.astro'
3
-
4
- interface Props {
5
- blocks?: any
6
- }
7
-
8
- const { blocks } = Astro.props
9
- ---
10
-
11
- {blocks?.map((block: any) => <Block {...block} />)}
@@ -1,31 +0,0 @@
1
- <!-- ---
2
- import { isObject,pascal } from 'radash'
3
- import { isArray,isString } from 'remeda'
4
-
5
- interface Props {
6
- [key: string]: any
7
- }
8
-
9
- const components = await Astro.glob('../**/*.astro')
10
- ---
11
-
12
- {
13
- Object.entries(Astro.props).map(([key, value]) => {
14
- const lastPart = key.split(/(?=[A-Z])/).pop()
15
- if (!lastPart) return null
16
- const part = pascal(lastPart)
17
-
18
- if (part === 'Text' && isString(value)) return value
19
- if (part === 'Html') return <Fragment set:html={value} />
20
-
21
- const Component: any = components.find((component) => {
22
- const fileName = component.default.moduleId?.split('/').pop()
23
- const componentName = fileName?.split('.')[0]
24
- return componentName === part
25
- })?.default
26
-
27
- if (!Component) return null
28
- if (isObject(value) || isArray(value)) return <Component {...value} />
29
- return <Component html={value} />
30
- })
31
- } -->
@@ -1,37 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'body'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component>
7
-
8
- const { as = 'body', ...rest } = Astro.props
9
- ---
10
-
11
- <Component
12
- class:list={['body']}
13
- {as}
14
- {...rest}
15
- >
16
- <slot />
17
-
18
- <style is:global lang="scss">
19
- @import '../../css/utils.scss';
20
-
21
- @include component('body') {
22
- display: flex;
23
- flex-direction: column;
24
- align-items: stretch;
25
- margin: 0;
26
- background: var(--background);
27
- padding: 0;
28
- width: 100%;
29
- max-width: 100vw;
30
- height: 100%;
31
- min-height: 100vh;
32
- color: var(--text);
33
- font-size: var(--text-2);
34
- font-family: var(--font-family);
35
- }
36
- </style>
37
- </Component>
@@ -1,28 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'main'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component>
7
-
8
- const { as = 'main', ...rest } = Astro.props
9
- ---
10
-
11
- <Component
12
- class:list={['main']}
13
- {as}
14
- {...rest}
15
- >
16
- <slot />
17
- </Component>
18
-
19
- <style is:global lang="scss">
20
- @import '../../css/utils.scss';
21
-
22
- @include component('main') {
23
- display: flex;
24
- flex-direction: column;
25
- align-items: stretch;
26
- width: 100%;
27
- }
28
- </style>
@@ -1,50 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'nav'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- structure?: 'spread' | 'group' | 'row'
8
- align?: 'start' | 'center' | 'end'
9
- space?: 'none' | 'auto'
10
- }
11
-
12
- const {
13
- as = 'nav',
14
- space = 'auto',
15
- structure = 'spread',
16
- ...rest
17
- } = Astro.props
18
- ---
19
-
20
- <Component
21
- class:list={['nav']}
22
- {as}
23
- {structure}
24
- {space}
25
- {...rest}
26
- >
27
- <slot />
28
- </Component>
29
-
30
- <style is:global lang="scss">
31
- @import '../../css/utils.scss';
32
-
33
- @include component('nav') {
34
- margin-left: auto;
35
- width: max-content;
36
-
37
- &.align-start {
38
- align-items: flex-start;
39
- text-align: left;
40
- }
41
-
42
- &.align-center {
43
- align-items: center;
44
- }
45
-
46
- &.align-end {
47
- align-items: flex-end;
48
- }
49
- }
50
- </style>