diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..87e65a4ac --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +URL=https://localhost:4321 +STRIPE_SECRET_KEY= +STRIPE_RESTRICTED_KEY= \ No newline at end of file diff --git a/.prettierrc.yaml b/.prettierrc.yaml index 00abca3bb..f99fd54cd 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -7,6 +7,7 @@ singleAttributePerLine: true plugins: - 'prettier-plugin-css-order' - 'prettier-plugin-astro' + - 'prettier-plugin-tailwindcss' - 'prettier-plugin-organize-imports' # Must be last - 'prettier-plugin-astro-organize-imports' # Must be last last overrides: diff --git a/.vscode/settings.json b/.vscode/settings.json index df1780074..a83272df7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,4 +20,6 @@ "files.associations": { "*.astro": "astro" }, + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.preferences.importModuleSpecifier": "non-relative" } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef3c7f0a0..846df44c9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,19 +15,25 @@ Here lay a few resources we wrote to help you do it! │ ├── content/ │ │ ├── pages/ │ │ │ └── ... -│ │ ├── settings/ +│ │ ├── presets/ │ │ │ └── ... │ │ └── ... │ ├── css/ │ │ └── ... +│ ├── images/ +│ │ └── ... │ ├── integration/ │ │ └── ... │ ├── layouts/ │ │ └── ... +│ ├── loaders/ +│ │ └── ... │ ├── pages/ │ │ └── ... │ ├── schemas/ │ │ └── ... +│ ├── types/ +│ │ └── ... │ └── utils/ │ └── ... ├── public/ @@ -101,9 +107,9 @@ For a faster and easier review we advise you to use [conventional commits](https Have you used fulldev-ui to build a website? Add it to the showcase! 1. Fork this repository. -2. Add a screenshot of your site to the `public/showcase/` directory. -3. Add your site to the `showcase` array at the top of `src/content/pages/showcase.mdx`. -4. Go to the forked repository on your Github and clicke the 'Contribute` button to make a Pull Request. +2. Add a screenshot of your site to the `/src/images/showcase/` directory. +3. Create a file which in `/src/content/pages/showcase/` for example `/src/content/pages/showcase/google.md`. +4. Go to the forked repository on your Github and clicke the "Contribute" button to make a Pull Request. ## Community / Contact diff --git a/astro.config.ts b/astro.config.ts index e25a34841..65cdecda0 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -1,44 +1,25 @@ -import mdx from '@astrojs/mdx' -import sitemap from '@astrojs/sitemap' -// @ts-ignore -import liveCode from 'astro-live-code' -import pagefind from 'astro-pagefind' +import svelte from '@astrojs/svelte' import { defineConfig } from 'astro/config' import integration from 'fulldev-ui/integration' // https://astro.build/config export default defineConfig({ - site: 'https://ui.full.dev', + devToolbar: { + enabled: false, + }, integrations: [ - sitemap(), - mdx(), - pagefind(), - - liveCode({ - layout: '/src/components/experimental/Window.astro', - }), integration({ + company: 'Fulldev UI', + favicon: 'public/images/favicon.svg', css: '/src/css/custom.css', - colors: { - theme: 'dark', - light: { - background: '#fff', - base: '#6F6D66', - brand: '#F50', - }, - dark: { - background: '#111110', - base: '#6F6D66', - brand: '#F50', - }, - }, + injectRoutes: false, }), + svelte(), ], - redirects: { - '/discord': 'https://discord.gg/vXZqMbadm8', - '/segment/card': '/base/card', - '/segment/section': '/base/section', - '/segment/header': '/blocks/header', - '/segment/footer': '/blocks/footer', - }, + // redirects: { + // '/overview/[...slug]': '/docs/[...slug]', + // '/typography/[...slug]': '/docs/components/[...slug]', + // '/structure/[...slug]': '/docs/structures/[...slug]', + // '/blocks': '/docs/blocks/banner/', + // }, }) diff --git a/cloudcannon.config.yml b/cloudcannon.config.yml new file mode 100644 index 000000000..c06296c5c --- /dev/null +++ b/cloudcannon.config.yml @@ -0,0 +1,204 @@ +paths: + static: public + uploads: public/images + +collection_groups: + - heading: Content + collections: + - pages + - records + - heading: Settings + collections: + - layouts + +collections_config: + pages: + path: src/content/pages + url: /[full_slug]/ + disable_add_folder: true + _enabled_editors: + - visual + - content + schemas: + page: + remove_extra_inputs: false + remove_empty_inputs: true + hide_extra_inputs: true + path: schemas/page.md + job: + remove_extra_inputs: false + remove_empty_inputs: true + hide_extra_inputs: true + path: schemas/job.md + jobs: + remove_extra_inputs: false + remove_empty_inputs: true + hide_extra_inputs: true + path: schemas/jobs.md + post: + remove_extra_inputs: false + remove_empty_inputs: true + hide_extra_inputs: true + path: schemas/post.md + records: + path: src/content/records + name: Records + disable_url: true + disable_add_folder: true + _enabled_editors: + - data + layouts: + path: src/content/layouts + name: Layouts + icon: web + disable_url: true + disable_add: true + disable_add_folder: true + disable_file_actions: true + _enabled_editors: + - data +_inputs: + pages: + type: multiselect + label: Categorieën + options: + values: collections.pages + categories: + type: multiselect + label: Categorieën + options: + values: collections.pages + href: + type: url + label: Link + rating: + label: Rating + type: range + options: + min: 0 + max: 5 + step: 0.1 + head: + label: SEO / Settings + head.title: + label: SEO title + comment: 50-60 characters + head.description: + label: SEO description + comment: 50-120 characters + head.image: + type: image + label: Image + comment: Visible when you share a link of the page + options: + accepts_mime_types: image/jpeg,image/jpg,image/png,image/webp + mime_type: image/png + resize_style: contain + width: 1200 + height: 640 + images: + type: array + cascade: true + images[*]: + type: image + options: + accepts_mime_types: image/jpeg,image/jpg,image/png,image/webp + mime_type: image/webp + resize_style: contain + width: 1920 + height: 1920 + image: + type: image + label: Afbeelding + options: + accepts_mime_types: image/jpeg,image/jpg,image/png,image/webp + mime_type: image/webp + resize_style: contain + width: 1920 + height: 1920 + list: + type: array + list[*]: + type: text + hidden: + label: Hide + type: switch + soldout: + label: Sold out + type: switch + draft: + label: Draft + type: switch + order: + label: Volgorde + type: number + paragraph: + type: textarea + label: Tekst + text: + type: textarea + label: Tekst + button.text: + type: text + options: + type: array + label: Opties + options[*]: + type: text + variations: + type: array + label: Variations + sizes: + type: array + label: Sizes + sizes[*]: + type: text + logo: + type: image + cascade: true + options: + accepts_mime_types: image/jpeg,image/jpg,image/png,image/webp + mime_type: image/webp + resize_style: contain + width: 260 + height: 32 + price: + type: number + content: + type: html + name: + hidden: true + id: + hidden: true + +_structures: + head: + remove_empty_inputs: true + id_key: title + values: + - label: SEO / Settings + value: + title: null + description: null + image: null + code: null +_editables: + content: + allow_custom_markup: false + remove_custom_markup: false + bold: true + bulletedlist: true + format: p h1 h2 h3 h4 h5 h6 + image: true + image_size_attributes: true + italic: true + link: true + numberedlist: true + redo: true + table: true + underline: true + undo: true + mime_type: image/webp + resize_style: contain + width: 1920 + height: 1920 diff --git a/package.json b/package.json index b47cf2d4f..decbacde8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fulldev-ui", - "version": "0.4.33", + "version": "0.6.0-beta.14", "description": "A component library built for Astro", "homepage": "https://ui.full.dev", "bugs": "https://github.com/fulldotdev/ui/issues", @@ -24,47 +24,56 @@ "preview": "astro preview", "build:prod": "astro check && astro build", "astro": "astro", - "test": "astro check && astro build && astro preview --host" + "test": "astro check && astro build && astro preview --host", + "l": "pnpm link --global" }, "type": "module", "exports": { ".": "./src/integration/index.ts", "./*": "./src/*", "./[...page].astro": "./src/pages/[...page].astro", - "./integration": "./src/integration/index.ts", - "./tailwind": "./src/integration/tailwind-plugin.ts", - "./unocss": "./src/integration/unocss-preset.ts" + "./integration": "./src/integration/index.ts" }, "dependencies": { - "@astrojs/mdx": "^3.1.7", - "@astrojs/sitemap": "^3.1.6", - "@astrolib/seo": "1.0.0-beta.6", - "@iconify-json/tabler": "^1.2.3", - "@radix-ui/colors": "^3.0.0", - "@unocss/reset": "^0.62.4", - "astro": "^4.15.8", - "astro-live-code": "^0.0.3", - "astro-pagefind": "^1.6.0", + "@astrojs/mdx": "^3.1.9", + "@astrojs/sitemap": "^3.2.1", + "@astrojs/svelte": "^6.0.2", + "@astrojs/tailwind": "^5.1.3", + "@astrolib/seo": "1.0.0-beta.8", + "@iconify-json/tabler": "^1.2.7", + "@nanostores/persistent": "^0.10.2", + "@rollup/plugin-yaml": "^4.1.2", + "astro": "^4.16.9", + "astro-favicons": "^2.1.8", + "astro-live-code": "^0.0.4", + "astro-robots-txt": "^1.0.0", "astro-seo": "^0.8.4", - "bezier-easing": "^2.1.0", - "colorjs.io": "^0.5.2", - "deepmerge": "^4.3.1", - "fs": "0.0.1-security", + "js-yaml": "^4.1.0", + "nanostores": "^0.11.3", "radash": "^12.1.0", - "remeda": "2.14.0", - "sass": "^1.78.0", - "tailwindcss": "^3.4.12", - "typescript": "^5.6.2", - "unocss": "^0.62.4", - "url": "^0.11.4", - "vite-plugin-virtual": "^0.3.0" + "remeda": "2.16.0", + "sharp": "^0.33.5", + "simple-stack-form": "^0.1.12", + "simple-stack-query": "^0.2.0", + "stripe": "^17.3.1", + "svelte": "^5.2.10", + "tailwind-scrollbar": "^3.1.0", + "tailwindcss": "3.4.14", + "tailwindcss-animate": "^1.0.7", + "typescript": "^5.7.2", + "vite": "^5.4.10", + "vite-plugin-virtual": "^0.3.0", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.23.5" }, "devDependencies": { - "@astrojs/check": "^0.9.3", + "@astrojs/check": "^0.9.4", + "@types/js-yaml": "^4.0.9", "prettier": "3.3.3", "prettier-plugin-astro": "0.14.1", - "prettier-plugin-astro-organize-imports": "^0.4.9", + "prettier-plugin-astro-organize-imports": "^0.4.11", "prettier-plugin-css-order": "^2.1.2", - "prettier-plugin-organize-imports": "^4.1.0" + "prettier-plugin-organize-imports": "^4.1.0", + "prettier-plugin-tailwindcss": "^0.6.8" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 627fb9901..83ab650d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,76 +6,103 @@ settings: dependencies: '@astrojs/mdx': - specifier: ^3.1.7 - version: 3.1.7(astro@4.15.8) + specifier: ^3.1.9 + version: 3.1.9(astro@4.16.9) '@astrojs/sitemap': - specifier: ^3.1.6 - version: 3.1.6 + specifier: ^3.2.1 + version: 3.2.1 + '@astrojs/svelte': + specifier: ^6.0.2 + version: 6.0.2(astro@4.16.9)(svelte@5.2.10)(typescript@5.7.2) + '@astrojs/tailwind': + specifier: ^5.1.3 + version: 5.1.3(astro@4.16.9)(tailwindcss@3.4.14) '@astrolib/seo': - specifier: 1.0.0-beta.6 - version: 1.0.0-beta.6(astro@4.15.8) + specifier: 1.0.0-beta.8 + version: 1.0.0-beta.8(astro@4.16.9) '@iconify-json/tabler': - specifier: ^1.2.3 - version: 1.2.3 - '@radix-ui/colors': - specifier: ^3.0.0 - version: 3.0.0 - '@unocss/reset': - specifier: ^0.62.4 - version: 0.62.4 + specifier: ^1.2.7 + version: 1.2.7 + '@nanostores/persistent': + specifier: ^0.10.2 + version: 0.10.2(nanostores@0.11.3) + '@rollup/plugin-yaml': + specifier: ^4.1.2 + version: 4.1.2 astro: - specifier: ^4.15.8 - version: 4.15.8(sass@1.79.3)(typescript@5.6.2) + specifier: ^4.16.9 + version: 4.16.9(typescript@5.7.2) + astro-favicons: + specifier: ^2.1.8 + version: 2.1.8(astro@4.16.9) astro-live-code: - specifier: ^0.0.3 - version: 0.0.3 - astro-pagefind: - specifier: ^1.6.0 - version: 1.6.0(astro@4.15.8) + specifier: ^0.0.4 + version: 0.0.4 + astro-robots-txt: + specifier: ^1.0.0 + version: 1.0.0 astro-seo: specifier: ^0.8.4 - version: 0.8.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2) - bezier-easing: - specifier: ^2.1.0 - version: 2.1.0 - colorjs.io: - specifier: ^0.5.2 - version: 0.5.2 - deepmerge: - specifier: ^4.3.1 - version: 4.3.1 - fs: - specifier: 0.0.1-security - version: 0.0.1-security + version: 0.8.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2) + js-yaml: + specifier: ^4.1.0 + version: 4.1.0 + nanostores: + specifier: ^0.11.3 + version: 0.11.3 radash: specifier: ^12.1.0 version: 12.1.0 remeda: - specifier: 2.14.0 - version: 2.14.0 - sass: - specifier: ^1.78.0 - version: 1.79.3 + specifier: 2.16.0 + version: 2.16.0 + sharp: + specifier: ^0.33.5 + version: 0.33.5 + simple-stack-form: + specifier: ^0.1.12 + version: 0.1.12(astro@4.16.9)(zod@3.23.8) + simple-stack-query: + specifier: ^0.2.0 + version: 0.2.0 + stripe: + specifier: ^17.3.1 + version: 17.3.1 + svelte: + specifier: ^5.2.10 + version: 5.2.10 + tailwind-scrollbar: + specifier: ^3.1.0 + version: 3.1.0(tailwindcss@3.4.14) tailwindcss: - specifier: ^3.4.12 - version: 3.4.12 + specifier: 3.4.14 + version: 3.4.14 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.14) typescript: - specifier: ^5.6.2 - version: 5.6.2 - unocss: - specifier: ^0.62.4 - version: 0.62.4(postcss@8.4.45)(vite@5.4.3) - url: - specifier: ^0.11.4 - version: 0.11.4 + specifier: ^5.7.2 + version: 5.7.2 + vite: + specifier: ^5.4.10 + version: 5.4.10 vite-plugin-virtual: specifier: ^0.3.0 - version: 0.3.0(vite@5.4.3) + version: 0.3.0(vite@5.4.10) + zod: + specifier: ^3.23.8 + version: 3.23.8 + zod-to-json-schema: + specifier: ^3.23.5 + version: 3.23.5(zod@3.23.8) devDependencies: '@astrojs/check': - specifier: ^0.9.3 - version: 0.9.3(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2) + specifier: ^0.9.4 + version: 0.9.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2) + '@types/js-yaml': + specifier: ^4.0.9 + version: 4.0.9 prettier: specifier: 3.3.3 version: 3.3.3 @@ -83,14 +110,17 @@ devDependencies: specifier: 0.14.1 version: 0.14.1 prettier-plugin-astro-organize-imports: - specifier: ^0.4.9 - version: 0.4.9(prettier-plugin-astro@0.14.1)(prettier@3.3.3) + specifier: ^0.4.11 + version: 0.4.11(prettier-plugin-astro@0.14.1)(prettier-plugin-tailwindcss@0.6.8)(prettier@3.3.3) prettier-plugin-css-order: specifier: ^2.1.2 - version: 2.1.2(postcss@8.4.45)(prettier@3.3.3) + version: 2.1.2(postcss@8.4.47)(prettier@3.3.3) prettier-plugin-organize-imports: specifier: ^4.1.0 - version: 4.1.0(prettier@3.3.3)(typescript@5.6.2) + version: 4.1.0(prettier@3.3.3)(typescript@5.7.2) + prettier-plugin-tailwindcss: + specifier: ^0.6.8 + version: 0.6.8(prettier-plugin-astro@0.14.1)(prettier-plugin-css-order@2.1.2)(prettier-plugin-organize-imports@4.1.0)(prettier@3.3.3) packages: @@ -107,45 +137,33 @@ packages: '@jridgewell/trace-mapping': 0.3.25 dev: false - /@antfu/install-pkg@0.4.1: - resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==} - dependencies: - package-manager-detector: 0.2.0 - tinyexec: 0.3.0 - dev: false - - /@antfu/utils@0.7.10: - resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} - dev: false - - /@astrojs/check@0.5.10(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2): + /@astrojs/check@0.5.10(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2): resolution: {integrity: sha512-vliHXM9cu/viGeKiksUM4mXfO816ohWtawTl2ADPgTsd4nUMjFiyAl7xFZhF34yy4hq4qf7jvK1F2PlR3b5I5w==} hasBin: true peerDependencies: typescript: ^5.0.0 dependencies: - '@astrojs/language-server': 2.14.2(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2) + '@astrojs/language-server': 2.15.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2) chokidar: 3.6.0 fast-glob: 3.3.2 kleur: 4.1.5 - typescript: 5.6.2 + typescript: 5.7.2 yargs: 17.7.2 transitivePeerDependencies: - prettier - prettier-plugin-astro dev: false - /@astrojs/check@0.9.3(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2): - resolution: {integrity: sha512-I6Dz45bMI5YRbp4yK2LKWsHH3/kkHRGdPGruGkLap6pqxhdcNh7oCgN04Ac+haDfc9ow5BYPGPmEhkwef15GQQ==} + /@astrojs/check@0.9.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2): + resolution: {integrity: sha512-IOheHwCtpUfvogHHsvu0AbeRZEnjJg3MopdLddkJE70mULItS/Vh37BHcI00mcOJcH1vhD3odbpvWokpxam7xA==} hasBin: true peerDependencies: typescript: ^5.0.0 dependencies: - '@astrojs/language-server': 2.14.2(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2) - chokidar: 3.6.0 - fast-glob: 3.3.2 + '@astrojs/language-server': 2.15.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2) + chokidar: 4.0.1 kleur: 4.1.5 - typescript: 5.6.2 + typescript: 5.7.2 yargs: 17.7.2 transitivePeerDependencies: - prettier @@ -159,8 +177,8 @@ packages: resolution: {integrity: sha512-bMf9jFihO8YP940uD70SI/RDzIhUHJAolWVcO1v5PUivxGKvfLZTLTVVxEYzGYyPsA3ivdLNqMnL5VgmQySa+g==} dev: false - /@astrojs/language-server@2.14.2(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2): - resolution: {integrity: sha512-daUJ/+/2pPF3eGG4tVdXKyw0tabUDrJKwLzU8VTuNhEHIn3VZAIES6VT3+mX0lmKcMiKM8/bjZdfY+fPfmnsMA==} + /@astrojs/language-server@2.15.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2): + resolution: {integrity: sha512-JivzASqTPR2bao9BWsSc/woPHH7OGSGc9aMxXL4U6egVTqBycB3ZHdBJPuOCVtcGLrzdWTosAqVPz1BVoxE0+A==} hasBin: true peerDependencies: prettier: ^3.0.0 @@ -172,45 +190,44 @@ packages: optional: true dependencies: '@astrojs/compiler': 2.10.3 - '@astrojs/yaml2ts': 0.2.1 + '@astrojs/yaml2ts': 0.2.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@volar/kit': 2.4.4(typescript@5.6.2) - '@volar/language-core': 2.4.4 - '@volar/language-server': 2.4.4 - '@volar/language-service': 2.4.4 - '@volar/typescript': 2.4.4 + '@volar/kit': 2.4.8(typescript@5.7.2) + '@volar/language-core': 2.4.8 + '@volar/language-server': 2.4.8 + '@volar/language-service': 2.4.8 fast-glob: 3.3.2 muggle-string: 0.4.1 prettier: 3.3.3 prettier-plugin-astro: 0.14.1 - volar-service-css: 0.0.61(@volar/language-service@2.4.4) - volar-service-emmet: 0.0.61(@volar/language-service@2.4.4) - volar-service-html: 0.0.61(@volar/language-service@2.4.4) - volar-service-prettier: 0.0.61(@volar/language-service@2.4.4)(prettier@3.3.3) - volar-service-typescript: 0.0.61(@volar/language-service@2.4.4) - volar-service-typescript-twoslash-queries: 0.0.61(@volar/language-service@2.4.4) - volar-service-yaml: 0.0.61(@volar/language-service@2.4.4) + volar-service-css: 0.0.62(@volar/language-service@2.4.8) + volar-service-emmet: 0.0.62(@volar/language-service@2.4.8) + volar-service-html: 0.0.62(@volar/language-service@2.4.8) + volar-service-prettier: 0.0.62(@volar/language-service@2.4.8)(prettier@3.3.3) + volar-service-typescript: 0.0.62(@volar/language-service@2.4.8) + volar-service-typescript-twoslash-queries: 0.0.62(@volar/language-service@2.4.8) + volar-service-yaml: 0.0.62(@volar/language-service@2.4.8) vscode-html-languageservice: 5.3.1 vscode-uri: 3.0.8 transitivePeerDependencies: - typescript - /@astrojs/markdown-remark@5.2.0: - resolution: {integrity: sha512-vWGM24KZXz11jR3JO+oqYU3T2qpuOi4uGivJ9SQLCAI01+vEkHC60YJMRvHPc+hwd60F7euNs1PeOEixIIiNQw==} + /@astrojs/markdown-remark@5.3.0: + resolution: {integrity: sha512-r0Ikqr0e6ozPb5bvhup1qdWnSPUvQu6tub4ZLYaKyG50BXZ0ej6FhGz3GpChKpH7kglRFPObJd/bDyf2VM9pkg==} dependencies: '@astrojs/prism': 3.1.0 github-slugger: 2.0.0 - hast-util-from-html: 2.0.2 + hast-util-from-html: 2.0.3 hast-util-to-text: 4.0.2 import-meta-resolve: 4.1.0 mdast-util-definitions: 6.0.0 rehype-raw: 7.0.0 - rehype-stringify: 10.0.0 + rehype-stringify: 10.0.1 remark-gfm: 4.0.0 remark-parse: 11.0.0 - remark-rehype: 11.1.0 + remark-rehype: 11.1.1 remark-smartypants: 3.0.2 - shiki: 1.16.2 + shiki: 1.22.2 unified: 11.0.5 unist-util-remove-position: 5.0.0 unist-util-visit: 5.0.0 @@ -220,20 +237,20 @@ packages: - supports-color dev: false - /@astrojs/mdx@3.1.7(astro@4.15.8): - resolution: {integrity: sha512-8lGdCt+S0TrZgQpbcP3fQJc4cTeacAirtz9TpAMtHCWrQGW8slKt3WG4/0N+bhZgYRC4h5AT5drzFz+y3wvmsg==} + /@astrojs/mdx@3.1.9(astro@4.16.9): + resolution: {integrity: sha512-3jPD4Bff6lIA20RQoonnZkRtZ9T3i0HFm6fcDF7BMsKIZ+xBP2KXzQWiuGu62lrVCmU612N+SQVGl5e0fI+zWg==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} peerDependencies: astro: ^4.8.0 dependencies: - '@astrojs/markdown-remark': 5.2.0 - '@mdx-js/mdx': 3.0.1 - acorn: 8.12.1 - astro: 4.15.8(sass@1.79.3)(typescript@5.6.2) + '@astrojs/markdown-remark': 5.3.0 + '@mdx-js/mdx': 3.1.0(acorn@8.14.0) + acorn: 8.14.0 + astro: 4.16.9(typescript@5.7.2) es-module-lexer: 1.5.4 estree-util-visit: 2.0.0 gray-matter: 4.0.3 - hast-util-to-html: 9.0.2 + hast-util-to-html: 9.0.3 kleur: 4.1.5 rehype-raw: 7.0.0 remark-gfm: 4.0.0 @@ -252,14 +269,55 @@ packages: prismjs: 1.29.0 dev: false - /@astrojs/sitemap@3.1.6: - resolution: {integrity: sha512-1Qp2NvAzVImqA6y+LubKi1DVhve/hXXgFvB0szxiipzh7BvtuKe4oJJ9dXSqaubaTkt4nMa6dv6RCCAYeB6xaQ==} + /@astrojs/sitemap@3.2.1: + resolution: {integrity: sha512-uxMfO8f7pALq0ADL6Lk68UV6dNYjJ2xGUzyjjVj60JLBs5a6smtlkBYv3tQ0DzoqwS7c9n4FUx5lgv0yPo/fgA==} dependencies: - sitemap: 7.1.2 + sitemap: 8.0.0 stream-replace-string: 2.0.0 zod: 3.23.8 dev: false + /@astrojs/svelte@6.0.2(astro@4.16.9)(svelte@5.2.10)(typescript@5.7.2): + resolution: {integrity: sha512-Jn60LLH+AbjtLIOQuL0SUI0fxMwpT89VraoGkEwF33ZgCT59H8fMQOj9eNf632P/SHRbKpD+Q+PJjODn5OcKoQ==} + engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} + peerDependencies: + astro: ^4.0.0 + svelte: ^5.1.16 + typescript: ^5.3.3 + dependencies: + '@sveltejs/vite-plugin-svelte': 4.0.2(svelte@5.2.10)(vite@5.4.10) + astro: 4.16.9(typescript@5.7.2) + svelte: 5.2.10 + svelte2tsx: 0.7.28(svelte@5.2.10)(typescript@5.7.2) + typescript: 5.7.2 + vite: 5.4.10 + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + dev: false + + /@astrojs/tailwind@5.1.3(astro@4.16.9)(tailwindcss@3.4.14): + resolution: {integrity: sha512-XF7WhXRhqEHGvADqc0kDtF7Yv/g4wAWTaj91jBBTBaYnc4+MQLH94duFfFa4NlTkRG40VQd012eF3MhO3Kk+bg==} + peerDependencies: + astro: ^3.0.0 || ^4.0.0 || ^5.0.0 + tailwindcss: ^3.0.24 + dependencies: + astro: 4.16.9(typescript@5.7.2) + autoprefixer: 10.4.20(postcss@8.4.49) + postcss: 8.4.49 + postcss-load-config: 4.0.2(postcss@8.4.49) + tailwindcss: 3.4.14 + transitivePeerDependencies: + - ts-node + dev: false + /@astrojs/telemetry@3.1.0: resolution: {integrity: sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} @@ -267,7 +325,7 @@ packages: ci-info: 4.0.0 debug: 4.3.7 dlv: 1.1.3 - dset: 3.1.3 + dset: 3.1.4 is-docker: 3.0.0 is-wsl: 3.1.0 which-pm-runs: 1.1.0 @@ -275,46 +333,47 @@ packages: - supports-color dev: false - /@astrojs/yaml2ts@0.2.1: - resolution: {integrity: sha512-CBaNwDQJz20E5WxzQh4thLVfhB3JEEGz72wRA+oJp6fQR37QLAqXZJU0mHC+yqMOQ6oj0GfRPJrz6hjf+zm6zA==} + /@astrojs/yaml2ts@0.2.2: + resolution: {integrity: sha512-GOfvSr5Nqy2z5XiwqTouBBpy5FyI6DEe+/g/Mk5am9SjILN1S5fOEvYK0GuWHg98yS/dobP4m8qyqw/URW35fQ==} dependencies: - yaml: 2.5.1 + yaml: 2.6.0 - /@astrolib/seo@1.0.0-beta.6(astro@4.15.8): - resolution: {integrity: sha512-j9YuxCGZUl6cHErg9O7Ss+AjDHxgUZVzLrc6hADZfEagY84dCr/HRYFEtrTstxEiW+YNdjCRr5S+Y7HZ7KUEmw==} + /@astrolib/seo@1.0.0-beta.8(astro@4.16.9): + resolution: {integrity: sha512-SpNycspjcjnz6um4Vph0k+SAKgUib7/8qJRCaaahJD1UfLuXKK7E+bmKbnv8QPBTRPZkQW6zFVaZRl5VvnyDfg==} peerDependencies: - astro: ^1.2.1 || ^2.0.0 || ^3.0.0-beta.0 || ^3.0.0 || ^4.0.0 + astro: ^1.2.1 || ^2.0.0 || ^3.0.0-beta.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-beta.0 || ^5.0.0 dependencies: - astro: 4.15.8(sass@1.79.3)(typescript@5.6.2) + astro: 4.16.9(typescript@5.7.2) dev: false - /@babel/code-frame@7.24.7: - resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + /@babel/code-frame@7.26.2: + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.24.7 - picocolors: 1.1.0 + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 dev: false - /@babel/compat-data@7.25.4: - resolution: {integrity: sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==} + /@babel/compat-data@7.26.2: + resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} engines: {node: '>=6.9.0'} dev: false - /@babel/core@7.25.2: - resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} + /@babel/core@7.26.0: + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helpers': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -324,173 +383,169 @@ packages: - supports-color dev: false - /@babel/generator@7.25.6: - resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} + /@babel/generator@7.26.2: + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.25.6 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + jsesc: 3.0.2 dev: false - /@babel/helper-annotate-as-pure@7.24.7: - resolution: {integrity: sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==} + /@babel/helper-annotate-as-pure@7.25.9: + resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.26.0 dev: false - /@babel/helper-compilation-targets@7.25.2: - resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} + /@babel/helper-compilation-targets@7.25.9: + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.25.4 - '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.3 + '@babel/compat-data': 7.26.2 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.2 lru-cache: 5.1.1 semver: 6.3.1 dev: false - /@babel/helper-module-imports@7.24.7: - resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} + /@babel/helper-module-imports@7.25.9: + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color dev: false - /@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} + /@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0): + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-simple-access': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.6 - transitivePeerDependencies: - - supports-color - dev: false - - /@babel/helper-plugin-utils@7.24.8: - resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} - engines: {node: '>=6.9.0'} - dev: false - - /@babel/helper-simple-access@7.24.7: - resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color dev: false - /@babel/helper-string-parser@7.24.8: - resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + /@babel/helper-plugin-utils@7.25.9: + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-identifier@7.24.7: - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + /@babel/helper-string-parser@7.25.9: + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-option@7.24.8: - resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} + /@babel/helper-validator-identifier@7.25.9: + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} dev: false - /@babel/helpers@7.25.6: - resolution: {integrity: sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==} + /@babel/helper-validator-option@7.25.9: + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 dev: false - /@babel/highlight@7.24.7: - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + /@babel/helpers@7.26.0: + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.24.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.1.0 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 dev: false - /@babel/parser@7.25.6: - resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} + /@babel/parser@7.26.2: + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.26.0 dev: false - /@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==} + /@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0): + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: false - /@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA==} + /@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.0): + resolution: {integrity: sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) - '@babel/types': 7.25.6 + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color dev: false - /@babel/template@7.25.0: - resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} + /@babel/template@7.25.9: + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 dev: false - /@babel/traverse@7.25.6: - resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} + /@babel/traverse@7.25.9: + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: false - /@babel/types@7.25.6: - resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} + /@babel/types@7.26.0: + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 - to-fast-properties: 2.0.0 + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + dev: false + + /@clack/core@0.3.5: + resolution: {integrity: sha512-5cfhQNH+1VQ2xLQlmzXMqUoiaH0lRBq9/CLW9lTyMbuKLC3+xEK01tHVvyut++mLOn5urSHmkm6I0Lg9MaJSTQ==} + dependencies: + picocolors: 1.1.1 + sisteransi: 1.0.5 + dev: false + + /@clack/prompts@0.7.0: + resolution: {integrity: sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA==} + dependencies: + '@clack/core': 0.3.5 + picocolors: 1.1.1 + sisteransi: 1.0.5 dev: false + bundledDependencies: + - is-unicode-supported /@emmetio/abbreviation@2.3.3: resolution: {integrity: sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==} @@ -522,11 +577,11 @@ packages: /@emmetio/stream-reader@2.2.0: resolution: {integrity: sha512-fXVXEyFA5Yv3M3n8sUGT7+fvecGrZP4k6FnWWMSZVQf69kAq0LLpaBQLGcPR30m3zMmKYhECP4k/ZkzvhEW5kw==} - /@emnapi/runtime@1.2.0: - resolution: {integrity: sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==} + /@emnapi/runtime@1.3.1: + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} requiresBuild: true dependencies: - tslib: 2.7.0 + tslib: 2.8.1 dev: false optional: true @@ -539,15 +594,6 @@ packages: dev: false optional: true - /@esbuild/aix-ppc64@0.23.1: - resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - requiresBuild: true - dev: false - optional: true - /@esbuild/android-arm64@0.21.5: resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} @@ -557,15 +603,6 @@ packages: dev: false optional: true - /@esbuild/android-arm64@0.23.1: - resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: false - optional: true - /@esbuild/android-arm@0.21.5: resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} @@ -575,15 +612,6 @@ packages: dev: false optional: true - /@esbuild/android-arm@0.23.1: - resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: false - optional: true - /@esbuild/android-x64@0.21.5: resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} @@ -593,15 +621,6 @@ packages: dev: false optional: true - /@esbuild/android-x64@0.23.1: - resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: false - optional: true - /@esbuild/darwin-arm64@0.21.5: resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} @@ -611,15 +630,6 @@ packages: dev: false optional: true - /@esbuild/darwin-arm64@0.23.1: - resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - /@esbuild/darwin-x64@0.21.5: resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} @@ -629,15 +639,6 @@ packages: dev: false optional: true - /@esbuild/darwin-x64@0.23.1: - resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - /@esbuild/freebsd-arm64@0.21.5: resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} @@ -647,15 +648,6 @@ packages: dev: false optional: true - /@esbuild/freebsd-arm64@0.23.1: - resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/freebsd-x64@0.21.5: resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} @@ -665,15 +657,6 @@ packages: dev: false optional: true - /@esbuild/freebsd-x64@0.23.1: - resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-arm64@0.21.5: resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} @@ -683,15 +666,6 @@ packages: dev: false optional: true - /@esbuild/linux-arm64@0.23.1: - resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-arm@0.21.5: resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} @@ -701,15 +675,6 @@ packages: dev: false optional: true - /@esbuild/linux-arm@0.23.1: - resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-ia32@0.21.5: resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} @@ -719,15 +684,6 @@ packages: dev: false optional: true - /@esbuild/linux-ia32@0.23.1: - resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-loong64@0.21.5: resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} @@ -737,15 +693,6 @@ packages: dev: false optional: true - /@esbuild/linux-loong64@0.23.1: - resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-mips64el@0.21.5: resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} @@ -755,15 +702,6 @@ packages: dev: false optional: true - /@esbuild/linux-mips64el@0.23.1: - resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-ppc64@0.21.5: resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} @@ -773,15 +711,6 @@ packages: dev: false optional: true - /@esbuild/linux-ppc64@0.23.1: - resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-riscv64@0.21.5: resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} @@ -791,15 +720,6 @@ packages: dev: false optional: true - /@esbuild/linux-riscv64@0.23.1: - resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-s390x@0.21.5: resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} @@ -809,15 +729,6 @@ packages: dev: false optional: true - /@esbuild/linux-s390x@0.23.1: - resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-x64@0.21.5: resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} @@ -827,15 +738,6 @@ packages: dev: false optional: true - /@esbuild/linux-x64@0.23.1: - resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/netbsd-x64@0.21.5: resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} @@ -845,24 +747,6 @@ packages: dev: false optional: true - /@esbuild/netbsd-x64@0.23.1: - resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: false - optional: true - - /@esbuild/openbsd-arm64@0.23.1: - resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/openbsd-x64@0.21.5: resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} @@ -872,15 +756,6 @@ packages: dev: false optional: true - /@esbuild/openbsd-x64@0.23.1: - resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/sunos-x64@0.21.5: resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} @@ -890,15 +765,6 @@ packages: dev: false optional: true - /@esbuild/sunos-x64@0.23.1: - resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: false - optional: true - /@esbuild/win32-arm64@0.21.5: resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} @@ -908,15 +774,6 @@ packages: dev: false optional: true - /@esbuild/win32-arm64@0.23.1: - resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: false - optional: true - /@esbuild/win32-ia32@0.21.5: resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} @@ -926,15 +783,6 @@ packages: dev: false optional: true - /@esbuild/win32-ia32@0.23.1: - resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: false - optional: true - /@esbuild/win32-x64@0.21.5: resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -944,17 +792,8 @@ packages: dev: false optional: true - /@esbuild/win32-x64@0.23.1: - resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /@iconify-json/tabler@1.2.3: - resolution: {integrity: sha512-km0P/1Gtp/bFhvBQQmDkMx3nNIkNmU57WCYl9b8Envl81m3bhVVT85A8FtWChQxMXsYv3cTNuwMq/WZGfcY9vQ==} + /@iconify-json/tabler@1.2.7: + resolution: {integrity: sha512-q6FbDeC5caOC7i7/dcJOv7PdovHWItd84hCvsnlD/mzsrl5Nhol6eSQOMRv1bIpyxykGEiSDbOsVK5f23j/aFg==} dependencies: '@iconify/types': 2.0.0 dev: false @@ -963,20 +802,6 @@ packages: resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} dev: false - /@iconify/utils@2.1.33: - resolution: {integrity: sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw==} - dependencies: - '@antfu/install-pkg': 0.4.1 - '@antfu/utils': 0.7.10 - '@iconify/types': 2.0.0 - debug: 4.3.7 - kolorist: 1.8.0 - local-pkg: 0.5.0 - mlly: 1.7.1 - transitivePeerDependencies: - - supports-color - dev: false - /@img/sharp-darwin-arm64@0.33.5: resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -1135,7 +960,7 @@ packages: cpu: [wasm32] requiresBuild: true dependencies: - '@emnapi/runtime': 1.2.0 + '@emnapi/runtime': 1.3.1 dev: false optional: true @@ -1198,26 +1023,27 @@ packages: '@jridgewell/sourcemap-codec': 1.5.0 dev: false - /@mdx-js/mdx@3.0.1: - resolution: {integrity: sha512-eIQ4QTrOWyL3LWEe/bu6Taqzq2HQvHcyTMaOrI95P2/LmJE7AsfPfgJGuFLPVqBUE1BC1rik3VIhU+s9u72arA==} + /@mdx-js/mdx@3.1.0(acorn@8.14.0): + resolution: {integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.4 '@types/mdx': 2.0.13 collapse-white-space: 2.1.0 devlop: 1.1.0 - estree-util-build-jsx: 3.0.1 estree-util-is-identifier-name: 3.0.0 - estree-util-to-js: 2.0.0 + estree-util-scope: 1.0.0 estree-walker: 3.0.3 - hast-util-to-estree: 3.1.0 - hast-util-to-jsx-runtime: 2.3.0 + hast-util-to-jsx-runtime: 2.3.2 markdown-extensions: 2.0.0 - periscopic: 3.1.0 - remark-mdx: 3.0.1 + recma-build-jsx: 1.0.0 + recma-jsx: 1.0.0(acorn@8.14.0) + recma-stringify: 1.0.0 + rehype-recma: 1.0.0 + remark-mdx: 3.1.0 remark-parse: 11.0.0 - remark-rehype: 11.1.0 + remark-rehype: 11.1.1 source-map: 0.7.4 unified: 11.0.5 unist-util-position-from-estree: 2.0.0 @@ -1225,9 +1051,19 @@ packages: unist-util-visit: 5.0.0 vfile: 6.0.3 transitivePeerDependencies: + - acorn - supports-color dev: false + /@nanostores/persistent@0.10.2(nanostores@0.11.3): + resolution: {integrity: sha512-BEndnLhRC+yP7gXTESepBbSj8XNl8OXK9hu4xAgKC7MWJHKXnEqJMqY47LUyHxK6vYgFnisyHmqq+vq8AUFyIg==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + nanostores: ^0.9.0 || ^0.10.0 || ^0.11.0 + dependencies: + nanostores: 0.11.3 + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1246,53 +1082,9 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - /@oslojs/encoding@0.4.1: - resolution: {integrity: sha512-hkjo6MuIK/kQR5CrGNdAPZhS01ZCXuWDRJ187zh6qqF2+yMHZpD9fAYpX8q2bOO6Ryhl3XpCT6kUX76N8hhm4Q==} - dev: false - - /@pagefind/darwin-arm64@1.1.1: - resolution: {integrity: sha512-tZ9tysUmQpFs2EqWG2+E1gc+opDAhSyZSsgKmFzhnWfkK02YHZhvL5XJXEZDqYy3s1FAKhwjTg8XDxneuBlDZQ==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /@pagefind/darwin-x64@1.1.1: - resolution: {integrity: sha512-ChohLQ39dLwaxQv0jIQB/SavP3TM5K5ENfDTqIdzLkmfs3+JlzSDyQKcJFjTHYcCzQOZVeieeGq8PdqvLJxJxQ==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /@pagefind/default-ui@1.1.1: - resolution: {integrity: sha512-ZM0zDatWDnac/VGHhQCiM7UgA4ca8jpjA+VfuTJyHJBaxGqZMQnm4WoTz9E0KFcue1Bh9kxpu7uWFZfwpZZk0A==} - dev: false - - /@pagefind/linux-arm64@1.1.1: - resolution: {integrity: sha512-H5P6wDoCoAbdsWp0Zx0DxnLUrwTGWGLu/VI1rcN2CyFdY2EGSvPQsbGBMrseKRNuIrJDFtxHHHyjZ7UbzaM9EA==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@pagefind/linux-x64@1.1.1: - resolution: {integrity: sha512-yJs7tTYbL2MI3HT+ngs9E1BfUbY9M4/YzA0yEM5xBo4Xl8Yu8Qg2xZTOQ1/F6gwvMrjCUFo8EoACs6LRDhtMrQ==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@pagefind/windows-x64@1.1.1: - resolution: {integrity: sha512-b7/qPqgIl+lMzkQ8fJt51SfguB396xbIIR+VZ3YrL2tLuyifDJ1wL5mEm+ddmHxJ2Fki340paPcDan9en5OmAw==} - cpu: [x64] - os: [win32] - requiresBuild: true + /@oslojs/encoding@1.1.0: + resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} dev: false - optional: true /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} @@ -1301,16 +1093,22 @@ packages: dev: false optional: true - /@polka/url@1.0.0-next.25: - resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} - dev: false - - /@radix-ui/colors@3.0.0: - resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==} + /@rollup/plugin-yaml@4.1.2: + resolution: {integrity: sha512-RpupciIeZMUqhgFE97ba0s98mOFS7CWzN3EJNhJkqSv9XLlWYtwVdtE6cDw6ASOF/sZVFS7kRJXftaqM2Vakdw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.3 + js-yaml: 4.1.0 + tosource: 2.0.0-alpha.3 dev: false - /@rollup/pluginutils@5.1.0: - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + /@rollup/pluginutils@5.1.3: + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -1318,479 +1116,363 @@ packages: rollup: optional: true dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 - picomatch: 2.3.1 + picomatch: 4.0.2 dev: false - /@rollup/rollup-android-arm-eabi@4.21.2: - resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} + /@rollup/rollup-android-arm-eabi@4.24.4: + resolution: {integrity: sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==} cpu: [arm] os: [android] requiresBuild: true dev: false optional: true - /@rollup/rollup-android-arm64@4.21.2: - resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} + /@rollup/rollup-android-arm64@4.24.4: + resolution: {integrity: sha512-j4nrEO6nHU1nZUuCfRKoCcvh7PIywQPUCBa2UsootTHvTHIoIu2BzueInGJhhvQO/2FTRdNYpf63xsgEqH9IhA==} cpu: [arm64] os: [android] requiresBuild: true dev: false optional: true - /@rollup/rollup-darwin-arm64@4.21.2: - resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} + /@rollup/rollup-darwin-arm64@4.24.4: + resolution: {integrity: sha512-GmU/QgGtBTeraKyldC7cDVVvAJEOr3dFLKneez/n7BvX57UdhOqDsVwzU7UOnYA7AAOt+Xb26lk79PldDHgMIQ==} cpu: [arm64] os: [darwin] requiresBuild: true dev: false optional: true - /@rollup/rollup-darwin-x64@4.21.2: - resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} + /@rollup/rollup-darwin-x64@4.24.4: + resolution: {integrity: sha512-N6oDBiZCBKlwYcsEPXGDE4g9RoxZLK6vT98M8111cW7VsVJFpNEqvJeIPfsCzbf0XEakPslh72X0gnlMi4Ddgg==} cpu: [x64] os: [darwin] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.21.2: - resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} + /@rollup/rollup-freebsd-arm64@4.24.4: + resolution: {integrity: sha512-py5oNShCCjCyjWXCZNrRGRpjWsF0ic8f4ieBNra5buQz0O/U6mMXCpC1LvrHuhJsNPgRt36tSYMidGzZiJF6mw==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-freebsd-x64@4.24.4: + resolution: {integrity: sha512-L7VVVW9FCnTTp4i7KrmHeDsDvjB4++KOBENYtNYAiYl96jeBThFfhP6HVxL74v4SiZEVDH/1ILscR5U9S4ms4g==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.24.4: + resolution: {integrity: sha512-10ICosOwYChROdQoQo589N5idQIisxjaFE/PAnX2i0Zr84mY0k9zul1ArH0rnJ/fpgiqfu13TFZR5A5YJLOYZA==} cpu: [arm] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-arm-musleabihf@4.21.2: - resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} + /@rollup/rollup-linux-arm-musleabihf@4.24.4: + resolution: {integrity: sha512-ySAfWs69LYC7QhRDZNKqNhz2UKN8LDfbKSMAEtoEI0jitwfAG2iZwVqGACJT+kfYvvz3/JgsLlcBP+WWoKCLcw==} cpu: [arm] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-arm64-gnu@4.21.2: - resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + /@rollup/rollup-linux-arm64-gnu@4.24.4: + resolution: {integrity: sha512-uHYJ0HNOI6pGEeZ/5mgm5arNVTI0nLlmrbdph+pGXpC9tFHFDQmDMOEqkmUObRfosJqpU8RliYoGz06qSdtcjg==} cpu: [arm64] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-arm64-musl@4.21.2: - resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} + /@rollup/rollup-linux-arm64-musl@4.24.4: + resolution: {integrity: sha512-38yiWLemQf7aLHDgTg85fh3hW9stJ0Muk7+s6tIkSUOMmi4Xbv5pH/5Bofnsb6spIwD5FJiR+jg71f0CH5OzoA==} cpu: [arm64] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.21.2: - resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} + /@rollup/rollup-linux-powerpc64le-gnu@4.24.4: + resolution: {integrity: sha512-q73XUPnkwt9ZNF2xRS4fvneSuaHw2BXuV5rI4cw0fWYVIWIBeDZX7c7FWhFQPNTnE24172K30I+dViWRVD9TwA==} cpu: [ppc64] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-riscv64-gnu@4.21.2: - resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} + /@rollup/rollup-linux-riscv64-gnu@4.24.4: + resolution: {integrity: sha512-Aie/TbmQi6UXokJqDZdmTJuZBCU3QBDA8oTKRGtd4ABi/nHgXICulfg1KI6n9/koDsiDbvHAiQO3YAUNa/7BCw==} cpu: [riscv64] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-s390x-gnu@4.21.2: - resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} + /@rollup/rollup-linux-s390x-gnu@4.24.4: + resolution: {integrity: sha512-P8MPErVO/y8ohWSP9JY7lLQ8+YMHfTI4bAdtCi3pC2hTeqFJco2jYspzOzTUB8hwUWIIu1xwOrJE11nP+0JFAQ==} cpu: [s390x] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-x64-gnu@4.21.2: - resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} + /@rollup/rollup-linux-x64-gnu@4.24.4: + resolution: {integrity: sha512-K03TljaaoPK5FOyNMZAAEmhlyO49LaE4qCsr0lYHUKyb6QacTNF9pnfPpXnFlFD3TXuFbFbz7tJ51FujUXkXYA==} cpu: [x64] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-linux-x64-musl@4.21.2: - resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} + /@rollup/rollup-linux-x64-musl@4.24.4: + resolution: {integrity: sha512-VJYl4xSl/wqG2D5xTYncVWW+26ICV4wubwN9Gs5NrqhJtayikwCXzPL8GDsLnaLU3WwhQ8W02IinYSFJfyo34Q==} cpu: [x64] os: [linux] requiresBuild: true dev: false optional: true - /@rollup/rollup-win32-arm64-msvc@4.21.2: - resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} + /@rollup/rollup-win32-arm64-msvc@4.24.4: + resolution: {integrity: sha512-ku2GvtPwQfCqoPFIJCqZ8o7bJcj+Y54cZSr43hHca6jLwAiCbZdBUOrqE6y29QFajNAzzpIOwsckaTFmN6/8TA==} cpu: [arm64] os: [win32] requiresBuild: true dev: false optional: true - /@rollup/rollup-win32-ia32-msvc@4.21.2: - resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} + /@rollup/rollup-win32-ia32-msvc@4.24.4: + resolution: {integrity: sha512-V3nCe+eTt/W6UYNr/wGvO1fLpHUrnlirlypZfKCT1fG6hWfqhPgQV/K/mRBXBpxc0eKLIF18pIOFVPh0mqHjlg==} cpu: [ia32] os: [win32] requiresBuild: true dev: false optional: true - /@rollup/rollup-win32-x64-msvc@4.21.2: - resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} + /@rollup/rollup-win32-x64-msvc@4.24.4: + resolution: {integrity: sha512-LTw1Dfd0mBIEqUVCxbvTE/LLo+9ZxVC9k99v1v4ahg9Aak6FpqOfNu5kRkeTAn0wphoC4JU7No1/rL+bBCEwhg==} cpu: [x64] os: [win32] requiresBuild: true dev: false optional: true - /@shikijs/core@1.16.2: - resolution: {integrity: sha512-XSVH5OZCvE4WLMgdoBqfPMYmGHGmCC3OgZhw0S7KcSi2XKZ+5oHGe71GFnTljgdOxvxx5WrRks6QoTLKrl1eAA==} + /@shikijs/core@1.22.2: + resolution: {integrity: sha512-bvIQcd8BEeR1yFvOYv6HDiyta2FFVePbzeowf5pPS1avczrPK+cjmaxxh0nx5QzbON7+Sv0sQfQVciO7bN72sg==} dependencies: - '@shikijs/vscode-textmate': 9.2.0 + '@shikijs/engine-javascript': 1.22.2 + '@shikijs/engine-oniguruma': 1.22.2 + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 + hast-util-to-html: 9.0.3 dev: false - /@shikijs/vscode-textmate@9.2.0: - resolution: {integrity: sha512-5FinaOp6Vdh/dl4/yaOTh0ZeKch+rYS8DUb38V3GMKYVkdqzxw53lViRKUYkVILRiVQT7dcPC7VvAKOR73zVtQ==} - dev: false - - /@types/acorn@4.0.6: - resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} - dependencies: - '@types/estree': 1.0.5 - dev: false - - /@types/babel__core@7.20.5: - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.6 - dev: false - - /@types/babel__generator@7.6.8: - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} - dependencies: - '@babel/types': 7.25.6 - dev: false - - /@types/babel__template@7.4.4: - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 - dev: false - - /@types/babel__traverse@7.20.6: - resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} - dependencies: - '@babel/types': 7.25.6 - dev: false - - /@types/cookie@0.6.0: - resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - dev: false - - /@types/debug@4.1.12: - resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} - dependencies: - '@types/ms': 0.7.34 - dev: false - - /@types/estree-jsx@1.0.5: - resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} + /@shikijs/engine-javascript@1.22.2: + resolution: {integrity: sha512-iOvql09ql6m+3d1vtvP8fLCVCK7BQD1pJFmHIECsujB0V32BJ0Ab6hxk1ewVSMFA58FI0pR2Had9BKZdyQrxTw==} dependencies: - '@types/estree': 1.0.5 - dev: false - - /@types/estree@1.0.5: - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 + oniguruma-to-js: 0.4.3 dev: false - /@types/hast@3.0.4: - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + /@shikijs/engine-oniguruma@1.22.2: + resolution: {integrity: sha512-GIZPAGzQOy56mGvWMoZRPggn0dTlBf1gutV5TdceLCZlFNqWmuc7u+CzD0Gd9vQUTgLbrt0KLzz6FNprqYAxlA==} dependencies: - '@types/unist': 3.0.3 + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 dev: false - /@types/mdast@4.0.4: - resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + /@shikijs/types@1.22.2: + resolution: {integrity: sha512-NCWDa6LGZqTuzjsGfXOBWfjS/fDIbDdmVDug+7ykVe1IKT4c1gakrvlfFYp5NhAXH/lyqLM8wsAPo5wNy73Feg==} dependencies: - '@types/unist': 3.0.3 - dev: false - - /@types/mdx@2.0.13: - resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} - dev: false - - /@types/ms@0.7.34: - resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - dev: false - - /@types/nlcst@2.0.3: - resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==} - dependencies: - '@types/unist': 3.0.3 - dev: false - - /@types/node@17.0.45: - resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - dev: false - - /@types/sax@1.2.7: - resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} - dependencies: - '@types/node': 17.0.45 - dev: false - - /@types/unist@2.0.11: - resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} - dev: false - - /@types/unist@3.0.3: - resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - dev: false - - /@ungap/structured-clone@1.2.0: - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@shikijs/vscode-textmate': 9.3.0 + '@types/hast': 3.0.4 dev: false - /@unocss/astro@0.62.4(vite@5.4.3): - resolution: {integrity: sha512-98KfkbrNhBLx2+uYxMiGsldIeIZ6/PbL4yaGRHeHoiHd7p4HmIyCF+auYe4Psntx3Yr8kU+XSIAhGDYebvTidQ==} - peerDependencies: - vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 - peerDependenciesMeta: - vite: - optional: true - dependencies: - '@unocss/core': 0.62.4 - '@unocss/reset': 0.62.4 - '@unocss/vite': 0.62.4(vite@5.4.3) - vite: 5.4.3(sass@1.79.3) - transitivePeerDependencies: - - rollup - - supports-color + /@shikijs/vscode-textmate@9.3.0: + resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} dev: false - /@unocss/cli@0.62.4: - resolution: {integrity: sha512-p4VyS40mzn4LCOkIsbIRzN0Zi50rRepesREi2S1+R4Kpvd4QFeeuxTuZNHEyi2uCboQ9ZWl1gfStCXIrNECwTg==} - engines: {node: '>=14'} - hasBin: true + /@sveltejs/vite-plugin-svelte-inspector@3.0.1(@sveltejs/vite-plugin-svelte@4.0.2)(svelte@5.2.10)(vite@5.4.10): + resolution: {integrity: sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^4.0.0-next.0||^4.0.0 + svelte: ^5.0.0-next.96 || ^5.0.0 + vite: ^5.0.0 dependencies: - '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0 - '@unocss/config': 0.62.4 - '@unocss/core': 0.62.4 - '@unocss/preset-uno': 0.62.4 - cac: 6.7.14 - chokidar: 3.6.0 - colorette: 2.0.20 - consola: 3.2.3 - magic-string: 0.30.11 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - tinyglobby: 0.2.6 + '@sveltejs/vite-plugin-svelte': 4.0.2(svelte@5.2.10)(vite@5.4.10) + debug: 4.3.7 + svelte: 5.2.10 + vite: 5.4.10 transitivePeerDependencies: - - rollup - supports-color dev: false - /@unocss/config@0.62.4: - resolution: {integrity: sha512-XKudKxxW8P44JvlIdS6HBpfE3qZA9rhbemy6/sb8HyZjKYjgeM9jx5yjk+9+4hXNma/KlwDXwjAqY29z0S0SrA==} - engines: {node: '>=14'} + /@sveltejs/vite-plugin-svelte@4.0.2(svelte@5.2.10)(vite@5.4.10): + resolution: {integrity: sha512-Y9r/fWy539XlAC7+5wfNJ4zH6TygUYoQ0Eegzp0zDDqhJ54+92gOyOX1l4MO1cJSx0O+Gp13YePT5XEa3+kX0w==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} + peerDependencies: + svelte: ^5.0.0-next.96 || ^5.0.0 + vite: ^5.0.0 dependencies: - '@unocss/core': 0.62.4 - unconfig: 0.5.5 + '@sveltejs/vite-plugin-svelte-inspector': 3.0.1(@sveltejs/vite-plugin-svelte@4.0.2)(svelte@5.2.10)(vite@5.4.10) + debug: 4.3.7 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.12 + svelte: 5.2.10 + vite: 5.4.10 + vitefu: 1.0.3(vite@5.4.10) transitivePeerDependencies: - supports-color dev: false - /@unocss/core@0.62.4: - resolution: {integrity: sha512-Cc+Vo6XlaQpyVejkJrrzzWtiK9pgMWzVVBpm9VCVtwZPUjD4GSc+g7VQCPXSsr7m03tmSuRySJx72QcASmauNQ==} + /@types/acorn@4.0.6: + resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} + dependencies: + '@types/estree': 1.0.6 dev: false - /@unocss/extractor-arbitrary-variants@0.62.4: - resolution: {integrity: sha512-e4hJfBMyFr6T6dYSTTjNv9CQwaU1CVEKxDlYP0GpfSgxsV58pguID9j1mt0/XZD6LvEDzwxj9RTRWKpUSWqp+Q==} + /@types/babel__core@7.20.5: + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: - '@unocss/core': 0.62.4 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 dev: false - /@unocss/inspector@0.62.4: - resolution: {integrity: sha512-bRcnI99gZecNzrUr6kDMdwGHkhUuTPyvvadRdaOxHc9Ow3ANNyqymeFM1q5anZEUZt8h15TYN0mdyQyIWkU3zg==} + /@types/babel__generator@7.6.8: + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} dependencies: - '@unocss/core': 0.62.4 - '@unocss/rule-utils': 0.62.4 - gzip-size: 6.0.0 - sirv: 2.0.4 + '@babel/types': 7.26.0 dev: false - /@unocss/postcss@0.62.4(postcss@8.4.45): - resolution: {integrity: sha512-kWdHy7UsSP4bDu8I7sCKeO0VuzvVpNHmn2rifK5gNstUx5dZ1H/SoyXTHx5sKtgfZBRzdNXFu2nZ3PzYGvEFbw==} - engines: {node: '>=14'} - peerDependencies: - postcss: ^8.4.21 + /@types/babel__template@7.4.4: + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: - '@unocss/config': 0.62.4 - '@unocss/core': 0.62.4 - '@unocss/rule-utils': 0.62.4 - css-tree: 2.3.1 - postcss: 8.4.45 - tinyglobby: 0.2.6 - transitivePeerDependencies: - - supports-color + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 dev: false - /@unocss/preset-attributify@0.62.4: - resolution: {integrity: sha512-ei5nNT58GON9iyCGRRiIrphzyQbBIZ9iEqSBhIY0flcfi1uAPUXV32aO2slqJnWWAIwbRSb1GMpwYR8mmfuz8g==} + /@types/babel__traverse@7.20.6: + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} dependencies: - '@unocss/core': 0.62.4 + '@babel/types': 7.26.0 dev: false - /@unocss/preset-icons@0.62.4: - resolution: {integrity: sha512-n9m2nRTxyiw0sqOwSioO3rro0kaPW0JJzWlzcfdwQ+ZORNR5WyJL298fLXYUFbZG3EOF+zSPg6CMDWudKk/tlA==} - dependencies: - '@iconify/utils': 2.1.33 - '@unocss/core': 0.62.4 - ofetch: 1.3.4 - transitivePeerDependencies: - - supports-color + /@types/cookie@0.6.0: + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} dev: false - /@unocss/preset-mini@0.62.4: - resolution: {integrity: sha512-1O+QpQFx7FT61aheAZEYemW5e4AGib8TFGm+rWLudKq2IBNnXHcS5xsq5QvqdC7rp9Dn3lnW5du6ijow5kCBuw==} + /@types/debug@4.1.12: + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} dependencies: - '@unocss/core': 0.62.4 - '@unocss/extractor-arbitrary-variants': 0.62.4 - '@unocss/rule-utils': 0.62.4 + '@types/ms': 0.7.34 dev: false - /@unocss/preset-tagify@0.62.4: - resolution: {integrity: sha512-8b2Kcsvt93xu1JqDqcD3QvvW0L5rqvH7ev3BlNEVx6n8ayBqfB5HEd4ILKr7wSC90re+EnCgnMm7EP2FiQAJkw==} + /@types/estree-jsx@1.0.5: + resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} dependencies: - '@unocss/core': 0.62.4 + '@types/estree': 1.0.6 dev: false - /@unocss/preset-typography@0.62.4: - resolution: {integrity: sha512-ZVh+NbcibMmD6ve8Deub/G+XAFcGPuzE2Fx/tMAfWfYlfyOAtrMxuL+AARMthpRxdE0JOtggXNTrJb0ZhGYl9g==} - dependencies: - '@unocss/core': 0.62.4 - '@unocss/preset-mini': 0.62.4 + /@types/estree@1.0.6: + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} dev: false - /@unocss/preset-uno@0.62.4: - resolution: {integrity: sha512-2S6+molIz8dH/al0nfkU7i/pMS0oERPr4k9iW80Byt4cKDIhh/0jhZrC83kgZRtCf5hclSBO4oCoMTi1JF7SBw==} + /@types/hast@3.0.4: + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} dependencies: - '@unocss/core': 0.62.4 - '@unocss/preset-mini': 0.62.4 - '@unocss/preset-wind': 0.62.4 - '@unocss/rule-utils': 0.62.4 + '@types/unist': 3.0.3 dev: false - /@unocss/preset-web-fonts@0.62.4: - resolution: {integrity: sha512-kaxgYBVyMdBlErseN8kWLiaS2N5OMlwg5ktAxUlei275fMoY7inQjOwppnjDVveJbN9SP6TcqqFpBIPfUayPkQ==} + /@types/js-yaml@4.0.9: + resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} + dev: true + + /@types/mdast@4.0.4: + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} dependencies: - '@unocss/core': 0.62.4 - ofetch: 1.3.4 + '@types/unist': 3.0.3 dev: false - /@unocss/preset-wind@0.62.4: - resolution: {integrity: sha512-YOzfQ11AmAnl1ZkcWLMMxCdezLjRKavLNk38LumUMtcdsa0DAy+1JjTp+KEvVQAnD+Et/ld5X+YcBWJkVy5WFQ==} - dependencies: - '@unocss/core': 0.62.4 - '@unocss/preset-mini': 0.62.4 - '@unocss/rule-utils': 0.62.4 + /@types/mdx@2.0.13: + resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} dev: false - /@unocss/reset@0.62.4: - resolution: {integrity: sha512-CtxjeDgN39fY/eZDLIXN4wy7C8W7+SD+41AlzGVU5JwhcXmnb1XoDpOd2lzMxc/Yy3F5dIJt2+MRDj9RnpX9Ew==} + /@types/ms@0.7.34: + resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} dev: false - /@unocss/rule-utils@0.62.4: - resolution: {integrity: sha512-XUwLbLUzL+VSHCJNK5QBHC9RbFehumge1/XJmsRfmh0+oxgJoO1gvEvxi57gYEmdJdMRJHRJZ66se6+cB0Ymvw==} - engines: {node: '>=14'} + /@types/nlcst@2.0.3: + resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==} dependencies: - '@unocss/core': 0.62.4 - magic-string: 0.30.11 + '@types/unist': 3.0.3 dev: false - /@unocss/transformer-attributify-jsx@0.62.4: - resolution: {integrity: sha512-z9DDqS2DibDR9gno55diKfAVegeJ9uoyQXQhH3R0KY4YMF49N1fWy/t74gOiHtlPmvjQtDRZYgjgaMCc2w8oWg==} - dependencies: - '@unocss/core': 0.62.4 + /@types/node@17.0.45: + resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: false - /@unocss/transformer-compile-class@0.62.4: - resolution: {integrity: sha512-8yadY9T7LToJwSsrmYU3rUKlnDgPGVRvON7z9g1IjUCmFCGx7Gpg84x9KpKUG6eUTshPQFUI0YUHocrYFevAEA==} + /@types/node@22.9.0: + resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} dependencies: - '@unocss/core': 0.62.4 + undici-types: 6.19.8 dev: false - /@unocss/transformer-directives@0.62.4: - resolution: {integrity: sha512-bq9ZDG6/mr6X2mAogAo0PBVrLSLT0900MPqnj/ixadYHc7mRpX+y6bc/1AgWytZIFYSdNzf7XDoquZuwf42Ucg==} + /@types/sax@1.2.7: + resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} dependencies: - '@unocss/core': 0.62.4 - '@unocss/rule-utils': 0.62.4 - css-tree: 2.3.1 + '@types/node': 17.0.45 dev: false - /@unocss/transformer-variant-group@0.62.4: - resolution: {integrity: sha512-W1fxMc2Lzxu4E+6JBQEBzK+AwoCQYI+EL2FT2BCUsAno37f3JdnwFFEVscck0epSdmdtidsSLDognyX8h10r8A==} - dependencies: - '@unocss/core': 0.62.4 + /@types/unist@2.0.11: + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} dev: false - /@unocss/vite@0.62.4(vite@5.4.3): - resolution: {integrity: sha512-JKq3V6bcevYl9X5Jl3p9crArbhzI8JVWQkOxKV2nGLFaqvnc47vMSDxlU4MUdRWp3aQvzDw132tcx27oSbrojw==} - peerDependencies: - vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 - dependencies: - '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0 - '@unocss/config': 0.62.4 - '@unocss/core': 0.62.4 - '@unocss/inspector': 0.62.4 - chokidar: 3.6.0 - magic-string: 0.30.11 - tinyglobby: 0.2.6 - vite: 5.4.3(sass@1.79.3) - transitivePeerDependencies: - - rollup - - supports-color + /@types/unist@3.0.3: + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + dev: false + + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: false - /@volar/kit@2.4.4(typescript@5.6.2): - resolution: {integrity: sha512-6WusqQ4YhtIYbqY3nlLnkSbfBRSakx5HcTKdF+WjGKBj5D74ux9nsLq3uAqQlbpKgVkkt425KEDymQTb4C36Kg==} + /@volar/kit@2.4.8(typescript@5.7.2): + resolution: {integrity: sha512-HY+HTP9sSqj0St9j1N8l85YMu4w0GxCtelzkzZWuq2GVz0+QRYwlyc0mPH7749OknUAdtsdozBR5Ecez55Ncug==} peerDependencies: typescript: '*' dependencies: - '@volar/language-service': 2.4.4 - '@volar/typescript': 2.4.4 + '@volar/language-service': 2.4.8 + '@volar/typescript': 2.4.8 typesafe-path: 0.2.2 - typescript: 5.6.2 + typescript: 5.7.2 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - /@volar/language-core@2.4.4: - resolution: {integrity: sha512-kO9k4kTLfxpg+6lq7/KAIv3m2d62IHuCL6GbVgYZTpfKvIGoAIlDxK7pFcB/eczN2+ydg/vnyaeZ6SGyZrJw2w==} + /@volar/language-core@2.4.8: + resolution: {integrity: sha512-K/GxMOXGq997bO00cdFhTNuR85xPxj0BEEAy+BaqqayTmy9Tmhfgmq2wpJcVspRhcwfgPoE2/mEJa26emUhG/g==} dependencies: - '@volar/source-map': 2.4.4 + '@volar/source-map': 2.4.8 - /@volar/language-server@2.4.4: - resolution: {integrity: sha512-rBzTgRw4/msZSFRSJURFU53qcDfBNm40NtYoMwOyaZuPcLzdgDAZ3hzVE80Rj0pk82LQJ0AfH13Y+EYFvUWkfQ==} + /@volar/language-server@2.4.8: + resolution: {integrity: sha512-3Jd9Y+0Zhwi/zfdRxqoNrm7AxP6lgTsw4Ni9r6eCyWYGVsTnpVwGmlcbiZyDja6anoKZxnaeDatX1jkaHHWaRQ==} dependencies: - '@volar/language-core': 2.4.4 - '@volar/language-service': 2.4.4 - '@volar/typescript': 2.4.4 + '@volar/language-core': 2.4.8 + '@volar/language-service': 2.4.8 + '@volar/typescript': 2.4.8 path-browserify: 1.0.1 request-light: 0.7.0 vscode-languageserver: 9.0.1 @@ -1798,28 +1480,28 @@ packages: vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - /@volar/language-service@2.4.4: - resolution: {integrity: sha512-QXfZV3IpJdcNQcdWFEG+iXOIb3NiC6/cNIQeH2QAOMx2vpkshuMcWD7AzrhVavobircOXJNiGmRGwqf2okYE3A==} + /@volar/language-service@2.4.8: + resolution: {integrity: sha512-9y8X4cdUxXmy4s5HoB8jmOpDIZG7XVFu4iEFvouhZlJX2leCq0pbq5h7dhA+O8My0fne3vtE6cJ4t9nc+8UBZw==} dependencies: - '@volar/language-core': 2.4.4 + '@volar/language-core': 2.4.8 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - /@volar/source-map@2.4.4: - resolution: {integrity: sha512-xG3PZqOP2haG8XG4Pg3PD1UGDAdqZg24Ru8c/qYjYAnmcj6GBR64mstx+bZux5QOyRaJK+/lNM/RnpvBD3489g==} + /@volar/source-map@2.4.8: + resolution: {integrity: sha512-jeWJBkC/WivdelMwxKkpFL811uH/jJ1kVxa+c7OvG48DXc3VrP7pplSWPP2W1dLMqBxD+awRlg55FQQfiup4cA==} - /@volar/typescript@2.4.4: - resolution: {integrity: sha512-QQMQRVj0fVHJ3XdRKiS1LclhG0VBXdFYlyuHRQF/xLk2PuJuHNWP26MDZNvEVCvnyUQuUQhIAfylwY5TGPgc6w==} + /@volar/typescript@2.4.8: + resolution: {integrity: sha512-6xkIYJ5xxghVBhVywMoPMidDDAFT1OoQeXwa27HSgJ6AiIKRe61RXLoik+14Z7r0JvnblXVsjsRLmCr42SGzqg==} dependencies: - '@volar/language-core': 2.4.4 + '@volar/language-core': 2.4.8 path-browserify: 1.0.1 vscode-uri: 3.0.8 /@vscode/emmet-helper@2.9.3: resolution: {integrity: sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==} dependencies: - emmet: 2.4.7 + emmet: 2.4.11 jsonc-parser: 2.3.1 vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 @@ -1828,16 +1510,24 @@ packages: /@vscode/l10n@0.0.18: resolution: {integrity: sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==} - /acorn-jsx@5.3.2(acorn@8.12.1): + /acorn-jsx@5.3.2(acorn@8.14.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.12.1 + acorn: 8.14.0 + dev: false + + /acorn-typescript@1.4.13(acorn@8.14.0): + resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==} + peerDependencies: + acorn: '>=8.9.0' + dependencies: + acorn: 8.14.0 dev: false - /acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + /acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true dev: false @@ -1846,7 +1536,7 @@ packages: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.1 + fast-uri: 3.0.3 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -1860,18 +1550,11 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - /ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + /ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} dev: false - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: false - /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -1893,6 +1576,7 @@ packages: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 + dev: false /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -1908,10 +1592,9 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: false - /aria-query@5.3.0: - resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} - dependencies: - dequal: 2.0.3 + /aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} dev: false /array-iterate@2.0.1: @@ -1923,71 +1606,75 @@ packages: hasBin: true dev: false - /astro-live-code@0.0.3: - resolution: {integrity: sha512-86FJ9CWBhm05E3CYODb+sTlVjYbVECHxCf33TZOKIGW1FTqO7fu+5fB0LnCQIvhzAsFAeobegYIHJ63quKk1SQ==} + /astro-favicons@2.1.8(astro@4.16.9): + resolution: {integrity: sha512-WbmALbs9aZrHjOd6Vmy+kgMT85sZ7JqDMcS9WOZznUYtLo2Z4hLB7scpeSkRsLAILYZp6w7aaRedNRw1peOyAw==} + peerDependencies: + astro: ^4.0.0 + dependencies: + astro: 4.16.9(typescript@5.7.2) + favicons-lib: 7.2.2 + dev: false + + /astro-live-code@0.0.4: + resolution: {integrity: sha512-sPL68iEhrdcH+JcUDUtObrUH8BxPv7czaFj/1lO59veQhjowvolXtMwOz3Wuyo0DDfXT6IDQ3Vf/CR/pmIXxuQ==} dependencies: estree-util-visit: 2.0.0 - magic-string: 0.30.11 + magic-string: 0.30.12 unist-util-visit-parents: 6.0.1 dev: false - /astro-pagefind@1.6.0(astro@4.15.8): - resolution: {integrity: sha512-U/WuE0ktkZkoFJf6yopWO4DjIJ3+wrnopE2L3kUYiyqNTJpqmp13bFLR8gir6B+KzQ5dsXQtJZYTQtKJg1FxIA==} - peerDependencies: - astro: ^2.0.4 || ^3.0.0 || ^4.0.0 + /astro-robots-txt@1.0.0: + resolution: {integrity: sha512-6JQSLid4gMhoWjOm85UHLkgrw0+hHIjnJVIUqxjU2D6feKlVyYukMNYjH44ZDZBK1P8hNxd33PgWlHzCASvedA==} dependencies: - '@pagefind/default-ui': 1.1.1 - astro: 4.15.8(sass@1.79.3)(typescript@5.6.2) - pagefind: 1.1.1 - sirv: 2.0.4 + valid-filename: 4.0.0 + zod: 3.23.8 dev: false - /astro-seo@0.8.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2): + /astro-seo@0.8.4(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2): resolution: {integrity: sha512-Ou1vzQSXAxa0K8rtNtXNvSpYqOGEgMhh0immMxJeXmbVZac3UKCNWAoXWyOQDFYsZvBugCRSg0N1phBqPMVgCw==} dependencies: - '@astrojs/check': 0.5.10(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.6.2) + '@astrojs/check': 0.5.10(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.7.2) transitivePeerDependencies: - prettier - prettier-plugin-astro - typescript dev: false - /astro@4.15.8(sass@1.79.3)(typescript@5.6.2): - resolution: {integrity: sha512-pdXjtRF6O1xChiPAUF32R7oVRTW7AK1/Oy/JqPNhLfbelO0l6C7cLdSEuSLektwOEnMhOVXqccetjBs7HPaoxA==} + /astro@4.16.9(typescript@5.7.2): + resolution: {integrity: sha512-DFYzPZooVArKSGu969BBByUV44tJMVDPGKxgqWNFBaIrkvGljdVUqQSVwD+/iPYACoSkI8BRYvDMEBDkathIUQ==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true dependencies: '@astrojs/compiler': 2.10.3 '@astrojs/internal-helpers': 0.4.1 - '@astrojs/markdown-remark': 5.2.0 + '@astrojs/markdown-remark': 5.3.0 '@astrojs/telemetry': 3.1.0 - '@babel/core': 7.25.2 - '@babel/plugin-transform-react-jsx': 7.25.2(@babel/core@7.25.2) - '@babel/types': 7.25.6 - '@oslojs/encoding': 0.4.1 - '@rollup/pluginutils': 5.1.0 + '@babel/core': 7.26.0 + '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.0 + '@oslojs/encoding': 1.1.0 + '@rollup/pluginutils': 5.1.3 '@types/babel__core': 7.20.5 '@types/cookie': 0.6.0 - acorn: 8.12.1 - aria-query: 5.3.0 + acorn: 8.14.0 + aria-query: 5.3.2 axobject-query: 4.1.0 - boxen: 7.1.1 + boxen: 8.0.1 ci-info: 4.0.0 clsx: 2.1.1 common-ancestor-path: 1.0.1 - cookie: 0.6.0 + cookie: 0.7.2 cssesc: 3.0.0 debug: 4.3.7 deterministic-object-hash: 2.0.2 - devalue: 5.0.0 + devalue: 5.1.1 diff: 5.2.0 dlv: 1.1.3 - dset: 3.1.3 + dset: 3.1.4 es-module-lexer: 1.5.4 esbuild: 0.21.5 estree-walker: 3.0.3 fast-glob: 3.3.2 - fastq: 1.17.1 flattie: 1.1.1 github-slugger: 2.0.0 gray-matter: 4.0.3 @@ -1995,33 +1682,31 @@ packages: http-cache-semantics: 4.1.1 js-yaml: 4.1.0 kleur: 4.1.5 - magic-string: 0.30.11 + magic-string: 0.30.12 magicast: 0.3.5 micromatch: 4.0.8 mrmime: 2.0.0 neotraverse: 0.6.18 - ora: 8.1.0 + ora: 8.1.1 p-limit: 6.1.0 p-queue: 8.0.1 preferred-pm: 4.0.0 prompts: 2.4.2 - rehype: 13.0.1 + rehype: 13.0.2 semver: 7.6.3 - shiki: 1.16.2 - string-width: 7.2.0 - strip-ansi: 7.1.0 - tinyexec: 0.3.0 - tsconfck: 3.1.3(typescript@5.6.2) + shiki: 1.22.2 + tinyexec: 0.3.1 + tsconfck: 3.1.4(typescript@5.7.2) unist-util-visit: 5.0.0 vfile: 6.0.3 - vite: 5.4.3(sass@1.79.3) - vitefu: 1.0.2(vite@5.4.3) + vite: 5.4.10 + vitefu: 1.0.3(vite@5.4.10) which-pm: 3.0.0 xxhash-wasm: 1.0.2 yargs-parser: 21.1.1 zod: 3.23.8 - zod-to-json-schema: 3.23.2(zod@3.23.8) - zod-to-ts: 1.2.0(typescript@5.6.2)(zod@3.23.8) + zod-to-json-schema: 3.23.5(zod@3.23.8) + zod-to-ts: 1.2.0(typescript@5.7.2)(zod@3.23.8) optionalDependencies: sharp: 0.33.5 transitivePeerDependencies: @@ -2038,6 +1723,22 @@ packages: - typescript dev: false + /autoprefixer@10.4.20(postcss@8.4.49): + resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.24.2 + caniuse-lite: 1.0.30001677 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.1.1 + postcss: 8.4.49 + postcss-value-parser: 4.2.0 + dev: false + /axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} @@ -2055,26 +1756,23 @@ packages: resolution: {integrity: sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==} dev: false - /bezier-easing@2.1.0: - resolution: {integrity: sha512-gbIqZ/eslnUFC1tjEvtz0sgx+xTK20wDnYMIA27VA04R7w6xxXQPZDbibjA9DTWZRA2CXtwHykkVzlCaAJAZig==} - dev: false - /binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + dev: false - /boxen@7.1.1: - resolution: {integrity: sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==} - engines: {node: '>=14.16'} + /boxen@8.0.1: + resolution: {integrity: sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw==} + engines: {node: '>=18'} dependencies: ansi-align: 3.0.1 - camelcase: 7.0.1 + camelcase: 8.0.0 chalk: 5.3.0 cli-boxes: 3.0.0 - string-width: 5.1.2 - type-fest: 2.19.0 - widest-line: 4.0.1 - wrap-ansi: 8.1.0 + string-width: 7.2.0 + type-fest: 4.26.1 + widest-line: 5.0.0 + wrap-ansi: 9.0.0 dev: false /brace-expansion@2.0.1: @@ -2089,30 +1787,15 @@ packages: dependencies: fill-range: 7.1.1 - /browserslist@4.23.3: - resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + /browserslist@4.24.2: + resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001659 - electron-to-chromium: 1.5.18 + caniuse-lite: 1.0.30001677 + electron-to-chromium: 1.5.51 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) - dev: false - - /bundle-require@5.0.0(esbuild@0.21.5): - resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: '>=0.18' - dependencies: - esbuild: 0.21.5 - load-tsconfig: 0.2.5 - dev: false - - /cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} + update-browserslist-db: 1.1.1(browserslist@4.24.2) dev: false /call-bind@1.0.7: @@ -2131,28 +1814,19 @@ packages: engines: {node: '>= 6'} dev: false - /camelcase@7.0.1: - resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} - engines: {node: '>=14.16'} + /camelcase@8.0.0: + resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} + engines: {node: '>=16'} dev: false - /caniuse-lite@1.0.30001659: - resolution: {integrity: sha512-Qxxyfv3RdHAfJcXelgf0hU4DFUVXBGTjqrBUZLUh8AtlGnsDo+CnncYtTd95+ZKfnANUOzxyIQCuU/UeBZBYoA==} + /caniuse-lite@1.0.30001677: + resolution: {integrity: sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==} dev: false /ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} dev: false - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: false - /chalk@5.3.0: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} @@ -2187,13 +1861,14 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.3 + dev: false - /chokidar@4.0.0: - resolution: {integrity: sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==} + /chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} engines: {node: '>= 14.16.0'} dependencies: - readdirp: 4.0.1 - dev: false + readdirp: 4.0.2 + dev: true /ci-info@4.0.0: resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==} @@ -2234,52 +1909,29 @@ packages: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} dev: false - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: false - /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: false - /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - requiresBuild: true /color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - requiresBuild: true dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 dev: false - optional: true /color@4.2.3: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} - requiresBuild: true dependencies: color-convert: 2.0.1 color-string: 1.9.1 dev: false - optional: true - - /colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - dev: false - - /colorjs.io@0.5.2: - resolution: {integrity: sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==} - dev: false /comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -2294,21 +1946,12 @@ packages: resolution: {integrity: sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==} dev: false - /confbox@0.1.7: - resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} - dev: false - - /consola@3.2.3: - resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} - engines: {node: ^14.18.0 || >=16.10.0} - dev: false - /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: false - /cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + /cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} dev: false @@ -2321,23 +1964,15 @@ packages: which: 2.0.2 dev: false - /css-declaration-sorter@7.2.0(postcss@8.4.45): + /css-declaration-sorter@7.2.0(postcss@8.4.47): resolution: {integrity: sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.0.9 dependencies: - postcss: 8.4.45 + postcss: 8.4.47 dev: true - /css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.2.1 - dev: false - /cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -2362,6 +1997,10 @@ packages: character-entities: 2.0.2 dev: false + /dedent-js@1.0.1: + resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} + dev: false + /deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -2376,25 +2015,15 @@ packages: gopd: 1.0.1 dev: false - /defu@6.1.4: - resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} - dev: false - /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} dev: false - /destr@2.0.3: - resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} - dev: false - /detect-libc@2.0.3: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} - requiresBuild: true dev: false - optional: true /deterministic-object-hash@2.0.2: resolution: {integrity: sha512-KxektNH63SrbfUyDiwXqRb1rLwKt33AmMv+5Nhsw1kqZ13SJBRTgZHtGbE+hH3a1mVW1cz+4pqSWVPAtLVXTzQ==} @@ -2403,8 +2032,8 @@ packages: base-64: 1.0.0 dev: false - /devalue@5.0.0: - resolution: {integrity: sha512-gO+/OMXF7488D+u3ue+G7Y4AA3ZmUnB3eHJXmBTgNHvr4ZNzl36A0ZtG+XCRNYCkYx/bFmw4qtkoFLa+wSrwAA==} + /devalue@5.1.1: + resolution: {integrity: sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==} dev: false /devlop@1.1.0: @@ -2426,25 +2055,21 @@ packages: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} dev: false - /dset@3.1.3: - resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==} + /dset@3.1.4: + resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} engines: {node: '>=4'} dev: false - /duplexer@0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - dev: false - /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: false - /electron-to-chromium@1.5.18: - resolution: {integrity: sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ==} + /electron-to-chromium@1.5.51: + resolution: {integrity: sha512-kKeWV57KSS8jH4alKt/jKnvHPmJgBxXzGUSbMd4eQF+iOsVPl7bz2KUmu6eo80eMP8wVioTfTyTzdMgM15WXNg==} dev: false - /emmet@2.4.7: - resolution: {integrity: sha512-O5O5QNqtdlnQM2bmKHtJgyChcrFMgQuulI+WdiOw2NArzprUqqxUW6bgYtKvzKgrsYpuLWalOkdhNP+1jluhCA==} + /emmet@2.4.11: + resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==} dependencies: '@emmetio/abbreviation': 2.3.3 '@emmetio/css-abbreviation': 2.1.8 @@ -2481,6 +2106,24 @@ packages: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} dev: false + /esast-util-from-estree@2.0.0: + resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} + dependencies: + '@types/estree-jsx': 1.0.5 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + unist-util-position-from-estree: 2.0.0 + dev: false + + /esast-util-from-js@2.0.1: + resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==} + dependencies: + '@types/estree-jsx': 1.0.5 + acorn: 8.14.0 + esast-util-from-estree: 2.0.0 + vfile-message: 4.0.2 + dev: false + /esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -2512,45 +2155,12 @@ packages: '@esbuild/win32-x64': 0.21.5 dev: false - /esbuild@0.23.1: - resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} - engines: {node: '>=18'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/aix-ppc64': 0.23.1 - '@esbuild/android-arm': 0.23.1 - '@esbuild/android-arm64': 0.23.1 - '@esbuild/android-x64': 0.23.1 - '@esbuild/darwin-arm64': 0.23.1 - '@esbuild/darwin-x64': 0.23.1 - '@esbuild/freebsd-arm64': 0.23.1 - '@esbuild/freebsd-x64': 0.23.1 - '@esbuild/linux-arm': 0.23.1 - '@esbuild/linux-arm64': 0.23.1 - '@esbuild/linux-ia32': 0.23.1 - '@esbuild/linux-loong64': 0.23.1 - '@esbuild/linux-mips64el': 0.23.1 - '@esbuild/linux-ppc64': 0.23.1 - '@esbuild/linux-riscv64': 0.23.1 - '@esbuild/linux-s390x': 0.23.1 - '@esbuild/linux-x64': 0.23.1 - '@esbuild/netbsd-x64': 0.23.1 - '@esbuild/openbsd-arm64': 0.23.1 - '@esbuild/openbsd-x64': 0.23.1 - '@esbuild/sunos-x64': 0.23.1 - '@esbuild/win32-arm64': 0.23.1 - '@esbuild/win32-ia32': 0.23.1 - '@esbuild/win32-x64': 0.23.1 - dev: false - /escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} + /escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} dev: false /escape-string-regexp@5.0.0: @@ -2558,16 +2168,27 @@ packages: engines: {node: '>=12'} dev: false + /esm-env@1.2.0: + resolution: {integrity: sha512-OhSQuHL3mUcaQHjGe8UMG8GsJIJHYYz0flR0h9fiTPNMupLMkb7TvcRD0EeJXW5a8GHBgfz08b6FDLNK7kkPQA==} + dev: false + /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true dev: false + /esrap@1.2.2: + resolution: {integrity: sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==} + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + '@types/estree': 1.0.6 + dev: false + /estree-util-attach-comments@3.0.0: resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 dev: false /estree-util-build-jsx@3.0.1: @@ -2583,6 +2204,13 @@ packages: resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} dev: false + /estree-util-scope@1.0.0: + resolution: {integrity: sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==} + dependencies: + '@types/estree': 1.0.6 + devlop: 1.1.0 + dev: false + /estree-util-to-js@2.0.0: resolution: {integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==} dependencies: @@ -2605,7 +2233,7 @@ packages: /estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 dev: false /eventemitter3@5.0.1: @@ -2636,23 +2264,26 @@ packages: merge2: 1.4.1 micromatch: 4.0.8 - /fast-uri@3.0.1: - resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + /fast-uri@3.0.3: + resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} /fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} dependencies: reusify: 1.0.4 - /fdir@6.3.0(picomatch@4.0.2): - resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true + /favicons-lib@7.2.2: + resolution: {integrity: sha512-LBDBJBCEZbEO58Fu5L+fKk6A+VXY51lxrY6zbb0NtZQc2ecFwwi+2CQcMRSsSWt/bT1JZjay6sWNcS1mXmVJ6w==} + engines: {node: '>=14.0.0'} dependencies: - picomatch: 4.0.2 + escape-html: 1.0.3 + sharp: 0.33.5 + xml2js: 0.6.2 + dev: false + + /filename-reserved-regex@3.0.0: + resolution: {integrity: sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false /fill-range@7.1.1: @@ -2694,8 +2325,17 @@ packages: signal-exit: 4.1.0 dev: false - /fs@0.0.1-security: - resolution: {integrity: sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==} + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + dev: false + + /fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 dev: false /fsevents@2.3.3: @@ -2703,6 +2343,7 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true + dev: false optional: true /function-bind@1.1.2: @@ -2718,8 +2359,8 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - /get-east-asian-width@1.2.0: - resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} + /get-east-asian-width@1.3.0: + resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} dev: false @@ -2734,12 +2375,6 @@ packages: hasown: 2.0.2 dev: false - /get-tsconfig@4.8.1: - resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} - dependencies: - resolve-pkg-maps: 1.0.0 - dev: false - /github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} dev: false @@ -2765,7 +2400,7 @@ packages: jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 path-scurry: 1.11.1 dev: false @@ -2794,18 +2429,6 @@ packages: strip-bom-string: 1.0.0 dev: false - /gzip-size@6.0.0: - resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} - engines: {node: '>=10'} - dependencies: - duplexer: 0.1.2 - dev: false - - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - dev: false - /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: @@ -2829,13 +2452,13 @@ packages: function-bind: 1.1.2 dev: false - /hast-util-from-html@2.0.2: - resolution: {integrity: sha512-HwOHwxdt2zC5KQ/CNoybBntRook2zJvfZE/u5/Ap7aLPe22bDqen7KwGkOqOyzL5zIqKwiYX/OTtE0FWgr6XXA==} + /hast-util-from-html@2.0.3: + resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==} dependencies: '@types/hast': 3.0.4 devlop: 1.1.0 hast-util-from-parse5: 8.0.1 - parse5: 7.1.2 + parse5: 7.2.1 vfile: 6.0.3 vfile-message: 4.0.2 dev: false @@ -2875,7 +2498,7 @@ packages: hast-util-to-parse5: 8.0.0 html-void-elements: 3.0.0 mdast-util-to-hast: 13.2.0 - parse5: 7.1.2 + parse5: 7.2.1 unist-util-position: 5.0.0 unist-util-visit: 5.0.0 vfile: 6.0.3 @@ -2886,7 +2509,7 @@ packages: /hast-util-to-estree@3.1.0: resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.4 comma-separated-tokens: 2.0.3 @@ -2894,7 +2517,7 @@ packages: estree-util-attach-comments: 3.0.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.0 + mdast-util-mdx-expression: 2.0.1 mdast-util-mdx-jsx: 3.1.3 mdast-util-mdxjs-esm: 2.0.1 property-information: 6.5.0 @@ -2906,8 +2529,8 @@ packages: - supports-color dev: false - /hast-util-to-html@9.0.2: - resolution: {integrity: sha512-RP5wNpj5nm1Z8cloDv4Sl4RS8jH5HYa0v93YB6Wb4poEzgMo/dAAL0KcT4974dCjcNG5pkLqTImeFHHCwwfY3g==} + /hast-util-to-html@9.0.3: + resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} dependencies: '@types/hast': 3.0.4 '@types/unist': 3.0.3 @@ -2922,22 +2545,22 @@ packages: zwitch: 2.0.4 dev: false - /hast-util-to-jsx-runtime@2.3.0: - resolution: {integrity: sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==} + /hast-util-to-jsx-runtime@2.3.2: + resolution: {integrity: sha512-1ngXYb+V9UT5h+PxNRa1O1FYguZK/XL+gkeqvp7EdHlB9oHUG0eYRo/vY5inBdcqo3RkPMC58/H94HvkbfGdyg==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/hast': 3.0.4 '@types/unist': 3.0.3 comma-separated-tokens: 2.0.3 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 - mdast-util-mdx-expression: 2.0.0 + mdast-util-mdx-expression: 2.0.1 mdast-util-mdx-jsx: 3.1.3 mdast-util-mdxjs-esm: 2.0.1 property-information: 6.5.0 space-separated-tokens: 2.0.2 - style-to-object: 1.0.7 + style-to-object: 1.0.8 unist-util-position: 5.0.0 vfile-message: 4.0.2 transitivePeerDependencies: @@ -2993,34 +2616,16 @@ packages: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} dev: false - /immutable@4.3.7: - resolution: {integrity: sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==} - dev: false - /import-meta-resolve@4.1.0: resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} dev: false - /importx@0.4.4: - resolution: {integrity: sha512-Lo1pukzAREqrBnnHC+tj+lreMTAvyxtkKsMxLY8H15M/bvLl54p3YuoTI70Tz7Il0AsgSlD7Lrk/FaApRcBL7w==} - dependencies: - bundle-require: 5.0.0(esbuild@0.21.5) - debug: 4.3.7 - esbuild: 0.21.5 - jiti: 2.0.0-beta.3 - jiti-v1: /jiti@1.21.6 - pathe: 1.1.2 - tsx: 4.19.1 - transitivePeerDependencies: - - supports-color - dev: false - /inline-style-parser@0.1.1: resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} dev: false - /inline-style-parser@0.2.3: - resolution: {integrity: sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g==} + /inline-style-parser@0.2.4: + resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} dev: false /is-alphabetical@2.0.1: @@ -3036,15 +2641,14 @@ packages: /is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - requiresBuild: true dev: false - optional: true /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} dependencies: binary-extensions: 2.3.0 + dev: false /is-core-module@2.15.1: resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} @@ -3108,10 +2712,10 @@ packages: engines: {node: '>=12'} dev: false - /is-reference@3.0.2: - resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} + /is-reference@3.0.3: + resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 dev: false /is-unicode-supported@1.3.0: @@ -3148,11 +2752,6 @@ packages: hasBin: true dev: false - /jiti@2.0.0-beta.3: - resolution: {integrity: sha512-pmfRbVRs/7khFrSAYnSiJ8C0D5GvzkE4Ey2pAvUcJsw1ly/p+7ut27jbJrjY79BpAJQJ4gXYFtK6d1Aub+9baQ==} - hasBin: true - dev: false - /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: false @@ -3172,9 +2771,9 @@ packages: argparse: 2.0.1 dev: false - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} + /jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} hasBin: true dev: false @@ -3193,6 +2792,18 @@ packages: /jsonc-parser@3.3.1: resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + dev: false + + /just-map-values@3.2.0: + resolution: {integrity: sha512-TyqCKtK3NxiUgOjRYMIKURvBTHesi3XzomDY0QVPZ3rYzLCF+nNq5rSi0B/L5aOd/WMTZo6ukzA4wih4HUbrDg==} + dev: false + /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -3207,10 +2818,6 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} - /kolorist@1.8.0: - resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} - dev: false - /lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -3225,11 +2832,6 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: false - /load-tsconfig@0.2.5: - resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: false - /load-yaml-file@0.2.0: resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} engines: {node: '>=6'} @@ -3240,12 +2842,8 @@ packages: strip-bom: 3.0.0 dev: false - /local-pkg@0.5.0: - resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} - engines: {node: '>=14'} - dependencies: - mlly: 1.7.1 - pkg-types: 1.2.0 + /locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} dev: false /locate-path@5.0.0: @@ -3270,6 +2868,12 @@ packages: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} dev: false + /lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + dependencies: + tslib: 2.8.1 + dev: false + /lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} dev: false @@ -3280,8 +2884,8 @@ packages: yallist: 3.1.1 dev: false - /magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + /magic-string@0.30.12: + resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} dependencies: '@jridgewell/sourcemap-codec': 1.5.0 dev: false @@ -3289,8 +2893,8 @@ packages: /magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 source-map-js: 1.2.1 dev: false @@ -3299,8 +2903,8 @@ packages: engines: {node: '>=16'} dev: false - /markdown-table@3.0.3: - resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} + /markdown-table@3.0.4: + resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} dev: false /mdast-util-definitions@6.0.0: @@ -3320,8 +2924,8 @@ packages: unist-util-visit-parents: 6.0.1 dev: false - /mdast-util-from-markdown@2.0.1: - resolution: {integrity: sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==} + /mdast-util-from-markdown@2.0.2: + resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 @@ -3354,8 +2958,8 @@ packages: dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 micromark-util-normalize-identifier: 2.0.0 transitivePeerDependencies: - supports-color @@ -3365,8 +2969,8 @@ packages: resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color dev: false @@ -3376,9 +2980,9 @@ packages: dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - markdown-table: 3.0.3 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 + markdown-table: 3.0.4 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color dev: false @@ -3388,8 +2992,8 @@ packages: dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color dev: false @@ -3397,26 +3001,26 @@ packages: /mdast-util-gfm@3.0.0: resolution: {integrity: sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==} dependencies: - mdast-util-from-markdown: 2.0.1 + mdast-util-from-markdown: 2.0.2 mdast-util-gfm-autolink-literal: 2.0.1 mdast-util-gfm-footnote: 2.0.0 mdast-util-gfm-strikethrough: 2.0.0 mdast-util-gfm-table: 2.0.0 mdast-util-gfm-task-list-item: 2.0.0 - mdast-util-to-markdown: 2.1.0 + mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color dev: false - /mdast-util-mdx-expression@2.0.0: - resolution: {integrity: sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==} + /mdast-util-mdx-expression@2.0.1: + resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.4 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color dev: false @@ -3430,8 +3034,8 @@ packages: '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 parse-entities: 4.0.1 stringify-entities: 4.0.4 unist-util-stringify-position: 4.0.0 @@ -3443,11 +3047,11 @@ packages: /mdast-util-mdx@3.0.0: resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==} dependencies: - mdast-util-from-markdown: 2.0.1 - mdast-util-mdx-expression: 2.0.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-mdx-expression: 2.0.1 mdast-util-mdx-jsx: 3.1.3 mdast-util-mdxjs-esm: 2.0.1 - mdast-util-to-markdown: 2.1.0 + mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color dev: false @@ -3459,8 +3063,8 @@ packages: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color dev: false @@ -3486,14 +3090,15 @@ packages: vfile: 6.0.3 dev: false - /mdast-util-to-markdown@2.1.0: - resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==} + /mdast-util-to-markdown@2.1.2: + resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 longest-streak: 3.1.0 mdast-util-phrasing: 4.1.0 mdast-util-to-string: 4.0.0 + micromark-util-classify-character: 2.0.0 micromark-util-decode-string: 2.0.0 unist-util-visit: 5.0.0 zwitch: 2.0.4 @@ -3505,10 +3110,6 @@ packages: '@types/mdast': 4.0.4 dev: false - /mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - dev: false - /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -3609,7 +3210,7 @@ packages: /micromark-extension-mdx-expression@3.0.0: resolution: {integrity: sha512-sI0nwhUDz97xyzqJAbHQhp5TfaxEvZZZ2JDqUo+7NvyIYG6BZ5CPPqj2ogUoPJlmXHBnyZUzISg9+oUmU6tUjQ==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 micromark-factory-mdx-expression: 2.0.2 micromark-factory-space: 2.0.0 @@ -3623,7 +3224,7 @@ packages: resolution: {integrity: sha512-vNuFb9czP8QCtAQcEJn0UJQJZA8Dk6DXKBqx+bg/w0WGuSxDxNr7hErW89tHUY31dUW4NqEOWwmEUNhjTFmHkg==} dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 micromark-factory-mdx-expression: 2.0.2 @@ -3644,7 +3245,7 @@ packages: /micromark-extension-mdxjs-esm@3.0.0: resolution: {integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 micromark-core-commonmark: 2.0.1 micromark-util-character: 2.1.0 @@ -3658,8 +3259,8 @@ packages: /micromark-extension-mdxjs@3.0.0: resolution: {integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==} dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) micromark-extension-mdx-expression: 3.0.0 micromark-extension-mdx-jsx: 3.0.1 micromark-extension-mdx-md: 2.0.0 @@ -3688,7 +3289,7 @@ packages: /micromark-factory-mdx-expression@2.0.2: resolution: {integrity: sha512-5E5I2pFzJyg2CtemqAbcyCktpHXuJbABnsb32wX2U8IQKhhVFBqkcZR5LRm1WVoFqa4kTueZK4abep7wdo9nrw==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 micromark-factory-space: 2.0.0 micromark-util-character: 2.1.0 @@ -3775,7 +3376,7 @@ packages: resolution: {integrity: sha512-Fk+xmBrOv9QZnEDguL9OI9/NQQp6Hz4FuQ4YmCb/5V7+9eAh1s6AYSvL20kHkD67YIg7EpE54TiSlcsf3vyZgA==} dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/unist': 3.0.3 devlop: 1.1.0 estree-util-visit: 2.0.0 @@ -3873,15 +3474,6 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dev: false - /mlly@1.7.1: - resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} - dependencies: - acorn: 8.12.1 - pathe: 1.1.2 - pkg-types: 1.2.0 - ufo: 1.5.4 - dev: false - /mrmime@2.0.0: resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} engines: {node: '>=10'} @@ -3907,6 +3499,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /nanostores@0.11.3: + resolution: {integrity: sha512-TUes3xKIX33re4QzdxwZ6tdbodjmn3tWXCEc1uokiEmo14sI1EaGYNs2k3bU2pyyGNmBqFGAVl6jAGWd06AVIg==} + engines: {node: ^18.0.0 || >=20.0.0} + dev: false + /neotraverse@0.6.18: resolution: {integrity: sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==} engines: {node: '>= 10'} @@ -3918,8 +3515,11 @@ packages: '@types/nlcst': 2.0.3 dev: false - /node-fetch-native@1.6.4: - resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} + /no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + dependencies: + lower-case: 2.0.2 + tslib: 2.8.1 dev: false /node-releases@2.0.18: @@ -3929,6 +3529,12 @@ packages: /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + dev: false + + /normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + dev: false /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -3945,14 +3551,6 @@ packages: engines: {node: '>= 0.4'} dev: false - /ofetch@1.3.4: - resolution: {integrity: sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==} - dependencies: - destr: 2.0.3 - node-fetch-native: 1.6.4 - ufo: 1.5.4 - dev: false - /onetime@7.0.0: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} @@ -3960,8 +3558,14 @@ packages: mimic-function: 5.0.1 dev: false - /ora@8.1.0: - resolution: {integrity: sha512-GQEkNkH/GHOhPFXcqZs3IDahXEQcQxsSjEkK4KvEEST4t7eNzoMjxTzef+EZ+JluDEV+Raoi3WQ2CflnRdSVnQ==} + /oniguruma-to-js@0.4.3: + resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==} + dependencies: + regex: 4.4.0 + dev: false + + /ora@8.1.1: + resolution: {integrity: sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==} engines: {node: '>=18'} dependencies: chalk: 5.3.0 @@ -4001,11 +3605,11 @@ packages: engines: {node: '>=18'} dependencies: eventemitter3: 5.0.1 - p-timeout: 6.1.2 + p-timeout: 6.1.3 dev: false - /p-timeout@6.1.2: - resolution: {integrity: sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==} + /p-timeout@6.1.3: + resolution: {integrity: sha512-UJUyfKbwvr/uZSV6btANfb+0t/mOhKV/KXcCUTp8FcQI+v/0d+wXqH4htrW0E4rR6WiEO/EPvUFiV9D5OI4vlw==} engines: {node: '>=14.16'} dev: false @@ -4014,23 +3618,8 @@ packages: engines: {node: '>=6'} dev: false - /package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} - dev: false - - /package-manager-detector@0.2.0: - resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} - dev: false - - /pagefind@1.1.1: - resolution: {integrity: sha512-U2YR0dQN5B2fbIXrLtt/UXNS0yWSSYfePaad1KcBPTi0p+zRtsVjwmoPaMQgTks5DnHNbmDxyJUL5TGaLljK3A==} - hasBin: true - optionalDependencies: - '@pagefind/darwin-arm64': 1.1.1 - '@pagefind/darwin-x64': 1.1.1 - '@pagefind/linux-arm64': 1.1.1 - '@pagefind/linux-x64': 1.1.1 - '@pagefind/windows-x64': 1.1.1 + /package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} dev: false /parse-entities@4.0.1: @@ -4057,12 +3646,19 @@ packages: vfile: 6.0.3 dev: false - /parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + /parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} dependencies: entities: 4.5.0 dev: false + /pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + dependencies: + no-case: 3.0.4 + tslib: 2.8.1 + dev: false + /path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -4088,24 +3684,8 @@ packages: minipass: 7.1.2 dev: false - /pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - dev: false - - /perfect-debounce@1.0.0: - resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} - dev: false - - /periscopic@3.1.0: - resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} - dependencies: - '@types/estree': 1.0.5 - estree-walker: 3.0.3 - is-reference: 3.0.2 - dev: false - - /picocolors@1.1.0: - resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + /picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -4138,46 +3718,55 @@ packages: find-up: 4.1.0 dev: false - /pkg-types@1.2.0: - resolution: {integrity: sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==} - dependencies: - confbox: 0.1.7 - mlly: 1.7.1 - pathe: 1.1.2 - dev: false - - /postcss-import@15.1.0(postcss@8.4.45): + /postcss-import@15.1.0(postcss@8.4.47): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 dev: false - /postcss-js@4.0.1(postcss@8.4.45): + /postcss-js@4.0.1(postcss@8.4.47): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.45 + postcss: 8.4.47 dev: false - /postcss-less@6.0.0(postcss@8.4.45): + /postcss-less@6.0.0(postcss@8.4.47): resolution: {integrity: sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==} engines: {node: '>=12'} peerDependencies: postcss: ^8.3.5 dependencies: - postcss: 8.4.45 + postcss: 8.4.47 dev: true - /postcss-load-config@4.0.2(postcss@8.4.45): + /postcss-load-config@4.0.2(postcss@8.4.47): + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 3.1.2 + postcss: 8.4.47 + yaml: 2.6.0 + dev: false + + /postcss-load-config@4.0.2(postcss@8.4.49): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} peerDependencies: @@ -4190,27 +3779,27 @@ packages: optional: true dependencies: lilconfig: 3.1.2 - postcss: 8.4.45 - yaml: 2.5.1 + postcss: 8.4.49 + yaml: 2.6.0 dev: false - /postcss-nested@6.2.0(postcss@8.4.45): + /postcss-nested@6.2.0(postcss@8.4.47): resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.1.2 dev: false - /postcss-scss@4.0.9(postcss@8.4.45): + /postcss-scss@4.0.9(postcss@8.4.47): resolution: {integrity: sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.4.29 dependencies: - postcss: 8.4.45 + postcss: 8.4.47 dev: true /postcss-selector-parser@6.1.2: @@ -4225,14 +3814,23 @@ packages: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: false - /postcss@8.4.45: - resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} + /postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 - picocolors: 1.1.0 + picocolors: 1.1.1 source-map-js: 1.2.1 + /postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.1 + source-map-js: 1.2.1 + dev: false + /preferred-pm@4.0.0: resolution: {integrity: sha512-gYBeFTZLu055D8Vv3cSPox/0iTPtkzxpLroSYYA7WXgRi31WCJ51Uyl8ZiPeUUjyvs2MBzK+S8v9JVUgHU/Sqw==} engines: {node: '>=18.12'} @@ -4242,8 +3840,8 @@ packages: which-pm: 3.0.0 dev: false - /prettier-plugin-astro-organize-imports@0.4.9(prettier-plugin-astro@0.14.1)(prettier@3.3.3): - resolution: {integrity: sha512-iMiTSTOs3YDVDojSUZKIZanovqbonGqX2hxp6XM3l2tWXTyQZodpOSLcK3p2PB2rMVu0K5OgUVv3J+ypIO5Evw==} + /prettier-plugin-astro-organize-imports@0.4.11(prettier-plugin-astro@0.14.1)(prettier-plugin-tailwindcss@0.6.8)(prettier@3.3.3): + resolution: {integrity: sha512-qJQZ7qgnTVmk8ALe1SXpCVGa2QNanhsKn6ivfGQqWH8SCgQY1/poxLVras0Q4fqRBugR3xPRGxovODk1tmkbwA==} peerDependencies: prettier: ^3.0 prettier-plugin-astro: '*' @@ -4257,7 +3855,8 @@ packages: '@astrojs/compiler': 2.10.3 prettier: 3.3.3 prettier-plugin-astro: 0.14.1 - typescript: 5.6.2 + prettier-plugin-tailwindcss: 0.6.8(prettier-plugin-astro@0.14.1)(prettier-plugin-css-order@2.1.2)(prettier-plugin-organize-imports@4.1.0)(prettier@3.3.3) + typescript: 5.7.2 dev: true /prettier-plugin-astro@0.14.1: @@ -4268,21 +3867,21 @@ packages: prettier: 3.3.3 sass-formatter: 0.7.9 - /prettier-plugin-css-order@2.1.2(postcss@8.4.45)(prettier@3.3.3): + /prettier-plugin-css-order@2.1.2(postcss@8.4.47)(prettier@3.3.3): resolution: {integrity: sha512-vomxPjHI6pOMYcBuouSJHxxQClJXaUpU9rsV9IAO2wrSTZILRRlrxAAR8t9UF6wtczLkLfNRFUwM+ZbGXOONUA==} engines: {node: '>=16'} peerDependencies: prettier: 3.x dependencies: - css-declaration-sorter: 7.2.0(postcss@8.4.45) - postcss-less: 6.0.0(postcss@8.4.45) - postcss-scss: 4.0.9(postcss@8.4.45) + css-declaration-sorter: 7.2.0(postcss@8.4.47) + postcss-less: 6.0.0(postcss@8.4.47) + postcss-scss: 4.0.9(postcss@8.4.47) prettier: 3.3.3 transitivePeerDependencies: - postcss dev: true - /prettier-plugin-organize-imports@4.1.0(prettier@3.3.3)(typescript@5.6.2): + /prettier-plugin-organize-imports@4.1.0(prettier@3.3.3)(typescript@5.7.2): resolution: {integrity: sha512-5aWRdCgv645xaa58X8lOxzZoiHAldAPChljr/MT0crXVOWTZ+Svl4hIWlz+niYSlO6ikE5UXkN1JrRvIP2ut0A==} peerDependencies: prettier: '>=2.0' @@ -4293,7 +3892,68 @@ packages: optional: true dependencies: prettier: 3.3.3 - typescript: 5.6.2 + typescript: 5.7.2 + dev: true + + /prettier-plugin-tailwindcss@0.6.8(prettier-plugin-astro@0.14.1)(prettier-plugin-css-order@2.1.2)(prettier-plugin-organize-imports@4.1.0)(prettier@3.3.3): + resolution: {integrity: sha512-dGu3kdm7SXPkiW4nzeWKCl3uoImdd5CTZEJGxyypEPL37Wj0HT2pLqjrvSei1nTeuQfO4PUfjeW5cTUNRLZ4sA==} + engines: {node: '>=14.21.3'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@trivago/prettier-plugin-sort-imports': '*' + '@zackad/prettier-plugin-twig-melody': '*' + prettier: ^3.0 + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-import-sort: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-marko: '*' + prettier-plugin-multiline-arrays: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-sort-imports: '*' + prettier-plugin-style-order: '*' + prettier-plugin-svelte: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + '@zackad/prettier-plugin-twig-melody': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-multiline-arrays: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-sort-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + dependencies: + prettier: 3.3.3 + prettier-plugin-astro: 0.14.1 + prettier-plugin-css-order: 2.1.2(postcss@8.4.47)(prettier@3.3.3) + prettier-plugin-organize-imports: 4.1.0(prettier@3.3.3)(typescript@5.7.2) dev: true /prettier@2.8.7: @@ -4325,10 +3985,6 @@ packages: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} dev: false - /punycode@1.4.1: - resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} - dev: false - /qs@6.13.0: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} @@ -4355,17 +4011,60 @@ packages: engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 + dev: false - /readdirp@4.0.1: - resolution: {integrity: sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==} + /readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} engines: {node: '>= 14.16.0'} + dev: true + + /recma-build-jsx@1.0.0: + resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==} + dependencies: + '@types/estree': 1.0.6 + estree-util-build-jsx: 3.0.1 + vfile: 6.0.3 + dev: false + + /recma-jsx@1.0.0(acorn@8.14.0): + resolution: {integrity: sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==} + dependencies: + acorn-jsx: 5.3.2(acorn@8.14.0) + estree-util-to-js: 2.0.0 + recma-parse: 1.0.0 + recma-stringify: 1.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - acorn + dev: false + + /recma-parse@1.0.0: + resolution: {integrity: sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==} + dependencies: + '@types/estree': 1.0.6 + esast-util-from-js: 2.0.1 + unified: 11.0.5 + vfile: 6.0.3 + dev: false + + /recma-stringify@1.0.0: + resolution: {integrity: sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==} + dependencies: + '@types/estree': 1.0.6 + estree-util-to-js: 2.0.0 + unified: 11.0.5 + vfile: 6.0.3 + dev: false + + /regex@4.4.0: + resolution: {integrity: sha512-uCUSuobNVeqUupowbdZub6ggI5/JZkYyJdDogddJr60L764oxC2pMZov1fQ3wM9bdyzUILDG+Sqx6NAKAz9rKQ==} dev: false - /rehype-parse@9.0.0: - resolution: {integrity: sha512-WG7nfvmWWkCR++KEkZevZb/uw41E8TsH4DsY9UxsTbIXCVGbAs4S+r8FrQ+OtH5EEQAs+5UxKC42VinkmpA1Yw==} + /rehype-parse@9.0.1: + resolution: {integrity: sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==} dependencies: '@types/hast': 3.0.4 - hast-util-from-html: 2.0.2 + hast-util-from-html: 2.0.3 unified: 11.0.5 dev: false @@ -4377,20 +4076,30 @@ packages: vfile: 6.0.3 dev: false - /rehype-stringify@10.0.0: - resolution: {integrity: sha512-1TX1i048LooI9QoecrXy7nGFFbFSufxVRAfc6Y9YMRAi56l+oB0zP51mLSV312uRuvVLPV1opSlJmslozR1XHQ==} + /rehype-recma@1.0.0: + resolution: {integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==} + dependencies: + '@types/estree': 1.0.6 + '@types/hast': 3.0.4 + hast-util-to-estree: 3.1.0 + transitivePeerDependencies: + - supports-color + dev: false + + /rehype-stringify@10.0.1: + resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} dependencies: '@types/hast': 3.0.4 - hast-util-to-html: 9.0.2 + hast-util-to-html: 9.0.3 unified: 11.0.5 dev: false - /rehype@13.0.1: - resolution: {integrity: sha512-AcSLS2mItY+0fYu9xKxOu1LhUZeBZZBx8//5HKzF+0XP+eP8+6a5MXn2+DW2kfXR6Dtp1FEXMVrjyKAcvcU8vg==} + /rehype@13.0.2: + resolution: {integrity: sha512-j31mdaRFrwFRUIlxGeuPXXKWQxet52RBQRvCmzl5eCefn/KGbomK5GMHNMsOJf55fgo3qw5tST5neDuarDYR2A==} dependencies: '@types/hast': 3.0.4 - rehype-parse: 9.0.0 - rehype-stringify: 10.0.0 + rehype-parse: 9.0.1 + rehype-stringify: 10.0.1 unified: 11.0.5 dev: false @@ -4407,8 +4116,8 @@ packages: - supports-color dev: false - /remark-mdx@3.0.1: - resolution: {integrity: sha512-3Pz3yPQ5Rht2pM5R+0J2MrGoBSrzf+tJG94N+t/ilfdh8YLyyKYtidAYwTveB20BoHAcwIopOUqhcmh2F7hGYA==} + /remark-mdx@3.1.0: + resolution: {integrity: sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==} dependencies: mdast-util-mdx: 3.0.0 micromark-extension-mdxjs: 3.0.0 @@ -4420,15 +4129,15 @@ packages: resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.1 + mdast-util-from-markdown: 2.0.2 micromark-util-types: 2.0.0 unified: 11.0.5 transitivePeerDependencies: - supports-color dev: false - /remark-rehype@11.1.0: - resolution: {integrity: sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==} + /remark-rehype@11.1.1: + resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==} dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 @@ -4442,7 +4151,7 @@ packages: engines: {node: '>=16.0.0'} dependencies: retext: 9.0.0 - retext-smartypants: 6.1.1 + retext-smartypants: 6.2.0 unified: 11.0.5 unist-util-visit: 5.0.0 dev: false @@ -4451,12 +4160,12 @@ packages: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} dependencies: '@types/mdast': 4.0.4 - mdast-util-to-markdown: 2.1.0 + mdast-util-to-markdown: 2.1.2 unified: 11.0.5 dev: false - /remeda@2.14.0: - resolution: {integrity: sha512-OSOhr9gGcb3AshMxlu9YnnUtKSkeYhj+AxWiWGfVh3HolYtJP5IF9vC1j1tq15uI7lxCPVd9qnnp43dOvZ840A==} + /remeda@2.16.0: + resolution: {integrity: sha512-HOymkGg58HW4LT8MBEabQEdW76YsqcRNNFPXPrOrnYm+/9Pmk0b9fm8PKgQxoRPa6WDLnRM/LxTXkHdXf9Ab0w==} dependencies: type-fest: 4.26.1 dev: false @@ -4475,10 +4184,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - /resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - dev: false - /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -4504,8 +4209,8 @@ packages: unified: 11.0.5 dev: false - /retext-smartypants@6.1.1: - resolution: {integrity: sha512-onsHf34i/GzgElJgtT1K2V+31yEhWs7NJboKNxXJcmVMMPxLpgxZ9iADoMdydd6j/bHic5F/aNq0CGqElEtu2g==} + /retext-smartypants@6.2.0: + resolution: {integrity: sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==} dependencies: '@types/nlcst': 2.0.3 nlcst-to-string: 4.0.0 @@ -4533,29 +4238,31 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - /rollup@4.21.2: - resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} + /rollup@4.24.4: + resolution: {integrity: sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.2 - '@rollup/rollup-android-arm64': 4.21.2 - '@rollup/rollup-darwin-arm64': 4.21.2 - '@rollup/rollup-darwin-x64': 4.21.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 - '@rollup/rollup-linux-arm-musleabihf': 4.21.2 - '@rollup/rollup-linux-arm64-gnu': 4.21.2 - '@rollup/rollup-linux-arm64-musl': 4.21.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 - '@rollup/rollup-linux-riscv64-gnu': 4.21.2 - '@rollup/rollup-linux-s390x-gnu': 4.21.2 - '@rollup/rollup-linux-x64-gnu': 4.21.2 - '@rollup/rollup-linux-x64-musl': 4.21.2 - '@rollup/rollup-win32-arm64-msvc': 4.21.2 - '@rollup/rollup-win32-ia32-msvc': 4.21.2 - '@rollup/rollup-win32-x64-msvc': 4.21.2 + '@rollup/rollup-android-arm-eabi': 4.24.4 + '@rollup/rollup-android-arm64': 4.24.4 + '@rollup/rollup-darwin-arm64': 4.24.4 + '@rollup/rollup-darwin-x64': 4.24.4 + '@rollup/rollup-freebsd-arm64': 4.24.4 + '@rollup/rollup-freebsd-x64': 4.24.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.4 + '@rollup/rollup-linux-arm-musleabihf': 4.24.4 + '@rollup/rollup-linux-arm64-gnu': 4.24.4 + '@rollup/rollup-linux-arm64-musl': 4.24.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.4 + '@rollup/rollup-linux-riscv64-gnu': 4.24.4 + '@rollup/rollup-linux-s390x-gnu': 4.24.4 + '@rollup/rollup-linux-x64-gnu': 4.24.4 + '@rollup/rollup-linux-x64-musl': 4.24.4 + '@rollup/rollup-win32-arm64-msvc': 4.24.4 + '@rollup/rollup-win32-ia32-msvc': 4.24.4 + '@rollup/rollup-win32-x64-msvc': 4.24.4 fsevents: 2.3.3 dev: false @@ -4572,16 +4279,6 @@ packages: dependencies: suf-log: 2.5.3 - /sass@1.79.3: - resolution: {integrity: sha512-m7dZxh0W9EZ3cw50Me5GOuYm/tVAJAn91SUnohLRo9cXBixGUOdvmryN+dXpwR831bhoY3Zv7rEFt85PUwTmzA==} - engines: {node: '>=14.0.0'} - hasBin: true - dependencies: - chokidar: 4.0.0 - immutable: 4.3.7 - source-map-js: 1.2.1 - dev: false - /sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} dev: false @@ -4645,7 +4342,6 @@ packages: '@img/sharp-win32-ia32': 0.33.5 '@img/sharp-win32-x64': 0.33.5 dev: false - optional: true /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} @@ -4659,11 +4355,14 @@ packages: engines: {node: '>=8'} dev: false - /shiki@1.16.2: - resolution: {integrity: sha512-gSym0hZf5a1U0iDPsdoOAZbvoi+e0c6c3NKAi03FoSLTm7oG20tum29+gk0wzzivOasn3loxfGUPT+jZXIUbWg==} + /shiki@1.22.2: + resolution: {integrity: sha512-3IZau0NdGKXhH2bBlUk4w1IHNxPh6A5B2sUpyY+8utLu2j/h1QpFkAaUA1bAMxOWWGtTWcAh531vnS4NJKS/lA==} dependencies: - '@shikijs/core': 1.16.2 - '@shikijs/vscode-textmate': 9.2.0 + '@shikijs/core': 1.22.2 + '@shikijs/engine-javascript': 1.22.2 + '@shikijs/engine-oniguruma': 1.22.2 + '@shikijs/types': 1.22.2 + '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 dev: false @@ -4682,30 +4381,57 @@ packages: engines: {node: '>=14'} dev: false - /simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - requiresBuild: true + /simple-stack-form@0.1.12(astro@4.16.9)(zod@3.23.8): + resolution: {integrity: sha512-cqxiA0/91WddM9Jya8Es1wfDurBfm8pUOmgMb08OB32wpmQLz2JQpjcarFNYkj5ZXfmE3qkGqakvx+6TCwxqUQ==} + hasBin: true + peerDependencies: + astro: ^3.6.0 || ^4.0.0 + zod: ^3.22.4 dependencies: - is-arrayish: 0.3.2 + '@clack/prompts': 0.7.0 + astro: 4.16.9(typescript@5.7.2) + fs-extra: 11.2.0 + just-map-values: 3.2.0 + kleur: 4.1.5 + zod: 3.23.8 dev: false - optional: true - /sirv@2.0.4: - resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} - engines: {node: '>= 10'} + /simple-stack-query@0.2.0: + resolution: {integrity: sha512-7y+b+DmeBDkwU/GVD/nz9zElqjo+FY1V9oAIE+W2UVB5SGWqGLrZwkd4c2wz4Z6hNZFroQk9SIz+oOhtaX20Ag==} + engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} + peerDependencies: + signal-polyfill: ^0.1.2 + peerDependenciesMeta: + signal-polyfill: + optional: true dependencies: - '@polka/url': 1.0.0-next.25 - mrmime: 2.0.0 - totalist: 3.0.1 + '@clack/prompts': 0.7.0 + kleur: 4.1.5 + vite-plugin-simple-scope: 2.0.2 + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - terser + dev: false + + /simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + dependencies: + is-arrayish: 0.3.2 dev: false /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: false - /sitemap@7.1.2: - resolution: {integrity: sha512-ARCqzHJ0p4gWt+j7NlU5eDlIO9+Rkr/JhPFZKKQ1l5GCus7rJH4UdrlVAh0xC/gDS/Qir2UMxqYNHtsKr2rpCw==} - engines: {node: '>=12.0.0', npm: '>=5.6.0'} + /sitemap@8.0.0: + resolution: {integrity: sha512-+AbdxhM9kJsHtruUF39bwS/B0Fytw6Fr1o4ZAIAEqA6cke2xcoO2GleBw9Zw7nRzILVEgz7zBM5GiTJjie1G9A==} + engines: {node: '>=14.0.0', npm: '>=6.0.0'} hasBin: true dependencies: '@types/node': 17.0.45 @@ -4762,7 +4488,7 @@ packages: engines: {node: '>=18'} dependencies: emoji-regex: 10.4.0 - get-east-asian-width: 1.2.0 + get-east-asian-width: 1.3.0 strip-ansi: 7.1.0 dev: false @@ -4783,7 +4509,7 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} dependencies: - ansi-regex: 6.0.1 + ansi-regex: 6.1.0 dev: false /strip-bom-string@1.0.0: @@ -4796,16 +4522,24 @@ packages: engines: {node: '>=4'} dev: false + /stripe@17.3.1: + resolution: {integrity: sha512-E9/u+GFBPkYnTmfFCoKX3+gP4R3SkZoGunHe4cw9J+sqkj5uxpLFf1LscuI9BuEyIQ0PFAgPTHavgQwRtOvnag==} + engines: {node: '>=12.*'} + dependencies: + '@types/node': 22.9.0 + qs: 6.13.0 + dev: false + /style-to-object@0.4.4: resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} dependencies: inline-style-parser: 0.1.1 dev: false - /style-to-object@1.0.7: - resolution: {integrity: sha512-uSjr59G5u6fbxUfKbb8GcqMGT3Xs9v5IbPkjb0S16GyOeBLAzSRK0CixBv5YrYvzO6TDLzIS6QCn78tkqWngPw==} + /style-to-object@1.0.8: + resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} dependencies: - inline-style-parser: 0.2.3 + inline-style-parser: 0.2.4 dev: false /sucrase@3.35.0: @@ -4827,20 +4561,61 @@ packages: dependencies: s.color: 0.0.15 - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: false - /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} dev: false - /tailwindcss@3.4.12: - resolution: {integrity: sha512-Htf/gHj2+soPb9UayUNci/Ja3d8pTmu9ONTfh4QY8r3MATTZOzmv6UYWF7ZwikEIC8okpfqmGqrmDehua8mF8w==} + /svelte2tsx@0.7.28(svelte@5.2.10)(typescript@5.7.2): + resolution: {integrity: sha512-TJjA+kU8AnkyoprZPgQACMfTX8N0MA5NsIL//h9IuHOxmmaCLluqhcZU+fCkWipi5c/pooHLFOMpqjhq4v7JLQ==} + peerDependencies: + svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 + typescript: ^4.9.4 || ^5.0.0 + dependencies: + dedent-js: 1.0.1 + pascal-case: 3.1.2 + svelte: 5.2.10 + typescript: 5.7.2 + dev: false + + /svelte@5.2.10: + resolution: {integrity: sha512-ON0OyO7vOmSjTc9mLjusu3vf1I7BvjovbiRB7j84F1WZMXV6dR+Tj4btIzxQxMHfzbGskaFmRa7qjgmBSVBnhQ==} + engines: {node: '>=18'} + dependencies: + '@ampproject/remapping': 2.3.0 + '@jridgewell/sourcemap-codec': 1.5.0 + '@types/estree': 1.0.6 + acorn: 8.14.0 + acorn-typescript: 1.4.13(acorn@8.14.0) + aria-query: 5.3.2 + axobject-query: 4.1.0 + esm-env: 1.2.0 + esrap: 1.2.2 + is-reference: 3.0.3 + locate-character: 3.0.0 + magic-string: 0.30.12 + zimmerframe: 1.1.2 + dev: false + + /tailwind-scrollbar@3.1.0(tailwindcss@3.4.14): + resolution: {integrity: sha512-pmrtDIZeHyu2idTejfV59SbaJyvp1VRjYxAjZBH0jnyrPRo6HL1kD5Glz8VPagasqr6oAx6M05+Tuw429Z8jxg==} + engines: {node: '>=12.13.0'} + peerDependencies: + tailwindcss: 3.x + dependencies: + tailwindcss: 3.4.14 + dev: false + + /tailwindcss-animate@1.0.7(tailwindcss@3.4.14): + resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + dependencies: + tailwindcss: 3.4.14 + dev: false + + /tailwindcss@3.4.14: + resolution: {integrity: sha512-IcSvOcTRcUtQQ7ILQL5quRDg7Xs93PdJEk1ZLbhhvJc7uj/OAhYOnruEiwnGgBvUtaUAJ8/mhSw1o8L2jCiENA==} engines: {node: '>=14.0.0'} hasBin: true dependencies: @@ -4857,12 +4632,12 @@ packages: micromatch: 4.0.8 normalize-path: 3.0.0 object-hash: 3.0.0 - picocolors: 1.1.0 - postcss: 8.4.45 - postcss-import: 15.1.0(postcss@8.4.45) - postcss-js: 4.0.1(postcss@8.4.45) - postcss-load-config: 4.0.2(postcss@8.4.45) - postcss-nested: 6.2.0(postcss@8.4.45) + picocolors: 1.1.1 + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.2(postcss@8.4.47) + postcss-nested: 6.2.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 resolve: 1.22.8 sucrase: 3.35.0 @@ -4883,21 +4658,8 @@ packages: any-promise: 1.3.0 dev: false - /tinyexec@0.3.0: - resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} - dev: false - - /tinyglobby@0.2.6: - resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} - engines: {node: '>=12.0.0'} - dependencies: - fdir: 6.3.0(picomatch@4.0.2) - picomatch: 4.0.2 - dev: false - - /to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} + /tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} dev: false /to-regex-range@5.0.1: @@ -4906,9 +4668,9 @@ packages: dependencies: is-number: 7.0.0 - /totalist@3.0.1: - resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} - engines: {node: '>=6'} + /tosource@2.0.0-alpha.3: + resolution: {integrity: sha512-KAB2lrSS48y91MzFPFuDg4hLbvDiyTjOVgaK7Erw+5AmZXNq4sFRVn8r6yxSLuNs15PaokrDRpS61ERY9uZOug==} + engines: {node: '>=10'} dev: false /trim-lines@3.0.1: @@ -4923,8 +4685,8 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: false - /tsconfck@3.1.3(typescript@5.6.2): - resolution: {integrity: sha512-ulNZP1SVpRDesxeMLON/LtWM8HIgAJEIVpVVhBM6gsmvQ8+Rh+ZG7FWGvHh7Ah3pRABwVJWklWCr/BTZSv0xnQ==} + /tsconfck@3.1.4(typescript@5.7.2): + resolution: {integrity: sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==} engines: {node: ^18 || >=20} hasBin: true peerDependencies: @@ -4933,30 +4695,13 @@ packages: typescript: optional: true dependencies: - typescript: 5.6.2 + typescript: 5.7.2 dev: false - /tslib@2.7.0: - resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + /tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} requiresBuild: true dev: false - optional: true - - /tsx@4.19.1: - resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} - engines: {node: '>=18.0.0'} - hasBin: true - dependencies: - esbuild: 0.23.1 - get-tsconfig: 4.8.1 - optionalDependencies: - fsevents: 2.3.3 - dev: false - - /type-fest@2.19.0: - resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} - engines: {node: '>=12.20'} - dev: false /type-fest@4.26.1: resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} @@ -4966,28 +4711,18 @@ packages: /typesafe-path@0.2.2: resolution: {integrity: sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA==} - /typescript-auto-import-cache@0.3.3: - resolution: {integrity: sha512-ojEC7+Ci1ij9eE6hp8Jl9VUNnsEKzztktP5gtYNRMrTmfXVwA1PITYYAkpxCvvupdSYa/Re51B6KMcv1CTZEUA==} + /typescript-auto-import-cache@0.3.5: + resolution: {integrity: sha512-fAIveQKsoYj55CozUiBoj4b/7WpN0i4o74wiGY5JVUEoD0XiqDk1tJqTEjgzL2/AizKQrXxyRosSebyDzBZKjw==} dependencies: semver: 7.6.3 - /typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + /typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true - /ufo@1.5.4: - resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} - dev: false - - /unconfig@0.5.5: - resolution: {integrity: sha512-VQZ5PT9HDX+qag0XdgQi8tJepPhXiR/yVOkn707gJDKo31lGjRilPREiQJ9Z6zd/Ugpv6ZvO5VxVIcatldYcNQ==} - dependencies: - '@antfu/utils': 0.7.10 - defu: 6.1.4 - importx: 0.4.4 - transitivePeerDependencies: - - supports-color + /undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} dev: false /unified@11.0.5: @@ -5068,65 +4803,33 @@ packages: unist-util-visit-parents: 6.0.1 dev: false - /unocss@0.62.4(postcss@8.4.45)(vite@5.4.3): - resolution: {integrity: sha512-SaGbxXQkk8GDPeJpWsBCZ8a23Knu4ixVTt6pvcQWKjOCGTd9XBd+vLZzN2WwdwgBPVwmMmx5wp+/gPHKFNOmIw==} - engines: {node: '>=14'} - peerDependencies: - '@unocss/webpack': 0.62.4 - vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 - peerDependenciesMeta: - '@unocss/webpack': - optional: true - vite: - optional: true - dependencies: - '@unocss/astro': 0.62.4(vite@5.4.3) - '@unocss/cli': 0.62.4 - '@unocss/core': 0.62.4 - '@unocss/postcss': 0.62.4(postcss@8.4.45) - '@unocss/preset-attributify': 0.62.4 - '@unocss/preset-icons': 0.62.4 - '@unocss/preset-mini': 0.62.4 - '@unocss/preset-tagify': 0.62.4 - '@unocss/preset-typography': 0.62.4 - '@unocss/preset-uno': 0.62.4 - '@unocss/preset-web-fonts': 0.62.4 - '@unocss/preset-wind': 0.62.4 - '@unocss/transformer-attributify-jsx': 0.62.4 - '@unocss/transformer-compile-class': 0.62.4 - '@unocss/transformer-directives': 0.62.4 - '@unocss/transformer-variant-group': 0.62.4 - '@unocss/vite': 0.62.4(vite@5.4.3) - vite: 5.4.3(sass@1.79.3) - transitivePeerDependencies: - - postcss - - rollup - - supports-color + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} dev: false - /update-browserslist-db@1.1.0(browserslist@4.23.3): - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + /update-browserslist-db@1.1.1(browserslist@4.24.2): + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.23.3 + browserslist: 4.24.2 escalade: 3.2.0 - picocolors: 1.1.0 - dev: false - - /url@0.11.4: - resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==} - engines: {node: '>= 0.4'} - dependencies: - punycode: 1.4.1 - qs: 6.13.0 + picocolors: 1.1.1 dev: false /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: false + /valid-filename@4.0.0: + resolution: {integrity: sha512-VEYTpTVPMgO799f2wI7zWf0x2C54bPX6NAfbZ2Z8kZn76p+3rEYCTYVYzMUcVSMvakxMQTriBf24s3+WeXJtEg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + filename-reserved-regex: 3.0.0 + dev: false + /vfile-location@5.0.3: resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==} dependencies: @@ -5148,16 +4851,33 @@ packages: vfile-message: 4.0.2 dev: false - /vite-plugin-virtual@0.3.0(vite@5.4.3): + /vite-plugin-simple-scope@2.0.2: + resolution: {integrity: sha512-UvF++rRZbmGK4A+JsTo0YVKw55wk5IyBTgURspzlkjbt66FXWMOND5yZmGB/2CtFky7wKNz6LHB2B6gHCVrfAw==} + engines: {node: '>=18.14.1'} + dependencies: + typescript: 5.7.2 + vite: 5.4.10 + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - terser + dev: false + + /vite-plugin-virtual@0.3.0(vite@5.4.10): resolution: {integrity: sha512-TOtrWw6jKrJNXfxhGRUiQzfAP1gRkYkVzMkJNjHUJ8idLuxf8eeeDKZKZHhdeYfaCc/87rv+KvWE2iCy1QInWA==} peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 dependencies: - vite: 5.4.3(sass@1.79.3) + vite: 5.4.10 dev: false - /vite@5.4.3(sass@1.79.3): - resolution: {integrity: sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==} + /vite@5.4.10: + resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5188,39 +4908,38 @@ packages: optional: true dependencies: esbuild: 0.21.5 - postcss: 8.4.45 - rollup: 4.21.2 - sass: 1.79.3 + postcss: 8.4.47 + rollup: 4.24.4 optionalDependencies: fsevents: 2.3.3 dev: false - /vitefu@1.0.2(vite@5.4.3): - resolution: {integrity: sha512-0/iAvbXyM3RiPPJ4lyD4w6Mjgtf4ejTK6TPvTNG3H32PLwuT0N/ZjJLiXug7ETE/LWtTeHw9WRv7uX/tIKYyKg==} + /vitefu@1.0.3(vite@5.4.10): + resolution: {integrity: sha512-iKKfOMBHob2WxEJbqbJjHAkmYgvFDPhuqrO82om83S8RLk+17FtyMBfcyeH8GqD0ihShtkMW/zzJgiA51hCNCQ==} peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0-beta.0 peerDependenciesMeta: vite: optional: true dependencies: - vite: 5.4.3(sass@1.79.3) + vite: 5.4.10 dev: false - /volar-service-css@0.0.61(@volar/language-service@2.4.4): - resolution: {integrity: sha512-Ct9L/w+IB1JU8F4jofcNCGoHy6TF83aiapfZq9A0qYYpq+Kk5dH+ONS+rVZSsuhsunq8UvAuF8Gk6B8IFLfniw==} + /volar-service-css@0.0.62(@volar/language-service@2.4.8): + resolution: {integrity: sha512-JwNyKsH3F8PuzZYuqPf+2e+4CTU8YoyUHEHVnoXNlrLe7wy9U3biomZ56llN69Ris7TTy/+DEX41yVxQpM4qvg==} peerDependencies: '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.4.4 + '@volar/language-service': 2.4.8 vscode-css-languageservice: 6.3.1 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - /volar-service-emmet@0.0.61(@volar/language-service@2.4.4): - resolution: {integrity: sha512-iiYqBxjjcekqrRruw4COQHZME6EZYWVbkHjHDbULpml3g8HGJHzpAMkj9tXNCPxf36A+f1oUYjsvZt36qPg4cg==} + /volar-service-emmet@0.0.62(@volar/language-service@2.4.8): + resolution: {integrity: sha512-U4dxWDBWz7Pi4plpbXf4J4Z/ss6kBO3TYrACxWNsE29abu75QzVS0paxDDhI6bhqpbDFXlpsDhZ9aXVFpnfGRQ==} peerDependencies: '@volar/language-service': ~2.4.0 peerDependenciesMeta: @@ -5229,25 +4948,25 @@ packages: dependencies: '@emmetio/css-parser': 0.4.0 '@emmetio/html-matcher': 1.3.0 - '@volar/language-service': 2.4.4 + '@volar/language-service': 2.4.8 '@vscode/emmet-helper': 2.9.3 vscode-uri: 3.0.8 - /volar-service-html@0.0.61(@volar/language-service@2.4.4): - resolution: {integrity: sha512-yFE+YmmgqIL5HI4ORqP++IYb1QaGcv+xBboI0WkCxJJ/M35HZj7f5rbT3eQ24ECLXFbFCFanckwyWJVz5KmN3Q==} + /volar-service-html@0.0.62(@volar/language-service@2.4.8): + resolution: {integrity: sha512-Zw01aJsZRh4GTGUjveyfEzEqpULQUdQH79KNEiKVYHZyuGtdBRYCHlrus1sueSNMxwwkuF5WnOHfvBzafs8yyQ==} peerDependencies: '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.4.4 + '@volar/language-service': 2.4.8 vscode-html-languageservice: 5.3.1 vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - /volar-service-prettier@0.0.61(@volar/language-service@2.4.4)(prettier@3.3.3): - resolution: {integrity: sha512-F612nql5I0IS8HxXemCGvOR2Uxd4XooIwqYVUvk7WSBxP/+xu1jYvE3QJ7EVpl8Ty3S4SxPXYiYTsG3bi+gzIQ==} + /volar-service-prettier@0.0.62(@volar/language-service@2.4.8)(prettier@3.3.3): + resolution: {integrity: sha512-h2yk1RqRTE+vkYZaI9KYuwpDfOQRrTEMvoHol0yW4GFKc75wWQRrb5n/5abDrzMPrkQbSip8JH2AXbvrRtYh4w==} peerDependencies: '@volar/language-service': ~2.4.0 prettier: ^2.2 || ^3.0 @@ -5257,46 +4976,46 @@ packages: prettier: optional: true dependencies: - '@volar/language-service': 2.4.4 + '@volar/language-service': 2.4.8 prettier: 3.3.3 vscode-uri: 3.0.8 - /volar-service-typescript-twoslash-queries@0.0.61(@volar/language-service@2.4.4): - resolution: {integrity: sha512-99FICGrEF0r1E2tV+SvprHPw9Knyg7BdW2fUch0tf59kG+KG+Tj4tL6tUg+cy8f23O/VXlmsWFMIE+bx1dXPnQ==} + /volar-service-typescript-twoslash-queries@0.0.62(@volar/language-service@2.4.8): + resolution: {integrity: sha512-KxFt4zydyJYYI0kFAcWPTh4u0Ha36TASPZkAnNY784GtgajerUqM80nX/W1d0wVhmcOFfAxkVsf/Ed+tiYU7ng==} peerDependencies: '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.4.4 + '@volar/language-service': 2.4.8 vscode-uri: 3.0.8 - /volar-service-typescript@0.0.61(@volar/language-service@2.4.4): - resolution: {integrity: sha512-4kRHxVbW7wFBHZWRU6yWxTgiKETBDIJNwmJUAWeP0mHaKpnDGj/astdRFKqGFRYVeEYl45lcUPhdJyrzanjsdQ==} + /volar-service-typescript@0.0.62(@volar/language-service@2.4.8): + resolution: {integrity: sha512-p7MPi71q7KOsH0eAbZwPBiKPp9B2+qrdHAd6VY5oTo9BUXatsOAdakTm9Yf0DUj6uWBAaOT01BSeVOPwucMV1g==} peerDependencies: '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.4.4 + '@volar/language-service': 2.4.8 path-browserify: 1.0.1 semver: 7.6.3 - typescript-auto-import-cache: 0.3.3 + typescript-auto-import-cache: 0.3.5 vscode-languageserver-textdocument: 1.0.12 vscode-nls: 5.2.0 vscode-uri: 3.0.8 - /volar-service-yaml@0.0.61(@volar/language-service@2.4.4): - resolution: {integrity: sha512-L+gbDiLDQQ1rZUbJ3mf3doDsoQUa8OZM/xdpk/unMg1Vz24Zmi2Ign8GrZyBD7bRoIQDwOH9gdktGDKzRPpUNw==} + /volar-service-yaml@0.0.62(@volar/language-service@2.4.8): + resolution: {integrity: sha512-k7gvv7sk3wa+nGll3MaSKyjwQsJjIGCHFjVkl3wjaSP2nouKyn9aokGmqjrl39mi88Oy49giog2GkZH526wjig==} peerDependencies: '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 2.4.4 + '@volar/language-service': 2.4.8 vscode-uri: 3.0.8 yaml-language-server: 1.15.0 @@ -5400,11 +5119,11 @@ packages: isexe: 2.0.0 dev: false - /widest-line@4.0.1: - resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} - engines: {node: '>=12'} + /widest-line@5.0.0: + resolution: {integrity: sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==} + engines: {node: '>=18'} dependencies: - string-width: 5.1.2 + string-width: 7.2.0 dev: false /wrap-ansi@7.0.0: @@ -5424,6 +5143,28 @@ packages: strip-ansi: 7.1.0 dev: false + /wrap-ansi@9.0.0: + resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} + engines: {node: '>=18'} + dependencies: + ansi-styles: 6.2.1 + string-width: 7.2.0 + strip-ansi: 7.1.0 + dev: false + + /xml2js@0.6.2: + resolution: {integrity: sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==} + engines: {node: '>=4.0.0'} + dependencies: + sax: 1.4.1 + xmlbuilder: 11.0.1 + dev: false + + /xmlbuilder@11.0.1: + resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==} + engines: {node: '>=4.0'} + dev: false + /xxhash-wasm@1.0.2: resolution: {integrity: sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==} dev: false @@ -5457,8 +5198,8 @@ packages: resolution: {integrity: sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==} engines: {node: '>= 14'} - /yaml@2.5.1: - resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + /yaml@2.6.0: + resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==} engines: {node: '>= 14'} hasBin: true @@ -5483,21 +5224,25 @@ packages: engines: {node: '>=12.20'} dev: false - /zod-to-json-schema@3.23.2(zod@3.23.8): - resolution: {integrity: sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw==} + /zimmerframe@1.1.2: + resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} + dev: false + + /zod-to-json-schema@3.23.5(zod@3.23.8): + resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==} peerDependencies: zod: ^3.23.3 dependencies: zod: 3.23.8 dev: false - /zod-to-ts@1.2.0(typescript@5.6.2)(zod@3.23.8): + /zod-to-ts@1.2.0(typescript@5.7.2)(zod@3.23.8): resolution: {integrity: sha512-x30XE43V+InwGpvTySRNz9kB7qFU8DlyEy7BsSTCHPH1R0QasMmHWZDCzYm6bVXtj/9NNJAZF3jW8rzFvH5OFA==} peerDependencies: typescript: ^4.9.4 || ^5.0.2 zod: ^3 dependencies: - typescript: 5.6.2 + typescript: 5.7.2 zod: 3.23.8 dev: false diff --git a/public/favicon/android-chrome-192x192.png b/public/favicon/android-chrome-192x192.png index 6a185d4a8..312028344 100644 Binary files a/public/favicon/android-chrome-192x192.png and b/public/favicon/android-chrome-192x192.png differ diff --git a/public/favicon/android-chrome-512x512.png b/public/favicon/android-chrome-512x512.png index dfb9feab4..11dbb4fb1 100644 Binary files a/public/favicon/android-chrome-512x512.png and b/public/favicon/android-chrome-512x512.png differ diff --git a/public/favicon/apple-touch-icon.png b/public/favicon/apple-touch-icon.png index aafe5a71b..53433bfa3 100644 Binary files a/public/favicon/apple-touch-icon.png and b/public/favicon/apple-touch-icon.png differ diff --git a/public/favicon/browserconfig.xml b/public/favicon/browserconfig.xml index 70cb989d3..76025f4d3 100644 --- a/public/favicon/browserconfig.xml +++ b/public/favicon/browserconfig.xml @@ -1,9 +1,9 @@ - - - - #da532c - - - + + + + #fff + + + \ No newline at end of file diff --git a/public/favicon/favicon-16x16.png b/public/favicon/favicon-16x16.png index 6d9ef3184..6a994cd2e 100644 Binary files a/public/favicon/favicon-16x16.png and b/public/favicon/favicon-16x16.png differ diff --git a/public/favicon/favicon-32x32.png b/public/favicon/favicon-32x32.png index a7857b49f..76430f717 100644 Binary files a/public/favicon/favicon-32x32.png and b/public/favicon/favicon-32x32.png differ diff --git a/public/favicon/favicon-48x48.png b/public/favicon/favicon-48x48.png new file mode 100644 index 000000000..024dde90d Binary files /dev/null and b/public/favicon/favicon-48x48.png differ diff --git a/public/favicon/favicon.ico b/public/favicon/favicon.ico index d3eee2e64..5b52d8df7 100644 Binary files a/public/favicon/favicon.ico and b/public/favicon/favicon.ico differ diff --git a/public/favicon/favicon.svg b/public/favicon/favicon.svg new file mode 100644 index 000000000..e3853f6c8 --- /dev/null +++ b/public/favicon/favicon.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/public/favicon/manifest.webmanifest b/public/favicon/manifest.webmanifest new file mode 100644 index 000000000..cd1db0639 --- /dev/null +++ b/public/favicon/manifest.webmanifest @@ -0,0 +1,30 @@ +{ + "name": "Fulldev UI", + "short_name": "Fulldev UI", + "description": "Fulldev UI", + "dir": "auto", + "lang": "en-GB", + "display": "standalone", + "display_override": [ + "window-controls-overlay", + "standalone" + ], + "orientation": "any", + "start_url": "/?homescreen=1", + "background_color": "#fff", + "theme_color": "#fff", + "icons": [ + { + "src": "/favicon/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "/favicon/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} \ No newline at end of file diff --git a/public/favicon/mstile-150x150.png b/public/favicon/mstile-150x150.png index f46c06a60..ebe16e075 100644 Binary files a/public/favicon/mstile-150x150.png and b/public/favicon/mstile-150x150.png differ diff --git a/public/favicon/safari-pinned-tab.svg b/public/favicon/safari-pinned-tab.svg index ce1b4e1a0..e3853f6c8 100644 --- a/public/favicon/safari-pinned-tab.svg +++ b/public/favicon/safari-pinned-tab.svg @@ -1,17 +1,16 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - + + + + + + + + + + + + + + diff --git a/public/favicon/site.webmanifest b/public/favicon/site.webmanifest deleted file mode 100644 index 5eb5e44f8..000000000 --- a/public/favicon/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/favicon/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/favicon/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/public/favicon/yandex-browser-50x50.png b/public/favicon/yandex-browser-50x50.png new file mode 100644 index 000000000..198e02186 Binary files /dev/null and b/public/favicon/yandex-browser-50x50.png differ diff --git a/public/favicon/yandex-browser-manifest.json b/public/favicon/yandex-browser-manifest.json new file mode 100644 index 000000000..26190eb2b --- /dev/null +++ b/public/favicon/yandex-browser-manifest.json @@ -0,0 +1,9 @@ +{ + "version": "1.0", + "api_version": 1, + "layout": { + "logo": "/favicon/yandex-browser-50x50.png", + "color": "#fff", + "show_title": true + } +} \ No newline at end of file diff --git a/public/showcase/anti-slip-profiles.webp b/public/images/anti-slip-profiles.webp similarity index 100% rename from public/showcase/anti-slip-profiles.webp rename to public/images/anti-slip-profiles.webp diff --git a/public/images/avatars/500/1.jpeg b/public/images/avatar-1.jpeg similarity index 100% rename from public/images/avatars/500/1.jpeg rename to public/images/avatar-1.jpeg diff --git a/public/images/avatars/500/2.jpeg b/public/images/avatar-2.jpeg similarity index 100% rename from public/images/avatars/500/2.jpeg rename to public/images/avatar-2.jpeg diff --git a/public/images/avatars/500/3.jpeg b/public/images/avatar-3.jpeg similarity index 100% rename from public/images/avatars/500/3.jpeg rename to public/images/avatar-3.jpeg diff --git a/public/images/avatars/500/4.jpeg b/public/images/avatar-4.jpeg similarity index 100% rename from public/images/avatars/500/4.jpeg rename to public/images/avatar-4.jpeg diff --git a/public/images/avatars/1.jpeg b/public/images/avatars/1.jpeg deleted file mode 100644 index 5b8ee9f09..000000000 Binary files a/public/images/avatars/1.jpeg and /dev/null differ diff --git a/public/images/avatars/2.jpeg b/public/images/avatars/2.jpeg deleted file mode 100644 index 80ac95363..000000000 Binary files a/public/images/avatars/2.jpeg and /dev/null differ diff --git a/public/images/avatars/3.jpeg b/public/images/avatars/3.jpeg deleted file mode 100644 index 5e2fe4895..000000000 Binary files a/public/images/avatars/3.jpeg and /dev/null differ diff --git a/public/images/avatars/300/1.jpeg b/public/images/avatars/300/1.jpeg deleted file mode 100644 index f78363f4e..000000000 Binary files a/public/images/avatars/300/1.jpeg and /dev/null differ diff --git a/public/images/avatars/300/2.jpeg b/public/images/avatars/300/2.jpeg deleted file mode 100644 index 96a47cd59..000000000 Binary files a/public/images/avatars/300/2.jpeg and /dev/null differ diff --git a/public/images/avatars/300/3.jpeg b/public/images/avatars/300/3.jpeg deleted file mode 100644 index 4625f3ab9..000000000 Binary files a/public/images/avatars/300/3.jpeg and /dev/null differ diff --git a/public/images/avatars/300/4.jpeg b/public/images/avatars/300/4.jpeg deleted file mode 100644 index 461b37454..000000000 Binary files a/public/images/avatars/300/4.jpeg and /dev/null differ diff --git a/public/images/avatars/4.jpeg b/public/images/avatars/4.jpeg deleted file mode 100644 index f5fdb90fc..000000000 Binary files a/public/images/avatars/4.jpeg and /dev/null differ diff --git a/public/images/avatars/5.jpeg b/public/images/avatars/5.jpeg deleted file mode 100644 index 1c7140bd8..000000000 Binary files a/public/images/avatars/5.jpeg and /dev/null differ diff --git a/public/images/avatars/6.jpeg b/public/images/avatars/6.jpeg deleted file mode 100644 index fb957a425..000000000 Binary files a/public/images/avatars/6.jpeg and /dev/null differ diff --git a/public/images/avatars/7.jpeg b/public/images/avatars/7.jpeg deleted file mode 100644 index 1c3986dce..000000000 Binary files a/public/images/avatars/7.jpeg and /dev/null differ diff --git a/public/images/avatars/8.jpeg b/public/images/avatars/8.jpeg deleted file mode 100644 index 6bf26d586..000000000 Binary files a/public/images/avatars/8.jpeg and /dev/null differ diff --git a/public/images/block-code.png b/public/images/block-code.png index 7bac054c5..7cd0978ae 100644 Binary files a/public/images/block-code.png and b/public/images/block-code.png differ diff --git a/public/images/blocks/colleagues.png b/public/images/blocks/colleagues.png deleted file mode 100644 index 9b721f638..000000000 Binary files a/public/images/blocks/colleagues.png and /dev/null differ diff --git a/public/images/blocks/content.png b/public/images/blocks/content.png deleted file mode 100644 index 51673db23..000000000 Binary files a/public/images/blocks/content.png and /dev/null differ diff --git a/public/images/blocks/cta.png b/public/images/blocks/cta.png deleted file mode 100644 index 9e16e5f22..000000000 Binary files a/public/images/blocks/cta.png and /dev/null differ diff --git a/public/images/blocks/features.png b/public/images/blocks/features.png deleted file mode 100644 index 1b1cd00fa..000000000 Binary files a/public/images/blocks/features.png and /dev/null differ diff --git a/public/images/blocks/footer.png b/public/images/blocks/footer.png deleted file mode 100644 index 4bcf7a255..000000000 Binary files a/public/images/blocks/footer.png and /dev/null differ diff --git a/public/images/blocks/header.png b/public/images/blocks/header.png deleted file mode 100644 index b8bfbc6a4..000000000 Binary files a/public/images/blocks/header.png and /dev/null differ diff --git a/public/images/blocks/hero.png b/public/images/blocks/hero.png deleted file mode 100644 index 130906bb2..000000000 Binary files a/public/images/blocks/hero.png and /dev/null differ diff --git a/public/images/blocks/intro.png b/public/images/blocks/intro.png deleted file mode 100644 index 51bfe6958..000000000 Binary files a/public/images/blocks/intro.png and /dev/null differ diff --git a/public/images/blocks/posts.png b/public/images/blocks/posts.png deleted file mode 100644 index 093d84c9e..000000000 Binary files a/public/images/blocks/posts.png and /dev/null differ diff --git a/public/images/blocks/prices.png b/public/images/blocks/prices.png deleted file mode 100644 index 147b6b0f2..000000000 Binary files a/public/images/blocks/prices.png and /dev/null differ diff --git a/public/images/blocks/reviews.png b/public/images/blocks/reviews.png deleted file mode 100644 index 2e701c364..000000000 Binary files a/public/images/blocks/reviews.png and /dev/null differ diff --git a/public/images/component-code.png b/public/images/component-code.png index 43fa32d5e..3d61de92d 100644 Binary files a/public/images/component-code.png and b/public/images/component-code.png differ diff --git a/public/images/favicon.svg b/public/images/favicon.svg new file mode 100644 index 000000000..e3853f6c8 --- /dev/null +++ b/public/images/favicon.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/public/showcase/fulldev-ui.webp b/public/images/fulldev-ui.webp similarity index 100% rename from public/showcase/fulldev-ui.webp rename to public/images/fulldev-ui.webp diff --git a/public/showcase/lavis-detailing.webp b/public/images/lavis-detailing.webp similarity index 100% rename from public/showcase/lavis-detailing.webp rename to public/images/lavis-detailing.webp diff --git a/public/showcase/leren-trainingsacteren.webp b/public/images/leren-trainingsacteren.webp similarity index 100% rename from public/showcase/leren-trainingsacteren.webp rename to public/images/leren-trainingsacteren.webp diff --git a/public/images/logo-1.svg b/public/images/logo-1.svg new file mode 100644 index 000000000..3fa749ebc --- /dev/null +++ b/public/images/logo-1.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/logo-2.svg b/public/images/logo-2.svg new file mode 100644 index 000000000..912400034 --- /dev/null +++ b/public/images/logo-2.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/public/images/logo-basic.svg b/public/images/logo-basic.svg new file mode 100644 index 000000000..2e48ad118 --- /dev/null +++ b/public/images/logo-basic.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/logo-placeholder.svg b/public/images/logo-placeholder.svg deleted file mode 100644 index 882a22bfb..000000000 --- a/public/images/logo-placeholder.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/logo-simple.svg b/public/images/logo-simple.svg new file mode 100644 index 000000000..3984a1ff9 --- /dev/null +++ b/public/images/logo-simple.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/public/images/logo-thin.svg b/public/images/logo-thin.svg new file mode 100644 index 000000000..6056a7989 --- /dev/null +++ b/public/images/logo-thin.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/public/images/logo.svg b/public/images/logo.svg new file mode 100644 index 000000000..7d1daba21 --- /dev/null +++ b/public/images/logo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/images/logofat.svg b/public/images/logofat.svg new file mode 100644 index 000000000..492fa8b8c --- /dev/null +++ b/public/images/logofat.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/showcase/miele-witgoedcenter-amsterdam.webp b/public/images/miele-witgoedcenter-amsterdam.webp similarity index 100% rename from public/showcase/miele-witgoedcenter-amsterdam.webp rename to public/images/miele-witgoedcenter-amsterdam.webp diff --git a/public/showcase/sloepverhuur-bolsward.webp b/public/images/sloepverhuur-bolsward.webp similarity index 100% rename from public/showcase/sloepverhuur-bolsward.webp rename to public/images/sloepverhuur-bolsward.webp diff --git a/public/showcase/stark-vulcanising-products.webp b/public/images/stark-vulcanising-products.webp similarity index 100% rename from public/showcase/stark-vulcanising-products.webp rename to public/images/stark-vulcanising-products.webp diff --git a/public/showcase/the-gym-haren.webp b/public/images/the-gym-haren.webp similarity index 100% rename from public/showcase/the-gym-haren.webp rename to public/images/the-gym-haren.webp diff --git a/public/showcase/van-dillen-antieke-bouwmaterialen.webp b/public/images/van-dillen-antieke-bouwmaterialen.webp similarity index 100% rename from public/showcase/van-dillen-antieke-bouwmaterialen.webp rename to public/images/van-dillen-antieke-bouwmaterialen.webp diff --git a/src/blocks/Banner.astro b/src/blocks/Banner.astro new file mode 100644 index 000000000..df1a0e28b --- /dev/null +++ b/src/blocks/Banner.astro @@ -0,0 +1,31 @@ +--- +import Element from 'fulldev-ui/components/Element.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' + +interface Props extends BlockSchema {} + +const { text, ...rest } = Astro.props +--- + + + + + + + + diff --git a/src/blocks/Categories.astro b/src/blocks/Categories.astro deleted file mode 100644 index c27c1475c..000000000 --- a/src/blocks/Categories.astro +++ /dev/null @@ -1,12 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Colleagues.astro b/src/blocks/Colleagues.astro deleted file mode 100644 index c51f83821..000000000 --- a/src/blocks/Colleagues.astro +++ /dev/null @@ -1,12 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Colleagues1.astro b/src/blocks/Colleagues1.astro new file mode 100644 index 000000000..f093738c2 --- /dev/null +++ b/src/blocks/Colleagues1.astro @@ -0,0 +1,74 @@ +--- +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Matrix from 'fulldev-ui/structures/Matrix.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, tagline, heading, paragraph, cards, ...rest } = Astro.props +--- + + + + + + + + + + { + cards?.map(({ image, heading, paragraph }) => ( + + + + + + )) + } + + + + + diff --git a/src/blocks/Contact.astro b/src/blocks/Contact.astro deleted file mode 100644 index cb969bda9..000000000 --- a/src/blocks/Contact.astro +++ /dev/null @@ -1,154 +0,0 @@ ---- -import Button from 'fulldev-ui/components/Button.astro' -import Column from 'fulldev-ui/components/Column.astro' -import Channel from 'fulldev-ui/components/experimental/Channel.astro' -import Form from 'fulldev-ui/components/experimental/Form.astro' -import Heading from 'fulldev-ui/components/Heading.astro' -import Image from 'fulldev-ui/components/Image.astro' -import Input from 'fulldev-ui/components/Input.astro' -import Row from 'fulldev-ui/components/Row.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Tagline from 'fulldev-ui/components/Tagline.astro' -import Text from 'fulldev-ui/components/Text.astro' -import Textarea from 'fulldev-ui/components/Textarea.astro' - -const { - heading, - text, - tagline, - googleMaps, - buttons, - channels, - socials, - position, - image, - ...rest -} = Astro.props ---- - - - - - - - - {buttons?.map((button: any) => )} - - - - - { - channels?.address && ( - - ) - } - - { - socials && ( - - {socials?.facebook && ( - - )} - {socials?.instagram && ( - - )} - - ) - } - - - - - - - - - - - - - - - diff --git a/src/blocks/Content.astro b/src/blocks/Content.astro deleted file mode 100644 index 169f8fe1a..000000000 --- a/src/blocks/Content.astro +++ /dev/null @@ -1,12 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Content1.astro b/src/blocks/Content1.astro new file mode 100644 index 000000000..c4ba80d11 --- /dev/null +++ b/src/blocks/Content1.astro @@ -0,0 +1,40 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block.ts' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' + +interface Props extends BlockSchema {} + +const { depth, tagline, heading, paragraph, buttons, image, content } = + Astro.props +--- + + + + + + + + + + + + + + + + diff --git a/src/blocks/Content2.astro b/src/blocks/Content2.astro new file mode 100644 index 000000000..04c6fd1de --- /dev/null +++ b/src/blocks/Content2.astro @@ -0,0 +1,46 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Split from 'fulldev-ui/structures/Split.astro' + +interface Props extends BlockSchema {} + +const { depth, tagline, heading, paragraph, buttons, image, content, ...rest } = + Astro.props +--- + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Content3.astro b/src/blocks/Content3.astro new file mode 100644 index 000000000..9be2c221c --- /dev/null +++ b/src/blocks/Content3.astro @@ -0,0 +1,46 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Split from 'fulldev-ui/structures/Split.astro' + +interface Props extends BlockSchema {} + +const { depth, tagline, heading, paragraph, buttons, image, content, ...rest } = + Astro.props +--- + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Content4.astro b/src/blocks/Content4.astro new file mode 100644 index 000000000..8650ce168 --- /dev/null +++ b/src/blocks/Content4.astro @@ -0,0 +1,45 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Split from 'fulldev-ui/structures/Split.astro' + +interface Props extends BlockSchema {} + +const { depth, tagline, heading, paragraph, buttons, image, content } = + Astro.props +--- + + + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Content5.astro b/src/blocks/Content5.astro new file mode 100644 index 000000000..76fc20403 --- /dev/null +++ b/src/blocks/Content5.astro @@ -0,0 +1,42 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' + +interface Props extends BlockSchema {} + +const { depth, tagline, heading, paragraph, buttons, image, content } = + Astro.props +--- + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Content6.astro b/src/blocks/Content6.astro new file mode 100644 index 000000000..fe6f70537 --- /dev/null +++ b/src/blocks/Content6.astro @@ -0,0 +1,56 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import Toc from 'fulldev-ui/components/Toc.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Sidebar from 'fulldev-ui/structures/Sidebar.astro' + +interface Props extends BlockSchema {} + +const { + depth, + tagline, + heading, + paragraph, + buttons, + image, + content, + headings, +} = Astro.props +--- + + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Content7.astro b/src/blocks/Content7.astro new file mode 100644 index 000000000..f18b760f9 --- /dev/null +++ b/src/blocks/Content7.astro @@ -0,0 +1,64 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Menus from 'fulldev-ui/components/Menus.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import Toc from 'fulldev-ui/components/Toc.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Sidebar from 'fulldev-ui/structures/Sidebar.astro' + +interface Props extends BlockSchema {} + +const { + depth, + tagline, + heading, + paragraph, + buttons, + image, + content, + menus, + headings, +} = Astro.props +--- + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Content8.astro b/src/blocks/Content8.astro new file mode 100644 index 000000000..41f03f344 --- /dev/null +++ b/src/blocks/Content8.astro @@ -0,0 +1,47 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Menus from 'fulldev-ui/components/Menus.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Sidebar from 'fulldev-ui/structures/Sidebar.astro' + +interface Props extends BlockSchema {} + +const { depth, tagline, heading, paragraph, buttons, image, content, menus } = + Astro.props +--- + + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Cta.astro b/src/blocks/Cta.astro deleted file mode 100644 index 73808c4bc..000000000 --- a/src/blocks/Cta.astro +++ /dev/null @@ -1,14 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Cta1.astro b/src/blocks/Cta1.astro new file mode 100644 index 000000000..c16c69fa8 --- /dev/null +++ b/src/blocks/Cta1.astro @@ -0,0 +1,70 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Panel from 'fulldev-ui/structures/Panel.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { + depth = 2, + tagline, + heading, + paragraph, + content, + button, + buttons, + image, +} = Astro.props +--- + + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Cta2.astro b/src/blocks/Cta2.astro new file mode 100644 index 000000000..caaa78e68 --- /dev/null +++ b/src/blocks/Cta2.astro @@ -0,0 +1,52 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Panel from 'fulldev-ui/structures/Panel.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Split from 'fulldev-ui/structures/Split.astro' + +interface Props extends BlockSchema {} + +const { depth, tagline, heading, paragraph, buttons, image, content, ...rest } = + Astro.props +--- + + + + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Features.astro b/src/blocks/Features.astro deleted file mode 100644 index 7cd11c568..000000000 --- a/src/blocks/Features.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Features1.astro b/src/blocks/Features1.astro new file mode 100644 index 000000000..102b2d84b --- /dev/null +++ b/src/blocks/Features1.astro @@ -0,0 +1,71 @@ +--- +import Heading from 'fulldev-ui/components/Heading.astro' +import Icon from 'fulldev-ui/components/Icon.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Stack from 'fulldev-ui/structures/Stack.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, tagline, heading, paragraph, cards, ...rest } = Astro.props +--- + + + + + + + + + + { + cards?.map(({ icon, heading, paragraph }) => ( + + + + + + )) + } + + + + + diff --git a/src/blocks/Features2.astro b/src/blocks/Features2.astro new file mode 100644 index 000000000..bc70c4f22 --- /dev/null +++ b/src/blocks/Features2.astro @@ -0,0 +1,70 @@ +--- +import Heading from 'fulldev-ui/components/Heading.astro' +import Icon from 'fulldev-ui/components/Icon.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Matrix from 'fulldev-ui/structures/Matrix.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, tagline, heading, paragraph, cards, ...rest } = Astro.props +--- + + + + + + + + + + { + cards?.map(({ icon, heading, paragraph }) => ( + + + + + + )) + } + + + + + diff --git a/src/blocks/Footer.astro b/src/blocks/Footer.astro index 71acb2918..97fbc1bbc 100644 --- a/src/blocks/Footer.astro +++ b/src/blocks/Footer.astro @@ -1,7 +1,83 @@ --- -import FooterComponent from 'fulldev-ui/components/Footer.astro' +import Channels from 'fulldev-ui/components/Channels.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Logo from 'fulldev-ui/components/Logo.astro' +import Menus from 'fulldev-ui/components/Menus.astro' +import { default as Paragraph } from 'fulldev-ui/components/Paragraph.astro' +import Socials from 'fulldev-ui/components/Socials.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' -const { ...rest } = Astro.props +interface Props extends BlockSchema {} + +const { + logo, + heading, + paragraph, + socials, + channels, + menus, + // hours, + // html, + ...rest +} = Astro.props --- - + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Header.astro b/src/blocks/Header.astro index ed237d23c..806f2bead 100644 --- a/src/blocks/Header.astro +++ b/src/blocks/Header.astro @@ -1,7 +1,141 @@ --- -import HeaderComponent from 'fulldev-ui/components/Header.astro' +// import Button from 'fulldev-ui/components/Button.astro' +import Button from 'fulldev-ui/components/Button.astro' +// import Cart from 'fulldev-ui/components/Cart.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Links from 'fulldev-ui/components/Links.astro' +import Logo from 'fulldev-ui/components/Logo.astro' +import Menus from 'fulldev-ui/components/Menus.astro' +import Search from 'fulldev-ui/components/Search.astro' +import Socials from 'fulldev-ui/components/Socials.astro' +import Themer from 'fulldev-ui/components/Themer.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Drawer from 'fulldev-ui/structures/Drawer.astro' -const { ...rest } = Astro.props +interface Props extends BlockSchema {} + +const { logo, links, menus, socials, search, themer, button } = Astro.props --- - + + + + + + + + { + search && ( + + ) + } + + { + themer && ( + + ) + } + + + + + + + + + + + + + + diff --git a/src/blocks/Hero.astro b/src/blocks/Hero.astro deleted file mode 100644 index 334cd8f18..000000000 --- a/src/blocks/Hero.astro +++ /dev/null @@ -1,16 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Hero1.astro b/src/blocks/Hero1.astro new file mode 100644 index 000000000..e50a9a6f7 --- /dev/null +++ b/src/blocks/Hero1.astro @@ -0,0 +1,69 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Chip from 'fulldev-ui/components/Chip.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Proof from 'fulldev-ui/components/Proof.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' + +interface Props extends BlockSchema {} + +const { + depth = 2, + chip, + tagline, + heading, + paragraph, + content, + buttons, + image, + proof, + ...rest +} = Astro.props +--- + + + + + + + + + + + + + + + + + diff --git a/src/blocks/Intro.astro b/src/blocks/Intro.astro deleted file mode 100644 index a2a14cb24..000000000 --- a/src/blocks/Intro.astro +++ /dev/null @@ -1,21 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { image, ...rest } = Astro.props ---- - - - - diff --git a/src/blocks/Intro1.astro b/src/blocks/Intro1.astro new file mode 100644 index 000000000..0b4e06e50 --- /dev/null +++ b/src/blocks/Intro1.astro @@ -0,0 +1,67 @@ +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { + depth = 2, + tagline, + heading, + paragraph, + content, + button, + buttons, + image, + ...rest +} = Astro.props +--- + + + + + + + + + + + + + + + + + diff --git a/src/blocks/JobCategories1.astro b/src/blocks/JobCategories1.astro new file mode 100644 index 000000000..e141b29f4 --- /dev/null +++ b/src/blocks/JobCategories1.astro @@ -0,0 +1,61 @@ +--- +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import List from 'fulldev-ui/components/List.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Card from 'fulldev-ui/structures/Card.astro' +import Container from 'fulldev-ui/structures/Container.astro' +import Matrix from 'fulldev-ui/structures/Matrix.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, heading, button, cards, ...rest } = Astro.props +--- + + + + + + + + + { + cards?.map(({ href, heading, list, image }) => ( + + + + + + + + )) + } + + + diff --git a/src/blocks/JobCategory1.astro b/src/blocks/JobCategory1.astro new file mode 100644 index 000000000..defb8fd4f --- /dev/null +++ b/src/blocks/JobCategory1.astro @@ -0,0 +1,90 @@ +--- +import type { CollectionEntry } from 'astro:content' +import { getCollection } from 'astro:content' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import List from 'fulldev-ui/components/List.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Card from 'fulldev-ui/structures/Card.astro' +import Container from 'fulldev-ui/structures/Container.astro' +import Matrix from 'fulldev-ui/structures/Matrix.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import { getHref } from 'fulldev-ui/utils/getHref' + +interface Props { + slug?: CollectionEntry<'pages'>['slug'] + heading?: string | undefined + paragraph?: string | undefined + pages?: CollectionEntry<'pages'>[] +} + +const { slug, heading, paragraph, pages, ...rest } = Astro.props + +// Jobs that reference the current category, or any of `pages` select categories +const jobs = await getCollection('pages', (page) => + page.data.categories?.some( + (category) => + category.slug == slug || pages?.some((p) => p.slug == category.slug) + ) +) +--- + + + + + + + + + + + { + pages?.map(({ slug, data: { title, image } }) => ( + + + + + )) + } + + + { + jobs?.map(({ slug, data: { title, list } }) => ( + + + + + )) + } + + + diff --git a/src/blocks/Jobs.astro b/src/blocks/Jobs.astro deleted file mode 100644 index 4f3de800e..000000000 --- a/src/blocks/Jobs.astro +++ /dev/null @@ -1,12 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Jobs1.astro b/src/blocks/Jobs1.astro new file mode 100644 index 000000000..e2f6021c7 --- /dev/null +++ b/src/blocks/Jobs1.astro @@ -0,0 +1,74 @@ +--- +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import List from 'fulldev-ui/components/List.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Card from 'fulldev-ui/structures/Card.astro' +import Container from 'fulldev-ui/structures/Container.astro' +import Matrix from 'fulldev-ui/structures/Matrix.astro' +import Section from 'fulldev-ui/structures/Section.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, heading, button, cards, ...rest } = Astro.props +--- + + + + + + + + + { + cards?.map(({ href, heading, list }) => ( + + + + + )) + } + + + + + diff --git a/src/blocks/Logos1.astro b/src/blocks/Logos1.astro new file mode 100644 index 000000000..ccfe202f5 --- /dev/null +++ b/src/blocks/Logos1.astro @@ -0,0 +1,55 @@ +--- +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, tagline, heading, paragraph, images, ...rest } = Astro.props +--- + + + + + + + + + {images?.map((image) => )} + + + + + diff --git a/src/blocks/Pages1.astro b/src/blocks/Pages1.astro new file mode 100644 index 000000000..13b3dc602 --- /dev/null +++ b/src/blocks/Pages1.astro @@ -0,0 +1,85 @@ +--- +// Heading etc left, image and content right, sticky +import Badges from 'fulldev-ui/components/Badges.astro' +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Split from 'fulldev-ui/structures/Split.astro' + +interface Props extends BlockSchema {} + +const { + depth = 2, + tagline, + heading, + paragraph, + buttons, + content, + cards, +} = Astro.props +--- + + + + + + + + + + + + + + + { + cards?.map(({ href, image, badges, heading, paragraph }) => ( + + + + + + + + + )) + } + + + + diff --git a/src/blocks/Posts.astro b/src/blocks/Posts.astro deleted file mode 100644 index b44afa7c2..000000000 --- a/src/blocks/Posts.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Prices.astro b/src/blocks/Prices.astro deleted file mode 100644 index 78ffc0eb1..000000000 --- a/src/blocks/Prices.astro +++ /dev/null @@ -1,24 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - - - diff --git a/src/blocks/Pricings1.astro b/src/blocks/Pricings1.astro new file mode 100644 index 000000000..e78c7493b --- /dev/null +++ b/src/blocks/Pricings1.astro @@ -0,0 +1,61 @@ +--- +import Button from 'fulldev-ui/components/Button.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import List from 'fulldev-ui/components/List.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Card from 'fulldev-ui/structures/Card.astro' +import Container from 'fulldev-ui/structures/Container.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Stack from 'fulldev-ui/structures/Stack.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, heading, paragraph, cards } = Astro.props +--- + + + + + + + + + { + cards?.map(({ tagline, heading, paragraph, list, button }) => ( + + + + + + + + + + )) + } + + + diff --git a/src/blocks/Product.astro b/src/blocks/Product.astro deleted file mode 100644 index e3c639b76..000000000 --- a/src/blocks/Product.astro +++ /dev/null @@ -1,64 +0,0 @@ ---- -import Button from 'fulldev-ui/components/Button.astro' -import Column from 'fulldev-ui/components/Column.astro' -import Heading from 'fulldev-ui/components/Heading.astro' -import Image from 'fulldev-ui/components/Image.astro' -import Input from 'fulldev-ui/components/Input.astro' -import Row from 'fulldev-ui/components/Row.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Text from 'fulldev-ui/components/Text.astro' -import Price from 'fulldev-ui/components/experimental/Price.astro' - -const { - heading, - title, - list, - price, - image, - images, - rating, - buttons, - text, - subheading, - button, - description, - form, - ...rest -} = Astro.props ---- - - - - - - - - - - - - - - diff --git a/src/blocks/Products.astro b/src/blocks/Products.astro deleted file mode 100644 index 772e8217f..000000000 --- a/src/blocks/Products.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Products1.astro b/src/blocks/Products1.astro new file mode 100644 index 000000000..fac529cdf --- /dev/null +++ b/src/blocks/Products1.astro @@ -0,0 +1,87 @@ +--- +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Price from 'fulldev-ui/components/Price.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Card from 'fulldev-ui/structures/Card.astro' +import Container from 'fulldev-ui/structures/Container.astro' +import Section from 'fulldev-ui/structures/Section.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, heading, button, cards, ...rest } = Astro.props +--- + + + + + + + + + { + cards?.map(({ href, images, heading, price }) => ( + + + + + + + + )) + } + + + + + diff --git a/src/blocks/Projects1.astro b/src/blocks/Projects1.astro new file mode 100644 index 000000000..e8054b3b0 --- /dev/null +++ b/src/blocks/Projects1.astro @@ -0,0 +1,79 @@ +--- +import Badges from 'fulldev-ui/components/Badges.astro' +import Buttons from 'fulldev-ui/components/Buttons.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Container from 'fulldev-ui/structures/Container.astro' +import Group from 'fulldev-ui/structures/Group.astro' +import Prose from 'fulldev-ui/structures/Prose.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Split from 'fulldev-ui/structures/Split.astro' + +interface Props extends BlockSchema {} + +const { + depth = 2, + tagline, + heading, + paragraph, + buttons, + content, + cards, +} = Astro.props +--- + + + + + + + + + + + + + + + { + cards?.map(({ image, badges, heading, paragraph }) => ( + + + + + + + + + )) + } + + + + diff --git a/src/blocks/Reviews.astro b/src/blocks/Reviews.astro deleted file mode 100644 index 9a1988ec1..000000000 --- a/src/blocks/Reviews.astro +++ /dev/null @@ -1,13 +0,0 @@ ---- -import Section from 'fulldev-ui/components/Section.astro' - -const { ...rest } = Astro.props ---- - - diff --git a/src/blocks/Reviews1.astro b/src/blocks/Reviews1.astro new file mode 100644 index 000000000..e68bea67e --- /dev/null +++ b/src/blocks/Reviews1.astro @@ -0,0 +1,81 @@ +--- +import Heading from 'fulldev-ui/components/Heading.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Proof from 'fulldev-ui/components/Proof.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Card from 'fulldev-ui/structures/Card.astro' +import Container from 'fulldev-ui/structures/Container.astro' +import Masonry from 'fulldev-ui/structures/Masonry.astro' +import Section from 'fulldev-ui/structures/Section.astro' +import Writeup from 'fulldev-ui/structures/Writeup.astro' + +interface Props extends BlockSchema {} + +const { depth = 2, tagline, heading, paragraph, cards, ...rest } = Astro.props +--- + + + + + + + + + + { + cards?.map(({ tagline, avatar, rating, heading, paragraph }) => ( + + + + + + )) + } + + + + + diff --git a/src/blocks/Subheader.astro b/src/blocks/Subheader.astro new file mode 100644 index 000000000..32f0e81ec --- /dev/null +++ b/src/blocks/Subheader.astro @@ -0,0 +1,53 @@ +--- +import Element from 'fulldev-ui/components/Element.astro' +import Links from 'fulldev-ui/components/Links.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' + +interface Props extends BlockSchema {} + +const { links, ...rest } = Astro.props +--- + + + + + + + + diff --git a/src/blocks/_Contact1.astro b/src/blocks/_Contact1.astro new file mode 100644 index 000000000..991dd6754 --- /dev/null +++ b/src/blocks/_Contact1.astro @@ -0,0 +1,93 @@ +--- +// @ts-nocheck +import Badges from 'fulldev-ui/components/Badges.astro' +import Channel from 'fulldev-ui/components/Channel.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Form from 'fulldev-ui/components/Form.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import Image from 'fulldev-ui/components/Image.astro' +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +import Social from 'fulldev-ui/components/Social.astro' +import Tagline from 'fulldev-ui/components/Tagline.astro' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import Section from 'fulldev-ui/structures/Section.astro' + +interface Props extends BlockSchema {} + +const { + badge, + badges, + tagline, + heading, + text, + paragraph, + buttons, + socials, + form, + image, + channels, + ...rest +} = Astro.props +--- + + + + + + + + + + + + {channels?.map((channel) => )} + + + {socials?.map((social) => )} + + + + + + + + diff --git a/src/components/Avatar.astro b/src/components/Avatar.astro index a87da5f97..f3e28d601 100644 --- a/src/components/Avatar.astro +++ b/src/components/Avatar.astro @@ -2,41 +2,38 @@ import type { ComponentProps } from 'astro/types' import Image from 'fulldev-ui/components/Image.astro' -type Props = Omit, 'position' | 'frame'> & { - variant?: 'subtle' | 'outline' | 'ghost' - radius?: 'none' | 'auto' | 'full' +interface Props extends ComponentProps { + size?: 'sm' | 'md' | 'lg' | undefined } -const { radius = 'auto', ...rest } = Astro.props +const { size = 'md', ...rest } = Astro.props --- - diff --git a/src/components/Block.astro b/src/components/Block.astro index 6961e831f..07442652c 100644 --- a/src/components/Block.astro +++ b/src/components/Block.astro @@ -1,157 +1,45 @@ --- -import { getCollection, getEntries, getEntry } from 'astro:content' -import { assign, mapKeys } from 'radash' +import { getEntries } from 'astro:content' +import type { BlockSchema } from 'fulldev-ui/schemas/block' +import { getHref } from 'fulldev-ui/utils/getHref' -interface Props { - _bookshop_name?: string - [key: string | number | symbol]: any -} - -let { _bookshop_name, records, pages, source, ...rest } = Astro.props +interface Props extends BlockSchema {} -const packageBlocks = import.meta.glob('../blocks/**/*.astro') -const userBlocks = import.meta.glob('/src/blocks/**/*.astro') +let { _block, cards, pages, records, ...rest } = Astro.props -const mapBlockKeys = (blocks: any) => - mapKeys(blocks, (key: any) => key.split('/').pop().split('.').shift()) - -const components = { - ...mapBlockKeys(packageBlocks), - ...mapBlockKeys(userBlocks), +const blocks = { + ...import.meta.glob('/src/blocks/**/*.astro'), + ...import.meta.glob('../blocks/**/*.astro'), } -const found = components[_bookshop_name as any] as any -const functioncomp = found && (await found()) -const Component = functioncomp?.default - -records = records - ? (await getEntries(records)).map((entry: any) => entry?.data) - : undefined - -pages = pages - ? (await getEntries(pages)).map((entry: any) => ({ - href: `/${entry.slug}/`, - ...entry?.data, - })) - : undefined - -const slug = Astro.url.pathname.replace(/^\/|\/$/g, '') - -const children = - source === 'children' && slug - ? [ - ...( - await getCollection( - 'pages', - (page: any) => - page.slug.startsWith(slug) && - page.slug !== slug && - !page.slug.replace(`${slug}/`, '').includes('/') - ) - ).map((page: any) => ({ href: `/${page.slug}/`, ...page.data })), - ...( - await getCollection( - 'records', - (record: any) => - record.id.startsWith(slug) && - record.id !== slug && - !record.id.replace(`${slug}/`, '').includes('/') - ) - ).map((record: any) => record.data), - ] - : undefined - -const references = - source === 'references' && slug - ? ( - await getCollection('pages', (page: any) => - page.data?.pages?.find( - (page: any) => - page.slug - .replace('.md', '') - .replace('/index', '') - .replace('src/content/', '') === slug - ) - ) - ).map((item: any) => ({ href: `/${item.slug}/`, ...item.data })) - : undefined - -const siblings = - source === 'siblings' && slug - ? ( - await getCollection('pages', (page: any) => { - const currentPageFolder = slug.split('/').slice(0, -1).join('/') - const pageFolder = page.slug.split('/').slice(0, -1).join('/') - return ( - page.slug !== slug && - pageFolder === currentPageFolder && - page.slug.startsWith(currentPageFolder) - ) - }) - ) - .map((item: any) => ({ href: `/${item.slug}/`, ...item.data })) - .sort(() => Math.random() - 0.5) // Randomize the order - : undefined - -const mergedPages = pages - ? await Promise.all( - pages.map(async (page: any) => { - if (!page.i18n) return page - const i18n = await getEntry(page.i18n) - return assign(i18n?.data, page) - }) - ) - : undefined - -const mergedChildren = children - ? await Promise.all( - children.map(async (child: any) => { - if (!child.i18n) return child - const i18n = await getEntry(child.i18n) - return assign(i18n?.data, child) - }) - ) - : undefined - -const mergedReferences = references - ? await Promise.all( - references.map(async (reference: any) => { - if (!reference.i18n) return reference - const i18n = await getEntry(reference.i18n) - return assign(i18n?.data, reference) - }) - ) - : undefined - -const mergedSiblings = siblings - ? await Promise.all( - siblings.map(async (sibling: any) => { - if (!sibling.i18n) return sibling - const i18n = await getEntry(sibling.i18n) - return assign(i18n?.data, sibling) - }) - ) - : undefined +const path = Object.keys(blocks).find( + (path) => path.split('/').pop()?.split('.')[0] === _block +) + +const BlockComponent = path && (await (blocks[path] as any)()).default + +cards = [ + ...(cards || []), + ...(await getEntries(records || [])).map(({ data }) => ({ + ...data, + })), + ...(await getEntries(pages || [])).map(({ slug, data }) => ({ + href: getHref(slug), + ...data, + heading: data.title, + })), +] --- { - Component && ( - + > + + ) } diff --git a/src/components/Blocks.astro b/src/components/Blocks.astro deleted file mode 100644 index 202a4d3e2..000000000 --- a/src/components/Blocks.astro +++ /dev/null @@ -1,5 +0,0 @@ ---- -import Block from './Block.astro' ---- - -{Object.values(Astro.props ?? {})?.map((block: any) => )} diff --git a/src/components/Box.astro b/src/components/Box.astro deleted file mode 100644 index b83b5534e..000000000 --- a/src/components/Box.astro +++ /dev/null @@ -1,63 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Bento from './Bento.astro' -import Carousel from './Carousel.astro' -import Column from './Column.astro' -import Grid from './Grid.astro' -import Masonry from './Masonry.astro' -import Row from './Row.astro' -import Split from './Split.astro' -import Spread from './Spread.astro' -import Stack from './Stack.astro' -import Wrap from './Wrap.astro' - -type Props = Polymorphic<{ as: As }> & { - align?: 'start' | 'center' | 'end' - position?: 'inset' - space?: 'none' | 'auto' - size?: 'sm' | 'md' | 'lg' - structure?: - | 'bento' - | 'carousel' - | 'column' - | 'grid' - | 'masonry' - | 'row' - | 'split' - | 'spread' - | 'wrap' - | 'stack' -} - -const structuresMap = { - bento: Bento, - carousel: Carousel, - column: Column, - grid: Grid, - masonry: Masonry, - row: Row, - split: Split, - spread: Spread, - wrap: Wrap, - stack: Stack, -} - -const { - as = 'div', - space = 'auto', - structure = 'column', - align = 'start', - ...rest -} = Astro.props - -const Structure = structuresMap[structure] ?? structuresMap['column'] ---- - - - - diff --git a/src/components/Button.astro b/src/components/Button.astro index a2af181c5..da207b3a4 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -1,141 +1,81 @@ --- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Avatar from 'fulldev-ui/components/Avatar.astro' +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' import Icon from 'fulldev-ui/components/Icon.astro' -import Root from 'fulldev-ui/components/Root.astro' -type Props = Polymorphic<{ as: As }> & { - variant?: 'primary' | 'secondary' | 'tertiary' - radius?: 'none' | 'auto' | 'full' - size?: 'sm' | 'md' | 'lg' - color?: 'base' | 'brand' - contrast?: boolean - avatar?: string - icon?: string - html?: string - text?: string +interface Props + extends HTMLAttributes<'button'>, + Omit, 'type'>, + HTMLAttributes<'label'> { + variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | undefined + size?: 'sm' | 'md' | 'lg' | undefined + text?: string | undefined + icon?: string | undefined } -const { - as = 'a', - variant = 'primary', - radius = 'auto', - avatar, - icon, - html, - text, - ...rest -} = Astro.props +const { variant = 'primary', size = 'md', text, icon, ...rest } = Astro.props --- - - + + + + - - - - + - diff --git a/src/components/Carousel.astro b/src/components/Carousel.astro deleted file mode 100644 index f034e954e..000000000 --- a/src/components/Carousel.astro +++ /dev/null @@ -1,54 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' - position?: 'inset' -} - -const { ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Cart.astro b/src/components/Cart.astro new file mode 100644 index 000000000..457a542c4 --- /dev/null +++ b/src/components/Cart.astro @@ -0,0 +1,42 @@ +--- +// @ts-nocheck +import type { ComponentProps } from 'astro/types' +import CartList from 'fulldev-ui/components/CartList.svelte' +import CartSummary from 'fulldev-ui/components/CartSummary.astro' +import Drawer from 'fulldev-ui/structures/Drawer.astro' +import Button from './Button.astro' +import Icon from './Icon.astro' +import Input from './Input.astro' +import Select from './Select.astro' + +interface Props extends Omit, 'id' | 'icon'> {} + +const { variant = 'ghost', size = 'md', ...rest } = Astro.props +--- + + + + + + + + + + + + diff --git a/src/components/CartAdd.svelte b/src/components/CartAdd.svelte new file mode 100644 index 000000000..20f073cb4 --- /dev/null +++ b/src/components/CartAdd.svelte @@ -0,0 +1,76 @@ + + + + {#if quantity > 10} + + {:else} + + + + + {#each Array(10) as _, i} + + {i + 1} + + {/each} + 10} + > + Meer + + + {/if} + + + diff --git a/src/components/CartCheckout.svelte b/src/components/CartCheckout.svelte new file mode 100644 index 000000000..a03878d26 --- /dev/null +++ b/src/components/CartCheckout.svelte @@ -0,0 +1,58 @@ + + + + Afrekenennn + diff --git a/src/components/CartForm.svelte b/src/components/CartForm.svelte new file mode 100644 index 000000000..1253a6f71 --- /dev/null +++ b/src/components/CartForm.svelte @@ -0,0 +1,130 @@ + + + + + + + + {#if form.variants} + {#each Object.entries(data.variants ?? {}) as [key, options]} + + + {capitalize(key)} + + + + + + {#each options as option} + {option} + {/each} + + + {/each} + {/if} + {#if data.price} + + {formatPrice(data.price)} + + {/if} + + + + + {data.soldout ? 'Uitverkocht' : 'Toevoegen aan winkelwagen'} + + + + + diff --git a/src/components/CartList.svelte b/src/components/CartList.svelte new file mode 100644 index 000000000..8b51bf91a --- /dev/null +++ b/src/components/CartList.svelte @@ -0,0 +1,88 @@ + + + + {#each $cart as item, index} + + + + + {item.title} + {#if item.price} + {formatPrice(item.price)} + {/if} + + + + removeItem(index)} + > + + + + + + + + {/each} + + + diff --git a/src/components/CartQuantity.svelte b/src/components/CartQuantity.svelte new file mode 100644 index 000000000..cbfa7b584 --- /dev/null +++ b/src/components/CartQuantity.svelte @@ -0,0 +1,81 @@ + + + + {#if value > 10} + + {:else} + + + + + {#each Array(10) as _, i} + + {i + 1} + + {/each} + 10} + > + Meer + + + {/if} + + + diff --git a/src/components/CartSummary.astro b/src/components/CartSummary.astro new file mode 100644 index 000000000..f90d61fe2 --- /dev/null +++ b/src/components/CartSummary.astro @@ -0,0 +1,59 @@ +--- +// @ts-nocheck +import { STRIPE_RESTRICTED_KEY, URL } from 'astro:env/client' +import CartCheckout from './CartCheckout.svelte' +import CartTotal from './CartTotal.svelte' +import Element from './Element.astro' +import Paragraph from './Paragraph.astro' + +interface Props {} + +const { ...rest } = Astro.props +--- + + + + + + + + + + + diff --git a/src/components/CartTotal.svelte b/src/components/CartTotal.svelte new file mode 100644 index 000000000..29a55a92c --- /dev/null +++ b/src/components/CartTotal.svelte @@ -0,0 +1,15 @@ + + + + {formatPrice(total)} + diff --git a/src/components/Channel.astro b/src/components/Channel.astro new file mode 100644 index 000000000..4fb53bd67 --- /dev/null +++ b/src/components/Channel.astro @@ -0,0 +1,85 @@ +--- +import type { HTMLAttributes } from 'astro/types' +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' + +interface Props extends HTMLAttributes<'div'> { + variant?: 'secondary' | 'outline' | undefined + size?: 'sm' | 'md' | 'lg' | undefined + heading?: string | undefined + text?: string | undefined + href?: string | undefined + icon?: string | undefined +} + +const { + variant = 'secondary', + size = 'md', + href, + icon, + heading, + text, + ...rest +} = Astro.props +--- + + + + + + + + + + + diff --git a/src/components/Channels.astro b/src/components/Channels.astro new file mode 100644 index 000000000..fb78d460f --- /dev/null +++ b/src/components/Channels.astro @@ -0,0 +1,20 @@ +--- +import type { ComponentProps } from 'astro/types' +import Channel from 'fulldev-ui/components/Channel.astro' + +interface Props extends ComponentProps { + channel?: ComponentProps | undefined + channels?: ComponentProps[] | undefined +} + +const { channel, channels, ...rest } = Astro.props +--- + +{ + [channel, ...(channels || [])].filter(Boolean).map((channel) => ( + + )) +} diff --git a/src/components/Checkbox.astro b/src/components/Checkbox.astro index 49b14ece7..9ce7d0fd6 100644 --- a/src/components/Checkbox.astro +++ b/src/components/Checkbox.astro @@ -1,65 +1,80 @@ --- import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' +import Icon from 'fulldev-ui/components/Icon.astro' import Label from 'fulldev-ui/components/Label.astro' -import Root from 'fulldev-ui/components/Root.astro' -type Props = Omit, 'type'> & { - label?: string - color?: 'base' | 'brand' - contrast?: boolean - icon?: string +interface Props extends HTMLAttributes<'input'> { + size?: 'sm' | 'md' | 'lg' | undefined + label?: string | undefined } -const { - label, - contrast, - icon, - name, - id, - placeholder, - value, - disabled, - checked, - required, - ...rest -} = Astro.props +const { label, name = label, id = name, size = 'md', ...rest } = Astro.props --- - - + - + - diff --git a/src/components/Column.astro b/src/components/Column.astro deleted file mode 100644 index 333b015a3..000000000 --- a/src/components/Column.astro +++ /dev/null @@ -1,73 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' - align?: 'start' | 'center' | 'end' - space?: 'none' | 'auto' -} - -const { space = 'auto', align = 'start', ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Dialog.astro b/src/components/Dialog.astro deleted file mode 100644 index 86c211fc4..000000000 --- a/src/components/Dialog.astro +++ /dev/null @@ -1,68 +0,0 @@ ---- -import type { ComponentProps, HTMLTag } from 'astro/types' -import Button from './Button.astro' -import Card from './Card.astro' - -type Props = ComponentProps> & { - label?: string - icon?: string -} - -const { - variant = 'secondary', - label, - icon, - id = 'dialog', - ...rest -} = Astro.props ---- - - - - - - - - - - diff --git a/src/components/Drawer.astro b/src/components/Drawer.astro deleted file mode 100644 index c055d15ac..000000000 --- a/src/components/Drawer.astro +++ /dev/null @@ -1,102 +0,0 @@ ---- -import type { ComponentProps, HTMLTag } from 'astro/types' -import Box from './Box.astro' -import Button from './Button.astro' -import Card from './Card.astro' -import Root from './Root.astro' - -type Props = ComponentProps> & { - label?: string - icon?: string - position?: 'left' | 'right' -} - -const { - id = 'drawer', - frame = 'fill', - position = 'left', - label, - icon, - ...rest -} = Astro.props ---- - - - - - - - - - - diff --git a/src/components/Element.astro b/src/components/Element.astro new file mode 100644 index 000000000..44852b07a --- /dev/null +++ b/src/components/Element.astro @@ -0,0 +1,70 @@ +--- +const { + as: As = 'div', + show = 'content', + theme, + variant, + size, + align, + color, + position, + panel, + contrast, + structure, + level, + placement, + reverse, + open, + lead, + current, + direction, + center, + frame, + dark, + muted, + inset, + ...rest +} = Astro.props + +const slot = await Astro.slots.render('default') +const render = show === 'content' ? slot?.trim().length > 0 : show +--- + +{ + render && ( + + + + ) +} + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro deleted file mode 100644 index 3f5ef2e2b..000000000 --- a/src/components/Footer.astro +++ /dev/null @@ -1,144 +0,0 @@ ---- -import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types' -import Column from 'fulldev-ui/components/Column.astro' -import Heading from 'fulldev-ui/components/Heading.astro' -import Link from 'fulldev-ui/components/Link.astro' -import Root from 'fulldev-ui/components/Root.astro' -import Text from 'fulldev-ui/components/Text.astro' -import Logo from 'fulldev-ui/components/experimental/Logo.astro' - -type Props = Polymorphic<{ as: As }> & { - structure?: 'spread' | 'row' | 'split' | 'column' | 'stack' - variant?: 'base' | 'ghost' | 'subtle' | 'soft' | 'surface' | 'outline' - frame?: 'fill' | 'panel' | 'contain' | 'none' - align?: 'start' | 'center' | 'end' - size?: 'sm' | 'md' | 'lg' - theme?: 'light' | 'dark' - color?: 'base' | 'brand' - space?: 'none' | 'auto' - logo?: string - heading?: string - title?: string - description?: string - text?: string - html?: string - columns?: { - heading: string - links: ComponentProps>[] - }[] -} - -const { - as = 'footer', - space = 'auto', - variant = 'subtle', - frame = 'fill', - structure = 'grid', - size = 'sm', - logo, - heading, - columns, - text, - title, - description, - html, - ...rest -} = Astro.props ---- - - - - - - - - - - - { - columns?.map(({ heading, links }) => ( - - - {links.map((link) => ( - - ))} - - )) - } - - - diff --git a/src/components/Form.astro b/src/components/Form.astro new file mode 100644 index 000000000..1e589d9d7 --- /dev/null +++ b/src/components/Form.astro @@ -0,0 +1,51 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Input from 'fulldev-ui/components/Input.astro' +import Select from 'fulldev-ui/components/Select.astro' +import Textarea from 'fulldev-ui/components/Textarea.astro' + +interface Props extends HTMLAttributes<'form'> { + submit?: ComponentProps['text'] + fields?: + | ( + | ComponentProps + | ComponentProps + | (ComponentProps & { + type?: 'textarea' | undefined + }) + )[] + | undefined +} + +const { fields, submit, ...rest } = Astro.props +--- + + + { + fields?.map((field) => { + if ('options' in field) return + if ('type' in field && field.type === 'textarea') + return + return + }) + } + + + + + diff --git a/src/components/Gallery.astro b/src/components/Gallery.astro new file mode 100644 index 000000000..33ed3baa0 --- /dev/null +++ b/src/components/Gallery.astro @@ -0,0 +1,175 @@ +--- +// @ts-nocheck +import type { ComponentProps } from 'astro/types' +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Image from 'fulldev-ui/components/Image.astro' + +interface Props { + images?: + | (ComponentProps | ComponentProps['src'])[] + | undefined +} + +const { images } = Astro.props + +const hasMultiple = images?.length > 1 +const hasMany = images?.length > 5 +--- + + + + + + + + { + images?.map((image: any) => ( + + + + )) + } + + + + + + + { + images?.map((image: any) => ( + + + + )) + } + + + + + + diff --git a/src/components/Grid.astro b/src/components/Grid.astro deleted file mode 100644 index 545a189f9..000000000 --- a/src/components/Grid.astro +++ /dev/null @@ -1,32 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' -} - -const { ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Head.astro b/src/components/Head.astro index ceb649689..56b2e4089 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -1,21 +1,26 @@ --- import { AstroSeo } from '@astrolib/seo' -import type { CollectionEntry } from 'astro:content' -import { ViewTransitions } from 'astro:transitions' +import type { HTMLAttributes } from 'astro/types' +import type Image from 'fulldev-ui/components/Image.astro' +import type { ComponentProps } from 'svelte' -type Props = Partial> +type Props = HTMLAttributes<'head'> & { + title?: string | undefined + description?: string | undefined + image?: ComponentProps | undefined + theme?: 'light' | 'dark' | 'system' | undefined + favicon?: string | undefined + company?: string | undefined + scripts?: string[] | undefined + code?: string | undefined +} -const { data, render } = Astro.props -const { title, description, image, seo, code } = data || {} +const { theme, title, description, image, code, ...rest } = Astro.props -const renderTitle = render && (await render()).headings[0]?.text -const mergedTitle = seo?.title || title || renderTitle -const mergedDescription = seo?.description || description -const mergedImage = - seo?.image || image ? Astro.url.origin + (seo?.image || image) : undefined +const src = image?.src && Astro.url.origin + image.src --- - + - + - - - - - - - - - - + + + + diff --git a/src/components/Header.astro b/src/components/Header.astro deleted file mode 100644 index a3f92c2aa..000000000 --- a/src/components/Header.astro +++ /dev/null @@ -1,214 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import { getCollection } from 'astro:content' -import Button from 'fulldev-ui/components/Button.astro' -import Drawer from 'fulldev-ui/components/Drawer.astro' -import Logo from 'fulldev-ui/components/experimental/Logo.astro' -import Heading from 'fulldev-ui/components/Heading.astro' -import Link from 'fulldev-ui/components/Link.astro' -import Root from 'fulldev-ui/components/Root.astro' -import Row from 'fulldev-ui/components/Row.astro' -import Search from 'fulldev-ui/components/Search.astro' - -type Props = Polymorphic<{ as: As }> & { - structure?: 'spread' | 'row' | 'column' - position?: 'relative' | 'sticky' | 'fixed' | 'absolute' - variant?: 'ghost' | 'base' | 'subtle' | 'soft' | 'surface' | 'outline' - size?: 'sm' | 'md' | 'lg' - frame?: 'fill' | 'panel' - align?: 'start' | 'center' | 'end' - space?: 'none' | 'auto' - logo?: string - heading?: string - links?: any[] - buttons?: any[] - drawer?: any[] - search?: any -} - -const { - as = 'header', - align = 'center', - structure = 'spread', - space = 'auto', - size = 'sm', - frame = 'none', - logo, - heading, - links, - buttons, - drawer, - search, - ...rest -} = Astro.props - -const slug = Astro.url.pathname.replace(/^\/|\/$/g, '') -const url = Astro.url.href ---- - - - - - - - - { - links?.map((link) => ( - - )) - } - { - buttons?.map((button) => ( - - )) - } - {search && } - { - drawer && ( - - {drawer && - drawer.length > 0 && - drawer.map((item: any) => ( - <> - - {item.links?.map((link: any) => ( - - ))} - {item.folder && - (async () => { - const pages = await getCollection( - 'pages', - (entry: any) => - entry.slug.startsWith(item.folder) && - !entry.slug.endsWith(item.folder) - ) - return pages.map((page: any) => ( - - )) - })()} - > - ))} - - ) - } - - - - diff --git a/src/components/Heading.astro b/src/components/Heading.astro index f00085c19..47999ecae 100644 --- a/src/components/Heading.astro +++ b/src/components/Heading.astro @@ -1,81 +1,92 @@ --- -import type { Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' -type Props = - Polymorphic<{ - as: As - }> & { - level?: 1 | 2 | 3 | 4 | 5 | 6 - size?: 'sm' | 'md' | 'lg' - color?: 'base' | 'brand' - contrast?: boolean - html?: string - text?: string - } +interface Props + extends HTMLAttributes<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> { + as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | undefined + depth?: 1 | 2 | 3 | 4 | 5 | 6 | number | undefined + text?: string | undefined + size?: + | 'xs' + | 'sm' + | 'md' + | 'lg' + | 'xl' + | '2xl' + | '3xl' + | '4xl' + | '5xl' + | '6xl' + | undefined +} -const { - level = 2, - as = `h${level}`, - color = 'base', - contrast = true, - html, - text, - ...rest -} = Astro.props +const { depth = 2, as = `h${depth}`, text, ...rest } = Astro.props --- - - - - - - + + + + + diff --git a/src/components/Icon.astro b/src/components/Icon.astro index 129550f1b..926c815aa 100644 --- a/src/components/Icon.astro +++ b/src/components/Icon.astro @@ -1,55 +1,50 @@ --- import tablerIcons from '@iconify-json/tabler/icons.json' -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' -type Props = Polymorphic<{ as: As }> & { - name?: string - color?: 'base' | 'brand' +interface Props extends HTMLAttributes<'svg'> { + size?: 'sm' | 'md' | 'lg' | undefined + name?: string | undefined } -const { as = 'i', name, ...rest } = Astro.props +const { size = 'md', name, ...rest } = Astro.props -const trimmedName = name?.trim() as string | undefined +const trimmedName = name?.trim() const icon = trimmedName ? (tablerIcons as any)?.icons[trimmedName]?.body : undefined --- - - { - icon && ( - - ) - } - - - diff --git a/src/components/Image.astro b/src/components/Image.astro index 48c7d16ef..28bc5fd04 100644 --- a/src/components/Image.astro +++ b/src/components/Image.astro @@ -1,204 +1,48 @@ --- import type { HTMLAttributes } from 'astro/types' import { Image as AstroImage } from 'astro:assets' -import Root from 'fulldev-ui/components/Root.astro' -import { isString } from 'remeda' -type Props = HTMLAttributes<'img'> & { - position?: 'background' | 'cover' | 'inset' - ratio?: 'landscape' | 'portrait' | 'square' | number - frame?: 'inset' - width?: number | 1920 - height?: number | 1920 - radius?: 'none' | 'auto' | 'full' - mask?: 'sm' | 'md' | 'lg' +interface Props extends HTMLAttributes<'img'> { + src?: string | undefined + alt?: string | undefined + height?: number | undefined + width?: number | undefined } -function getAltBySrc(): string { - if (!isString(Astro.props.src)) return '' - const filename = Astro.props.src?.split('/').pop() +function getAltBySrc() { + if (!src) return + const filename = src?.split('/').pop() const slug = filename && filename.split('.')[0] const unslugged = slug?.replace(/-/g, ' ') return unslugged || '' } const { - loading = 'lazy', + src, alt = getAltBySrc(), - src = Astro.props.src, - position, - frame, - width, - radius = 'auto', - height, + height = 1920, + width = 1920, ...rest } = Astro.props - -// TODO get alt from image collection with yaml files -// const imageEntry = -// src && (await getEntry('images', src?.replace('/images/', ''))) --- { src && ( - <> - {!width && !height && ( - - )} - {width && height && ( - - )} - > + ) } - diff --git a/src/components/Input.astro b/src/components/Input.astro index be280444b..259175d6e 100644 --- a/src/components/Input.astro +++ b/src/components/Input.astro @@ -1,119 +1,118 @@ --- import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' import Icon from 'fulldev-ui/components/Icon.astro' import Label from 'fulldev-ui/components/Label.astro' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = HTMLAttributes<'input'> & { - variant?: 'outline' - color?: 'base' | 'brand' - label?: string - icon?: string - radius?: 'none' | 'auto' | 'full' + +interface Props extends HTMLAttributes<'input'> { + size?: 'sm' | 'md' | 'lg' | undefined + label?: string | undefined + icon?: string | undefined } const { - variant = 'outline', label, - icon, - value, - disabled, - required, - radius = 'auto', placeholder, - name = placeholder, + name = label || placeholder, + id = name, type = 'text', + size = 'md', + value, + icon, ...rest } = Astro.props --- - - + - - + - diff --git a/src/components/Link.astro b/src/components/Link.astro index 6f95d4f92..502d0f7dd 100644 --- a/src/components/Link.astro +++ b/src/components/Link.astro @@ -1,74 +1,68 @@ --- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' +import Icon from 'fulldev-ui/components/Icon.astro' -type Props = Polymorphic<{ as: As }> & { - underline?: 'auto' | 'always' | 'hover' | 'none' - size?: 'sm' | 'md' | 'lg' - color?: 'base' | 'brand' - contrast?: boolean - html?: string - text?: string +interface Props extends HTMLAttributes<'a'> { + variant?: 'primary' | 'underline' | 'muted' | undefined + size?: 'sm' | 'md' | 'lg' | undefined + text?: string | undefined + icon?: string | undefined } -const { html, text, as = 'a', underline = 'auto', ...rest } = Astro.props +const { variant = 'muted', size = 'md', text, icon, ...rest } = Astro.props --- - - - - - - + + + + - diff --git a/src/components/Masonry.astro b/src/components/Masonry.astro deleted file mode 100644 index b188180b5..000000000 --- a/src/components/Masonry.astro +++ /dev/null @@ -1,42 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' -} - -const { ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Menu.astro b/src/components/Menu.astro new file mode 100644 index 000000000..7bb4aaba8 --- /dev/null +++ b/src/components/Menu.astro @@ -0,0 +1,47 @@ +--- +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' +import Heading from 'fulldev-ui/components/Heading.astro' +import type Link from 'fulldev-ui/components/Link.astro' +import type { ComponentProps } from 'svelte' +import Links from './Links.astro' + +interface Props extends HTMLAttributes<'div'> { + size?: 'sm' | 'md' | 'lg' | undefined + heading?: string | undefined + links?: ComponentProps[] | undefined +} + +const { size = 'md', heading, links, ...rest } = Astro.props +--- + + + { + links && links.length > 0 && ( + + ) + } + + + + diff --git a/src/components/Menus.astro b/src/components/Menus.astro new file mode 100644 index 000000000..e5d2b02b1 --- /dev/null +++ b/src/components/Menus.astro @@ -0,0 +1,20 @@ +--- +import type { ComponentProps } from 'astro/types' +import Menu from 'fulldev-ui/components/Menu.astro' + +interface Props extends ComponentProps { + menu?: ComponentProps | undefined + menus?: ComponentProps[] | undefined +} + +const { menu, menus, ...rest } = Astro.props +--- + +{ + [menu, ...(menus || [])].filter(Boolean).map((menu) => ( + + )) +} diff --git a/src/components/Paragraph.astro b/src/components/Paragraph.astro new file mode 100644 index 000000000..7822dff0b --- /dev/null +++ b/src/components/Paragraph.astro @@ -0,0 +1,54 @@ +--- +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'p'> { + size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | undefined + muted?: boolean | undefined + text?: string | undefined +} + +const { text, ...rest } = Astro.props +--- + + + + + + + diff --git a/src/components/Price.astro b/src/components/Price.astro new file mode 100644 index 000000000..972de10be --- /dev/null +++ b/src/components/Price.astro @@ -0,0 +1,31 @@ +--- +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' +import { formatPrice } from 'fulldev-ui/utils/cart' + +interface Props extends HTMLAttributes<'div'> { + size?: 'sm' | 'md' | 'lg' | undefined + amount?: number | undefined +} + +const { amount, ...rest } = Astro.props +--- + + + {amount && } + + + diff --git a/src/components/Proof.astro b/src/components/Proof.astro new file mode 100644 index 000000000..3591d9c3d --- /dev/null +++ b/src/components/Proof.astro @@ -0,0 +1,52 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Avatars from 'fulldev-ui/components/Avatars.astro' +import Element from 'fulldev-ui/components/Element.astro' +import Label from 'fulldev-ui/components/Label.astro' +import Rating from 'fulldev-ui/components/Rating.astro' + +interface Props extends HTMLAttributes<'div'> { + avatar?: ComponentProps['avatar'] + avatars?: ComponentProps['avatars'] + rating?: number | undefined + text?: string | undefined +} + +const { avatar, avatars, rating, text, ...rest } = Astro.props +--- + + + + + + + + + + diff --git a/src/components/Rating.astro b/src/components/Rating.astro index d5f976804..3a32be28c 100644 --- a/src/components/Rating.astro +++ b/src/components/Rating.astro @@ -1,88 +1,55 @@ --- import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' import Icon from 'fulldev-ui/components/Icon.astro' -import Root from 'fulldev-ui/components/Root.astro' -import Avatar from './Avatar.astro' -import Column from './Column.astro' -import Label from './Label.astro' -type Props = HTMLAttributes<'div'> & { - color?: 'base' | 'brand' - align?: 'start' | 'center' | 'end' - value?: number - size?: string - label?: string - avatars?: string[] - avatar?: string +interface Props extends HTMLAttributes<'div'> { + size?: 'sm' | 'md' | 'lg' | undefined + score?: number | undefined } -const { value, label, avatars, avatar, align, ...rest } = Astro.props +const { size = 'md', score, ...rest } = Astro.props const getIcon = (count: number) => { - if (!value) return - const difference = value - count + if (!score) return + const difference = score - count if (difference >= -0.25) return 'star-filled' if (difference >= -0.75) return 'star-half-filled' return 'star' } - -const hasAvatars = avatars && avatars?.length > 0 --- - { - [avatar, ...(avatars ?? [])]?.filter(Boolean)?.map((avatar) => ( - - )) + score && + [1, 2, 3, 4, 5].map((count) => ( + + )) } - - - { - value && - [1, 2, 3, 4, 5].map((_, i) => ( - - )) - } - - - - + - diff --git a/src/components/Root.astro b/src/components/Root.astro deleted file mode 100644 index e858fa4d1..000000000 --- a/src/components/Root.astro +++ /dev/null @@ -1,94 +0,0 @@ ---- -import type { HTMLTag } from 'astro/types' - -type Props = { - as?: As - slot?: any - if?: 'content' | any - [key: string | number | symbol]: any -} - -const { - as: As = 'div', - if: ifProp = 'content', - space, - theme, - variant, - underline, - density, - size, - align, - justify, - color, - position, - frame, - ratio, - contrast, - structure, - text, - html, - radius, - level, - mask, - reverse, - lead, - ...rest -} = Astro.props - -const slot = await Astro.slots.render('default') -const hasContent = (str?: string) => - typeof str === 'string' && str.trim().length > 0 -const render = - ifProp == 'content' - ? hasContent(slot) || hasContent(html) || hasContent(text) - : ifProp ---- - -{ - render && ( - - - - ) -} - - diff --git a/src/components/Row.astro b/src/components/Row.astro deleted file mode 100644 index a7bf4f2c4..000000000 --- a/src/components/Row.astro +++ /dev/null @@ -1,49 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' - align?: 'start' | 'center' | 'end' - space?: 'none' | 'auto' -} - -const { space = 'auto', align = 'center', ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Search.astro b/src/components/Search.astro index 027b764c7..27c8581c0 100644 --- a/src/components/Search.astro +++ b/src/components/Search.astro @@ -1,62 +1,118 @@ --- -import Pagefind from 'astro-pagefind/components/Search' -import Dialog from './Dialog.astro' +import { getCollection } from 'astro:content' +import { getHref } from 'fulldev-ui/utils/getHref' +import Button from './Button.astro' +import Element from './Element.astro' +import Heading from './Heading.astro' +import Input from './Input.astro' +import Paragraph from './Paragraph.astro' -const { variant = 'secondary', icon, ...rest } = Astro.props +const pages = await getCollection('pages') --- - + document.addEventListener('astro:page-load', () => { + const input = document.querySelector('.search-input') + const items = document.querySelectorAll('.search-item') + + input?.addEventListener('input', (e) => { + if (!(e.target instanceof HTMLInputElement)) return + const value = e.target.value.toLowerCase() + items.forEach((item) => { + if (!(item instanceof HTMLElement)) return + + const title = + item.querySelector('.heading')?.textContent?.toLowerCase() || '' + const description = + item.querySelector('.paragraph')?.textContent?.toLowerCase() || '' + + const isVisible = title.includes(value) || description.includes(value) + item.classList.toggle('hide', !isVisible) + }) + }) + }) + + + + + - - - - diff --git a/src/components/Section.astro b/src/components/Section.astro deleted file mode 100644 index 46e61fd68..000000000 --- a/src/components/Section.astro +++ /dev/null @@ -1,294 +0,0 @@ ---- -import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types' -import type { CollectionEntry } from 'astro:content' -import Badge from 'fulldev-ui/components/Badge.astro' -import Box from 'fulldev-ui/components/Box.astro' -import Button from 'fulldev-ui/components/Button.astro' -import Card from 'fulldev-ui/components/Card.astro' -import Column from 'fulldev-ui/components/Column.astro' -import Heading from 'fulldev-ui/components/Heading.astro' -import Image from 'fulldev-ui/components/Image.astro' -import List from 'fulldev-ui/components/List.astro' -import Rating from 'fulldev-ui/components/Rating.astro' -import Root from 'fulldev-ui/components/Root.astro' -import Text from 'fulldev-ui/components/Text.astro' -import Wrap from 'fulldev-ui/components/Wrap.astro' -import Tagline from './Tagline.astro' - -type Props = Polymorphic<{ as: As }> & { - position?: 'background' | 'cover' | 'inset' - ratio?: 'landscape' | 'portrait' | 'square' | number - mask?: 'sm' | 'md' | 'lg' - buttons?: ComponentProps>[] - button?: ComponentProps> - cards?: ComponentProps>[] - badge?: string | ComponentProps> - image?: ComponentProps['src'] - rating?: number - pages?: CollectionEntry<'pages'>['data'][] - records?: CollectionEntry<'records'>['data'][] - heading?: string - title?: string - text?: string - html?: string - description?: string - label?: string - tagline?: string - list?: string[] - theme?: 'light' | 'dark' - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' - frame?: 'none' | 'fill' | 'panel' - align?: 'start' | 'center' | 'end' - justify?: 'start' | 'center' | 'end' - structure?: - | 'column' - | 'split' - | 'spread' - | 'carousel' - | 'grid' - | 'masonry' - | 'stack' - level?: 1 | 2 | 3 | 4 | 5 | 6 - space?: 'auto' | 'none' - reverse?: 'odd' | 'even' - variant?: 'primary' | 'secondary' | 'tertiary' -} - -const { - as = 'section', - space = 'auto', - frame = 'none', - structure = 'column', - variant = 'secondary', - align = 'start', - level = 2, - position, - label, - heading, - badge, - title, - text, - list, - html, - tagline, - description, - buttons, - image, - rating, - size, - button, - cards, - pages, - records, - mask, - justify, - theme, - ratio, - ...rest -} = Astro.props - -const mergedCards = (pages || records || cards)?.filter(Boolean) -const hasCards = mergedCards && mergedCards?.length > 0 -const hasText = text || html || description || list -const hasButton = button || (buttons && buttons?.length > 0) - -const buttonVariant = (i: number) => { - if (variant === 'primary' && i === 0) return 'primary' - else if (variant === 'primary' && i === 1) return 'secondary' - else if (variant === 'primary' && i > 1) return 'tertiary' - else if (variant === 'secondary' && i === 0) return 'secondary' - else if (variant === 'secondary' && i > 0) return 'tertiary' - else if (variant === 'tertiary') return 'tertiary' -} ---- - - - - - - - - - - - - - - - - - { - [button, ...(buttons ?? [])] - .filter(Boolean) - ?.map((button: any, i: number) => ( - - )) - } - - - - - - - - { - mergedCards?.map(({ ...rest }: any) => ( - - )) - } - - - - - - - diff --git a/src/components/Select.astro b/src/components/Select.astro index 69e8be418..46eace0ec 100644 --- a/src/components/Select.astro +++ b/src/components/Select.astro @@ -1,52 +1,50 @@ --- import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' import Icon from 'fulldev-ui/components/Icon.astro' import Label from 'fulldev-ui/components/Label.astro' -import Root from 'fulldev-ui/components/Root.astro' -type Props = HTMLAttributes<'select'> & { - color?: 'base' | 'brand' - label?: string - placeholder?: string - options?: string[] - value?: string - radius?: 'none' | 'auto' | 'full' - variant?: 'outline' +interface Props extends HTMLAttributes<'select'> { + show?: any + label?: string | undefined + placeholder?: string | undefined + options?: string[] | undefined + value?: string | undefined } const { label, placeholder, + name = label || placeholder, + id = name, + size = 'md', options, value, - name, - required, - radius = 'auto', - disabled, - variant = 'outline', ...rest } = Astro.props --- - - + - { options?.map((option: any) => ( - - - - + + - diff --git a/src/components/Sidebar.astro b/src/components/Sidebar.astro deleted file mode 100644 index cd5a3684a..000000000 --- a/src/components/Sidebar.astro +++ /dev/null @@ -1,74 +0,0 @@ ---- -import { getCollection } from 'astro:content' -import Column from 'fulldev-ui/components/Column.astro' -import Heading from 'fulldev-ui/components/Heading.astro' -import Link from 'fulldev-ui/components/Link.astro' - -const { sidebar } = Astro.props -const slug = Astro.url.pathname.replace(/^\/|\/$/g, '') -const url = Astro.url.href ---- - - - { - sidebar?.length > 0 && - sidebar.map((item: any) => ( - <> - - {item.links?.map((link: any) => ( - - ))} - {item.folder && - (async () => { - const pages = await getCollection( - 'pages', - (entry: any) => - entry.slug.startsWith(item.folder) && - !entry.slug.endsWith(item.folder) - ) - return pages.map((page: any) => ( - - )) - })()} - > - )) - } - - - diff --git a/src/components/Social.astro b/src/components/Social.astro new file mode 100644 index 000000000..a7e3d4b81 --- /dev/null +++ b/src/components/Social.astro @@ -0,0 +1,39 @@ +--- +import type { ComponentProps } from 'astro/types' +import Button from 'fulldev-ui/components/Button.astro' + +interface Props extends ComponentProps {} + +const { + variant = 'ghost', + target = '_blank', + size = 'sm', + icon, + href, + ...rest +} = Astro.props + +const platform = () => { + if (typeof href !== 'string') return + if (href.includes('x.com')) return 'brand-x' + if (href.includes('facebook')) return 'brand-facebook' + if (href.includes('instagram')) return 'brand-instagram' + if (href.includes('linkedin')) return 'brand-linkedin' + if (href.includes('youtube')) return 'brand-youtube' + if (href.includes('tiktok')) return 'brand-tiktok' + if (href.includes('twitch')) return 'brand-twitch' + if (href.includes('github')) return 'brand-github' + if (href.includes('discord')) return 'brand-discord' + return undefined +} +--- + + diff --git a/src/components/Socials.astro b/src/components/Socials.astro new file mode 100644 index 000000000..c8e6370a4 --- /dev/null +++ b/src/components/Socials.astro @@ -0,0 +1,25 @@ +--- +import type { ComponentProps } from 'astro/types' +import Social from 'fulldev-ui/components/Social.astro' + +interface Props extends ComponentProps { + social?: + | ComponentProps + | ComponentProps['href'] + | undefined + socials?: + | (ComponentProps | ComponentProps['href'])[] + | undefined +} + +const { social, socials, ...rest } = Astro.props +--- + +{ + [social, ...(socials || [])].filter(Boolean).map((social) => ( + + )) +} diff --git a/src/components/Split.astro b/src/components/Split.astro deleted file mode 100644 index ffdfefb51..000000000 --- a/src/components/Split.astro +++ /dev/null @@ -1,59 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' - align?: 'start' | 'center' | 'end' - space?: 'none' | 'auto' -} - -const { space = 'auto', align = 'center', ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Spread.astro b/src/components/Spread.astro deleted file mode 100644 index 9d6cb1df9..000000000 --- a/src/components/Spread.astro +++ /dev/null @@ -1,46 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' - align?: 'start' | 'center' | 'end' -} - -const { align = 'center', ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Stack.astro b/src/components/Stack.astro deleted file mode 100644 index c2cfdf5f0..000000000 --- a/src/components/Stack.astro +++ /dev/null @@ -1,36 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - size?: 'sm' | 'md' | 'lg' -} - -const { ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/Switch.astro b/src/components/Switch.astro index 8c965ebf3..b5a45a6ed 100644 --- a/src/components/Switch.astro +++ b/src/components/Switch.astro @@ -1,114 +1,84 @@ --- -import type { Polymorphic } from 'astro/types' +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' import Label from 'fulldev-ui/components/Label.astro' -import Root from 'fulldev-ui/components/Root.astro' -type Props = Polymorphic<{ as: As }> & { - color?: 'base' | 'brand' - true?: string - false?: string - trueLabel?: string - falseLabel?: string - name: string - checked: boolean +interface Props extends Omit, 'type'> { + label?: ComponentProps['text'] + size?: 'sm' | 'md' | 'lg' } -const { - as = 'div', - name, - checked, - trueLabel, - falseLabel, - ...rest -} = Astro.props +const { label, name = label, id = name, size = 'md', ...rest } = Astro.props --- - - + - - - - - + - diff --git a/src/components/Text.astro b/src/components/Text.astro deleted file mode 100644 index 8d29b53a9..000000000 --- a/src/components/Text.astro +++ /dev/null @@ -1,45 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - size?: 'sm' | 'md' | 'lg' - color?: 'base' | 'brand' - contrast?: boolean - lead?: boolean - html?: string - text?: string -} - -const { as = 'p', color = 'base', html, text, ...rest } = Astro.props ---- - - - - - - - - - diff --git a/src/components/Textarea.astro b/src/components/Textarea.astro index 4305108f8..0e2f4c61c 100644 --- a/src/components/Textarea.astro +++ b/src/components/Textarea.astro @@ -1,105 +1,81 @@ --- import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' import Label from 'fulldev-ui/components/Label.astro' -import Root from 'fulldev-ui/components/Root.astro' -type Props = HTMLAttributes<'textarea'> & { - radius?: 'none' | 'auto' - color?: 'base' | 'brand' - variant?: 'outline' - label?: string +interface Props extends HTMLAttributes<'textarea'> { + size?: 'sm' | 'md' | 'lg' | undefined + label?: string | undefined } const { - placeholder, - name = placeholder, - variant = 'outline', - radius = 'auto', label, - rows, - value, - disabled, - required, + placeholder, + name = label || placeholder, + id = name, + size = 'md', + rows = 3, ...rest } = Astro.props --- - - - + - diff --git a/src/components/Toc.astro b/src/components/Toc.astro index afab938cd..274172343 100644 --- a/src/components/Toc.astro +++ b/src/components/Toc.astro @@ -1,75 +1,58 @@ --- -import Column from 'fulldev-ui/components/Column.astro' +import type { MarkdownHeading } from 'astro' +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' import Link from 'fulldev-ui/components/Link.astro' -import Card from './Card.astro' -import Heading from './Heading.astro' +import Links from './Links.astro' -const { toc, headings } = Astro.props +interface Props extends HTMLAttributes<'div'> { + size?: 'sm' | 'md' | 'lg' | undefined + heading?: string | undefined + headings?: MarkdownHeading[] | undefined +} + +const { size = 'md', heading, headings, ...rest } = Astro.props + +const filteredHeadings = headings?.filter((heading: any) => heading.depth <= 4) + +const links = filteredHeadings?.map((button: any) => ({ + text: button.text, + href: `#${button.slug}`, + class: `depth-${button.depth}`, +})) --- - - { - toc?.length && headings?.length > 0 && ( - <> - - {headings.map( - (heading: { slug: string; depth: number; text: string }) => ( - - ) - )} - - > - ) - } - + + - + + diff --git a/src/components/Toggle.astro b/src/components/Toggle.astro index 744639a9d..84a10b000 100644 --- a/src/components/Toggle.astro +++ b/src/components/Toggle.astro @@ -32,14 +32,13 @@ const { id = uid(7), toggled, name, ...rest } = Astro.props {...rest} /> - diff --git a/src/components/_Breadcrumb.astro b/src/components/_Breadcrumb.astro new file mode 100644 index 000000000..2959391e6 --- /dev/null +++ b/src/components/_Breadcrumb.astro @@ -0,0 +1,58 @@ + diff --git a/src/components/_Image.astro b/src/components/_Image.astro new file mode 100644 index 000000000..2419bae7c --- /dev/null +++ b/src/components/_Image.astro @@ -0,0 +1,79 @@ + diff --git a/src/components/_LocaleSwitcher.astro b/src/components/_LocaleSwitcher.astro new file mode 100644 index 000000000..61ca7df04 --- /dev/null +++ b/src/components/_LocaleSwitcher.astro @@ -0,0 +1,25 @@ +--- +import Select from 'fulldev-ui/components/Select.astro' +--- + +{ + Astro.props.locales && ( + + ) +} + + diff --git a/src/components/docs/DecorativeBox.astro b/src/components/docs/DecorativeBox.astro deleted file mode 100644 index 2aab1f13f..000000000 --- a/src/components/docs/DecorativeBox.astro +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/src/components/docs/NavigationButtons.astro b/src/components/docs/NavigationButtons.astro deleted file mode 100644 index 892bf85e4..000000000 --- a/src/components/docs/NavigationButtons.astro +++ /dev/null @@ -1,59 +0,0 @@ ---- -import { getCollection } from 'astro:content' -import Button from 'fulldev-ui/components/Button.astro' -import Section from '../Section.astro' -import Spread from '../Spread.astro' - -const { sidebar = [] } = Astro.props - -const allPages = await getCollection('pages') -const pages = [] - -for (const item of sidebar as any) { - if (item.links) pages.push(...item.links) - if (item.folder) { - const folderPages = allPages.filter( - (page: any) => - page.slug.startsWith(item.folder) && !page.slug.endsWith(item.folder) - ) - pages.push( - ...folderPages.map((page: any) => ({ - href: `/${page.slug}`, - text: page.data.title, - })) - ) - } -} - -const withoutLeadingOrTrailingSlashes = (path: string) => - path.replace(/^\/+|\/+$/g, '') - -const currentIndex = pages.findIndex( - (page: any) => - withoutLeadingOrTrailingSlashes(page?.href) === - withoutLeadingOrTrailingSlashes(Astro.url.pathname) -) - -const prevPage = pages[currentIndex - 1] -const nextPage = pages[currentIndex + 1] ---- - -{ - sidebar && sidebar.length > 0 && ( - - - - - - - ) -} diff --git a/src/components/docs/Props.astro b/src/components/docs/Props.astro new file mode 100644 index 000000000..59a3090ec --- /dev/null +++ b/src/components/docs/Props.astro @@ -0,0 +1,21 @@ +--- +import Link from 'fulldev-ui/components/Link.astro' + +const slug = Astro.params.page +const folder = slug?.split('/').slice(-2, -1)[0] +const component = slug + ?.split('/') + .pop() + ?.replace(/^\w/, (c) => c.toUpperCase()) +const path = `src/${folder}/${component}.astro` +--- + + + Please reference + + {path} + for now. + diff --git a/src/components/docs/PropsTable.astro b/src/components/docs/PropsTable.astro deleted file mode 100644 index 2c191a4ca..000000000 --- a/src/components/docs/PropsTable.astro +++ /dev/null @@ -1,102 +0,0 @@ ---- -import Table from 'fulldev-ui/components/Table.astro' -import { readFileSync } from 'node:fs' - -const pathnameWithoutTrailingSlash = Astro.url.pathname.replace(/\/$/, '') -const slug = pathnameWithoutTrailingSlash.split('/').pop() || '' -const component = slug.charAt(0).toUpperCase() + slug.slice(1) - -const allComponents = await Astro.glob('../../components/**/*.astro') -const found = allComponents.find( - (c) => c.file.split('/').pop()?.replace('.astro', '') === component -) - -if (!found) return - -const componentFileContent = readFileSync(found.file, 'utf-8') - -const extractProps = (content: string) => { - const propsMatch = content.match( - /type Props(?:<[^>]+>)?\s*=\s*(?:HTMLAttributes<'[^']+'>\s*&\s*)?(?:Polymorphic<[^>]+>\s*&\s*)?([\s\S]*?)(?:}|$)/ - ) - if (propsMatch) { - const propsContent = propsMatch[1] - const props = [ - ...propsContent.matchAll(/(\w+)(?:\??:\s*((?:[^;\n]|\n\s*\|)*)|,)/g), - ].map(([, name, type]) => ({ - name, - type: type - ? type - .replace(/^\s*\|\s*/, '') - .trim() - .replace(/\n\s*\|/g, ' | ') - : 'unknown', - })) - return props - } - return [] -} - -const extractDefaultProps = (content: string) => { - const defaultPropsMatch = content.match( - /const\s*{[\s\S]*?}\s*=\s*Astro\.props/ - ) - return defaultPropsMatch - ? [ - ...defaultPropsMatch[0].matchAll( - /(\w+)\s*=\s*('[^']*'|"[^"]*"|[^,\n]+)/g - ), - ].reduce( - (acc, [, name, value]) => { - acc[name] = - value.startsWith("'") || value.startsWith('"') - ? value.slice(1, -1) - : value - return acc - }, - {} as Record - ) - : {} -} - -const extractAsDefault = (content: string) => { - const asDefaultMatch = content.match(/as\s*=\s*([^,\n]+)/) - return asDefaultMatch - ? asDefaultMatch[1] - .trim() - .split(' : ')[0] - .replace(/['"]/g, '') - .replace(/href \? a : /, '') - .replace(/href \? 'a' : /, '') - : 'div' -} - -const parsedProps = extractProps(componentFileContent) -const parsedAstroProps = extractDefaultProps(componentFileContent) -const asDefault = extractAsDefault(componentFileContent) ---- - - [ - item.name, - item.type, - parsedAstroProps[item.name] ?? '-', - ]), - ...(asDefault !== 'div' - ? [ - ['as', 'HTMLTag', asDefault], - ['HTML Attributes', `Polymorphic<${asDefault}>`, '-'], - ] - : []), - ]} -/> - - diff --git a/src/components/experimental/Channel.astro b/src/components/experimental/Channel.astro deleted file mode 100644 index 25d65165c..000000000 --- a/src/components/experimental/Channel.astro +++ /dev/null @@ -1,74 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Button from 'fulldev-ui/components/Button.astro' -import Column from 'fulldev-ui/components/Column.astro' -import Heading from 'fulldev-ui/components/Heading.astro' -import Text from 'fulldev-ui/components/Text.astro' -import Root from '../Root.astro' - -type Props = Polymorphic<{ as: As }> & { - if?: any - size?: 'sm' | 'md' | 'lg' - color?: 'base' | 'brand' - variant?: 'primary' | 'secondary' | 'tertiary' - structure?: 'row' | 'column' - level?: 1 | 2 | 3 | 4 | 5 | 6 - heading?: string - text?: string - icon?: string - href?: string - target?: string -} - -const { - variant = 'secondary', - structure = 'row', - color = 'brand', - level = 5, - heading, - target, - text, - icon, - href, - ...rest -} = Astro.props ---- - - - - - - - - - - diff --git a/src/components/experimental/Form.astro b/src/components/experimental/Form.astro deleted file mode 100644 index 5898689e9..000000000 --- a/src/components/experimental/Form.astro +++ /dev/null @@ -1,34 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - structure?: 'column' | 'row' | 'group' - space?: 'none' | 'auto' -} - -const { - as = 'form', - space = 'auto', - structure = 'column', - ...rest -} = Astro.props ---- - - - - - - diff --git a/src/components/experimental/Gallery.astro b/src/components/experimental/Gallery.astro deleted file mode 100644 index 6a9dab476..000000000 --- a/src/components/experimental/Gallery.astro +++ /dev/null @@ -1,180 +0,0 @@ ---- -import Icon from 'fulldev-ui/components/Icon.astro' -import Image from 'fulldev-ui/components/Image.astro' - -const { images, direction } = Astro.props ---- - - - - - - - { - images?.map((image: any) => ( - - )) - } - - { - images?.length > 1 && ( - - ) - } - - - { - images?.length > 1 && - images.map((image: any) => ( - - )) - } - - - - diff --git a/src/components/experimental/GalleryVertical.astro b/src/components/experimental/GalleryVertical.astro deleted file mode 100644 index edf42b23e..000000000 --- a/src/components/experimental/GalleryVertical.astro +++ /dev/null @@ -1,161 +0,0 @@ ---- -import Icon from 'fulldev-ui/components/Icon.astro' -import Image from 'fulldev-ui/components/Image.astro' - -const { images, direction } = Astro.props ---- - - - - - - - { - images?.map((image: any) => ( - - )) - } - - { - images?.length > 1 && ( - - ) - } - - - { - images?.length > 1 && - images.map((image: any) => ( - - )) - } - - - - diff --git a/src/components/experimental/Logo.astro b/src/components/experimental/Logo.astro deleted file mode 100644 index ea3b5a310..000000000 --- a/src/components/experimental/Logo.astro +++ /dev/null @@ -1,21 +0,0 @@ ---- -import type { ComponentProps } from 'astro/types' -import Image from 'fulldev-ui/components/Image.astro' - -type Props = Omit, 'position' | 'frame'> & {} - -const { ...rest } = Astro.props ---- - - - - diff --git a/src/components/experimental/Price.astro b/src/components/experimental/Price.astro deleted file mode 100644 index 818672568..000000000 --- a/src/components/experimental/Price.astro +++ /dev/null @@ -1,40 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> & { - size?: 'sm' | 'md' | 'lg' - color?: 'base' | 'brand' - contrast?: boolean - value?: number -} - -const { as = 'p', value, ...rest } = Astro.props ---- - -{ - value && ( - - €{value?.toFixed(2).replace('.', ',')} - - ) -} - - diff --git a/src/components/experimental/Prose.astro b/src/components/experimental/Prose.astro deleted file mode 100644 index 06390bf51..000000000 --- a/src/components/experimental/Prose.astro +++ /dev/null @@ -1,156 +0,0 @@ ---- -import type { HTMLTag, Polymorphic } from 'astro/types' -import Root from 'fulldev-ui/components/Root.astro' - -type Props = Polymorphic<{ as: As }> - -const { as = 'div', ...rest } = Astro.props ---- - - - - - - diff --git a/src/components/experimental/Video.astro b/src/components/experimental/Video.astro deleted file mode 100644 index 0fbe679ca..000000000 --- a/src/components/experimental/Video.astro +++ /dev/null @@ -1,32 +0,0 @@ - diff --git a/src/components/experimental/Window.astro b/src/components/experimental/Window.astro deleted file mode 100644 index d982b63b9..000000000 --- a/src/components/experimental/Window.astro +++ /dev/null @@ -1,175 +0,0 @@ ---- -import Button from 'fulldev-ui/components/Button.astro' - -const { componentProps } = Astro.props - -const randomId = Math.random().toString(36).substring(2, 15) -const id = componentProps.title?.toLowerCase().replace(/ /g, '-') ?? randomId - -const isComponent = - Astro.url.pathname.includes('components/') || - Astro.url.pathname.includes('frameworks') || - Astro.url.pathname.includes('base/') || - Astro.url.pathname.includes('typography/') || - Astro.url.pathname.includes('segment/') ---- - -{ - isComponent ? ( - - - - - - - - - ) : ( - - - - Preview / Code - - - - - - - - - - - ) -} - - diff --git a/src/content/config.ts b/src/content/config.ts index 0905b79b9..2fcdf6fcc 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,17 +1,18 @@ import { defineCollection } from 'astro:content' -import { page } from 'fulldev-ui/schemas/page' +import { cardSchema } from 'fulldev-ui/schemas/card.ts' +import { pageSchema } from 'fulldev-ui/schemas/page.ts' export const collections = { pages: defineCollection({ type: 'content', - schema: page, + schema: pageSchema, }), - records: defineCollection({ + layouts: defineCollection({ type: 'data', - schema: page, + schema: pageSchema, }), - settings: defineCollection({ + records: defineCollection({ type: 'data', - schema: page, + schema: cardSchema, }), } diff --git a/src/content/layouts/base.yml b/src/content/layouts/base.yml new file mode 100644 index 000000000..4df78bc3f --- /dev/null +++ b/src/content/layouts/base.yml @@ -0,0 +1,165 @@ +head: + title: Fulldev UI - Astro component and block library, open-source + image: + src: /images/og-image.png + theme: system + code: | + + +banner: + text: 'Introducing v0.6: build complete websites 🎉' + +header: + search: true + themer: true + logo: + image: /favicon/android-chrome-512x512.png + text: Fulldev UI + links: + - text: Docs + href: /docs/ + - text: Components + href: /docs/components/badge/ + - text: Structures + href: /docs/structures/container/ + - text: Blocks + href: /docs/blocks/banner/ + socials: + - https://github.com/fulldotdev/ui + - https://discord.gg/vXZqMbadm8 + +menus: + - heading: Get Started + links: + - text: Introduction + href: /docs/ + - text: Installation + href: /docs/installation/ + - text: Customization + href: /docs/customization/ + - text: Integrating frameworks + href: /docs/frameworks/ + - text: Using components + href: /docs/components/ + - text: Using structures + href: /docs/structures/ + - text: Using blocks + href: /docs/blocks/ + - heading: Components + links: + - text: Avatar + href: /docs/components/avatar/ + - text: Badge + href: /docs/components/badge/ + - text: Badges + href: /docs/components/badges/ + - text: Button + href: /docs/components/button/ + - text: Buttons + href: /docs/components/buttons/ + - text: Channel + href: /docs/components/channel/ + - text: Channels + href: /docs/components/channels/ + - text: Checkbox + href: /docs/components/checkbox/ + - text: Chip + href: /docs/components/chip/ + - text: Heading + href: /docs/components/heading/ + - text: Icon + href: /docs/components/icon/ + - text: Image + href: /docs/components/image/ + - text: Input + href: /docs/components/input/ + - text: Label + href: /docs/components/label/ + - text: Link + href: /docs/components/link/ + - text: Links + href: /docs/components/links/ + - text: List + href: /docs/components/list/ + - text: Logo + href: /docs/components/logo/ + - text: Menu + href: /docs/components/menu/ + - text: Paragraph + href: /docs/components/paragraph/ + - text: Rating + href: /docs/components/rating/ + - text: Select + href: /docs/components/select/ + - text: Social + href: /docs/components/social/ + - text: Socials + href: /docs/components/socials/ + - text: Switch + href: /docs/components/switch/ + - text: Tagline + href: /docs/components/tagline/ + - text: Textarea + href: /docs/components/textarea/ + - heading: Structures + links: + - text: Card + href: /docs/structures/card/ + - text: Carousel + href: /docs/structures/carousel/ + - text: Code + href: /docs/structures/code/ + - text: Container + href: /docs/structures/container/ + - text: Drawer + href: /docs/structures/drawer/ + - text: Group + href: /docs/structures/group/ + - text: Layout + href: /docs/structures/layout/ + - text: Masonry + href: /docs/structures/masonry/ + - text: Matrix + href: /docs/structures/matrix/ + - text: Panel + href: /docs/structures/panel/ + - text: Prose + href: /docs/structures/prose/ + - text: Section + href: /docs/structures/section/ + - text: Sidebar + href: /docs/structures/sidebar/ + - text: Split + href: /docs/structures/split/ + - text: Stack + href: /docs/structures/stack/ + - heading: Blocks + links: + - text: Banner + href: /docs/blocks/banner/ + - text: Colleagues + href: /docs/blocks/colleagues/ + - text: Content + href: /docs/blocks/content/ + - text: Cta + href: /docs/blocks/cta/ + - text: Features + href: /docs/blocks/features/ + - text: Footer + href: /docs/blocks/footer/ + - text: Header + href: /docs/blocks/header/ + - text: Hero + href: /docs/blocks/hero/ + - text: Intro + href: /docs/blocks/intro/ + - text: Logos + href: /docs/blocks/logos/ + - text: Reviews + href: /docs/blocks/reviews/ + - text: Projects + href: /docs/blocks/projects/ diff --git a/src/content/pages/_base/toggle.mdx b/src/content/pages/_base/toggle.mdx new file mode 100644 index 000000000..ec27d302c --- /dev/null +++ b/src/content/pages/_base/toggle.mdx @@ -0,0 +1,28 @@ +--- +_block: Content7 +title: Toggle +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Toggle from 'fulldev-ui/components/Toggle.astro' +--- + + +``` + +## Props + + + +## Examples + +```astro live +--- +import Toggle from 'fulldev-ui/components/Toggle.astro' +--- + + +``` diff --git a/src/content/pages/_changelog.mdx b/src/content/pages/_changelog.mdx deleted file mode 100644 index aaafce824..000000000 --- a/src/content/pages/_changelog.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -_layout: PostLayout -settings: components -title: Changelog -description: What's new in Fulldev UI ---- - -import ChangeLog from '../../../CHANGELOG.md' - - diff --git a/src/content/pages/_posts/post.md b/src/content/pages/_posts/post.md new file mode 100644 index 000000000..b5f0d35a8 --- /dev/null +++ b/src/content/pages/_posts/post.md @@ -0,0 +1,7 @@ +--- +title: Post +description: Lorem ipsum dolor sit +--- + + + diff --git a/src/content/pages/_segment/footer.mdx b/src/content/pages/_segment/footer.mdx deleted file mode 100644 index 92c18d2d4..000000000 --- a/src/content/pages/_segment/footer.mdx +++ /dev/null @@ -1,244 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Footer ---- - -# Footer - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Footer from 'fulldev-ui/components/Footer.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import Footer from 'fulldev-ui/components/Footer.astro' ---- - - - - - - - - -``` - -```astro live ---- -import Footer from 'fulldev-ui/components/Footer.astro' ---- - - - - - - - - -``` - -```astro live ---- -import Footer from 'fulldev-ui/components/Footer.astro' ---- - - - - -``` diff --git a/src/content/pages/_segment/header.mdx b/src/content/pages/_segment/header.mdx deleted file mode 100644 index 2b00257b4..000000000 --- a/src/content/pages/_segment/header.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Header ---- - -# Header - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - - - - -``` - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - - - - - -``` - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - - - -``` diff --git a/src/content/pages/_showcase/anti-slip-profiles.md b/src/content/pages/_showcase/anti-slip-profiles.md new file mode 100644 index 000000000..c40442145 --- /dev/null +++ b/src/content/pages/_showcase/anti-slip-profiles.md @@ -0,0 +1,5 @@ +--- +title: Anti Slip Profiles +image: 'anti-slip-profiles.webp' +slug: 'https://antislipprofiles.com' +--- diff --git a/src/content/pages/_showcase/fulldev-ui.md b/src/content/pages/_showcase/fulldev-ui.md new file mode 100644 index 000000000..58754a92e --- /dev/null +++ b/src/content/pages/_showcase/fulldev-ui.md @@ -0,0 +1,5 @@ +--- +title: Fulldev UI +image: fulldev-ui.webp +href: 'https://ui.ull.dev' +--- \ No newline at end of file diff --git a/src/content/pages/_showcase/lavis-detailing.md b/src/content/pages/_showcase/lavis-detailing.md new file mode 100644 index 000000000..52cf45339 --- /dev/null +++ b/src/content/pages/_showcase/lavis-detailing.md @@ -0,0 +1,5 @@ +--- +title: Lavis Detailing +image: lavis-detailing.webp +href: 'https://lavisdetailing.nl' +--- \ No newline at end of file diff --git a/src/content/pages/_showcase/leren-trainingsacteren.md b/src/content/pages/_showcase/leren-trainingsacteren.md new file mode 100644 index 000000000..4cb0b83a3 --- /dev/null +++ b/src/content/pages/_showcase/leren-trainingsacteren.md @@ -0,0 +1,5 @@ +--- +title: Leren Trainingsacteren +image: leren-trainingsacteren.webp +href: 'https://lerentrainingsacteren.nl' +--- diff --git a/src/content/pages/_showcase/miele-witgoedcenter-amsterdam.md b/src/content/pages/_showcase/miele-witgoedcenter-amsterdam.md new file mode 100644 index 000000000..3e7a6a861 --- /dev/null +++ b/src/content/pages/_showcase/miele-witgoedcenter-amsterdam.md @@ -0,0 +1,5 @@ +--- +title: Miele Witgoedcenter Amsterdam +image: miele-witgoedcenter-amsterdam.webp +href: 'https://witgoedcenteramsterdam.nl' +--- diff --git a/src/content/pages/_showcase/sloepverhuur-bolsward.md b/src/content/pages/_showcase/sloepverhuur-bolsward.md new file mode 100644 index 000000000..0cc3d5cf5 --- /dev/null +++ b/src/content/pages/_showcase/sloepverhuur-bolsward.md @@ -0,0 +1,5 @@ +--- +title: Sloepverhuur Bolsward +image: sloepverhuur-bolsward.webp +href: 'https://sloepverhuurbolsward.nl' +--- diff --git a/src/content/pages/_showcase/stark-vulcanising-products.md b/src/content/pages/_showcase/stark-vulcanising-products.md new file mode 100644 index 000000000..a1054ae17 --- /dev/null +++ b/src/content/pages/_showcase/stark-vulcanising-products.md @@ -0,0 +1,4 @@ +--- +title: Stark Vulcanising Products +image: stark-vulcanising-products.webp +--- \ No newline at end of file diff --git a/src/content/pages/_showcase/the-gym-haren.md b/src/content/pages/_showcase/the-gym-haren.md new file mode 100644 index 000000000..ef8ab23c3 --- /dev/null +++ b/src/content/pages/_showcase/the-gym-haren.md @@ -0,0 +1,5 @@ +--- +title: The Gym Haren +image: the-gym-haren.webp +href: 'https://thegymharen.nl' +--- diff --git a/src/content/pages/_showcase/van-dillen-antieke-bouwmaterialen.md b/src/content/pages/_showcase/van-dillen-antieke-bouwmaterialen.md new file mode 100644 index 000000000..bb8514dfd --- /dev/null +++ b/src/content/pages/_showcase/van-dillen-antieke-bouwmaterialen.md @@ -0,0 +1,5 @@ +--- +title: Van Dillen Antieke Bouwmaterialen +image: van-dillen-antieke-bouwmaterialen.webp +href: 'https://vdabouwmaterialen.nl' +--- diff --git a/src/content/pages/base/_image.mdx b/src/content/pages/base/_image.mdx deleted file mode 100644 index be68417d8..000000000 --- a/src/content/pages/base/_image.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Image ---- - -```astro live ---- -import Image from 'fulldev-ui/components/Image.astro' ---- - - -``` diff --git a/src/content/pages/base/_switch.mdx b/src/content/pages/base/_switch.mdx deleted file mode 100644 index 9a6ab9dc0..000000000 --- a/src/content/pages/base/_switch.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Switch ---- - -```astro live ---- -import Switch from 'fulldev-ui/components/Switch.astro' ---- - - - - -``` - -```astro live ---- -import Switch from 'fulldev-ui/components/Switch.astro' ---- - - -``` - -```astro live ---- -import Switch from 'fulldev-ui/components/Switch.astro' ---- - - - -``` diff --git a/src/content/pages/base/badge.mdx b/src/content/pages/base/badge.mdx deleted file mode 100644 index 17b2bdbbd..000000000 --- a/src/content/pages/base/badge.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Badge ---- - -# Badge - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Badge from 'fulldev-ui/components/Badge.astro' ---- - -Badge -``` - -## Props - - - -## Examples - -```astro live ---- -import Badge from 'fulldev-ui/components/Badge.astro' ---- - -Badge -Badge -Badge -``` - -```astro live ---- -import Badge from 'fulldev-ui/components/Badge.astro' ---- - -Badge -Badge -``` - -```astro live ---- -import Badge from 'fulldev-ui/components/Badge.astro' ---- - -Badge -Badge -``` - -```astro live ---- -import Badge from 'fulldev-ui/components/Badge.astro' ---- - -Badge -Badge -Badge -``` - -```astro live ---- -import Badge from 'fulldev-ui/components/Badge.astro' ---- - - -``` diff --git a/src/content/pages/base/button.mdx b/src/content/pages/base/button.mdx deleted file mode 100644 index 40a7df062..000000000 --- a/src/content/pages/base/button.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Button ---- - -# Button - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - -Button -``` - -## Props - - - -## Examples - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - -Button -Button -Button -``` - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - - -``` - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - - - - -``` - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - - - -``` - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - - - - -``` diff --git a/src/content/pages/base/checkbox.mdx b/src/content/pages/base/checkbox.mdx deleted file mode 100644 index e733c6b88..000000000 --- a/src/content/pages/base/checkbox.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Checkbox ---- - -# Checkbox - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -## Props - - - -## Examples - -```astro live ---- -import Checkbox from 'fulldev-ui/components/Checkbox.astro' ---- - - -``` - -```astro live ---- -import Checkbox from 'fulldev-ui/components/Checkbox.astro' ---- - - - -``` - -```astro live ---- -import Checkbox from 'fulldev-ui/components/Checkbox.astro' ---- - - - - -``` diff --git a/src/content/pages/base/icon.mdx b/src/content/pages/base/icon.mdx deleted file mode 100644 index f632e8c8e..000000000 --- a/src/content/pages/base/icon.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Icon ---- - -# Icon - -We use [Tabler Icons](https://tablericons.com/) under the hood, you can use any of those icons by having the `name` prop match one of the icon names. - -```astro live ---- -import Icon from 'fulldev-ui/components/Icon.astro' ---- - - -``` - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -## Props - - - -## Examples - -```astro live ---- -import Icon from 'fulldev-ui/components/Icon.astro' ---- - - - - - -``` - -```astro live ---- -import Icon from 'fulldev-ui/components/Icon.astro' ---- - - - - -``` - -```astro live ---- -import Icon from 'fulldev-ui/components/Icon.astro' ---- - - - -``` diff --git a/src/content/pages/base/input.mdx b/src/content/pages/base/input.mdx deleted file mode 100644 index f114672ab..000000000 --- a/src/content/pages/base/input.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Input ---- - -# Input - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Input from 'fulldev-ui/components/Input.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import Input from 'fulldev-ui/components/Input.astro' ---- - - -``` - -```astro live ---- -import Input from 'fulldev-ui/components/Input.astro' ---- - - - - -``` - -```astro live ---- -import Input from 'fulldev-ui/components/Input.astro' ---- - - - -``` - -```astro live ---- -import Input from 'fulldev-ui/components/Input.astro' ---- - - - - -``` diff --git a/src/content/pages/base/rating.mdx b/src/content/pages/base/rating.mdx deleted file mode 100644 index c4ccec878..000000000 --- a/src/content/pages/base/rating.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Rating ---- - -# Rating - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Rating from 'fulldev-ui/components/Rating.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import Rating from 'fulldev-ui/components/Rating.astro' ---- - - -``` - -```astro live ---- -import Rating from 'fulldev-ui/components/Rating.astro' ---- - - - -``` - -```astro live ---- -import Rating from 'fulldev-ui/components/Rating.astro' ---- - - - - -``` diff --git a/src/content/pages/base/section.mdx b/src/content/pages/base/section.mdx deleted file mode 100644 index 163ae0a42..000000000 --- a/src/content/pages/base/section.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Section ---- - -# Section - -Please see the [blocks page](/blocks) for more examples, since they are built using sections. - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Section from 'fulldev-ui/components/Section.astro' ---- - - -``` - -## Props - - diff --git a/src/content/pages/base/select.mdx b/src/content/pages/base/select.mdx deleted file mode 100644 index b520420c7..000000000 --- a/src/content/pages/base/select.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Select - -example: - label: Select - name: select - placeholder: Select an option - options: - - Option 1 - - Option 2 ---- - -# Select - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Select from 'fulldev-ui/components/Select.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import Select from 'fulldev-ui/components/Select.astro' ---- - - -``` - -```astro live ---- -import Select from 'fulldev-ui/components/Select.astro' ---- - - - - -``` - -```astro live ---- -import Select from 'fulldev-ui/components/Select.astro' ---- - - - -``` - -```astro live ---- -import Select from 'fulldev-ui/components/Select.astro' ---- - - - - -``` diff --git a/src/content/pages/base/textarea.mdx b/src/content/pages/base/textarea.mdx deleted file mode 100644 index 889518c9a..000000000 --- a/src/content/pages/base/textarea.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Textarea - -example: - name: textarea - placeholder: Write a message.. - label: Textarea ---- - -# Textarea - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Textarea from 'fulldev-ui/components/Textarea.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import Textarea from 'fulldev-ui/components/Textarea.astro' ---- - - - - -``` - -```astro live ---- -import Textarea from 'fulldev-ui/components/Textarea.astro' ---- - - -``` - -```astro live ---- -import Textarea from 'fulldev-ui/components/Textarea.astro' ---- - - -``` - -```astro live ---- -import Textarea from 'fulldev-ui/components/Textarea.astro' ---- - - - -``` - -```astro live ---- -import Textarea from 'fulldev-ui/components/Textarea.astro' ---- - - - -``` diff --git a/src/content/pages/blocks.mdx b/src/content/pages/blocks.mdx deleted file mode 100644 index fbb5eb464..000000000 --- a/src/content/pages/blocks.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -_layout: BlockOverviewLayout - -seo: - title: Fulldev UI - Astro block library, open-source - description: Make websites rapidly with pre-built blocks. - -title: Blocks -heading: Blocks that you can customize with props ---- diff --git a/src/content/pages/blocks/_product.mdx b/src/content/pages/blocks/_product.mdx deleted file mode 100644 index 8be14c215..000000000 --- a/src/content/pages/blocks/_product.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -_layout: BlockLayout - -title: Product -image: /images/blocks/product.png ---- - -```astro live ---- -import Product from 'fulldev-ui/blocks/Product.astro' ---- - - -``` diff --git a/src/content/pages/blocks/_products.mdx b/src/content/pages/blocks/_products.mdx deleted file mode 100644 index f5ce7560c..000000000 --- a/src/content/pages/blocks/_products.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -_layout: BlockLayout - -title: Products -image: /images/blocks/products.png ---- - -```astro live ---- -import Products from 'fulldev-ui/blocks/Products.astro' ---- - - -``` diff --git a/src/content/pages/blocks/colleagues.mdx b/src/content/pages/blocks/colleagues.mdx deleted file mode 100644 index 17e8a8642..000000000 --- a/src/content/pages/blocks/colleagues.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -_layout: BlockLayout - -title: Colleagues -image: /images/blocks/colleagues.png ---- - -```astro live ---- -import Colleagues from 'fulldev-ui/blocks/Colleagues.astro' ---- - - -``` diff --git a/src/content/pages/blocks/content.mdx b/src/content/pages/blocks/content.mdx deleted file mode 100644 index 040db4348..000000000 --- a/src/content/pages/blocks/content.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -_layout: BlockLayout - -title: Content -image: /images/blocks/content.png ---- - -```astro live ---- -import Content from 'fulldev-ui/blocks/Content.astro' ---- - - -``` - -```astro live ---- -import Content from 'fulldev-ui/blocks/Content.astro' ---- - - -``` - -```astro live ---- -import Content from 'fulldev-ui/blocks/Content.astro' ---- - - -``` - -```astro live ---- -import Content from 'fulldev-ui/blocks/Content.astro' ---- - - -``` - -```astro live ---- -import Content from 'fulldev-ui/blocks/Content.astro' ---- - - -``` - -```astro live ---- -import Content from 'fulldev-ui/blocks/Content.astro' ---- - - -``` diff --git a/src/content/pages/blocks/cta.mdx b/src/content/pages/blocks/cta.mdx deleted file mode 100644 index 8a38747ea..000000000 --- a/src/content/pages/blocks/cta.mdx +++ /dev/null @@ -1,192 +0,0 @@ ---- -_layout: BlockLayout - -title: CTA -image: /images/blocks/cta.png ---- - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` - -```astro live ---- -import Cta from 'fulldev-ui/blocks/Cta.astro' ---- - - -``` diff --git a/src/content/pages/blocks/features.mdx b/src/content/pages/blocks/features.mdx deleted file mode 100644 index 9a5b2fcd3..000000000 --- a/src/content/pages/blocks/features.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -_layout: BlockLayout - -title: Features -image: /images/blocks/features.png ---- - -```astro live ---- -import Features from 'fulldev-ui/blocks/Features.astro' ---- - - -``` - -```astro live ---- -import Features from 'fulldev-ui/blocks/Features.astro' ---- - - -``` - -```astro live ---- -import Features from 'fulldev-ui/blocks/Features.astro' ---- - - -``` - -```astro live ---- -import Features from 'fulldev-ui/blocks/Features.astro' ---- - - -``` diff --git a/src/content/pages/blocks/footer.mdx b/src/content/pages/blocks/footer.mdx deleted file mode 100644 index 0cbb9918f..000000000 --- a/src/content/pages/blocks/footer.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -_layout: BlockLayout - -title: Footer -image: /images/blocks/footer.png ---- - -```astro live ---- -import Footer from 'fulldev-ui/components/Footer.astro' ---- - - -``` - -```astro live ---- -import Footer from 'fulldev-ui/components/Footer.astro' ---- - - -``` - -```astro live ---- -import Footer from 'fulldev-ui/components/Footer.astro' ---- - - -``` diff --git a/src/content/pages/blocks/header.mdx b/src/content/pages/blocks/header.mdx deleted file mode 100644 index 6d59c455f..000000000 --- a/src/content/pages/blocks/header.mdx +++ /dev/null @@ -1,192 +0,0 @@ ---- -_layout: BlockLayout - -title: Header -image: /images/blocks/header.png ---- - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - -``` - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - -``` - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - -``` - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - -``` - -```astro live ---- -import Header from 'fulldev-ui/components/Header.astro' ---- - - -``` diff --git a/src/content/pages/blocks/hero.mdx b/src/content/pages/blocks/hero.mdx deleted file mode 100644 index 3579910e1..000000000 --- a/src/content/pages/blocks/hero.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -_layout: BlockLayout - -title: Hero -image: /images/blocks/hero.png ---- - -```astro live ---- -import Hero from 'fulldev-ui/blocks/Hero.astro' ---- - - -``` - -```astro live ---- -import Hero from 'fulldev-ui/blocks/Hero.astro' ---- - - -``` - -```astro live ---- -import Hero from 'fulldev-ui/blocks/Hero.astro' ---- - - -``` - -```astro live ---- -import Hero from 'fulldev-ui/blocks/Hero.astro' ---- - - -``` - -```astro live ---- -import Hero from 'fulldev-ui/blocks/Hero.astro' ---- - - -``` diff --git a/src/content/pages/blocks/intro.mdx b/src/content/pages/blocks/intro.mdx deleted file mode 100644 index 2b7ae30ff..000000000 --- a/src/content/pages/blocks/intro.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -_layout: BlockLayout - -title: Intro -image: /images/blocks/intro.png ---- - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` - -```astro live ---- -import Intro from 'fulldev-ui/blocks/Intro.astro' ---- - - -``` diff --git a/src/content/pages/blocks/prices.mdx b/src/content/pages/blocks/prices.mdx deleted file mode 100644 index 4d74a6010..000000000 --- a/src/content/pages/blocks/prices.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -_layout: BlockLayout - -title: Prices -image: /images/blocks/prices.png ---- - -```astro live ---- -import Prices from 'fulldev-ui/blocks/Prices.astro' ---- - - -``` - -```astro live ---- -import Prices from 'fulldev-ui/blocks/Prices.astro' ---- - - -``` - -```astro live ---- -import Prices from 'fulldev-ui/blocks/Prices.astro' ---- - - -``` diff --git a/src/content/pages/blocks/reviews.mdx b/src/content/pages/blocks/reviews.mdx deleted file mode 100644 index a19369446..000000000 --- a/src/content/pages/blocks/reviews.mdx +++ /dev/null @@ -1,249 +0,0 @@ ---- -_layout: BlockLayout - -title: Reviews -image: /images/blocks/reviews.png ---- - -```astro live ---- -import Reviews from 'fulldev-ui/blocks/Reviews.astro' ---- - - -``` - -```astro live ---- -import Reviews from 'fulldev-ui/blocks/Reviews.astro' ---- - - -``` - -```astro live ---- -import Reviews from 'fulldev-ui/blocks/Reviews.astro' ---- - - -``` - -```astro live ---- -import Reviews from 'fulldev-ui/blocks/Reviews.astro' ---- - - -``` diff --git a/src/content/pages/docs/blocks.mdx b/src/content/pages/docs/blocks.mdx new file mode 100644 index 000000000..ac7e19af3 --- /dev/null +++ b/src/content/pages/docs/blocks.mdx @@ -0,0 +1,52 @@ +--- +_block: Content7 +title: Using Blocks +description: Ready to use blocks and page building. +--- + +## Regular usage + +```astro live +--- +import Hero1 from 'fulldev-ui/blocks/Hero1.astro' +--- + + +``` + +## Dynamic page building + +Blocks come with a utility component: ``. With this component you can dynamically render blocks to build pages. + +This is powerful when combined with content collections or a CMS, as the person writing content can choose which block to use. + +```astro live +--- +import Block from 'fulldev-ui/components/Block.astro' +--- + + +``` diff --git a/src/content/pages/blocks/_categories.mdx b/src/content/pages/docs/blocks/_categories.mdx similarity index 85% rename from src/content/pages/blocks/_categories.mdx rename to src/content/pages/docs/blocks/_categories.mdx index 7d3128b50..77ac9fbc4 100644 --- a/src/content/pages/blocks/_categories.mdx +++ b/src/content/pages/docs/blocks/_categories.mdx @@ -1,8 +1,5 @@ --- -_layout: BlockLayout - title: Categories -image: /images/blocks/categories.png --- ```astro live @@ -14,23 +11,20 @@ import Categories from 'fulldev-ui/blocks/Categories.astro' heading="Lorem ipsum dolor sit" text="Lorem ipsum dolor sit amet consectetur adipisicing." position="inset" - frame="panel" + panel size="sm" cards={[ { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, ]} /> @@ -45,22 +39,18 @@ import Categories from 'fulldev-ui/blocks/Categories.astro' heading="Lorem ipsum dolor sit" text="Lorem ipsum dolor sit amet consectetur adipisicing." position="background" - ratio="square" cards={[ { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, ]} /> @@ -80,22 +70,18 @@ import Categories from 'fulldev-ui/blocks/Categories.astro' { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, { heading: 'Lorem ipsum', image: '/images/placeholder-landscape.webp', - href: '#', }, ]} /> @@ -108,41 +94,35 @@ import Categories from 'fulldev-ui/blocks/Categories.astro' diff --git a/src/content/pages/docs/blocks/_contact.mdx b/src/content/pages/docs/blocks/_contact.mdx new file mode 100644 index 000000000..8470139cb --- /dev/null +++ b/src/content/pages/docs/blocks/_contact.mdx @@ -0,0 +1,67 @@ +--- +title: Contact +--- + +```astro live +--- +import Contact from 'fulldev-ui/blocks/Contact.astro' +--- + + +``` diff --git a/src/content/pages/blocks/_jobs.mdx b/src/content/pages/docs/blocks/_jobs.mdx similarity index 94% rename from src/content/pages/blocks/_jobs.mdx rename to src/content/pages/docs/blocks/_jobs.mdx index 5e98e6f5c..85ce8ffea 100644 --- a/src/content/pages/blocks/_jobs.mdx +++ b/src/content/pages/docs/blocks/_jobs.mdx @@ -1,8 +1,5 @@ --- -_layout: BlockLayout - title: Jobs -image: /images/blocks/jobs.png --- ```astro live diff --git a/src/content/pages/blocks/posts.mdx b/src/content/pages/docs/blocks/_posts.mdx similarity index 77% rename from src/content/pages/blocks/posts.mdx rename to src/content/pages/docs/blocks/_posts.mdx index a3e128f90..e729380e8 100644 --- a/src/content/pages/blocks/posts.mdx +++ b/src/content/pages/docs/blocks/_posts.mdx @@ -1,8 +1,5 @@ --- -_layout: BlockLayout - title: Posts -image: /images/blocks/posts.png --- ```astro live @@ -13,6 +10,7 @@ import Posts from 'fulldev-ui/blocks/Posts.astro' ``` diff --git a/src/content/pages/blocks/_stats.mdx b/src/content/pages/docs/blocks/_stats.mdx similarity index 95% rename from src/content/pages/blocks/_stats.mdx rename to src/content/pages/docs/blocks/_stats.mdx index 742c26ff0..23684f83d 100644 --- a/src/content/pages/blocks/_stats.mdx +++ b/src/content/pages/docs/blocks/_stats.mdx @@ -1,6 +1,4 @@ --- -_layout: BlockLayout - title: Stats --- diff --git a/src/content/pages/blocks/_banner.mdx b/src/content/pages/docs/blocks/banner.mdx similarity index 50% rename from src/content/pages/blocks/_banner.mdx rename to src/content/pages/docs/blocks/banner.mdx index 8d1f95379..7ae8f8583 100644 --- a/src/content/pages/blocks/_banner.mdx +++ b/src/content/pages/docs/blocks/banner.mdx @@ -1,6 +1,5 @@ --- -_layout: BlockLayout - +_block: Content8 title: Banner --- @@ -9,5 +8,5 @@ title: Banner import Banner from 'fulldev-ui/blocks/Banner.astro' --- - + ``` diff --git a/src/content/pages/docs/blocks/colleagues.mdx b/src/content/pages/docs/blocks/colleagues.mdx new file mode 100644 index 000000000..9c3fcddc2 --- /dev/null +++ b/src/content/pages/docs/blocks/colleagues.mdx @@ -0,0 +1,49 @@ +--- +_block: Content8 +title: Colleagues +--- + +```astro live +--- +import Colleagues1 from 'fulldev-ui/blocks/Colleagues1.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/content.mdx b/src/content/pages/docs/blocks/content.mdx new file mode 100644 index 000000000..ee058094c --- /dev/null +++ b/src/content/pages/docs/blocks/content.mdx @@ -0,0 +1,316 @@ +--- +_block: Content8 +title: Content +--- + +## Content1 + +```astro live +--- +import Content1 from 'fulldev-ui/blocks/Content1.astro' +--- + +HTML Content Example + This is an example of HTML content inserted into the Content block. + + First item + Second item + Third item + + ` +/> +``` + +## Content2 + +```astro live +--- +import Content2 from 'fulldev-ui/blocks/Content2.astro' +--- + +HTML Content Example + This is an example of HTML content inserted into the Content2 block. It demonstrates how you can use HTML to structure your content within the block. + + First item + Second item + Third item + Fourth item + Fifth item + + Adding more content to make it longer. You can include various HTML elements such as headings, paragraphs, lists, images, and more to enrich your content. + Here is another paragraph to further extend the content. This allows you to provide more information and details within the Content2 block. + ` +/> +``` + +## Content3 + +```astro live +--- +import Content3 from 'fulldev-ui/blocks/Content3.astro' +--- + +HTML Content Example + This is an example of HTML content inserted into the Content2 block. It demonstrates how you can use HTML to structure your content within the block. + + First item + Second item + Third item + Fourth item + Fifth item + + Adding more content to make it longer. You can include various HTML elements such as headings, paragraphs, lists, images, and more to enrich your content. + Here is another paragraph to further extend the content. This allows you to provide more information and details within the Content2 block. + ` +/> +``` + +## Content4 + +```astro live +--- +import Content4 from 'fulldev-ui/blocks/Content4.astro' +--- + + + This is an example of HTML content inserted into the Content4 block. Lorem + ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus quia, nulla! + Maiores et perferendis eaque, exercitationem praesentium nihil. Lorem ipsum + dolor sit amet consectetur adipisicing elit. Praesent sapien massa, + convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget + malesuada. + + + This is an example of HTML content inserted into the Content4 block. Lorem + ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus quia, nulla! + Maiores et perferendis eaque, exercitationem praesentium nihil. Lorem ipsum + dolor sit amet consectetur adipisicing elit. Praesent sapien massa, + convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget + malesuada. + + ` +/> +``` + +## Content5 + +```astro live +--- +import Content5 from 'fulldev-ui/blocks/Content5.astro' +--- + + + This is an example of HTML content inserted into the Content4 block. Lorem + ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus quia, nulla! + Maiores et perferendis eaque, exercitationem praesentium nihil. Lorem ipsum + dolor sit amet consectetur adipisicing elit. Praesent sapien massa, + convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget + malesuada. + + + This is an example of HTML content inserted into the Content4 block. Lorem + ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus quia, nulla! + Maiores et perferendis eaque, exercitationem praesentium nihil. Lorem ipsum + dolor sit amet consectetur adipisicing elit. Praesent sapien massa, + convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget + malesuada. + + ` +/> +``` + +## Content6 + +```astro live +--- +import Content6 from 'fulldev-ui/blocks/Content6.astro' +--- + +HTML Content Example + This is an example of HTML content inserted into the Content block. + + First item + Second item + Third item + + ` +/> +``` + +## Content7 + +```astro live +--- +import Content7 from 'fulldev-ui/blocks/Content7.astro' +--- + +HTML Content Example + This is an example of HTML content inserted into the Content block. + + First item + Second item + Third item + + ` +/> +``` + +## Content8 + +```astro live +--- +import Content8 from 'fulldev-ui/blocks/Content8.astro' +--- + +HTML Content Example + This is an example of HTML content inserted into the Content block. + + First item + Second item + Third item + + ` +/> +``` diff --git a/src/content/pages/docs/blocks/cta.mdx b/src/content/pages/docs/blocks/cta.mdx new file mode 100644 index 000000000..3885246d7 --- /dev/null +++ b/src/content/pages/docs/blocks/cta.mdx @@ -0,0 +1,16 @@ +--- +_block: Content8 +title: Cta +--- + +```astro live +--- +import Cta1 from 'fulldev-ui/blocks/Cta1.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/features.mdx b/src/content/pages/docs/blocks/features.mdx new file mode 100644 index 000000000..72708d25b --- /dev/null +++ b/src/content/pages/docs/blocks/features.mdx @@ -0,0 +1,100 @@ +--- +_block: Content8 +title: Features +--- + +## Features 1 + +```astro live +--- +import Features1 from 'fulldev-ui/blocks/Features1.astro' +--- + + +``` + +## Features 2 + +```astro live +--- +import Features2 from 'fulldev-ui/blocks/Features2.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/footer.mdx b/src/content/pages/docs/blocks/footer.mdx new file mode 100644 index 000000000..1bdec650c --- /dev/null +++ b/src/content/pages/docs/blocks/footer.mdx @@ -0,0 +1,46 @@ +--- +_block: Content8 +title: Footer +--- + +```astro live +--- +import Footer from 'fulldev-ui/blocks/Footer.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/header.mdx b/src/content/pages/docs/blocks/header.mdx new file mode 100644 index 000000000..31e3587fa --- /dev/null +++ b/src/content/pages/docs/blocks/header.mdx @@ -0,0 +1,60 @@ +--- +_block: Content8 +title: Header +--- + +```astro live +--- +import Header from 'fulldev-ui/blocks/Header.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/hero.mdx b/src/content/pages/docs/blocks/hero.mdx new file mode 100644 index 000000000..8b9668fcb --- /dev/null +++ b/src/content/pages/docs/blocks/hero.mdx @@ -0,0 +1,18 @@ +--- +_block: Content8 +title: Hero +--- + +```astro live +--- +import Hero1 from 'fulldev-ui/blocks/Hero1.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/intro.mdx b/src/content/pages/docs/blocks/intro.mdx new file mode 100644 index 000000000..cf0a864e6 --- /dev/null +++ b/src/content/pages/docs/blocks/intro.mdx @@ -0,0 +1,16 @@ +--- +_block: Content8 +title: Intro1 +--- + +```astro live +--- +import Intro1 from 'fulldev-ui/blocks/Intro1.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/logos.mdx b/src/content/pages/docs/blocks/logos.mdx new file mode 100644 index 000000000..ca63b4ac6 --- /dev/null +++ b/src/content/pages/docs/blocks/logos.mdx @@ -0,0 +1,37 @@ +--- +_block: Content8 +title: Logos +--- + +```astro live +--- +import Logos1 from 'fulldev-ui/blocks/Logos1.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/projects.mdx b/src/content/pages/docs/blocks/projects.mdx new file mode 100644 index 000000000..a6b2415ef --- /dev/null +++ b/src/content/pages/docs/blocks/projects.mdx @@ -0,0 +1,36 @@ +--- +_block: Content8 +title: Content +--- + +## Projects1 + +```astro live +--- +import Projects1 from 'fulldev-ui/blocks/Projects1.astro' +--- + + +``` diff --git a/src/content/pages/docs/blocks/reviews.mdx b/src/content/pages/docs/blocks/reviews.mdx new file mode 100644 index 000000000..2f0cd944f --- /dev/null +++ b/src/content/pages/docs/blocks/reviews.mdx @@ -0,0 +1,65 @@ +--- +_block: Content8 +title: Reviews +--- + +```astro live +--- +import Reviews1 from 'fulldev-ui/blocks/Reviews1.astro' +--- + + +``` diff --git a/src/content/pages/docs/collections/images.mdx b/src/content/pages/docs/collections/images.mdx new file mode 100644 index 000000000..7382f4ce4 --- /dev/null +++ b/src/content/pages/docs/collections/images.mdx @@ -0,0 +1,102 @@ +--- +_block: Content7 +title: images +--- + +# images + +Adds type-safety and optimization for local images + +## Features + +- Type-safe image references +- Integrates with Astro's `` component +- Integrates even better with fulldev-ui's `` component +- Get images using the `getEntry()` helper function +- Define alt texts globally, so you don't have to repeat yourself + +## Adding images + +Image files added to the `src/images` directory will automatically be added to the images collection. + +## Global alt texts + +Alt texts can be defined globally in the same folder as where the images live. You create a `[IMAGE NAME].yml` in the same folder as the images. + +This way you can define alt texts once and they will be used everyhwere you use the image. An example of such a `yaml` file would be: + +```yaml +alt: 'A placeholder landscape image' +``` + +## Using images + +### Automatic (recommended) + +Use fulldev-ui's included `` component to get the following benefits out of the box: + +- You only have to pass the image id +- Automatic type-safety and warnings +- Automatically uses global alt text +- Automatically optimizes image file + +This is also the easiest way to use images: + +```astro +--- +import Image from 'fulldev-ui/components/Image.astro' +--- + + +``` + +### Manual + +If you want more control over the image, you can use the `getEntry()` helper function to get an image. + +```astro +--- +import { getEntry } from 'fulldev-ui/utils' + +const image = getEntry('my-image.png') +--- +``` + +It will return an image in the following format: + +```ts +{ + id: 'my-image.png', + src: '/src/images/my-image.png', + alt: 'Alt text provided via steps above', + width: 1930, + height: 1080, + format: 'png' +} +``` + +You can pass these values directly into Astro's `` component to render the image. + +```astro +--- +import { getEntry } from 'fulldev-ui/utils' + +const image = getEntry('my-image.png') +--- + + +``` + +But to get an optimized version, you should use an imported image instead: + +```astro +--- +import { getEntry } from 'fulldev-ui/utils' + +const image = getEntry('my-image.png') +const images = import.meta.glob<{ default: ImageMetadata }>('/src/images/*') +const image = images[image.src] +--- + + +``` diff --git a/src/content/pages/docs/collections/pages.mdx b/src/content/pages/docs/collections/pages.mdx new file mode 100644 index 000000000..972975e8e --- /dev/null +++ b/src/content/pages/docs/collections/pages.mdx @@ -0,0 +1,119 @@ +--- +_block: Content7 +title: pages +--- + +# pages + +Used for generating pages and/or cards. + +## Features + +- Pages are automatically generated from `.md` and `.mdx` files in `src/content/pages` +- References to other pages, and other collections +- Setting a preset, which automatically gets merged with the current page +- Type-safe frontmatter validation with helpful error messages + +## Frontmatter reference + +import Props from 'fulldev-ui/components/docs/Props.astro' + + + +### `presets` + +Type: Filepath of an entry in `src/content/presets` + +### `component` + +Type: Filename of a component in `src/layouts` + +### `theme` + +Type: `'light' | 'dark' | 'system' | undefined` + +### `lang` + +Type: `string` | undefined + +### `title` + +Type: `string` | undefined + +### `description` + +Type: `string` | undefined + +### `image` + +### `images` + +### `seo` + +## Example + +```md +--- +presets: [post] +component: PostLayout + +seo: + title: About us - Fulldev + description: Learn more about Fulldev + +title: About us + +sections: + - component: Hero + tagline: We are a team of passionate developers + heading: About us + description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. + buttons: + - text: Get in touch + href: /contact +--- + +# Write your markdown here! + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. +``` + +## Disabling page generation + +### If no content is passed + +No page will be generated if no content is passed, meaning the page does not have body content or any of the following frontmatter keys: + +- `component` +- `section` +- `sections` + +### On a global level + +You can disable all automatic page generation by setting the `injectRoutes` option in your `astro.config.ts` file. + +```ts +// astro.config.ts +import { defineConfig } from 'astro/config' +import fulldev from 'fulldev-ui/integration' + +export default defineConfig({ + integrations: [ + fulldev({ + injectRoutes: false, + }), + ], +}) +``` + +### On a per-page level + +You can disable page generation per page by setting the `inject` key to `false`. + +This makes sense for content you might only want to show as a card on another page, like reviews or the showcases on this website. + +```md +--- +inject: false +--- +``` diff --git a/src/content/pages/docs/collections/presets.mdx b/src/content/pages/docs/collections/presets.mdx new file mode 100644 index 000000000..8922883be --- /dev/null +++ b/src/content/pages/docs/collections/presets.mdx @@ -0,0 +1,60 @@ +--- +_block: Content7 +title: presets +--- + +# presets + +Default values that can be referenced by pages + +## Features + +- Uses same schema as pages +- Can be referenced by pages, to automatically merge values +- Global preset can be set which will be automatically merged with all pages + +## Frontmatter reference + +Presets accept the exact same properties as the [pages collection](/docs/collections/pages/), except for the `presets` key, since this could potentially create a circular reference. + +## Configuring a base preset + +To configure a base preset, you can set the `basePreset` option in your `astro.config.ts` file. It accepts the filepath of a preset in `src/content/presets`. + +```ts +// astro.config.ts +import { defineConfig } from 'astro/config' +import fulldev from 'fulldev-ui/integration' + +export default defineConfig({ + integrations: [ + fulldev({ + basePreset: 'base', + }), + ], +}) +``` + +## Example + +```yml +seo: + title: Default site title + description: Default site description + image: default-og-image.png + +header: + logo: logo.svg + links: + - docs + - about + - showcase + - text: Custom link text + href: /custom-link-href + +footer: + logo: logo.svg + socials: + - https://github.com/fulldotdev/ui + - https://discord.gg/vXZqMbadm8 +``` diff --git a/src/content/pages/docs/components.mdx b/src/content/pages/docs/components.mdx new file mode 100644 index 000000000..41f2a7416 --- /dev/null +++ b/src/content/pages/docs/components.mdx @@ -0,0 +1,36 @@ +--- +_block: Content7 +title: Using components +--- + +## Slots versus props + +You can use either slots or props. Props are recommended as they are type safe and work better in combination with content collections. + +Though, the following examples do the same thing. + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Click me + +``` + +## Conditional rendering + +By default, if no content is passed to a component, it will **NOT** render anything. This helps optimize your code, especially when working with content collections. + +You can override this default behavior using the `if` prop, which lets you control component rendering based on a truthy or falsy value. + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + + + + + +``` diff --git a/src/content/pages/docs/components/_localeswitcher.mdx b/src/content/pages/docs/components/_localeswitcher.mdx new file mode 100644 index 000000000..b3edf9990 --- /dev/null +++ b/src/content/pages/docs/components/_localeswitcher.mdx @@ -0,0 +1,16 @@ +--- +_block: Content7 +title: LocaleSwitcher +--- + +# Theme Switcher + +```astro live +--- +import LocaleSwitcher from 'fulldev-ui/components/LocaleSwitcher.astro' +--- + + +``` + +## Props diff --git a/src/content/pages/base/table.mdx b/src/content/pages/docs/components/_table.mdx similarity index 71% rename from src/content/pages/base/table.mdx rename to src/content/pages/docs/components/_table.mdx index 080800ac2..f11556922 100644 --- a/src/content/pages/base/table.mdx +++ b/src/content/pages/docs/components/_table.mdx @@ -1,13 +1,9 @@ --- -_layout: ComponentLayout -settings: components - +_block: Content7 title: Table --- -# Table - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' +import Props from 'fulldev-ui/components/docs/Props.astro' ```astro live --- @@ -26,7 +22,7 @@ import Table from 'fulldev-ui/components/Table.astro' ## Props - + ## Examples @@ -51,7 +47,6 @@ import Table from 'fulldev-ui/components/Table.astro' --- ``` - -```astro live ---- -import Table from 'fulldev-ui/components/Table.astro' ---- - - - - -``` diff --git a/src/content/pages/typography/_tagline.mdx b/src/content/pages/docs/components/_tagline.mdx similarity index 79% rename from src/content/pages/typography/_tagline.mdx rename to src/content/pages/docs/components/_tagline.mdx index 31cea4d01..f03462c7f 100644 --- a/src/content/pages/typography/_tagline.mdx +++ b/src/content/pages/docs/components/_tagline.mdx @@ -1,7 +1,5 @@ --- -_layout: ComponentLayout -settings: components - +_block: Content7 title: Tagline --- @@ -20,8 +18,8 @@ import Tagline from 'fulldev-ui/components/Tagline.astro' import Tagline from 'fulldev-ui/components/Tagline.astro' --- -The quick brown fox jumps -The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps ``` Set to `true` by default on Headings, which you can override by setting it to `false`. diff --git a/src/content/pages/docs/components/_themer.mdx b/src/content/pages/docs/components/_themer.mdx new file mode 100644 index 000000000..9be7ad1af --- /dev/null +++ b/src/content/pages/docs/components/_themer.mdx @@ -0,0 +1,47 @@ +--- +_block: Content7 +title: Themer +--- + + + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Themer from 'fulldev-ui/components/Themer.astro' +--- + + +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Themer from 'fulldev-ui/components/Themer.astro' +--- + + + + + +``` + +### `size` + +```astro live +--- +import Themer from 'fulldev-ui/components/Themer.astro' +--- + + + + +``` diff --git a/src/content/pages/base/toggle.mdx b/src/content/pages/docs/components/_toggle.mdx similarity index 71% rename from src/content/pages/base/toggle.mdx rename to src/content/pages/docs/components/_toggle.mdx index c389a2f24..4eb99eca4 100644 --- a/src/content/pages/base/toggle.mdx +++ b/src/content/pages/docs/components/_toggle.mdx @@ -1,13 +1,11 @@ --- -_layout: ComponentLayout -settings: components - +_block: Content7 title: Toggle --- # Toggle -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' +import Props from 'fulldev-ui/components/docs/Props.astro' ```astro live --- @@ -19,7 +17,7 @@ import Toggle from 'fulldev-ui/components/Toggle.astro' ## Props - + ## Examples diff --git a/src/content/pages/docs/components/avatar.mdx b/src/content/pages/docs/components/avatar.mdx new file mode 100644 index 000000000..a41678c57 --- /dev/null +++ b/src/content/pages/docs/components/avatar.mdx @@ -0,0 +1,32 @@ +--- +_block: Content7 +title: Avatar +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Avatar from 'fulldev-ui/components/Avatar.astro' +--- + + +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Avatar from 'fulldev-ui/components/Avatar.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/badge.mdx b/src/content/pages/docs/components/badge.mdx new file mode 100644 index 000000000..6d1b25bb8 --- /dev/null +++ b/src/content/pages/docs/components/badge.mdx @@ -0,0 +1,42 @@ +--- +_block: Content7 +title: Badge +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Badge from 'fulldev-ui/components/Badge.astro' +--- + +Badge +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Badge from 'fulldev-ui/components/Badge.astro' +--- + +Primary +Secondary +Outline +``` + +### `text` + +```astro live +--- +import Badge from 'fulldev-ui/components/Badge.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/badges.mdx b/src/content/pages/docs/components/badges.mdx new file mode 100644 index 000000000..fe00da937 --- /dev/null +++ b/src/content/pages/docs/components/badges.mdx @@ -0,0 +1,33 @@ +--- +_block: Content7 +title: Badges +description: A utility component for displaying multiple badges. +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Badges from 'fulldev-ui/components/Badges.astro' +--- + + +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Badges from 'fulldev-ui/components/Badges.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/button.mdx b/src/content/pages/docs/components/button.mdx new file mode 100644 index 000000000..7bb05bede --- /dev/null +++ b/src/content/pages/docs/components/button.mdx @@ -0,0 +1,76 @@ +--- +_block: Content7 +title: Button +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Button +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Primary +Secondary +Outline +Ghost +``` + +### `size` + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Small +Medium +Large +``` + +### `icon` + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + + + +``` + +### `href` + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Link +``` + +### `text` + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/buttons.mdx b/src/content/pages/docs/components/buttons.mdx new file mode 100644 index 000000000..40baa9873 --- /dev/null +++ b/src/content/pages/docs/components/buttons.mdx @@ -0,0 +1,50 @@ +--- +_block: Content7 +title: Buttons +description: A utility component for displaying multiple buttons. +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +--- + + +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +--- + + + +``` + +### `size` + +```astro live +--- +import Buttons from 'fulldev-ui/components/Buttons.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/channel.mdx b/src/content/pages/docs/components/channel.mdx new file mode 100644 index 000000000..b502c702f --- /dev/null +++ b/src/content/pages/docs/components/channel.mdx @@ -0,0 +1,89 @@ +--- +_block: Content7 +title: Channel +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Channel from 'fulldev-ui/components/Channel.astro' +--- + + +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Channel from 'fulldev-ui/components/Channel.astro' +--- + + + + + + +``` + +### `size` + +```astro live +--- +import Channel from 'fulldev-ui/components/Channel.astro' +--- + + + + + + +``` diff --git a/src/content/pages/docs/components/channels.mdx b/src/content/pages/docs/components/channels.mdx new file mode 100644 index 000000000..0df193b23 --- /dev/null +++ b/src/content/pages/docs/components/channels.mdx @@ -0,0 +1,90 @@ +--- +_block: Content7 +title: Channels +description: A utility component for displaying multiple channels. +--- + +# Channels + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Channels from 'fulldev-ui/components/Channels.astro' +--- + + +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Channels from 'fulldev-ui/components/Channels.astro' +--- + + +``` + +### `size` + +```astro live +--- +import Channels from 'fulldev-ui/components/Channels.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/checkbox.mdx b/src/content/pages/docs/components/checkbox.mdx new file mode 100644 index 000000000..7a81e8f93 --- /dev/null +++ b/src/content/pages/docs/components/checkbox.mdx @@ -0,0 +1,32 @@ +--- +_block: Content7 +title: Checkbox +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Checkbox from 'fulldev-ui/components/Checkbox.astro' +--- + + +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Checkbox from 'fulldev-ui/components/Checkbox.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/chip.mdx b/src/content/pages/docs/components/chip.mdx new file mode 100644 index 000000000..8748d6e0d --- /dev/null +++ b/src/content/pages/docs/components/chip.mdx @@ -0,0 +1,75 @@ +--- +_block: Content7 +title: Chip +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Chip from 'fulldev-ui/components/Chip.astro' +--- + +Chip +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Chip from 'fulldev-ui/components/Chip.astro' +--- + +Primary +Secondary +Outline +``` + +### `size` + +```astro live +--- +import Chip from 'fulldev-ui/components/Chip.astro' +--- + +Small +Medium +Large +``` + +### `icon` + +```astro live +--- +import Chip from 'fulldev-ui/components/Chip.astro' +--- + + + +``` + +### `href` + +```astro live +--- +import Chip from 'fulldev-ui/components/Chip.astro' +--- + +Link +``` + +### `text` + +```astro live +--- +import Chip from 'fulldev-ui/components/Chip.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/heading.mdx b/src/content/pages/docs/components/heading.mdx new file mode 100644 index 000000000..683702abc --- /dev/null +++ b/src/content/pages/docs/components/heading.mdx @@ -0,0 +1,49 @@ +--- +_block: Content7 +title: Heading +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Heading from 'fulldev-ui/components/Heading.astro' +--- + +The quick brown fox jumps +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Heading from 'fulldev-ui/components/Heading.astro' +--- + +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +``` + +### `text` + +```astro live +--- +import Heading from 'fulldev-ui/components/Heading.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/icon.mdx b/src/content/pages/docs/components/icon.mdx new file mode 100644 index 000000000..9a525368b --- /dev/null +++ b/src/content/pages/docs/components/icon.mdx @@ -0,0 +1,46 @@ +--- +_block: Content7 +title: Icon +--- + +```astro live +--- +import Icon from 'fulldev-ui/components/Icon.astro' +--- + + +``` + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +### `name` + +Accepts any icon name supported by [Tabler Icons](https://tabler.io/icons). + +```astro live +--- +import Icon from 'fulldev-ui/components/Icon.astro' +--- + + + + +``` + +### `size` + +```astro live +--- +import Icon from 'fulldev-ui/components/Icon.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/image.mdx b/src/content/pages/docs/components/image.mdx new file mode 100644 index 000000000..fa0b75209 --- /dev/null +++ b/src/content/pages/docs/components/image.mdx @@ -0,0 +1,20 @@ +--- +_block: Content7 +title: Image +description: A wrapper around the Astro Image component with conditional rendering. +--- + +import Link from 'fulldev-ui/components/Link.astro' +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Image from 'fulldev-ui/components/Image.astro' +--- + + +``` + +## Props + + diff --git a/src/content/pages/docs/components/input.mdx b/src/content/pages/docs/components/input.mdx new file mode 100644 index 000000000..ad913c121 --- /dev/null +++ b/src/content/pages/docs/components/input.mdx @@ -0,0 +1,38 @@ +--- +_block: Content7 +title: Input +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Input from 'fulldev-ui/components/Input.astro' +--- + + +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Input from 'fulldev-ui/components/Input.astro' +--- + + + + +``` diff --git a/src/content/pages/typography/label.mdx b/src/content/pages/docs/components/label.mdx similarity index 54% rename from src/content/pages/typography/label.mdx rename to src/content/pages/docs/components/label.mdx index d1e05176b..e6480f839 100644 --- a/src/content/pages/typography/label.mdx +++ b/src/content/pages/docs/components/label.mdx @@ -1,13 +1,9 @@ --- -_layout: ComponentLayout -settings: components - +_block: Content7 title: Label --- -# Label - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' +import Props from 'fulldev-ui/components/docs/Props.astro' ```astro live --- @@ -19,24 +15,28 @@ import Label from 'fulldev-ui/components/Label.astro' ## Props - + ## Examples +### `size` + ```astro live --- import Label from 'fulldev-ui/components/Label.astro' --- -Label -Label +Small +Medium +Large ``` +### `text` + ```astro live --- import Label from 'fulldev-ui/components/Label.astro' --- -Label -Label + ``` diff --git a/src/content/pages/docs/components/link.mdx b/src/content/pages/docs/components/link.mdx new file mode 100644 index 000000000..e7f2f65c7 --- /dev/null +++ b/src/content/pages/docs/components/link.mdx @@ -0,0 +1,63 @@ +--- +_block: Content7 +title: Link +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Link from 'fulldev-ui/components/Link.astro' +--- + +Link +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Link from 'fulldev-ui/components/Link.astro' +--- + +Primary +Muted +``` + +### `size` + +```astro live +--- +import Link from 'fulldev-ui/components/Link.astro' +--- + +Small +Medium +Large +``` + +### `icon` + +```astro live +--- +import Link from 'fulldev-ui/components/Link.astro' +--- + + +``` + +### `text` + +```astro live +--- +import Link from 'fulldev-ui/components/Link.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/links.mdx b/src/content/pages/docs/components/links.mdx new file mode 100644 index 000000000..ba62753d0 --- /dev/null +++ b/src/content/pages/docs/components/links.mdx @@ -0,0 +1,57 @@ +--- +_block: Content7 +title: Links +description: A utility component for displaying multiple links. +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Links from 'fulldev-ui/components/Links.astro' +--- + + +``` + +## Props + + + +## Examples + +### `direction` + +```astro live +--- +import Links from 'fulldev-ui/components/Links.astro' +--- + + +``` + +### `variant` + +```astro live +--- +import Links from 'fulldev-ui/components/Links.astro' +--- + + + + +``` + +### `size` + +```astro live +--- +import Links from 'fulldev-ui/components/Links.astro' +--- + + + + + + +``` diff --git a/src/content/pages/docs/components/list.mdx b/src/content/pages/docs/components/list.mdx new file mode 100644 index 000000000..d5db20980 --- /dev/null +++ b/src/content/pages/docs/components/list.mdx @@ -0,0 +1,42 @@ +--- +_block: Content7 +title: List +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import List from 'fulldev-ui/components/List.astro' +--- + + +``` + +## Props + + + +## Examples + +### `as` + +```astro live +--- +import List from 'fulldev-ui/components/List.astro' +--- + + +``` + +### `size` + +```astro live +--- +import List from 'fulldev-ui/components/List.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/logo.mdx b/src/content/pages/docs/components/logo.mdx new file mode 100644 index 000000000..f142efcb6 --- /dev/null +++ b/src/content/pages/docs/components/logo.mdx @@ -0,0 +1,24 @@ +--- +_block: Content7 +title: Logo +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Logo from 'fulldev-ui/components/Logo.astro' +--- + + +``` + +## Props + + diff --git a/src/content/pages/docs/components/menu.mdx b/src/content/pages/docs/components/menu.mdx new file mode 100644 index 000000000..46cda856d --- /dev/null +++ b/src/content/pages/docs/components/menu.mdx @@ -0,0 +1,48 @@ +--- +_block: Content7 +title: Menu +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' +import Card from 'fulldev-ui/structures/Card.astro' + +```astro live +--- +import Menu from 'fulldev-ui/components/Menu.astro' +--- + + +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Menu from 'fulldev-ui/components/Menu.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/paragraph.mdx b/src/content/pages/docs/components/paragraph.mdx new file mode 100644 index 000000000..69e888093 --- /dev/null +++ b/src/content/pages/docs/components/paragraph.mdx @@ -0,0 +1,44 @@ +--- +_block: Content7 +title: Paragraph +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +--- + +The quick brown fox jumps +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +--- + +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +The quick brown fox jumps +``` + +### `text` + +```astro live +--- +import Paragraph from 'fulldev-ui/components/Paragraph.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/rating.mdx b/src/content/pages/docs/components/rating.mdx new file mode 100644 index 000000000..133ebc728 --- /dev/null +++ b/src/content/pages/docs/components/rating.mdx @@ -0,0 +1,43 @@ +--- +_block: Content7 +title: Rating +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Rating from 'fulldev-ui/components/Rating.astro' +--- + + +``` + +## Props + + + +## Examples + +### `score` + +```astro live +--- +import Rating from 'fulldev-ui/components/Rating.astro' +--- + + + +``` + +### `size` + +```astro live +--- +import Rating from 'fulldev-ui/components/Rating.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/select.mdx b/src/content/pages/docs/components/select.mdx new file mode 100644 index 000000000..ae7c20588 --- /dev/null +++ b/src/content/pages/docs/components/select.mdx @@ -0,0 +1,46 @@ +--- +_block: Content7 +title: Select +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Select from 'fulldev-ui/components/Select.astro' +--- + + +``` + +## Props + + + +## Examples + +```astro live +--- +import Select from 'fulldev-ui/components/Select.astro' +--- + + +``` + +```astro live +--- +import Select from 'fulldev-ui/components/Select.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/social.mdx b/src/content/pages/docs/components/social.mdx new file mode 100644 index 000000000..c24044337 --- /dev/null +++ b/src/content/pages/docs/components/social.mdx @@ -0,0 +1,92 @@ +--- +_block: Content7 +title: Social +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Social from 'fulldev-ui/components/Social.astro' +--- + + +``` + +## Props + + + +## Examples + +### `href` + +If possible, the platform `icon` will be automatically set based on the `href`. The following platforms are supported: + +- X +- Facebook +- Instagram +- LinkedIn +- YouTube +- TikTok +- Twitch +- GitHub +- Discord + +```astro live +--- +import Social from 'fulldev-ui/components/Social.astro' +--- + + + + + +``` + +### `icon` + +You can also manually set the `icon`, in which case this component behaves like a regular ``. + +```astro live +--- +import Social from 'fulldev-ui/components/Social.astro' +--- + + +``` + +### `variant` + +```astro live +--- +import Social from 'fulldev-ui/components/Social.astro' +--- + + + + + +``` + +### `size` + +```astro live +--- +import Social from 'fulldev-ui/components/Social.astro' +--- + +Small +Medium +Large +``` + +### `text` + +```astro live +--- +import Social from 'fulldev-ui/components/Social.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/socials.mdx b/src/content/pages/docs/components/socials.mdx new file mode 100644 index 000000000..f19edf72f --- /dev/null +++ b/src/content/pages/docs/components/socials.mdx @@ -0,0 +1,103 @@ +--- +_block: Content7 +title: Socials +description: A utility component for displaying multiple socials. +--- + +# Socials + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Socials from 'fulldev-ui/components/Socials.astro' +--- + + +``` + +## Props + + + +## Examples + +### `variant` + +```astro live +--- +import Socials from 'fulldev-ui/components/Socials.astro' +--- + + + + + + +``` + +### `size` + +```astro live +--- +import Socials from 'fulldev-ui/components/Socials.astro' +--- + + + + + + +``` diff --git a/src/content/pages/docs/components/switch.mdx b/src/content/pages/docs/components/switch.mdx new file mode 100644 index 000000000..b6910a079 --- /dev/null +++ b/src/content/pages/docs/components/switch.mdx @@ -0,0 +1,32 @@ +--- +_block: Content7 +title: Switch +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Switch from 'fulldev-ui/components/Switch.astro' +--- + + +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Switch from 'fulldev-ui/components/Switch.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/components/tagline.mdx b/src/content/pages/docs/components/tagline.mdx new file mode 100644 index 000000000..846be82f4 --- /dev/null +++ b/src/content/pages/docs/components/tagline.mdx @@ -0,0 +1,42 @@ +--- +_block: Content7 +title: Tagline +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Tagline from 'fulldev-ui/components/Tagline.astro' +--- + +Tagline +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Tagline from 'fulldev-ui/components/Tagline.astro' +--- + +Small +Medium +Large +``` + +### `text` + +```astro live +--- +import Tagline from 'fulldev-ui/components/Tagline.astro' +--- + + +``` diff --git a/src/content/pages/docs/components/textarea.mdx b/src/content/pages/docs/components/textarea.mdx new file mode 100644 index 000000000..64e1d29ed --- /dev/null +++ b/src/content/pages/docs/components/textarea.mdx @@ -0,0 +1,32 @@ +--- +_block: Content7 +title: Textarea +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Textarea from 'fulldev-ui/components/Textarea.astro' +--- + + +``` + +## Props + + + +## Examples + +### `size` + +```astro live +--- +import Textarea from 'fulldev-ui/components/Textarea.astro' +--- + + + + +``` diff --git a/src/content/pages/docs/customization.mdx b/src/content/pages/docs/customization.mdx new file mode 100644 index 000000000..de80a1abd --- /dev/null +++ b/src/content/pages/docs/customization.mdx @@ -0,0 +1,183 @@ +--- +_block: Content7 +title: Customization +description: Customize styles and components. +--- + +## Overriding styles + +While fulldev-ui outputs 100% vanilla CSS, it is also fully compatible with [TailwindCSS](https://tailwindcss.com/) and [Shadcn/ui](https://ui.shadcn.com/). + +### Using CSS variables + +###### Default colors for backgrounds and text + +``` +--background: 0 0% 100%; +--foreground: 222.2 47.4% 11.2%; +``` + +###### Used for muted backgrounds and text + +``` +--muted: 210 40% 96.1%; +--muted-foreground: 215.4 16.3% 46.9%; +``` + +###### Used for `` and other panels + +``` +--card: 0 0% 100%; +--card-foreground: 222.2 47.4% 11.2%; +``` + +###### Default border color + +``` +--border: 214.3 31.8% 91.4%; +``` + +###### Border color for inputs such as ``, ``, `` + +``` +--input: 214.3 31.8% 91.4%; +``` + +###### Primary colors for `` + +``` +--primary: 222.2 47.4% 11.2%; +--primary-foreground: 210 40% 98%; +``` + +###### Secondary colors for `` + +``` +--secondary: 210 40% 96.1%; +--secondary-foreground: 222.2 47.4% 11.2%; +``` + +###### Accent colors ghost and outline `` + +``` +--accent: 210 40% 96.1%; +--accent-foreground: 222.2 47.4% 11.2%; +``` + +###### Used for focus ring + +``` +--ring: 215 20.2% 65.1%; +``` + +###### Border radius for cards, panels, input and buttons + +``` +--radius: 0.5rem; +``` + +#### Dark mode + +Dark mode colors can be customized by adding them within the `.dark` class: + +```css +:root { + /* Regular color go here */ +} + +.dark { + /* Dark mode colors go here */ +} +``` + +### Using vanilla CSS + +Components use simple CSS classes that match their names. For example: + +- `` uses the class `.button` +- `` adds `.variant-secondary` +- `` adds `.muted` + +You can then simply override the styles in your own CSS file like this: + +The plugin [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) is pre-installed so you can use the `&` operator to nest your styles. + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Button +Secondary + + +``` + +### Using Tailwind classes + +Tailwind is pre-installed. You don't have to use it, but you can. + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Button + + Secondary + +``` + +### Using Tailwind @apply + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Button + Secondary + + +``` + +## Overriding components + +All components can be overridden by defining a new path in the integration: + +```ts +// astro.config.ts +import { defineConfig } from 'astro/config' +import fulldev from 'fulldev-ui/integration' + +export default defineConfig({ + integrations: [ + fulldev({ + override: { + Button: 'src/components/Button.astro', + }, + }), + ], +}) +``` + +Everywhere where the `Button` component is imported, the new component will be used instead. + +This not only works for .astro files, but for all files in the entire library. Please check the [repository](https://github.com/fulldotdev/ui) to see what you can override. diff --git a/src/content/pages/docs/frameworks.mdx b/src/content/pages/docs/frameworks.mdx new file mode 100644 index 000000000..d05debb46 --- /dev/null +++ b/src/content/pages/docs/frameworks.mdx @@ -0,0 +1,30 @@ +--- +_block: Content7 +title: Integrating frameworks +description: Compatible with all JS and CSS frameworks. +--- + +## Svelte, Vue React, etc. + +While fulldev-ui is built with Tailwind CSS internally, all styles are converted to regular CSS classes using the `@apply` directive. This means all component styles are available globally through standard CSS classes. + +You can use these component classes (like `button`, `variant-primary`, etc.) directly in any framework (Svelte, Vue, React, and all other frameworks), similar to how you would use other CSS frameworks like DaisyUI. + +```astro live +--- +import Button from 'fulldev-ui/components/Button.astro' +--- + +Button +Button +``` + +## Shadcn/ui + +As detailed in the [customization documentation](/overview/customization/), Fulldev UI shares the same styling variables as Shadcn/ui, ensuring complete compatibility between the two libraries. + +This means you can seamlessly integrate Shadcn/ui components alongside Fulldev UI components while maintaining consistent styling and behavior. + +## TailwindCSS + +TailwindCSS comes pre-installed. You don't have to use it, but you can if you want to. diff --git a/src/content/pages/docs/index.mdx b/src/content/pages/docs/index.mdx new file mode 100644 index 000000000..9200a7f58 --- /dev/null +++ b/src/content/pages/docs/index.mdx @@ -0,0 +1,21 @@ +--- +_block: Content7 +title: Introduction +description: Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation. +--- + +## Why we built it + +After repeatedly encountering the same challenges in [our company's](https://full.dev) client projects, we decided to build this library. After successfully using it in production websites, we decided to open-source it to help others facing similar problems. + +## Some features + +- Built entirely with Astro components +- Outputs vanilla CSS, html and minimal JavaScript +- Compatible with all JS frameworks +- Compatible with Tailwind and Shadcn/ui +- Integrates with [content collections](https://docs.astro.build/en/guides/content-collections/) +- Blocks included, like Hero, CTA and Features +- Layouts included, like Docs, Post and Product +- Automatically generated pages +- And more... diff --git a/src/content/pages/docs/installation.mdx b/src/content/pages/docs/installation.mdx new file mode 100644 index 000000000..4e0e896b2 --- /dev/null +++ b/src/content/pages/docs/installation.mdx @@ -0,0 +1,30 @@ +--- +_block: Content7 +title: Installation +--- + +import Link from 'fulldev-ui/components/Link.astro' + +Run any of the following commands to add fulldev-ui to your dependencies. + +```bash +npm i fulldev-ui +# or +pnpm i fulldev-ui +# or +yarn add fulldev-ui +# or +bun add fulldev-ui +``` + +Add the integration to your `astro.config.ts` file. + +```ts +// astro.config.ts +import { defineConfig } from 'astro/config' +import fulldev from 'fulldev-ui/integration' + +export default defineConfig({ + integrations: [fulldev()], +}) +``` diff --git a/src/content/pages/docs/layouts/doc.mdx b/src/content/pages/docs/layouts/doc.mdx new file mode 100644 index 000000000..90692cf38 --- /dev/null +++ b/src/content/pages/docs/layouts/doc.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Doc +description: For documentation pages, just like this one. +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please try it in your own project for now. diff --git a/src/content/pages/docs/layouts/page.mdx b/src/content/pages/docs/layouts/page.mdx new file mode 100644 index 000000000..8e46b3adf --- /dev/null +++ b/src/content/pages/docs/layouts/page.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Page +description: For marketing pages, just like the home page. +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please try it in your own project for now. diff --git a/src/content/pages/docs/pages.mdx b/src/content/pages/docs/pages.mdx new file mode 100644 index 000000000..9045b8251 --- /dev/null +++ b/src/content/pages/docs/pages.mdx @@ -0,0 +1,130 @@ +--- +_block: Content7 +title: Generating Pages +description: Go a step further than just using components. +--- + +import Link from 'fulldev-ui/components/Link.astro' + +# Generating Pages + +With our integration, you can generate pages using content files with type-safe frontmatter, minimal configuration, and an easy-to-understand project structure. + +## Starter Template + +This is the recommended way to get started with our content layer integration. We've created a starter template with examples of everything you need to get started. This instantly gives you access to generating pages, using presets, internationalization and more without any additional setup. + +```bash +pnpm create astro@latest -- --template fulldotdev/starter +``` + +## Manual Setup + +To get started with the manual setup, you need to install the integration and add `injectRoutes: true` to your `astro.config.ts` file, see frontmatter below for more information on how this generates a site using content files. + +```ts +import { defineConfig } from 'astro/config' +import fulldev from 'fulldev-ui/integration' + +// https://astro.build/config +export default defineConfig({ + integrations: [ + fulldev({ + // other options + injectRoutes: true, + }), + ], +}) +``` + +`injectRoutes` reads your content files and generates routes for them in the generated site. Supporting file types like markdown and MDX. + +## Project Structure + +To start with, your project structure should look like this: + +```md +. +├── src/ +│ ├── blocks/ +│ │ └── ... +│ ├── components/ +│ │ └── ... +│ ├── layouts/ +│ │ └── ... +│ ├── images/ +│ │ └── ... +│ ├── content/ +│ │ ├── pages/ +│ │ │ └── ... +│ │ ├── presets/ +│ │ │ ├── base.yml +│ │ │ └── ... +│ │ └── ... +│ ├── css/ +│ │ ├── custom.css +│ │ └── ... +├── public/ +│ └── ... +└── +``` + +## Creating a page + +Creating a page is as simple as creating a new file in the **src/content/pages** directory. + +For example, + +- **src/content/pages/index.mdx** will be the root of your site. +- **src/content/pages/about.mdx** will appear at /about. +- **src/content/pages/team/first-name.mdx** will appear at /team/first-name. + +### Using presets + +Presets are a way to apply a set of configurations to a page. This can be apply navigation settings, seo and more. + +To learn more about presets, see the using presets guide. + +### Using layouts + +Layouts are a way to apply styles to a page. Used for having multiple layouts like a blog layout, documentation layout, etc. + +To learn more about layouts, see the using layouts guide. + +### Frontmatter + +Each file has a few frontmatter objects that are important to know about. The frontmatter is fully type-safe, so you will know if you use an unavailable option or mistype something. SEO has priority over title and description, however title and description are used in multiple places like cards so they remain important. + +```yml +--- +preset: [docs] +component: DocsLayout + +seo: + title: Page Title + description: This is my page description + image: /image.jpg # Open Graph Image + +# Information on the page, this is used in places like card, sidebar, etc. +title: Page Title +description: This is my page description + +sections: # Here you generate the page by adding a component and passing props + - component: Hero + heading: Page Title + text: This is my page description + buttons: + - text: Button + color: brand + href: / + - text: Button + href: / +--- +# This is the prose, you can use markdown here, typically used for blogs, docs, etc. +``` + +For all objects avaliable in the frontmatter, see the pages collection. + +## Using custom components + +You can use custom components simply creating them in the **src/components**, **src/blocks** or **src/layouts** directory. You can then use those in the component property of the frontmatter. If you want to override a component from the library, see the [overriding components](/guides/overriding-components/) guide. diff --git a/src/content/pages/docs/structures.mdx b/src/content/pages/docs/structures.mdx new file mode 100644 index 000000000..289a73c23 --- /dev/null +++ b/src/content/pages/docs/structures.mdx @@ -0,0 +1,7 @@ +--- +_block: Content7 +title: Using Structures +description: Build consistent blocks and layouts with structures. +--- + +Please look into the the blocks and layouts in the Gtihub repo to see how they are used. diff --git a/src/content/pages/base/card.mdx b/src/content/pages/docs/structures/_card.mdx similarity index 57% rename from src/content/pages/base/card.mdx rename to src/content/pages/docs/structures/_card.mdx index be9476c02..fe88d5aa9 100644 --- a/src/content/pages/base/card.mdx +++ b/src/content/pages/docs/structures/_card.mdx @@ -1,45 +1,42 @@ --- -_layout: ComponentLayout -settings: components - +_block: Content7 title: Card --- # Card -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' +import Props from 'fulldev-ui/components/docs/Props.astro' ```astro live --- -import Card from 'fulldev-ui/components/Card.astro' +import Card from 'fulldev-ui/structures/Card.astro' --- ``` ## Props - + ## Examples ```astro live --- -import Card from 'fulldev-ui/components/Card.astro' +import Card from 'fulldev-ui/structures/Card.astro' --- - - -``` - -```astro live ---- -import Card from 'fulldev-ui/components/Card.astro' +import Card from 'fulldev-ui/structures/Card.astro' --- diff --git a/src/content/pages/base/_dialog.mdx b/src/content/pages/docs/structures/_dialog.mdx similarity index 83% rename from src/content/pages/base/_dialog.mdx rename to src/content/pages/docs/structures/_dialog.mdx index c789c4eca..b5e8c00fe 100644 --- a/src/content/pages/base/_dialog.mdx +++ b/src/content/pages/docs/structures/_dialog.mdx @@ -1,7 +1,5 @@ --- -_layout: ComponentLayout -settings: components - +_block: Content7 title: Dialog --- diff --git a/src/content/pages/base/_drawer.mdx b/src/content/pages/docs/structures/_drawer.mdx similarity index 63% rename from src/content/pages/base/_drawer.mdx rename to src/content/pages/docs/structures/_drawer.mdx index bce178d9b..f223d085d 100644 --- a/src/content/pages/base/_drawer.mdx +++ b/src/content/pages/docs/structures/_drawer.mdx @@ -1,14 +1,12 @@ --- -_layout: ComponentLayout -settings: components - +_block: Content7 title: Drawer --- ```astro live --- -import Drawer from 'fulldev-ui/components/Drawer.astro' import Heading from 'fulldev-ui/components/Heading.astro' +import Drawer from 'fulldev-ui/structures/Drawer.astro' --- diff --git a/src/content/pages/docs/structures/card.mdx b/src/content/pages/docs/structures/card.mdx new file mode 100644 index 000000000..4233b4e6e --- /dev/null +++ b/src/content/pages/docs/structures/card.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Card +description: A box with a border, padding and rounded corners +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/code.mdx b/src/content/pages/docs/structures/code.mdx new file mode 100644 index 000000000..890979859 --- /dev/null +++ b/src/content/pages/docs/structures/code.mdx @@ -0,0 +1,42 @@ +--- +_block: Content7 +title: Code +description: Enhanced code component with live preview. +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' +import Code from 'fulldev-ui/structures/Code.astro' + +```astro live +I'm a live preview +``` + +## Usage in html + +Use it in the same way as the native Astro `` component, which is documented [here](https://docs.astro.build/en/reference/components-reference/#code-). + +The following code will translate to the example at the top of this page: + +```astro +--- +import Code from 'fulldev-ui/structures/Code.astro' +--- + +I'm a live preview`} /> +``` + +Will render as: + +I'm a live preview`} /> + +## Usage in markdown + +Thanks to [this great plugin](https://github.com/mattjennings/astro-live-code) you can also use it directly in markdown files. + +The following code will translate to the example at the top of this page: + +````html +```astro live +I'm a live preview +``` +```` diff --git a/src/content/pages/docs/structures/container.mdx b/src/content/pages/docs/structures/container.mdx new file mode 100644 index 000000000..606c24bf2 --- /dev/null +++ b/src/content/pages/docs/structures/container.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Container +description: Sets a max-width, padding and centers the content +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/drawer.mdx b/src/content/pages/docs/structures/drawer.mdx new file mode 100644 index 000000000..60637f417 --- /dev/null +++ b/src/content/pages/docs/structures/drawer.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Drawer +description: A panel that slides out from the side of the screen +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the Header blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/group.mdx b/src/content/pages/docs/structures/group.mdx new file mode 100644 index 000000000..e029447d0 --- /dev/null +++ b/src/content/pages/docs/structures/group.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Group +description: Group buttons and similar components +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/layout.mdx b/src/content/pages/docs/structures/layout.mdx new file mode 100644 index 000000000..c6aebe59b --- /dev/null +++ b/src/content/pages/docs/structures/layout.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Container +description: Sets a head, body and some base styles +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the layouts for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/masonry.mdx b/src/content/pages/docs/structures/masonry.mdx new file mode 100644 index 000000000..0d153d984 --- /dev/null +++ b/src/content/pages/docs/structures/masonry.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Masonry +description: Places items like cards in a masonry layout +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/matrix.mdx b/src/content/pages/docs/structures/matrix.mdx new file mode 100644 index 000000000..cdce5e31b --- /dev/null +++ b/src/content/pages/docs/structures/matrix.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Matrix +description: Places items like cards in a grid +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/panel.mdx b/src/content/pages/docs/structures/panel.mdx new file mode 100644 index 000000000..39507c239 --- /dev/null +++ b/src/content/pages/docs/structures/panel.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Panel +description: A box with a border, padding and rounded corners used for sections +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/prose.mdx b/src/content/pages/docs/structures/prose.mdx new file mode 100644 index 000000000..4b75ded1a --- /dev/null +++ b/src/content/pages/docs/structures/prose.mdx @@ -0,0 +1,33 @@ +--- +_block: Content7 +title: Prose +description: Applies styling to child components +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Prose from 'fulldev-ui/structures/Prose.astro' +--- + + + Welcome to Our Blog + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia + odio vitae vestibulum vestibulum. + + + Key Features + + Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. + + + Simple and elegant design + Responsive layout + Easy customization + + +``` diff --git a/src/content/pages/docs/structures/section.mdx b/src/content/pages/docs/structures/section.mdx new file mode 100644 index 000000000..3f4535b0b --- /dev/null +++ b/src/content/pages/docs/structures/section.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Section +description: Sets vertical padding and some base styles +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/stack.mdx b/src/content/pages/docs/structures/stack.mdx new file mode 100644 index 000000000..526318912 --- /dev/null +++ b/src/content/pages/docs/structures/stack.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Stack +description: Places items like cards in a horizontal or vertical stack +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/writeup.mdx b/src/content/pages/docs/structures/writeup.mdx new file mode 100644 index 000000000..0a8a58b51 --- /dev/null +++ b/src/content/pages/docs/structures/writeup.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Writeup +description: Applies styling to child components, similar to Prose +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/index.mdx b/src/content/pages/index.mdx index 87835c12e..db3a9e0f1 100644 --- a/src/content/pages/index.mdx +++ b/src/content/pages/index.mdx @@ -1,66 +1,52 @@ --- -seo: - title: Fulldev UI - Astro component and block library, open-source - description: Make websites rapidly with pre-built components and blocks. - image: /images/og-image.png +_schema: page +_block: Hero1 -sections: - hero: - _bookshop_name: Hero - color: brand - badge: - as: a - text: We just released our biggest update yet 🎉 - href: https://discord.gg/vXZqMbadm8 - heading: The Astro UI library to build content sites - text: Make websites with prebuilt components and blocks - buttons: - - text: Get Started - href: /overview/installation - - text: GitHub - href: https://github.com/fulldotdev/ui - target: _blank - icon: brand-github +title: Fulldev UI - Astro component and block library, open-source +description: Make websites rapidly with pre-built components and blocks. +heading: Build complete websites with this Astro UI library +paragraph: Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation. +buttons: + - text: Get Started + href: /docs/ + - text: GitHub + href: https://github.com/fulldotdev/ui + icon: brand-github + target: _blank - blocks: - _bookshop_name: Content - color: brand - label: Blocks +sections: + - _block: Content2 + tagline: Blocks heading: Use pre-built blocks with just props - text: we created a great gallery of blocks to build content sites with a modern look and feel, all of our blocks are build with components from the library to achieve a consistent look. - image: /images/block-code.png - reverse: odd + paragraph: We created a great gallery of blocks to build content sites with a modern look and feel, all of our blocks are build with components from the library to achieve a consistent look. + image: + src: /images/block-code.png buttons: - - href: /blocks + - href: /docs/blocks/ icon: layout text: View blocks + variant: secondary - components: - _bookshop_name: Content - color: brand - label: Components + - _block: Content2 + tagline: Components heading: Or build your own, with easy to use components - text: our rich set of components make it easy to build your own blocks with great customizability through props and global theming. - image: /images/component-code.png - reverse: odd + paragraph: Our rich set of components make it easy to build your own blocks with great customizability through props and global theming. + image: + src: /images/component-code.png buttons: - - href: /base/badge + - text: View components + href: /docs/components/ icon: code - text: View components + variant: secondary - cta: - _bookshop_name: Cta - size: lg - variant: primary + - _block: Cta1 heading: Build content websites in a fraction of time - text: A library of components and blocks to build content sites, fast. + paragraph: A library of components and blocks to build content sites, fast. buttons: - text: Get Started - href: /overview/installation - color: brand + href: /docs/ - text: Github href: https://github.com/fulldotdev/ui - target: _blank icon: brand-github - color: brand + target: _blank --- diff --git a/src/content/pages/overview/frameworks.mdx b/src/content/pages/overview/frameworks.mdx deleted file mode 100644 index 6c2831153..000000000 --- a/src/content/pages/overview/frameworks.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -# Frameworks - -Fulldev UI is written in vanilla CSS and .astro files. It is framework agnostic. - -## JS frameworks - -All styles in Fulldev UI use regular CSS and classes. Classes use the following naming convention: - -- Component classes are the same as the component name, like `button` for ``. -- Prop classes have the prop name as prefix, like `variant-primary` for ``. -- If a prop is a boolean the class is added without a prefix, like `contrast`. - -This means you can apply Fulldev UI styles to any framework component as follows: - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - - Button - Button -``` - -## CSS frameworks - -A TailwindCSS plugin and UnoCSS preset is available. - -### TailwindCSS - -In your `tailwind.config.ts` add the following: - -```ts -// tailwind.config.ts -import fulldevUI from 'fulldev-ui/tailwind' - -export default { - plugins: [fulldevUI], -} -``` - -In your `astro.config.ts` add the following: - -```ts -// astro.config.ts -import tailwind from '@astrojs/tailwind' - -export default defineConfig({ - integrations: [ - tailwind({ - // Disable injecting styles, import manually instead - applyBaseStyles: false, - }), - ], -}) -``` - -Import the css file file below anywhere in your project. - -```css -@tailwind base layer(base); -@tailwind components; -@tailwind utilities; -``` - -### UnoCSS - -In your `uno.config.ts` add the following: - -```ts -// uno.config.ts -import fulldevUI from 'fulldev-ui/unocss' - -export default defineConfig({ - injectReset: false, - presets: [fulldevUI], -}) -``` - -Do not use `injectReset` when using the UnoCSS preset, as it will conflict with the reset provided by Fulldev UI. If you do want a style reset, be sure to import it in the `base` layer, similar to the TailwindCSS example above. - -## Utility classes - -The following classes are available when using the Tailwind plugin or UnoCSS preset. - -### Spacing - -The following spacing classes are added to your tailwind/uno config. - -You can use them like `p-space-1`, `m-space-1`, `h-space-1`, `w-space-1`, etc. - -```ts -spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', -}, -``` - -### Font size - -The following spacing classes are added to your tailwind/uno config. - -You can use them like `text-1`, `text-2`, `text-3`, etc. - -```ts -fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', -} -``` - -### Border radius - -The following border radius classes are added to your tailwind/uno config. - -You can use them like `rounded-1`, `rounded-2`, `rounded-3`, etc. - -```ts -borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', -} -``` - -### Color classes - -The following color classes are added to your tailwind/uno config. - -You can use them like `bg-color-1`, `text-base-2`, `border-base-6`, etc. - -```ts -colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - } -} -``` diff --git a/src/content/pages/overview/installation.mdx b/src/content/pages/overview/installation.mdx deleted file mode 100644 index 961174d02..000000000 --- a/src/content/pages/overview/installation.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Installation - -Install fulldev-ui with your favorite package manager and you are ready to go. To get started with the integration see the integration page. - -```bash -pnpm i fulldev-ui -# or -bun i fulldev-ui -# or -yarn add fulldev-ui -# or -npm i fulldev-ui -``` diff --git a/src/content/pages/overview/integration.mdx b/src/content/pages/overview/integration.mdx deleted file mode 100644 index c032bacec..000000000 --- a/src/content/pages/overview/integration.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Integration - -After installation you can generate your color palettes via an Astro integration. You can optionally add a custom css file and define custom colors and other theming options, see the theming page for more information. - -```ts -import { defineConfig } from 'astro/config' -import fulldev from 'fulldev-ui/integration' - -// https://astro.build/config -export default defineConfig({ - integrations: [ - fulldev({ - css: '/src/css/custom.css', - colors: { - theme: 'dark', - dark: { - background: '#111110', - base: '#6F6D66', - brand: '#F50', - }, - light: { - background: '#EEEEEC', - base: '#6F6D66', - brand: '#F50', - }, - }, - }), - ], -}) -``` diff --git a/src/content/pages/overview/introduction.mdx b/src/content/pages/overview/introduction.mdx deleted file mode 100644 index f783756f8..000000000 --- a/src/content/pages/overview/introduction.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -# Introduction - -Fulldev UI focuses on content websites rather than applications. - -##### Build entire websites with just components - -Fulldev UI is unique in that it introduces larger components to build entire pages, and even websites. Like a Section component that just works. - -##### Integrates with any JS / CSS framework - -Want to use Tailwind, or something else? You can overwrite all styles. Need an interactive framework component? Styles can be applied with one simple class. - -##### Automated colors, spacing and sizes - -Everything is carefully designed to be fully responsive. Component adapt to their environment, like a Heading being different in a Section than in a Card. You can also customize via simple props. diff --git a/src/content/pages/overview/theming.mdx b/src/content/pages/overview/theming.mdx deleted file mode 100644 index 2bfc03a4b..000000000 --- a/src/content/pages/overview/theming.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Theming - -## Colors - -The color theme is inspired by / compatible with Radix Colors. - -### Automatic setup - -With the fulldev-ui integration you can easily set a theme and generate a radix color palette. See the integration page for details. - -### Manual setup - -You can define a `base` and a `brand` theme, both with 12 steps and 1 contrast step for text on step 9. For a detailed explenation see this page. - -```css -:root, -.theme-light { - --base-1: ; - --base-2: ; - --base-3: ; - --base-4: ; - --base-5: ; - --base-6: ; - --base-7: ; - --base-8: ; - --base-9: ; - --base-10: ; - --base-11: ; - --base-12: ; - --base-contrast: ; - - --brand-1: ; - --brand-2: ; - --brand-3: ; - --brand-4: ; - --brand-5: ; - --brand-6: ; - --brand-7: ; - --brand-8: ; - --brand-9: ; - --brand-10: ; - --brand-11: ; - --brand-12: ; - --brand-contrast: ; -} -``` - -### Dark theme - -Dark mode is set via a simple `.theme-dark` class. - -If you want to use a dark theme by default, remove the `:root` selector from the light theme and add it to the dark theme. - -Components in Fulldev UI that support theme switching have the `theme` prop available, which adds either the `theme-dark` or `theme-light` class - -```css -.theme-dark { - /* Same variables here as above */ -} -``` - -## Radius - -The `--border-radius` variable is a multiplier applied to all radius values. The default value is `1`. - -```css -:root { - --border-radius: 1; -} -``` - -## Other - -Since Fulldev UI uses just regular CSS with low specificity, you can customize anything else using custom CSS. - -We plan to add more customization via variables later. diff --git a/src/content/pages/showcase.mdx b/src/content/pages/showcase.mdx index 76d4a3cfb..a5be8f421 100644 --- a/src/content/pages/showcase.mdx +++ b/src/content/pages/showcase.mdx @@ -1,62 +1,30 @@ --- -showcase: - # Add your project here below 👇 - - - heading: Van Dillen Antieke Bouwmaterialen - image: /showcase/van-dillen-antieke-bouwmaterialen.webp - href: 'https://vdabouwmaterialen.nl' - - heading: Anti Slip Profiles - image: /showcase/anti-slip-profiles.webp - href: 'https://antislipprofiles.com' - - heading: Fulldev UI - image: /showcase/fulldev-ui.webp - href: 'https://ui.full.dev' - - heading: The Gym Haren - image: /showcase/the-gym-haren.webp - href: 'https://thegymharen.nl' - - heading: Lavis Detailing - image: /showcase/lavis-detailing.webp - href: 'https://lavisdetailing.nl' - - heading: Leren Trainingsacteren - image: /showcase/leren-trainingsacteren.webp - href: 'https://lerentrainingsacteren.nl' - - heading: Miele Witgoedcenter Amsterdam - image: /showcase/miele-witgoedcenter-amsterdam.webp - href: 'https://witgoedcenteramsterdam.nl' - - heading: Sloepverhuur Bolsward - image: /showcase/sloepverhuur-bolsward.webp - href: 'https://sloepverhuurbolsward.nl' - - heading: Stark Vulcanising Products - image: /showcase/stark-vulcanising-products.webp - -_layout: PostLayout -settings: components +title: Showcase --- -import Masonry from 'fulldev-ui/components/Masonry.astro' -import Card from 'fulldev-ui/components/Card.astro' +import Card from 'fulldev-ui/structures/Card.astro' +import { getCollection } from 'astro:content' + +export const projects = ( + await getCollection( + 'pages', + ({ slug }) => slug.startsWith('showcase') && slug !== 'showcase' + ) +).map((p) => p.data) # Showcase Projects that are built with Fulldev UI. - - - {frontmatter.showcase.map((showcase) => ( - - ))} - diff --git a/src/content/pages/structure/_row.mdx b/src/content/pages/structure/_row.mdx deleted file mode 100644 index 6eee78f5d..000000000 --- a/src/content/pages/structure/_row.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -_layout: BlockLayout -title: Row -description: Structures children in a horizontal row. This component sizes dynamically, the margin between a heading and a paragraph is smaller than the margin between a paragraph an image. ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Row from 'fulldev-ui/components/Row.astro' ---- - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/_wrap.mdx b/src/content/pages/structure/_wrap.mdx deleted file mode 100644 index 978414a38..000000000 --- a/src/content/pages/structure/_wrap.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Wrap -description: Structures children onto one line or can wrap onto multiple lines. ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Wrap from 'fulldev-ui/components/Wrap.astro' ---- - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/carousel.mdx b/src/content/pages/structure/carousel.mdx deleted file mode 100644 index 33c3b6fb5..000000000 --- a/src/content/pages/structure/carousel.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Carousel ---- - -```astro live ---- -import Carousel from 'fulldev-ui/components/Carousel.astro' -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/column.mdx b/src/content/pages/structure/column.mdx deleted file mode 100644 index da37a9380..000000000 --- a/src/content/pages/structure/column.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Column ---- - -```astro live ---- -import Column from 'fulldev-ui/components/Column.astro' -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/grid.mdx b/src/content/pages/structure/grid.mdx deleted file mode 100644 index c0a330a1a..000000000 --- a/src/content/pages/structure/grid.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Grid ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Grid from 'fulldev-ui/components/Grid.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/masonry.mdx b/src/content/pages/structure/masonry.mdx deleted file mode 100644 index a458b7a8d..000000000 --- a/src/content/pages/structure/masonry.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Masonry ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Masonry from 'fulldev-ui/components/Masonry.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/split.mdx b/src/content/pages/structure/split.mdx deleted file mode 100644 index fcb8a10e4..000000000 --- a/src/content/pages/structure/split.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Split ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Split from 'fulldev-ui/components/Split.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/spread.mdx b/src/content/pages/structure/spread.mdx deleted file mode 100644 index 5f152608f..000000000 --- a/src/content/pages/structure/spread.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Spread ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Spread from 'fulldev-ui/components/Spread.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/stack.mdx b/src/content/pages/structure/stack.mdx deleted file mode 100644 index 505dfd082..000000000 --- a/src/content/pages/structure/stack.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Stack ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Stack from 'fulldev-ui/components/Stack.astro' ---- - - - - - - - - -``` diff --git a/src/content/pages/typography/heading.mdx b/src/content/pages/typography/heading.mdx deleted file mode 100644 index e87c82ca6..000000000 --- a/src/content/pages/typography/heading.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Heading ---- - -# Heading - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -``` - -## Props - - - -## Examples - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` diff --git a/src/content/pages/typography/link.mdx b/src/content/pages/typography/link.mdx deleted file mode 100644 index c51412579..000000000 --- a/src/content/pages/typography/link.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Link ---- - -# Link - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -``` - -## Props - - - -## Examples - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -``` diff --git a/src/content/pages/typography/list.mdx b/src/content/pages/typography/list.mdx deleted file mode 100644 index a36aeb554..000000000 --- a/src/content/pages/typography/list.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: List ---- - -# List - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - - -``` - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - -``` - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - -``` diff --git a/src/content/pages/typography/text.mdx b/src/content/pages/typography/text.mdx deleted file mode 100644 index e3cbbc4cd..000000000 --- a/src/content/pages/typography/text.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Text ---- - -# Text - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -``` - -## Props - - - -## Examples - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` diff --git a/src/content/records/record.yml b/src/content/records/record.yml deleted file mode 100644 index d99e1b8f7..000000000 --- a/src/content/records/record.yml +++ /dev/null @@ -1 +0,0 @@ -title: Test diff --git a/src/content/settings/base.yml b/src/content/settings/base.yml deleted file mode 100644 index 265bdfa5e..000000000 --- a/src/content/settings/base.yml +++ /dev/null @@ -1,63 +0,0 @@ -seo: - image: /images/og-image.png - -code: - head: | - - -header: - heading: Fulldev UI - variant: base - links: - - text: Docs - href: /overview/introduction - - text: Components - href: /typography/heading - - text: Blocks - href: /blocks - - text: Showcase - href: /showcase - search: - icon: search - variant: soft - buttons: - - href: https://github.com/fulldotdev/ui - target: _blank - aria-label: GitHub - icon: brand-github - - href: https://discord.gg/vXZqMbadm8 - target: _blank - aria-label: Discord - icon: brand-discord - drawer: - - links: - - text: Docs - href: /overview/introduction - - text: Components - href: /typography/heading - - text: Blocks - href: /blocks - - heading: Overview - links: - - text: Introduction - href: /overview/introduction - - text: Installation - href: /overview/installation - - text: Integration - href: /overview/integration - - text: Theming - href: /overview/theming - - text: Frameworks - href: /overview/frameworks - - text: Showcase - href: /showcase - - heading: Typography - folder: typography - - heading: Base - folder: base - - heading: Structure - folder: structure diff --git a/src/content/settings/components.yml b/src/content/settings/components.yml deleted file mode 100644 index d26552028..000000000 --- a/src/content/settings/components.yml +++ /dev/null @@ -1,29 +0,0 @@ -sidebar: - - heading: Overview - links: - - text: Introduction - href: /overview/introduction - - text: Installation - href: /overview/installation - - text: Integration - href: /overview/integration - - text: Theming - href: /overview/theming - - text: Frameworks - href: /overview/frameworks - - text: Showcase - href: /showcase - - heading: Typography - folder: typography - - heading: Base - folder: base - - heading: Structure - folder: structure - -toc: - - heading: On this page - links: - - text: Props - href: /overview/introduction - - text: Examples - href: /overview/installation diff --git a/src/css/color.css b/src/css/color.css deleted file mode 100644 index 98636e1dc..000000000 --- a/src/css/color.css +++ /dev/null @@ -1,168 +0,0 @@ -.theme-light, -.theme-light * { - color-scheme: light; -} - -.theme-dark, -.theme-dark * { - color-scheme: dark; -} - -:where(:root), -:where(.theme-light), -:where(.theme-dark), -.color-base, -.color-base - *:where(:not([class*='color-']):not(.color-base [class*='color-'] *)) { - --color-1: var(--base-1); - --color-2: var(--base-2); - --color-3: var(--base-3); - --color-4: var(--base-4); - --color-5: var(--base-5); - --color-6: var(--base-6); - --color-7: var(--base-7); - --color-8: var(--base-8); - --color-9: var(--base-9); - --color-10: var(--base-10); - --color-11: var(--base-11); - --color-12: var(--base-12); - - --color-a1: var(--base-a1, var(--base-1)); - --color-a2: var(--base-a2, var(--base-2)); - --color-a3: var(--base-a3, var(--base-3)); - --color-a4: var(--base-a4, var(--base-4)); - --color-a5: var(--base-a5, var(--base-5)); - --color-a6: var(--base-a6, var(--base-6)); - --color-a7: var(--base-a7, var(--base-7)); - --color-a8: var(--base-a8, var(--base-8)); - --color-a9: var(--base-a9, var(--base-9)); - --color-a10: var(--base-a10, var(--base-10)); - --color-a11: var(--base-a11, var(--base-11)); - --color-a12: var(--base-a12, var(--base-12)); - - --color-contrast: var(--base-contrast); - --color-background: var(--base-background); -} - -.color-brand, -.color-brand - *:where(:not([class*='color-']):not(.color-brand [class*='color-'] *)) { - --color-1: var(--brand-1); - --color-2: var(--brand-2); - --color-3: var(--brand-3); - --color-4: var(--brand-4); - --color-5: var(--brand-5); - --color-6: var(--brand-6); - --color-7: var(--brand-7); - --color-8: var(--brand-8); - --color-9: var(--brand-9); - --color-10: var(--brand-10); - --color-11: var(--brand-11); - --color-12: var(--brand-12); - - --color-a1: var(--brand-a1, var(--brand-1)); - --color-a2: var(--brand-a2, var(--brand-2)); - --color-a3: var(--brand-a3, var(--brand-3)); - --color-a4: var(--brand-a4, var(--brand-4)); - --color-a5: var(--brand-a5, var(--brand-5)); - --color-a6: var(--brand-a6, var(--brand-6)); - --color-a7: var(--brand-a7, var(--brand-7)); - --color-a8: var(--brand-a8, var(--brand-8)); - --color-a9: var(--brand-a9, var(--brand-9)); - --color-a10: var(--brand-a10, var(--brand-10)); - --color-a11: var(--brand-a11, var(--brand-11)); - --color-a12: var(--brand-a12, var(--brand-12)); - - --color-contrast: var(--brand-contrast); - --color-background: var(--brand-background); -} - -.contrast, -.contrast * { - --color-9: var(--color-12); - --color-10: var(--color-12); - --color-11: var(--color-12); - --color-contrast: var(--color-1); -} - -/* :where(:root), -:where(.theme-light), -:where(.theme-dark), -:where(.color-base), -:where(.color-brand), -.variant-base, -.variant-base - *:not([class*='variant-']):not(.variant-base [class*='variant-'] *) { - --background: var(--color-background, var(--color-1)); - --background-hover: var(--color-1); - --background-active: var(--color-1); - --border: var(--color-6); - --border-hover: var(--color-6); - --text: var(--color-11); -} - -.variant-subtle, -.variant-subtle - *:not([class*='variant-']):not(.variant-subtle [class*='variant-'] *) { - --background: var(--color-2); - --background-hover: var(--color-2); - --background-active: var(--color-2); - --border: var(--color-6); - --border-hover: var(--color-6); - --text: var(--color-11); -} - -.variant-ghost, -.variant-ghost - *:not([class*='variant-']):not(.variant-ghost [class*='variant-'] *) { - --background: transparent; - --background-hover: var(--color-3); - --background-active: var(--color-4); - --border: transparent; - --border-hover: transparent; - --text: var(--color-11); -} - -.variant-outline, -.variant-outline - *:not([class*='variant-']):not(.variant-outline [class*='variant-'] *) { - --background: transparent; - --background-hover: var(--color-3); - --background-active: var(--color-5); - --border: var(--color-7); - --border-hover: var(--color-8); - --text: var(--color-11); -} - -.variant-soft, -.variant-soft - *:not([class*='variant-']):not(.variant-soft [class*='variant-'] *) { - --background: var(--color-3); - --background-hover: var(--color-4); - --background-active: var(--color-5); - --border: transparent; - --border-hover: transparent; - --text: var(--color-11); -} - -.variant-surface, -.variant-surface - *:not([class*='variant-']):not(.variant-surface [class*='variant-'] *) { - --background: var(--color-3); - --background-hover: var(--color-4); - --background-active: var(--color-5); - --border: var(--color-7); - --border-hover: var(--color-8); - --text: var(--color-11); -} - -.variant-solid, -.variant-solid - *:not([class*='variant-']):not(.variant-solid [class*='variant-'] *) { - --background: var(--color-9); - --background-hover: var(--color-10); - --background-active: var(--color-10); - --border: transparent; - --border-hover: transparent; - --text: var(--color-contrast); -} */ diff --git a/src/css/custom.css b/src/css/custom.css index 7966013c6..13cf57172 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1,69 +1,20 @@ -/* TODO: temporary decreased due to z-index issue over header */ -.hero:not(.window .hero)::before { - position: absolute; - top: 0; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.1), - #f500 70% - ); - width: 100%; - height: 100%; - content: ''; -} -/* .hero:not(.window .hero)::before { - position: absolute; - top: -80%; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.1), - #f500 90% - ); - width: 100%; - height: 170%; - content: ''; -} */ +@import url(https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900); -.header:not(.window .header) { - backdrop-filter: blur(10px); - border-color: var(--base-a6) !important; - background-color: rgba(17, 17, 16, 0.2) !important; +mark { + background-color: var(--brand-12) !important; + color: var(--brand-1) !important; } -.cta:not(.window .cta) { - backdrop-filter: blur(10px); - border-color: var(--base-a6) !important; - background-color: rgba(17, 17, 16, 0.2) !important; - overflow: visible; - - &::before { - position: absolute; - top: -30%; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.06), - #f500 90% - ); - width: 100%; - height: 160%; - content: ''; - } +.rounded-full { + border-radius: 999px !important; } -mark { - background-color: var(--brand-12) !important; - color: var(--brand-1) !important; +.hero .heading, +.hero .lead { + max-width: 680px; + text-wrap: balance; } -.astro-code { - border: 1px solid var(--base-6); - border-radius: var(--radius-2); - background-color: var(--base-2) !important; - padding: var(--space-5); +.logo .image { + border-radius: 2px; } diff --git a/src/css/size.css b/src/css/size.css deleted file mode 100644 index af17c5922..000000000 --- a/src/css/size.css +++ /dev/null @@ -1,130 +0,0 @@ -:root { - --space-sm-1: 4px; - --space-sm-2: 6px; - --space-sm-3: 8px; - --space-sm-4: 12px; - --space-sm-5: 20px; - --space-sm-6: 40px; - --space-sm-7: 60px; - - --space-md-1: 5px; - --space-md-2: 8px; - --space-md-3: 11px; - --space-md-4: 14px; - --space-md-5: 28px; - --space-md-6: 56px; - --space-md-7: 84px; - - --space-lg-1: 6px; - --space-lg-2: 10px; - --space-lg-3: 14px; - --space-lg-4: 18px; - --space-lg-5: 36px; - --space-lg-6: 72px; - --space-lg-7: 120px; - - --text-sm-1: 12px; - --text-sm-2: 14px; - --text-sm-3: 14px; - --text-sm-4: 16px; - --text-sm-5: 18px; - --text-sm-6: 20px; - --text-sm-7: 24px; - --text-sm-8: 30px; - - --text-md-1: 12px; - --text-md-2: 14px; - --text-md-3: 16px; - --text-md-4: 18px; - --text-md-5: 20px; - --text-md-6: 24px; - --text-md-7: 30px; - --text-md-8: 36px; - - --text-lg-1: 14px; - --text-lg-2: 14px; - --text-lg-3: 18px; - --text-lg-4: 20px; - --text-lg-5: 24px; - --text-lg-6: 30px; - --text-lg-7: 36px; - --text-lg-8: 48px; -} - -@media (min-width: 768px) { - :root { - --text-sm-8: 36px; - --text-md-8: 48px; - --text-lg-8: 60px; - } -} - -.size-sm { - --space-1: var(--space-sm-1); - --space-2: var(--space-sm-2); - --space-3: var(--space-sm-3); - --space-4: var(--space-sm-4); - --space-5: var(--space-sm-5); - --space-6: var(--space-sm-6); - --space-7: var(--space-sm-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-sm-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-sm-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-sm-3)); - - --text-1: var(--text-sm-1); - --text-2: var(--text-sm-2); - --text-3: var(--text-sm-3); - --text-4: var(--text-sm-4); - --text-5: var(--text-sm-5); - --text-6: var(--text-sm-6); - --text-7: var(--text-sm-7); - --text-8: var(--text-sm-8); -} - -:root, -.size-md { - --space-1: var(--space-md-1); - --space-2: var(--space-md-2); - --space-3: var(--space-md-3); - --space-4: var(--space-md-4); - --space-5: var(--space-md-5); - --space-6: var(--space-md-6); - --space-7: var(--space-md-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-md-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-md-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-md-3)); - - --text-1: var(--text-md-1); - --text-2: var(--text-md-2); - --text-3: var(--text-md-3); - --text-4: var(--text-md-4); - --text-5: var(--text-md-5); - --text-6: var(--text-md-6); - --text-7: var(--text-md-7); - --text-8: var(--text-md-8); -} - -.size-lg { - --space-1: var(--space-lg-1); - --space-2: var(--space-lg-2); - --space-3: var(--space-lg-3); - --space-4: var(--space-lg-4); - --space-5: var(--space-lg-5); - --space-6: var(--space-lg-6); - --space-7: var(--space-lg-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-lg-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-lg-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-lg-3)); - - --text-1: var(--text-lg-1); - --text-2: var(--text-lg-2); - --text-3: var(--text-lg-3); - --text-4: var(--text-lg-4); - --text-5: var(--text-lg-5); - --text-6: var(--text-lg-6); - --text-7: var(--text-lg-7); - --text-8: var(--text-lg-8); -} diff --git a/src/css/space.css b/src/css/space.css deleted file mode 100644 index 46e44de34..000000000 --- a/src/css/space.css +++ /dev/null @@ -1,85 +0,0 @@ -.root + .root, -.root + .box, -.root + .masonry, -.root + .carousel, -.image + .root, -.icon + .root { - --space-auto: var(--space-6); -} - -.root + .group, -.root + .row, -.root + .wrap, -.root + .button, -.root + .price, -.root + .switch { - --space-auto: var(--space-5); -} - -.card - :is( - .root + .root, - .root + .box, - .root + .masonry, - .root + .carousel, - .image + .root, - .icon + .root, - .root + .group, - .root + .row, - .root + .wrap, - .root + .button, - .root + .price, - .root + .switch - ) { - --space-auto: var(--space-4); -} - -.root + .heading, -.root + .link, -.root + .paragraph, -.root + .text, -.root + .tagline, -.root + .input, -.root + .textarea, -.root + .select, -.root + .badge, -.root + .rating { - --space-auto: var(--space-4); -} - -.paragraph + .paragraph, -.text + .text, -.button + .button, -.input + .button { - --space-auto: var(--space-3); -} - -.root + .label, -.label + .input, -.label + .textarea, -.label + .select, -.icon + .icon { - --space-auto: var(--space-2); -} - -.rating + .text, -.text + .rating { - --space-auto: var(--space-1); -} - -.image + .root, -.icon + .root { - --space-auto: var(--space-6); -} - -.link + .heading { - --space-auto: var(--space-5); -} - -/* // .button:not(.variant-link) + .button:not(.variant-link) { -// margin-top: var(--space-3); -// } - -// .variant-link + .variant-link{ -// margin-top: var(--space-2); -// } */ diff --git a/src/css/styles.css b/src/css/styles.css deleted file mode 100644 index ca253ac1e..000000000 --- a/src/css/styles.css +++ /dev/null @@ -1,15 +0,0 @@ -@import url(https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900); - -:root, -.root { - --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.15s; - - --font-family: 'Inter', sans-serif; - --font-weight: 400; - - --text-heading-font-family: var(--font-family); - --text-heading-font-weight: 700; - - --button-font-family: var(--font-family); - --button-font-weight: 500; -} diff --git a/src/css/theme.css b/src/css/theme.css new file mode 100644 index 000000000..0e8cb8688 --- /dev/null +++ b/src/css/theme.css @@ -0,0 +1,62 @@ +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 0 0% 100%; + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + --ring: 20 14.3% 4.1%; + --radius: 0.5rem; + --chart-1: 12 76% 61%; + --chart-2: 173 58% 39%; + --chart-3: 197 37% 24%; + --chart-4: 43 74% 66%; + --chart-5: 27 87% 67%; + } + + .dark { + --background: 20 14.3% 4.1%; + --foreground: 60 4.8% 95.9%; + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 0 0% 100%; + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + --ring: 24 5.7% 82.9%; + --chart-1: 220 70% 50%; + --chart-2: 160 60% 45%; + --chart-3: 30 80% 55%; + --chart-4: 280 65% 60%; + --chart-5: 340 75% 55%; + + color-scheme: dark; + } +} + +.astro-code { + @apply mt-4 rounded-md p-4 text-sm first:mt-0; +} diff --git a/src/env.d.ts b/src/env.d.ts index 5b0a7e0c5..55722dadf 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,2 +1,3 @@ /// -/// \ No newline at end of file +/// +/// diff --git a/src/integration/generate-colors.ts b/src/integration/generate-colors.ts deleted file mode 100644 index 97d77b692..000000000 --- a/src/integration/generate-colors.ts +++ /dev/null @@ -1,637 +0,0 @@ -import * as RadixColors from '@radix-ui/colors' -import BezierEasing from 'bezier-easing' -import Color from 'colorjs.io' - -type ArrayOf12 = [T, T, T, T, T, T, T, T, T, T, T, T] -const arrayOf12 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] as const - -// prettier-ignore -const grayScaleNames = ['gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const; - -// prettier-ignore -const scaleNames = [...grayScaleNames, 'tomato', 'red', 'ruby', 'crimson', 'pink', -'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', -'grass', 'brown', 'orange', 'sky', 'mint', 'lime', 'yellow', 'amber'] as const; - -const lightColors = Object.fromEntries( - scaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}P3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof scaleNames)[number], ArrayOf12> - -const darkColors = Object.fromEntries( - scaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}DarkP3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof scaleNames)[number], ArrayOf12> - -const lightGrayColors = Object.fromEntries( - grayScaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}P3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof grayScaleNames)[number], ArrayOf12> - -const darkGrayColors = Object.fromEntries( - grayScaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}DarkP3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof grayScaleNames)[number], ArrayOf12> - -export const generateRadixColors = ({ - appearance, - ...args -}: { - appearance: 'light' | 'dark' - accent: string - gray: string - background: string -}) => { - const allScales = appearance === 'light' ? lightColors : darkColors - const grayScales = appearance === 'light' ? lightGrayColors : darkGrayColors - const backgroundColor = new Color(args.background).to('oklch') - - const grayBaseColor = new Color(args.gray).to('oklch') - const grayScaleColors = getScaleFromColor( - grayBaseColor, - grayScales, - backgroundColor - ) - - const accentBaseColor = new Color(args.accent).to('oklch') - - let accentScaleColors = getScaleFromColor( - accentBaseColor, - allScales, - backgroundColor - ) - - // Enforce srgb for the background color - const backgroundHex = backgroundColor.to('srgb').toString({ format: 'hex' }) - - // Make sure we use the tint from the gray scale for when base is pure white or black - const accentBaseHex = accentBaseColor.to('srgb').toString({ format: 'hex' }) - if (accentBaseHex === '#000' || accentBaseHex === '#fff') { - accentScaleColors = grayScaleColors.map((color) => - color.clone() - ) as ArrayOf12 - } - - const [accent9Color, accentContrastColor] = getStep9Colors( - accentScaleColors, - accentBaseColor - ) - - accentScaleColors[8] = accent9Color - accentScaleColors[9] = getButtonHoverColor(accent9Color, [accentScaleColors]) - - // Limit saturation of the text colors - accentScaleColors[10].coords[1] = Math.min( - Math.max(accentScaleColors[8].coords[1], accentScaleColors[7].coords[1]), - accentScaleColors[10].coords[1] - ) - accentScaleColors[11].coords[1] = Math.min( - Math.max(accentScaleColors[8].coords[1], accentScaleColors[7].coords[1]), - accentScaleColors[11].coords[1] - ) - - const accentScaleHex = accentScaleColors.map((color) => - color.to('srgb').toString({ format: 'hex' }) - ) as ArrayOf12 - - const accentScaleWideGamut = accentScaleColors.map( - toOklchString - ) as ArrayOf12 - - const accentScaleAlphaHex = accentScaleHex.map((color) => - getAlphaColorSrgb(color, backgroundHex) - ) as ArrayOf12 - - const accentScaleAlphaWideGamutString = accentScaleHex.map((color) => - getAlphaColorP3(color, backgroundHex) - ) as ArrayOf12 - - const accentContrastColorHex = accentContrastColor - .to('srgb') - .toString({ format: 'hex' }) - - const grayScaleHex = grayScaleColors.map((color) => - color.to('srgb').toString({ format: 'hex' }) - ) as ArrayOf12 - - const grayScaleWideGamut = grayScaleColors.map( - toOklchString - ) as ArrayOf12 - - const grayScaleAlphaHex = grayScaleHex.map((color) => - getAlphaColorSrgb(color, backgroundHex) - ) as ArrayOf12 - - const grayScaleAlphaWideGamutString = grayScaleHex.map((color) => - getAlphaColorP3(color, backgroundHex) - ) as ArrayOf12 - - const accentSurfaceHex = - appearance === 'light' - ? getAlphaColorSrgb(accentScaleHex[1], backgroundHex, 0.8) - : getAlphaColorSrgb(accentScaleHex[1], backgroundHex, 0.5) - - const accentSurfaceWideGamutString = - appearance === 'light' - ? getAlphaColorP3(accentScaleWideGamut[1], backgroundHex, 0.8) - : getAlphaColorP3(accentScaleWideGamut[1], backgroundHex, 0.5) - - return { - accentScale: accentScaleHex, - accentScaleAlpha: accentScaleAlphaHex, - accentScaleWideGamut: accentScaleWideGamut, - accentScaleAlphaWideGamut: accentScaleAlphaWideGamutString, - accentContrast: accentContrastColorHex, - - grayScale: grayScaleHex, - grayScaleAlpha: grayScaleAlphaHex, - grayScaleWideGamut: grayScaleWideGamut, - grayScaleAlphaWideGamut: grayScaleAlphaWideGamutString, - - graySurface: appearance === 'light' ? '#ffffffcc' : 'rgba(0, 0, 0, 0.05)', - graySurfaceWideGamut: - appearance === 'light' - ? 'color(display-p3 1 1 1 / 80%)' - : 'color(display-p3 0 0 0 / 5%)', - - accentSurface: accentSurfaceHex, - accentSurfaceWideGamut: accentSurfaceWideGamutString, - - background: backgroundHex, - } -} - -function getStep9Colors( - scale: ArrayOf12, - accentBaseColor: Color -): [Color, Color] { - const referenceBackgroundColor = scale[0] - const distance = accentBaseColor.deltaEOK(referenceBackgroundColor) * 100 - - // If the accent base color is close to the page background color, it's likely - // white on white or black on black, so we want to return something that makes sense instead - if (distance < 25) { - return [scale[8], getTextColor(scale[8])] - } - - return [accentBaseColor, getTextColor(accentBaseColor)] -} - -function getButtonHoverColor(source: Color, scales: ArrayOf12[]) { - const [L, C, H] = source.coords - const newL = L > 0.4 ? L - 0.03 / (L + 0.1) : L + 0.03 / (L + 0.1) - const newC = L > 0.4 && !isNaN(H) ? C * 0.93 + 0 : C - const buttonHoverColor = new Color('oklch', [newL, newC, H]) - - // Find closest in-scale color to donate the chroma and hue. - // Especially useful when the source color is pure white or black, - // but the gray scale is tinted. - let closestColor = buttonHoverColor - let minDistance = Infinity - - scales.forEach((scale) => { - for (const color of scale) { - const distance = buttonHoverColor.deltaEOK(color) - if (distance < minDistance) { - minDistance = distance - closestColor = color - } - } - }) - - buttonHoverColor.coords[1] = closestColor.coords[1] - buttonHoverColor.coords[2] = closestColor.coords[2] - return buttonHoverColor -} - -function getScaleFromColor( - source: Color, - scales: Record>, - backgroundColor: Color -) { - let allColors: { scale: string; color: Color; distance: number }[] = [] - - Object.entries(scales).forEach(([name, scale]) => { - for (const color of scale) { - const distance = source.deltaEOK(color) - allColors.push({ scale: name, distance, color }) - } - }) - - allColors.sort((a, b) => a.distance - b.distance) - - // Remove non-unique scales - let closestColors = allColors.filter( - (color, i, arr) => - i === arr.findIndex((value) => value.scale === color.scale) - ) - - // If the next two closest colors are both grays, remove the second one until it’s not a gray anymore. - // This is because up next we will be comparing how close the two closest colors are to the source color, - // and since the grays are all extremely close to each other, we won’t get any useful data from the second - // closest color if it’s also a gray. - const grayScaleNamesStr = grayScaleNames as readonly string[] - const allAreGrays = closestColors.every((color) => - grayScaleNamesStr.includes(color.scale) - ) - if (!allAreGrays && grayScaleNamesStr.includes(closestColors[0].scale)) { - while (grayScaleNamesStr.includes(closestColors[1].scale)) { - closestColors.splice(1, 1) - } - } - - let colorA = closestColors[0] - let colorB = closestColors[1] - - // Light trigonometry ahead. - // - // We want to determine the color that is the closest to the source color. Sometimes it makes sense - // to proportionally mix the two closest colors together, but sometimes it is not useful at all. - // Color coords are spatial in 3D, however we can treat the data we have as a 2D projection that is good enough. - // - // Case 1: - // If the distances between the source color, the 1st closest color (A) and the 2nd closest color (B) form - // a triangle where NEITHER angle A nor B are larger than 90 degrees, then we want to mix the 1st and the 2nd - // closest colors in the same proportion as distances AD and BD are to each other. Mixing the two would result - // in a color that would be closer to the source color than either of the two original closest colors. - // Example: source color is a desaturated blue, which is between "indigo" and "slate" scales. - // - // C ← Source color - // /|⟍ - // / | ⟍ - // b / | ⟍ a - // / | ⟍ - // / | ⟍ - // A --- D -------- B - // ↑ - // The color we want to use as the base, which is a mix of A and B. - // - // Case 2: - // If the distances between the source color, the 1st closest color (A) and the 2nd closest color (B) form - // a triangle where EITHER angle A or B are larger than 90 degrees, then we don’t care about point B because it’s - // directionally the same as A, as mixing A and B can’t provide us with a color that is any closer to the source. - // Example: source color is a saturated blue, with "blue" being the closest scale, and "indigo" just being further. - // - // C ← Source color - // \⟍ - // \ ⟍ - // \ ⟍ a - // b \ ⟍ - // \ ⟍ - // A ------- B - // ↑ - // The color we want to use as the base, which is not influenced by B. - - // We’ll need all the lengths of the triangle sides, named after the angles they look at: - const a = colorB.distance - const b = colorA.distance - const c = colorA.color.deltaEOK(colorB.color) - - // We can get the ratios of AD to BD lengths with trigonometry using tangents, - // as the ratio of the tangents of the opposite angles will match. - const cosA = (b ** 2 + c ** 2 - a ** 2) / (2 * b * c) - const radA = Math.acos(cosA) - const sinA = Math.sin(radA) - - const cosB = (a ** 2 + c ** 2 - b ** 2) / (2 * a * c) - const radB = Math.acos(cosB) - const sinB = Math.sin(radB) - - // Tangent of angle C in the ACD triangle - const tanC1 = cosA / sinA - - // Tangent of angle C in the BCD triangle - const tanC2 = cosB / sinB - - // The ratio of the tangents corresponds to the ratio of the distances AD to BD - // In the end, it means how much of scale B we want to mix into scale A. - // If it’s "0" or less, this is an obtuse triangle from case 2, and we use just scale A. - const ratio = Math.max(0, tanC1 / tanC2) * 0.5 - - // The base scale is going to be a mix of the two closest scales, with the mix ratio we determined before - const scaleA = scales[colorA.scale] - const scaleB = scales[colorB.scale] - const scale = arrayOf12.map((i) => - new Color(Color.mix(scaleA[i], scaleB[i], ratio)).to('oklch') - ) as ArrayOf12 - - // Get the closest color from the pre-mixed scale we created - const baseColor = scale - .slice() - .sort((a, b) => source.deltaEOK(a) - source.deltaEOK(b))[0] - - // Note the chroma difference between the source color and the base color - const ratioC = source.coords[1] / baseColor.coords[1] - - // Modify hue and chroma of the scale to match the source color - scale.forEach((color) => { - color.coords[1] = Math.min(source.coords[1] * 1.5, color.coords[1] * ratioC) - color.coords[2] = source.coords[2] - }) - - // Light mode - if (scale[0].coords[0] > 0.5) { - const lightnessScale = scale.map(({ coords }) => coords[0]) - const backgroundL = Math.max(0, Math.min(1, backgroundColor.coords[0])) - const newLightnessScale = transposeProgressionStart( - backgroundL, - // Add white as the first "step" of the light scale - [1, ...lightnessScale], - lightModeEasing - ) - - // Remove the step we added - newLightnessScale.shift() - - newLightnessScale.forEach((lightness, i) => { - scale[i].coords[0] = lightness - }) - - return scale - } - - // Dark mode - let ease: typeof darkModeEasing = [...darkModeEasing] - const referenceBackgroundColorL = scale[0].coords[0] - const backgroundColorL = Math.max(0, Math.min(1, backgroundColor.coords[0])) - - // If background is lighter than step 0, we want to gradually change the easing to linear - const ratioL = backgroundColorL / referenceBackgroundColorL - - if (ratioL > 1) { - const maxRatio = 1.5 - - for (let i = 0; i < ease.length; i++) { - const metaRatio = (ratioL - 1) * (maxRatio / (maxRatio - 1)) - ease[i] = ratioL > maxRatio ? 0 : Math.max(0, ease[i] * (1 - metaRatio)) - } - } - - const lightnessScale = scale.map(({ coords }) => coords[0]) - const backgroundL = backgroundColor.coords[0] - const newLightnessScale = transposeProgressionStart( - backgroundL, - lightnessScale, - ease - ) - - newLightnessScale.forEach((lightness, i) => { - scale[i].coords[0] = lightness - }) - - return scale -} - -function getTextColor(background: Color) { - const white = new Color('oklch', [1, 0, 0]) - - if (Math.abs(white.contrastAPCA(background)) < 40) { - const [C, H] = background.coords - return new Color('oklch', [0.25, Math.max(0.08 * C, 0.04), H]) - } - - return white -} - -// target = background * (1 - alpha) + foreground * alpha -// alpha = (target - background) / (foreground - background) -// Expects 0-1 numbers for the RGB channels -function getAlphaColor( - targetRgb: number[], - backgroundRgb: number[], - rgbPrecision: number, - alphaPrecision: number, - targetAlpha?: number -) { - const [tr, tg, tb] = targetRgb.map((c) => Math.round(c * rgbPrecision)) - const [br, bg, bb] = backgroundRgb.map((c) => Math.round(c * rgbPrecision)) - - if ( - tr === undefined || - tg === undefined || - tb === undefined || - br === undefined || - bg === undefined || - bb === undefined - ) { - throw Error('Color is undefined') - } - - // Is the background color lighter, RGB-wise, than target color? - // Decide whether we want to add as little color or as much color as possible, - // darkening or lightening the background respectively. - // If at least one of the bits of the target RGB value - // is lighter than the background, we want to lighten it. - let desiredRgb = 0 - if (tr > br) { - desiredRgb = rgbPrecision - } else if (tg > bg) { - desiredRgb = rgbPrecision - } else if (tb > bb) { - desiredRgb = rgbPrecision - } - - const alphaR = (tr - br) / (desiredRgb - br) - const alphaG = (tg - bg) / (desiredRgb - bg) - const alphaB = (tb - bb) / (desiredRgb - bb) - - const isPureGray = [alphaR, alphaG, alphaB].every((alpha) => alpha === alphaR) - - // No need for precision gymnastics with pure grays, and we can get cleaner output - if (!targetAlpha && isPureGray) { - // Convert back to 0-1 values - const V = desiredRgb / rgbPrecision - return [V, V, V, alphaR] as const - } - - const clampRgb = (n: number) => - isNaN(n) ? 0 : Math.min(rgbPrecision, Math.max(0, n)) - const clampA = (n: number) => - isNaN(n) ? 0 : Math.min(alphaPrecision, Math.max(0, n)) - const maxAlpha = targetAlpha ?? Math.max(alphaR, alphaG, alphaB) - - const A = clampA(Math.ceil(maxAlpha * alphaPrecision)) / alphaPrecision - let R = clampRgb(((br * (1 - A) - tr) / A) * -1) - let G = clampRgb(((bg * (1 - A) - tg) / A) * -1) - let B = clampRgb(((bb * (1 - A) - tb) / A) * -1) - - R = Math.ceil(R) - G = Math.ceil(G) - B = Math.ceil(B) - - const blendedR = blendAlpha(R, A, br) - const blendedG = blendAlpha(G, A, bg) - const blendedB = blendAlpha(B, A, bb) - - // Correct for rounding errors in light mode - if (desiredRgb === 0) { - if (tr <= br && tr !== blendedR) { - R = tr > blendedR ? R + 1 : R - 1 - } - - if (tg <= bg && tg !== blendedG) { - G = tg > blendedG ? G + 1 : G - 1 - } - - if (tb <= bb && tb !== blendedB) { - B = tb > blendedB ? B + 1 : B - 1 - } - } - - // Correct for rounding errors in dark mode - if (desiredRgb === rgbPrecision) { - if (tr >= br && tr !== blendedR) { - R = tr > blendedR ? R + 1 : R - 1 - } - - if (tg >= bg && tg !== blendedG) { - G = tg > blendedG ? G + 1 : G - 1 - } - - if (tb >= bb && tb !== blendedB) { - B = tb > blendedB ? B + 1 : B - 1 - } - } - - // Convert back to 0-1 values - R = R / rgbPrecision - G = G / rgbPrecision - B = B / rgbPrecision - - return [R, G, B, A] as const -} - -// Important – I empirically discovered that this rounding is how the browser actually overlays -// transparent RGB bits over each other. It does NOT round the whole result altogether. -function blendAlpha( - foreground: number, - alpha: number, - background: number, - round = true -) { - if (round) { - return Math.round(background * (1 - alpha)) + Math.round(foreground * alpha) - } - - return background * (1 - alpha) + foreground * alpha -} - -function getAlphaColorSrgb( - targetColor: string, - backgroundColor: string, - targetAlpha?: number -) { - const [r, g, b, a] = getAlphaColor( - new Color(targetColor).to('srgb').coords, - new Color(backgroundColor).to('srgb').coords, - 255, - 255, - targetAlpha - ) - - return formatHex(new Color('srgb', [r, g, b], a).toString({ format: 'hex' })) -} - -function getAlphaColorP3( - targetColor: string, - backgroundColor: string, - targetAlpha?: number -) { - const [r, g, b, a] = getAlphaColor( - new Color(targetColor).to('p3').coords, - new Color(backgroundColor).to('p3').coords, - // Not sure why, but the resulting P3 alpha colors are blended in the browser most precisely when - // rounded to 255 integers too. Is the browser using 0-255 rather than 0-1 under the hood for P3 too? - 255, - 1000, - targetAlpha - ) - - return ( - new Color('p3', [r, g, b], a) - .toString({ precision: 4 }) - // Important: in non-browser environments colorjs.io outputs a different format for some reason - .replace('color(p3 ', 'color(display-p3 ') - ) -} - -// Format shortform hex to longform -function formatHex(str: string) { - if (!str.startsWith('#')) { - return str - } - - if (str.length === 4) { - const hash = str.charAt(0) - const r = str.charAt(1) - const g = str.charAt(2) - const b = str.charAt(3) - return hash + r + r + g + g + b + b - } - - if (str.length === 5) { - const hash = str.charAt(0) - const r = str.charAt(1) - const g = str.charAt(2) - const b = str.charAt(3) - const a = str.charAt(4) - return hash + r + r + g + g + b + b + a + a - } - - return str -} - -const darkModeEasing = [1, 0, 1, 0] as [number, number, number, number] -const lightModeEasing = [0, 2, 0, 2] as [number, number, number, number] - -export function transposeProgressionStart( - to: number, - arr: number[], - curve: [number, number, number, number] -) { - return arr.map((n, i, arr) => { - const lastIndex = arr.length - 1 - const diff = arr[0] - to - const fn = BezierEasing(...curve) - return n - diff * fn(1 - i / lastIndex) - }) -} - -export function transposeProgressionEnd( - to: number, - arr: number[], - curve: [number, number, number, number] -) { - return arr.map((n, i, arr) => { - const lastIndex = arr.length - 1 - const diff = arr[lastIndex] - to - const fn = BezierEasing(...curve) - return n - diff * fn(i / lastIndex) - }) -} - -// Convert to OKLCH string with percentage for the lightness channel -// https://github.com/radix-ui/themes/issues/420 -function toOklchString(color: Color) { - const L = +(color.coords[0] * 100).toFixed(1) - return color - .to('oklch') - .toString({ precision: 4 }) - .replace(/(\S+)(.+)/, `oklch(${L}%$2`) -} diff --git a/src/integration/index.ts b/src/integration/index.ts index d6e3de993..dfef10e5a 100644 --- a/src/integration/index.ts +++ b/src/integration/index.ts @@ -1,156 +1,182 @@ +import mdx from '@astrojs/mdx' +import sitemap from '@astrojs/sitemap' import type { AstroIntegration } from 'astro' -import merge from 'deepmerge' +import favicons from 'astro-favicons' +import liveCode from 'astro-live-code' +import robotsTxt from 'astro-robots-txt' +import { envField } from 'astro/config' +import fs from 'fs' +import yaml from 'js-yaml' +import path from 'path' +import { assign } from 'radash' +import tailwindcss from 'tailwindcss' +import tailwindcssNesting from 'tailwindcss/nesting' +import { loadEnv } from 'vite' import virtual from 'vite-plugin-virtual' -import { generateRadixColors } from './generate-colors' - -type Color = { - background: Parameters[0]['background'] - base: Parameters[0]['gray'] - brand: Parameters[0]['accent'] -} +import tailwindConfig from '../../tailwind.config.ts' interface Config { + favicon?: string + company?: string css?: string injectRoutes?: boolean - colors: { - theme: 'light' | 'dark' - light?: Color - dark?: Color + cloudcannon?: boolean + cart?: boolean + overrides?: { + [k: string]: string } } -const defaultConfig: Config = { - colors: { - theme: 'light', - light: { - background: '#fff', - base: '#000', - brand: '#000', - }, - }, -} export default function fulldevIntegration( - userConfig?: Partial + config: Partial | undefined ): AstroIntegration { - const config = merge(defaultConfig ?? {}, userConfig ?? {}) - return { name: '/integration', hooks: { 'astro:config:setup': async ({ - config: astroConfig, updateConfig, - injectScript, injectRoute, + injectScript, }) => { // ---------------------- - // Inject css + // Update config // ---------------------- - config?.css && injectScript('page-ssr', `import "${config?.css}";`) - - const generateCss = ( - defaultTheme: 'light' | 'dark', - theme: 'light' | 'dark', - color: Color - ) => { - const { background, base, brand } = color - const generated = generateRadixColors({ - background, - appearance: theme, - gray: base, - accent: brand, - }) - - const scaleToString = ( - scale: any, - palette: 'base' | 'brand', - alpha?: boolean - ) => - scale - .map( - (color: any, i: any) => - `--${palette}-${alpha ? 'a' : ''}${i + 1}: ${color};` - ) - .join('\n') - - const baseString = scaleToString(generated.grayScale, 'base', false) - const baseAlphaString = scaleToString( - generated.grayScaleAlpha, - 'base', - true - ) - const brandString = scaleToString( - generated.accentScale, - 'brand', - false - ) - const brandAlphaString = scaleToString( - generated.accentScaleAlpha, - 'brand', - true - ) - const brandContrastString = `--brand-contrast: ${generated.accentContrast};` - const baseContrastString = `--base-contrast: ${generated.accentContrast};` - const baseBackgroundString = `--base-background: ${generated.background};` - const brandBackgroundString = `--brand-background: ${generated.background};` - const colorSchemeString = `--color-scheme: ${theme};` - - const css = `${defaultTheme == theme ? ':root, ' : ''} .theme-${theme} { - ${baseString} - ${baseAlphaString} - ${baseContrastString} - ${baseBackgroundString} - ${brandString} - ${brandAlphaString} - ${brandContrastString} - ${brandBackgroundString} - ${colorSchemeString} - }` - return css - } - - const lightCss = - (config.colors.light && - generateCss(config.colors.theme, 'light', config.colors.light)) || - '' - const darkCss = - (config.colors.dark && - generateCss(config.colors.theme, 'dark', config.colors.dark)) || - '' - - const css = lightCss + '\n' + darkCss - updateConfig({ + site: loadEnv(process.env.NODE_ENV as any, process.cwd(), '').URL, + experimental: { + contentLayer: true, + env: { + schema: { + URL: envField.string({ + context: 'client', + access: 'public', + }), + STRIPE_RESTRICTED_KEY: envField.string({ + context: 'client', + access: 'public', + optional: true, + }), + STRIPE_SECRET_KEY: envField.string({ + context: 'server', + access: 'secret', + optional: true, + }), + }, + validateSecrets: true, + }, + }, + integrations: [ + mdx(), + sitemap(), + robotsTxt(), + liveCode({ + layout: '/src/structures/Code.astro', + }), + ], vite: { + resolve: { + alias: { + ...config?.overrides, + }, + }, plugins: [ virtual({ - 'virtual:astro/config': `export default ${JSON.stringify(astroConfig)}`, - 'virtual:fulldev-ui/config': `export default ${JSON.stringify(config)}`, - 'virtual:colors.css': css, + 'virtual:fulldev-ui/config': config ?? {}, }), ], css: { - preprocessorOptions: { - scss: { - api: 'modern', - }, + postcss: { + plugins: [tailwindcss(tailwindConfig), tailwindcssNesting], }, }, }, }) - injectScript('page-ssr', `import "virtual:colors.css";`) + // ---------------------- + // Inject Favicon + // ---------------------- + config?.favicon && + config?.company && + updateConfig({ + integrations: [ + favicons({ + path: 'favicon', + masterPicture: config.favicon, + appName: config.company, + appShortName: config.company, + appDescription: config.company, + }), + ], + }) // ---------------------- // Inject routes // ---------------------- - if (config.injectRoutes) { - const pages = import.meta.glob('/src/pages/**/*.astro') - !pages['/src/pages/[...page].astro'] && - injectRoute({ - pattern: '/[...page]', - entrypoint: 'fulldev-ui/[...page].astro', - }) + if (config?.injectRoutes) { + injectRoute({ + pattern: '/[...page]', + entrypoint: 'fulldev-ui/pages/[...page].astro', + }) + } + + // ---------------------- + // Inject css + // ---------------------- + config?.css && injectScript('page-ssr', `import "${config?.css}";`) + + // ---------------------- + // merge Cloudcannon configs + // ---------------------- + + // ---------------------- + // Generate image YAML files + // ---------------------- + // if (config.generateImageEntries) { + // const srcDir = path.join(process.cwd(), 'src') + // const filesDir = path.join(srcDir, 'images') + // const entriesDir = path.join(srcDir, 'content', 'images') + + // try { + // await fs.mkdir(filesDir, { recursive: true }) + // await fs.mkdir(entriesDir, { recursive: true }) + + // const files = await fs.readdir(filesDir) + // files.forEach(async (file) => { + // const filename = path.parse(file).name + // const yamlPath = path.join(entriesDir, `${filename}.yml`) + + // try { + // await fs.access(yamlPath) + // } catch { + // const yamlContent = yaml.dump({ + // alt: '', + // }) + // await fs.writeFile(yamlPath, yamlContent, 'utf8') + // } + // }) + // } catch (error) { + // console.error('Error generating image YAML files:', error) + // } + // } + }, + 'astro:build:done': async () => { + if (config?.cloudcannon) { + const __dirname = path.dirname(new URL(import.meta.url).pathname) + const libDir = path.join(__dirname, '../../cloudcannon.config.yml') + const userDir = path.join(process.cwd(), 'cloudcannon.config.yml') + + const libConfig = yaml.load( + fs.readFileSync(path.resolve(libDir), 'utf8') + ) + + const userConfig = yaml.load( + fs.readFileSync(path.resolve(userDir), 'utf8') + ) + + const mergedConfig = assign(libConfig || {}, userConfig || {}) + const yamlContent = yaml.dump(mergedConfig) + + await fs.promises.writeFile(userDir, yamlContent, 'utf8') } }, }, diff --git a/src/integration/tailwind-plugin.ts b/src/integration/tailwind-plugin.ts deleted file mode 100644 index 2c3ff6115..000000000 --- a/src/integration/tailwind-plugin.ts +++ /dev/null @@ -1,80 +0,0 @@ -import plugin from 'tailwindcss/plugin' - -export default plugin(() => {}, { - theme: { - spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', - }, - borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', - }, - fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', - }, - colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - }, - }, - }, -}) diff --git a/src/integration/unocss-preset.ts b/src/integration/unocss-preset.ts deleted file mode 100644 index 170ce7c3c..000000000 --- a/src/integration/unocss-preset.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { definePreset, presetUno } from 'unocss' - -export default definePreset(() => { - return { - name: 'fullUI', - presets: [presetUno()], - theme: { - spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', - }, - borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', - }, - fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', - }, - colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - }, - }, - }, - } -}) diff --git a/src/layouts/BlockLayout.astro b/src/layouts/BlockLayout.astro deleted file mode 100644 index 525bca33b..000000000 --- a/src/layouts/BlockLayout.astro +++ /dev/null @@ -1,24 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Intro from 'fulldev-ui/blocks/Intro.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { Content } = await render() ---- - - - - - - diff --git a/src/layouts/BlockOverviewLayout.astro b/src/layouts/BlockOverviewLayout.astro deleted file mode 100644 index 06654cca8..000000000 --- a/src/layouts/BlockOverviewLayout.astro +++ /dev/null @@ -1,39 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Hero from 'fulldev-ui/blocks/Hero.astro' -import Block from 'fulldev-ui/components/Block.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data } = Astro.props ---- - - - - - - - diff --git a/src/layouts/ComponentLayout.astro b/src/layouts/ComponentLayout.astro deleted file mode 100644 index b202d94bb..000000000 --- a/src/layouts/ComponentLayout.astro +++ /dev/null @@ -1,23 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { render } = Astro.props -const { Content } = await render() ---- - - - - - - - - - diff --git a/src/layouts/JobsLayout.astro b/src/layouts/JobsLayout.astro deleted file mode 100644 index 1b8e9c260..000000000 --- a/src/layouts/JobsLayout.astro +++ /dev/null @@ -1,40 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import { getCollection } from 'astro:content' -import JobDeck from 'fulldev-ui/blocks/Jobs.astro' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, slug, ...rest } = Astro.props - -const childPages = ( - await getCollection('pages', (page: any) => page.slug.startsWith(slug)) -).map((page: any) => ({ href: `/${page.slug}/`, ...page.data })) ---- - - - - - - - - - - - - diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro deleted file mode 100644 index d8cf36e77..000000000 --- a/src/layouts/Layout.astro +++ /dev/null @@ -1,169 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Button from 'fulldev-ui/components/Button.astro' -import Head from 'fulldev-ui/components/Head.astro' -import Header from 'fulldev-ui/components/Header.astro' -import Sidebar from 'fulldev-ui/components/Sidebar.astro' -import Toc from 'fulldev-ui/components/Toc.astro' -import NavigationButtons from '../components/docs/NavigationButtons.astro' - -type Props = Partial> & { - class?: string - theme?: 'light' | 'dark' -} - -const { slug, data, theme, class: classes, render } = Astro.props -const { logo, header, footer, footers, channels, sidebar, toc } = data || {} - -const { headings } = render ? await render() : { headings: [] } - -const h2Headings = headings.filter((heading: any) => heading.depth === 2) ---- - - - - - - - - - - - - - - - - - - { - channels?.whatsapp && ( - - ) - } - - - - - - - diff --git a/src/layouts/OverviewLayout.astro b/src/layouts/OverviewLayout.astro deleted file mode 100644 index eda484f57..000000000 --- a/src/layouts/OverviewLayout.astro +++ /dev/null @@ -1,45 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { sections, blocks, children, references } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro new file mode 100644 index 000000000..f67525f24 --- /dev/null +++ b/src/layouts/Page.astro @@ -0,0 +1,63 @@ +--- +import type { ComponentProps } from 'astro/types' +import type { CollectionEntry } from 'astro:content' +import Block from 'fulldev-ui/components/Block.astro' +import Element from 'fulldev-ui/components/Element.astro' +import type { PageSchema } from 'fulldev-ui/schemas/page.ts' +import Layout from 'fulldev-ui/structures/Layout.astro' + +type Props = ComponentProps & + PageSchema & { + render: CollectionEntry<'pages'>['render'] + } + +const { + _block, + title, + heading, + description, + paragraph, + banner, + sidebar, + header, + sections, + footer, + render, + navigation, + ...rest +} = Astro.props + +const { Content, headings } = await render() +--- + + + + + + + + + {sections?.map((section) => )} + + + diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro deleted file mode 100644 index ed8111443..000000000 --- a/src/layouts/PageLayout.astro +++ /dev/null @@ -1,32 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { hero, section, sections, block, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro deleted file mode 100644 index ec8ae413b..000000000 --- a/src/layouts/PostLayout.astro +++ /dev/null @@ -1,32 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Intro from 'fulldev-ui/blocks/Intro.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { section, sections, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - diff --git a/src/layouts/ProductLayout.astro b/src/layouts/ProductLayout.astro deleted file mode 100644 index 686a69635..000000000 --- a/src/layouts/ProductLayout.astro +++ /dev/null @@ -1,31 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { section, sections, block, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/_Product.astro b/src/layouts/_Product.astro new file mode 100644 index 000000000..a2490deb1 --- /dev/null +++ b/src/layouts/_Product.astro @@ -0,0 +1,115 @@ + diff --git a/src/pages/[...page].astro b/src/pages/[...page].astro index 2f3605c27..79c77add6 100644 --- a/src/pages/[...page].astro +++ b/src/pages/[...page].astro @@ -1,40 +1,49 @@ --- -import { getCollection } from 'astro:content' -import PageLayout from 'fulldev-ui/layouts/PageLayout.astro' -import { mapKeys } from 'radash' -import { mergeEntries } from '../utils/mergeEntries' +import { getCollection, getEntry } from 'astro:content' +import { getHref } from 'fulldev-ui/utils/getHref.ts' +import { dash, pascal } from 'radash' +import { mergeDeep } from 'remeda' export async function getStaticPaths() { - const pages = await getCollection('pages') - return pages.map((page) => ({ + const collection = await getCollection('pages') + return collection.map((entry) => ({ params: { - page: page.slug === 'index' ? undefined : page.slug, + page: getHref(entry.slug), }, - props: page, + props: entry, })) } -const { data, slug, ...rest } = Astro.props +const layoutName = Astro.props.data._layout ?? 'Page' +const layoutComponentName = pascal(layoutName) -const merged = (await mergeEntries({ data, slug })) as any +const layoutsComponents = { + ...import.meta.glob('/src/layouts/**/*.astro'), + ...import.meta.glob('../layouts/**/*.astro'), +} -const packageLayouts = import.meta.glob('../layouts/**/*.astro') -const userLayouts = import.meta.glob('/src/layouts/**/*.astro') +const layoutComponentPath = Object.keys(layoutsComponents).find( + (path) => path.split('/').pop()?.split('.')[0] === layoutComponentName +) -const mapBlockKeys = (blocks: any) => - mapKeys(blocks, (key: any) => key.split('/').pop().split('.').shift()) +const LayoutComponent = + layoutComponentPath && + (await (layoutsComponents[layoutComponentPath] as any)()).default -const components = { - ...mapBlockKeys(packageLayouts), - ...mapBlockKeys(userLayouts), -} +const layoutEntryName = dash(layoutName) +const layoutEntry = await getEntry('layouts', layoutEntryName) +const baseLayout = await getEntry('layouts', 'base') +const mergedLayouts = mergeDeep(baseLayout || {}, layoutEntry || {}) +const merged = mergeDeep(mergedLayouts, Astro.props) -const found = components[(merged.data._layout ?? 'PageLayout') as string] as any -const functioncomp = found && (await found()) -const Layout = functioncomp?.default ?? PageLayout +const { data, ...rest } = merged --- - +{ + LayoutComponent && ( + + ) +} diff --git a/src/pages/test.astro b/src/pages/test.astro new file mode 100644 index 000000000..d4f92294f --- /dev/null +++ b/src/pages/test.astro @@ -0,0 +1,16 @@ + + + + Sign up + diff --git a/src/schemas/base.ts b/src/schemas/base.ts deleted file mode 100644 index 937d9a780..000000000 --- a/src/schemas/base.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { z } from 'astro:content' - -export const button = z - .object({ - text: z.string(), - href: z.string(), - icon: z.string(), - }) - .partial() - .passthrough() - -export const link = z - .object({ - text: z.string(), - href: z.string(), - }) - .partial() - .passthrough() - -export const base = z - .object({ - tagline: z.string(), - icon: z.string(), - badge: z.string().or( - z.object({ - text: z.string(), - href: z.string(), - }) - ), - heading: z.string(), - text: z.string(), - html: z.string(), - image: z.string(), - images: z.string().array(), - rating: z.number().or( - z - .object({ - value: z.number(), - label: z.string(), - avatars: z.string().array(), - avatar: z.string(), - }) - .partial() - ), - button: button, - buttons: button.array(), - link: link, - links: link.array(), - list: z.string().array(), - avatar: z.string(), - price: z.number(), - input: z - .object({ - placeholder: z.string(), - submit: z.string(), - }) - .partial() - .passthrough(), - logos: z.string().array(), - logo: z.string(), - channels: z - .object({ - phone: z.string(), - email: z.string(), - address: z.string(), - }) - .partial() - .passthrough(), - socials: z - .object({ - facebook: z.string(), - instagram: z.string(), - }) - .partial() - .passthrough(), - hours: z - .object({ - monday: z.string(), - tuesday: z.string(), - wednesday: z.string(), - thursday: z.string(), - friday: z.string(), - saturday: z.string(), - sunday: z.string(), - }) - .partial() - .passthrough(), - }) - .partial() - .passthrough() diff --git a/src/schemas/block.ts b/src/schemas/block.ts index 6e70c3ec7..fef54f512 100644 --- a/src/schemas/block.ts +++ b/src/schemas/block.ts @@ -1,15 +1,32 @@ import { z } from 'astro:content' -import { base } from './base' -import { card } from './card' -import { pathSchema } from './utils' +import { cardSchema } from 'fulldev-ui/schemas/card.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' +import { pathSchema } from 'fulldev-ui/schemas/path.ts' -export const block = base +export const blockSchema = cardSchema .extend({ - columns: card.array(), - cards: z.array(card), - source: z.enum(['children', 'references']), - pages: pathSchema('pages').array(), - records: pathSchema('records').array(), + _block: z.string().optional(), + depth: z.union([z.literal(1), z.literal(2), z.literal(3)]).optional(), + themer: z.boolean().optional(), + search: z.boolean().optional(), + cart: z.boolean().optional(), + cards: cardSchema.array().optional(), + pages: pathSchema('pages').array().optional(), + records: pathSchema('records').array().optional(), + soldout: z.boolean().optional(), + variants: z.record(z.string(), z.string().array()).optional(), + categories: pathSchema('pages').array().optional(), + menus: menuSchema.array().optional(), + headings: z + .array( + z.object({ + depth: z.number(), + slug: z.string(), + text: z.string(), + }) + ) + .optional(), }) - .partial() - .passthrough() + .strict() + +export type BlockSchema = z.infer diff --git a/src/schemas/button.ts b/src/schemas/button.ts new file mode 100644 index 000000000..c0bb5c615 --- /dev/null +++ b/src/schemas/button.ts @@ -0,0 +1,17 @@ +import { z } from 'astro:content' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const buttonSchema = z + .object({ + icon: z.string().optional(), + image: imageSchema.optional(), + text: z.string().optional(), + href: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + reverse: z.boolean().optional(), + variant: z.enum(['primary', 'secondary', 'outline', 'ghost']).optional(), + }) + .strict() + +export type ButtonSchema = z.infer diff --git a/src/schemas/card.ts b/src/schemas/card.ts index d41315cbf..af5c8d4a9 100644 --- a/src/schemas/card.ts +++ b/src/schemas/card.ts @@ -1,3 +1,43 @@ -import { base } from './base' +import { z } from 'astro:content' +import { buttonSchema } from 'fulldev-ui/schemas/button.ts' +import { channelSchema } from 'fulldev-ui/schemas/channel.ts' +import { chipSchema } from 'fulldev-ui/schemas/chip.ts' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' +import { proofSchema } from 'fulldev-ui/schemas/proof.ts' -export const card = base +export const cardSchema = z + .object({ + target: z.string().optional(), + href: z.string().optional(), + order: z.number().optional(), + dark: z.boolean().optional(), + text: z.string().optional(), + content: z.string().optional(), + tagline: z.string().optional(), + heading: z.string().optional(), + paragraph: z.string().optional(), + list: z.string().array().optional(), + socials: z.string().array().optional(), + logo: logoSchema.optional(), + link: linkSchema.optional(), + links: linkSchema.array().optional(), + menus: menuSchema.array().optional(), + chip: chipSchema.optional(), + badges: z.string().array().optional(), + button: buttonSchema.optional(), + buttons: buttonSchema.array().optional(), + image: imageSchema.optional(), + images: imageSchema.array().optional(), + channels: channelSchema.array().optional(), + proof: proofSchema.optional(), + price: z.number().optional(), + icon: z.string().optional(), + rating: z.number().optional(), + avatar: imageSchema.optional(), + avatars: imageSchema.array().optional(), + soldout: z.boolean().optional(), + }) + .strict() diff --git a/src/schemas/channel.ts b/src/schemas/channel.ts new file mode 100644 index 000000000..7fd62d6ae --- /dev/null +++ b/src/schemas/channel.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Channel from 'fulldev-ui/components/Channel.astro' + +export const channelSchema = z + .object({ + icon: z.string().optional(), + heading: z.string().optional(), + text: z.string().optional(), + href: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['secondary', 'outline']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/checkbox.ts b/src/schemas/checkbox.ts new file mode 100644 index 000000000..b5aa7b835 --- /dev/null +++ b/src/schemas/checkbox.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Checkbox from 'fulldev-ui/components/Checkbox.astro' + +export const checkboxSchema = z + .object({ + name: z.string().optional(), + label: z.string().optional(), + id: z.string().optional(), + value: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/chip.ts b/src/schemas/chip.ts new file mode 100644 index 000000000..047ebd140 --- /dev/null +++ b/src/schemas/chip.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Chip from 'fulldev-ui/components/Chip.astro' + +export const chipSchema = z + .object({ + icon: z.string().optional(), + text: z.string().optional(), + href: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['primary', 'secondary', 'outline']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/footer.ts b/src/schemas/footer.ts new file mode 100644 index 000000000..4d9a8d800 --- /dev/null +++ b/src/schemas/footer.ts @@ -0,0 +1,17 @@ +import { z } from 'astro:content' +import { channelSchema } from 'fulldev-ui/schemas/channel.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' + +export const footerSchema = z + .object({ + logo: logoSchema.optional(), + heading: z.string().optional(), + paragraph: z.string().optional(), + socials: z.string().url().array().optional(), + channels: channelSchema.array().optional(), + menus: menuSchema.array().optional(), + }) + .strict() + +export type FooterSchema = z.infer diff --git a/src/schemas/head.ts b/src/schemas/head.ts new file mode 100644 index 000000000..4d4bd67dc --- /dev/null +++ b/src/schemas/head.ts @@ -0,0 +1,17 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Head from 'fulldev-ui/components/Head.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const headSchema = z + .object({ + title: z.string().optional(), + description: z.string().optional(), + image: imageSchema.optional(), + theme: z.enum(['light', 'dark', 'system']).optional(), + favicon: z.string().optional(), + company: z.string().optional(), + scripts: z.string().array().optional(), + code: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/header.ts b/src/schemas/header.ts new file mode 100644 index 000000000..28f2387a8 --- /dev/null +++ b/src/schemas/header.ts @@ -0,0 +1,21 @@ +import { z } from 'astro:content' +import { buttonSchema } from 'fulldev-ui/schemas/button.ts' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' + +export const headerSchema = z + .object({ + logo: logoSchema.optional(), + heading: z.string().optional(), + links: linkSchema.array().optional(), + socials: z.string().array().optional(), + buttons: buttonSchema.array().optional(), + menus: menuSchema.array().optional(), + themer: z.boolean().optional(), + cart: z.boolean().optional(), + search: z.boolean().optional(), + }) + .strict() + +export type HeaderSchema = z.infer diff --git a/src/schemas/image.ts b/src/schemas/image.ts new file mode 100644 index 000000000..17b1b61ed --- /dev/null +++ b/src/schemas/image.ts @@ -0,0 +1,53 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Image from 'fulldev-ui/components/Image.astro' + +// const imagePath = z.preprocess((data: unknown) => { +// if (typeof data === 'string') { +// return data.split('/').pop() +// } +// return data +// }, reference('images')) + +// export const imageSchema = z +// .union([imagePath, z.object({}).passthrough()]) +// .pipe( +// z +// .object({ +// id: z +// .string() +// .refine(async (data) => await reference('images').parseAsync(data)), +// src: z.string(), +// alt: z.string(), +// width: z.number(), +// height: z.number(), +// }) +// .partial() +// .passthrough() +// ) +// .optional() + +// export const imageSchema = z +// .object({ +// src: z.string().optional(), +// alt: z.string().optional(), +// width: z.number().optional(), +// height: z.number().optional(), +// }) +// .strict() satisfies z.ZodType> + +const image = z + .object({ + src: z.string().optional(), + alt: z.string().optional(), + width: z.number().optional(), + height: z.number().optional(), + }) + .strict() satisfies z.ZodType> + +export const imageSchema = z + .preprocess( + (data: unknown) => (typeof data === 'string' ? { src: data } : data), + image + ) + .optional() as z.ZodType> diff --git a/src/schemas/input.ts b/src/schemas/input.ts new file mode 100644 index 000000000..11b9156ef --- /dev/null +++ b/src/schemas/input.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Input from 'fulldev-ui/components/Input.astro' + +export const inputSchema = z + .object({ + icon: z.string().optional(), + label: z.string().optional(), + placeholder: z.string().optional(), + value: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/link.ts b/src/schemas/link.ts new file mode 100644 index 000000000..bb91689df --- /dev/null +++ b/src/schemas/link.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Link from 'fulldev-ui/components/Link.astro' + +export const linkSchema = z + .object({ + text: z.string().optional(), + href: z.string().optional(), + icon: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['primary', 'underline', 'muted']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/logo.ts b/src/schemas/logo.ts new file mode 100644 index 000000000..faf75915b --- /dev/null +++ b/src/schemas/logo.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Logo from 'fulldev-ui/components/Logo.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const logoSchema = z + .object({ + image: imageSchema.optional(), + text: z.string().optional(), + href: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/menu.ts b/src/schemas/menu.ts new file mode 100644 index 000000000..a825cceef --- /dev/null +++ b/src/schemas/menu.ts @@ -0,0 +1,11 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Menu from 'fulldev-ui/components/Menu.astro' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' + +export const menuSchema = z + .object({ + heading: z.string().optional(), + links: linkSchema.array().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/page.ts b/src/schemas/page.ts index ced52e1a9..a7a586110 100644 --- a/src/schemas/page.ts +++ b/src/schemas/page.ts @@ -1,43 +1,23 @@ import { z } from 'astro:content' -import { base } from './base' -import { block } from './block' -import { pathSchema } from './utils' +import { blockSchema } from 'fulldev-ui/schemas/block.ts' +import { headSchema } from 'fulldev-ui/schemas/head.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' -export const page = base +export const pageSchema = blockSchema .extend({ - i18n: pathSchema('pages'), - settings: pathSchema('settings'), - seo: z - .object({ - title: z.string(), - description: z.string(), - image: z.string(), - }) - .partial() - .passthrough(), - code: z - .object({ - head: z.string(), - body: z.string(), - }) - .partial() - .passthrough(), - pages: pathSchema('pages').array(), - records: pathSchema('records').array(), - title: z.string(), - description: z.string(), - header: block.or(z.literal(false)), - headers: block.array().or(z.literal(false)), - hero: block.or(z.literal(false)), - block: block.or(z.literal(false)), - section: block.or(z.literal(false)), - blocks: block.array().or(z.object({}).catchall(block)), - sections: block.array().or(z.object({}).catchall(block)), - cta: block.or(z.literal(false)), - footer: block.or(z.literal(false)), - footers: block.array().or(z.literal(false)), + _layout: z.string().optional(), + _schema: z.string().optional(), + title: z.string().optional(), + description: z.string().optional(), + head: headSchema.optional(), + banner: blockSchema.optional(), + navigation: blockSchema.optional(), + header: blockSchema.optional(), + sections: blockSchema.array().optional(), + subheader: blockSchema.array().optional(), + sidebar: menuSchema.array().optional(), + footer: blockSchema.optional(), }) - .partial() - .passthrough() + .strict() -export type Page = z.infer +export type PageSchema = z.infer diff --git a/src/schemas/utils.ts b/src/schemas/path.ts similarity index 61% rename from src/schemas/utils.ts rename to src/schemas/path.ts index a749ac209..e5513828c 100644 --- a/src/schemas/utils.ts +++ b/src/schemas/path.ts @@ -1,19 +1,10 @@ import { reference, z, type AnyEntryMap } from 'astro:content' -// export const pagesPath = z -// .string() -// .transform((value) => { -// const fullpath = value?.split(`pages/`).pop() -// const slug = fullpath?.split('.').shift() -// return slug -// }) -// .pipe(reference('pages')) - +// TODO: preprocess instead export const pathSchema = (collection: C) => z .string() .transform((value) => { - // @ts-ignore const fullpath = value?.split(`${collection}/`).pop() const slug = fullpath?.split('.').shift() const noIndexEnding = slug?.replace('/index', '') diff --git a/src/schemas/proof.ts b/src/schemas/proof.ts new file mode 100644 index 000000000..686231ab8 --- /dev/null +++ b/src/schemas/proof.ts @@ -0,0 +1,12 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Proof from 'fulldev-ui/components/Proof.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const proofSchema = z + .object({ + rating: z.number().optional(), + avatars: imageSchema.array().optional(), + text: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/textarea.ts b/src/schemas/textarea.ts new file mode 100644 index 000000000..b54687c98 --- /dev/null +++ b/src/schemas/textarea.ts @@ -0,0 +1,11 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Textarea from 'fulldev-ui/components/Textarea.astro' + +export const textareaSchema = z + .object({ + label: z.string().optional(), + placeholder: z.string().optional(), + value: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/stores/cart.svelte.ts b/src/stores/cart.svelte.ts new file mode 100644 index 000000000..5da624751 --- /dev/null +++ b/src/stores/cart.svelte.ts @@ -0,0 +1,78 @@ +import { derived, writable } from 'svelte/store' + +export type CartItem = { + uid: string + quantity: number + slug: string + title: string + price?: number | undefined + image?: string | undefined + variants?: + | { + [k: string]: string | undefined + } + | undefined +} + +export type Cart = CartItem[] + +const isServer = import.meta.env.SSR +const storageJson = !isServer && localStorage.getItem('cart') +const storageData = storageJson ? JSON.parse(storageJson) : [] + +export const cart = writable(storageData) + +cart.subscribe((newCart) => { + if (isServer) return + const json = JSON.stringify(newCart) + localStorage.setItem('cart', json) +}) + +export const getUid = ( + slug: CartItem['slug'], + variants?: CartItem['variants'] +) => (variants ? `${slug}-${Object.values(variants)?.join('-')}` : slug) + +export const getItemIndex = (currentCart: Cart, uid: CartItem['uid']) => { + const index = currentCart.findIndex((i) => i.uid === uid) + if (index === -1) throw new Error(`Item with uid ${uid} not found`) + return index +} + +export const addItem = (item: CartItem) => + cart.update((currentCart) => [...currentCart, item]) + +export const removeItem = (uid: CartItem['uid']) => + cart.update((currentCart) => { + const index = getItemIndex(currentCart, uid) + currentCart.splice(index, 1) + return [...currentCart] + }) + +export const updateQuantity = ( + uid: CartItem['uid'], + quantity: CartItem['quantity'] +) => + cart.update((currentCart) => { + const index = getItemIndex(currentCart, uid) + if (currentCart[index]) currentCart[index].quantity = quantity + return [...currentCart] + }) + +export const openCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.showModal() +} + +export const closeCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.close() +} + +export const totalPrice = derived(cart, ($cart) => { + return $cart.length + // return $cart.reduce( + // (acc, item) => acc + (item.price || 0) * (item.quantity || 0), + // 0 + // ) +}) diff --git a/src/stores/cart.ts b/src/stores/cart.ts new file mode 100644 index 000000000..0bb77204b --- /dev/null +++ b/src/stores/cart.ts @@ -0,0 +1,76 @@ +import { persistentAtom } from '@nanostores/persistent' +import { computed } from 'nanostores' + +type Item = { + slug: string + title: string + price: number + image: string + quantity: number + variants: string[] +} + +type Cart = Item[] | [] + +export const $cart = persistentAtom('cart', [], { + encode: JSON.stringify, + decode: JSON.parse, +}) + +// for svelte files +export const cart = $cart + +export const getCart = () => $cart.get() + +export const setCart = (cart: Cart) => $cart.set(cart) + +export const removeItem = (slug: string) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex((item) => item.slug === slug) + newCart.splice(index, 1) + $cart.set(newCart) +} + +export const addItem = (item: Item) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex( + (i) => i.slug === item.slug && i.variants.join() === item.variants.join() + ) + if (index === -1) newCart.push(item) + else { + let newItem = { ...newCart[index] } as Item + newItem.quantity += item.quantity + newCart[index] = newItem + } + setCart(newCart) +} + +export const updateQuantity = (slug: string, quantity: number) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex((item) => item.slug === slug) + let newItem = { ...newCart[index] } as Item + newItem.quantity = quantity + newCart[index] = newItem + setCart(newCart) +} + +export const $totalPrice = computed($cart, ($cart) => + $cart.reduce((a, b) => +a + b.price * b.quantity, 0) +) + +export const openCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.showModal() +} + +export const closeCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.close() +} + +// export const totalQuantity = computed(cart, ($cart) => +// $cart.reduce((a, b) => +a + b.quantity, 0) +// ) diff --git a/src/structures/Card.astro b/src/structures/Card.astro new file mode 100644 index 000000000..68e0c36e7 --- /dev/null +++ b/src/structures/Card.astro @@ -0,0 +1,35 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'a'>, HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { href, as = href ? 'a' : 'div', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Carousel.astro b/src/structures/Carousel.astro new file mode 100644 index 000000000..1fa2e1c34 --- /dev/null +++ b/src/structures/Carousel.astro @@ -0,0 +1,106 @@ +--- +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props {} +--- + + + + + + + + + + + + diff --git a/src/structures/Code.astro b/src/structures/Code.astro new file mode 100644 index 000000000..a3c5d8c8a --- /dev/null +++ b/src/structures/Code.astro @@ -0,0 +1,53 @@ +--- +import type { ComponentProps } from 'astro/types' +import { Code as AstroCode } from 'astro:components' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends ComponentProps {} + +const { lang = 'astro', code, ...rest } = Astro.props +--- + + + + + + + + { + code && ( + + ) + } + + + diff --git a/src/structures/Container.astro b/src/structures/Container.astro new file mode 100644 index 000000000..5840700af --- /dev/null +++ b/src/structures/Container.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Drawer.astro b/src/structures/Drawer.astro new file mode 100644 index 000000000..7bd771632 --- /dev/null +++ b/src/structures/Drawer.astro @@ -0,0 +1,80 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props + extends HTMLAttributes<'aside'>, + Pick, 'variant' | 'size' | 'text' | 'icon'> { + id: string + icon: string +} + +const { id, variant = 'ghost', size = 'md', icon, text, ...rest } = Astro.props + +const slot = await Astro.slots.render('default') +const render = slot?.trim().length > 0 +--- + +{ + render && ( + + + + + + + + + + + ) +} + + diff --git a/src/structures/Group.astro b/src/structures/Group.astro new file mode 100644 index 000000000..f722dd9a0 --- /dev/null +++ b/src/structures/Group.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Layout.astro b/src/structures/Layout.astro new file mode 100644 index 000000000..1d3f58054 --- /dev/null +++ b/src/structures/Layout.astro @@ -0,0 +1,34 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Head from 'fulldev-ui/components/Head.astro' + +type Props = Omit, 'title'> & { + head?: ComponentProps +} + +const { head, ...rest } = Astro.props +--- + + + + + + + + + diff --git a/src/structures/Masonry.astro b/src/structures/Masonry.astro new file mode 100644 index 000000000..cf19ccc0f --- /dev/null +++ b/src/structures/Masonry.astro @@ -0,0 +1,42 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Matrix.astro b/src/structures/Matrix.astro new file mode 100644 index 000000000..5098252b5 --- /dev/null +++ b/src/structures/Matrix.astro @@ -0,0 +1,39 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + size?: 'sm' | 'md' | 'lg' | undefined +} + +const { size = 'md', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Panel.astro b/src/structures/Panel.astro new file mode 100644 index 000000000..ce0b15d2a --- /dev/null +++ b/src/structures/Panel.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Prose.astro b/src/structures/Prose.astro new file mode 100644 index 000000000..ac90de9f9 --- /dev/null +++ b/src/structures/Prose.astro @@ -0,0 +1,88 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'center' | 'middle' | 'columns' +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Section.astro b/src/structures/Section.astro new file mode 100644 index 000000000..8bb0391ac --- /dev/null +++ b/src/structures/Section.astro @@ -0,0 +1,26 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'section'> { + as?: HTMLTag +} + +const { as = 'section', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Sidebar.astro b/src/structures/Sidebar.astro new file mode 100644 index 000000000..de72b863e --- /dev/null +++ b/src/structures/Sidebar.astro @@ -0,0 +1,36 @@ +--- +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'aside'> {} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Split.astro b/src/structures/Split.astro new file mode 100644 index 000000000..b9fc5abf8 --- /dev/null +++ b/src/structures/Split.astro @@ -0,0 +1,38 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'start' | 'center' | 'sticky' +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Stack.astro b/src/structures/Stack.astro new file mode 100644 index 000000000..429aacbcf --- /dev/null +++ b/src/structures/Stack.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Writeup.astro b/src/structures/Writeup.astro new file mode 100644 index 000000000..40fec3e63 --- /dev/null +++ b/src/structures/Writeup.astro @@ -0,0 +1,67 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'left' | 'center' | 'right' +} + +const { align = 'start', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/_Bento.astro b/src/structures/_Bento.astro new file mode 100644 index 000000000..a1c5e809c --- /dev/null +++ b/src/structures/_Bento.astro @@ -0,0 +1,34 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/utils/_archive/Childmorphic.ts b/src/utils/_archive/Childmorphic.ts deleted file mode 100644 index 0409b50a5..000000000 --- a/src/utils/_archive/Childmorphic.ts +++ /dev/null @@ -1,8 +0,0 @@ -// import type { AstroGlobal } from 'astro' - -// export type Childmorphic = { -// [Key in keyof C & string as -// | Lowercase -// | Capitalize -// | `${string}${Capitalize}`]?: C[Key] -// } diff --git a/src/utils/_archive/getAllCollections.ts b/src/utils/_archive/getAllCollections.ts deleted file mode 100644 index f5547ac7d..000000000 --- a/src/utils/_archive/getAllCollections.ts +++ /dev/null @@ -1,10 +0,0 @@ -// import type { CollectionKey } from 'astro:content' -// import { getCollection } from 'astro:content' - -// export const getAllCollections = async (names: CollectionKey[]) => { -// const promises = names.map((name) => getCollection(name)) -// const resolved = await Promise.all(promises) -// const flattened = resolved.flat() -// const filtered = flattened.filter(Boolean) -// return filtered -// } diff --git a/src/utils/_archive/getCollectionCascade.ts b/src/utils/_archive/getCollectionCascade.ts deleted file mode 100644 index aba39bab2..000000000 --- a/src/utils/_archive/getCollectionCascade.ts +++ /dev/null @@ -1,33 +0,0 @@ -// import { -// getCollection, -// type CollectionEntry, -// type CollectionKey, -// type ContentCollectionKey, -// type DataCollectionKey, -// } from 'astro:content' -// import { unflatten } from 'flat' -// import { objectify } from 'radash' -// import { mapValues } from 'remeda' - -// export type CollectionCascade = { -// [Key in ContentCollectionKey]: { -// [Key in CollectionEntry['slug']]: any -// } -// } & { -// [Key in DataCollectionKey]: { -// [Key in CollectionEntry['id']]: any -// } -// } - -// export const getCollectionCascade = async (collectionKeys: CollectionKey[]) => { -// const promises = collectionKeys.map((key) => getCollection(key)) -// const resolved = await Promise.all(promises) -// const flattened = resolved.flat() -// const object = objectify( -// flattened, -// ({ collection, slug, id }) => `${collection}.${slug || id}` -// ) -// const mapped = mapValues(object, (value) => value.data) -// const unflattened = unflatten(mapped) -// return unflattened as CollectionCascade -// } diff --git a/src/utils/_archive/getPathname.ts b/src/utils/_archive/getPathname.ts deleted file mode 100644 index e0503f5c9..000000000 --- a/src/utils/_archive/getPathname.ts +++ /dev/null @@ -1,18 +0,0 @@ -// import type { AstroGlobal } from 'astro' -// import type { CollectionEntry, ContentCollectionKey } from 'astro:content' - -// export const getPathname = ({ -// slug, -// collection, -// data, -// }: CollectionEntry): -// | AstroGlobal['url']['pathname'] -// | undefined => { -// if (!slug) return -// if (data.draft) return -// if (data.output === false) return -// if (collection === 'pages' && slug === 'index') return '/' -// if (collection === 'pages') return `/${slug}` -// if (slug === 'index') return `/${collection}` -// return `/${collection}/${slug}` -// } diff --git a/src/utils/_archive/staticPageSchema.ts b/src/utils/_archive/staticPageSchema.ts deleted file mode 100644 index b53084964..000000000 --- a/src/utils/_archive/staticPageSchema.ts +++ /dev/null @@ -1,124 +0,0 @@ -// import { -// getCollection, -// getEntry, -// z, -// type CollectionEntry, -// type CollectionKey, -// } from 'astro:content' -// import { flatten, unflatten } from 'flat' -// import { all, camel, construct, get, isString, mapValues } from 'radash' -// import { mapKeys, merge } from 'remeda' - -// interface Options { -// casing: boolean -// layouts: boolean -// references: boolean -// selfs: boolean -// } - -// const defaults: Options = { -// casing: true, -// layouts: true, -// references: true, -// selfs: true, -// } - -// const transformReferences = async (data: object) => -// await all( -// mapValues(flatten(data) as any, async (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const results = await all( -// parts.map(async (valuePart) => { -// if (!valuePart.startsWith('$')) return valuePart -// if (valuePart.startsWith('$self')) return valuePart - -// const reference = valuePart.split('.')[0].replace('$', '') -// const collection = reference.split('/')[0] -// const slug = reference.split('/').slice(1).join('/') -// const path = valuePart.split('.').slice(1).join('.') - -// if (collection && slug) { -// let response = await getEntry(collection as CollectionKey, slug) -// const result = get(response?.data, path) -// return result -// } else if (collection) { -// const response = await getCollection(collection as CollectionKey) -// const result = response?.map((entry: any) => get(entry?.data, path)) -// return result -// } - -// return valuePart -// }) -// ) -// if (results.length == 1) return results[0] -// return results.join(' ') -// }) -// ) - -// const transformLayouts = (data: object) => { -// const flat: any = flatten(data) -// let store: any = {} -// let i: number = 0 - -// const merged = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = key.split('.') -// const result = parts.map((part) => { -// return part.replace(/^_+/, '') -// }) -// const filtered = result.filter(Boolean) -// const joined = filtered.join('.') -// return joined -// }) -// const nested = construct(merged) -// return nested -// } - -// const transformSelfs = (data: object) => { -// const flat = flatten(data) as any -// const mapped = mapValues(flat, (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const result = parts.map((part) => { -// if (!part.startsWith('$self')) return part -// const pathParts = part.split('.').slice(1) -// const camelCased = pathParts.map((part) => camel(part)) -// const path = camelCased.join('.') -// const result = get(data, path) -// return result ? result : part -// }) -// return result.join(' ') -// }) -// return unflatten(mapped) -// } - -// const transformCasing = (object: object) => { -// const flat = flatten(object) -// const mapped = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = (key as string).split('.') -// const result = parts.map((part) => camel(part)) -// return result.join('.') -// }) -// return unflatten(mapped) -// } - -// export const pageSchema = (options: Partial = {}) => -// z.any().transform(async (data: CollectionEntry['data']) => { -// const { layouts, casing, references, selfs } = merge(defaults, options) - -// if (references) data = await transformReferences(data) -// // console.log('references', JSON.stringify(data, null, 2)) - -// if (layouts) data = transformLayouts(data) -// // console.log('layouts', data) - -// if (casing) data = transformCasing(data) -// // console.log('casing', data) - -// if (selfs) data = transformSelfs(data) -// // console.log('selfs', data) - -// return data -// }) diff --git a/src/utils/_archive/transform/transform.ts b/src/utils/_archive/transform/transform.ts deleted file mode 100644 index 16aa65be5..000000000 --- a/src/utils/_archive/transform/transform.ts +++ /dev/null @@ -1,25 +0,0 @@ -// import type { CollectionEntry, CollectionKey } from 'astro:content' -// import { transformCasing } from './transformCasing' -// import { transformReferences } from './transformReferences' -// import { transformSelfs } from './transformSelfs' -// import { transformUnderscores } from './transformUnderscores' - -// export const transform = async ( -// entry: CollectionEntry -// ): Promise => { -// // console.log('entry', entry.data) - -// entry = await transformReferences(entry) -// // console.log('references', entry) - -// entry = transformUnderscores(entry) -// // console.log('underscores', entry) - -// entry = transformCasing(entry) -// // console.log('casing', entry) - -// entry = transformSelfs(entry) -// // console.log('selfs', entry) - -// return entry -// } diff --git a/src/utils/_archive/transform/transformCasing.ts b/src/utils/_archive/transform/transformCasing.ts deleted file mode 100644 index c934a9477..000000000 --- a/src/utils/_archive/transform/transformCasing.ts +++ /dev/null @@ -1,24 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { camel, isObject } from 'radash' -// import { isArray, isString, mapKeys } from 'remeda' - -// export const transformCasing = (data: any) => { -// if (!isObject(data) && !isArray(data)) return data - -// const flat: any = flatten(data) -// const transformedData = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = (key as string).split('.') -// const result = parts.map((part) => { -// const leadingUnderscores = part.match(/^_+/) || [''] -// const withoutLeadingUnderscores = part.replace(/^_+/, '') -// const camelCased = camel(withoutLeadingUnderscores) -// const result = leadingUnderscores + camelCased -// return result -// }) -// return result.join('.') -// }) - -// const nested = unflatten(transformedData) -// return nested -// } diff --git a/src/utils/_archive/transform/transformReferences.ts b/src/utils/_archive/transform/transformReferences.ts deleted file mode 100644 index 830cf492c..000000000 --- a/src/utils/_archive/transform/transformReferences.ts +++ /dev/null @@ -1,54 +0,0 @@ -// import { getCollection, getEntry, type CollectionKey } from 'astro:content' -// import { flatten, unflatten } from 'flat' -// import { all, get, isString, mapValues } from 'radash' -// import { getPathname } from '../getPathname' -// import { transform } from './transform' - -// export const transformReferences = async (data: object): Promise => { -// const flat = flatten(data) -// const mappedValues = await all( -// mapValues(flat as any, async (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const mappedParts = await all( -// parts.map(async (valuePart) => { -// if (!valuePart.startsWith('$/')) return valuePart - -// const reference = valuePart.split('.')[0].replace('$/', '') -// const collection = reference.split('/')[0] -// const slug = reference.split('/').slice(1).join('/') -// const path = valuePart.split('.').slice(1).join('.') - -// if (collection && slug) { -// let response = await getEntry(collection as CollectionKey, slug) -// if (!response) -// throw new Error(`Entry not found: ${collection}/${slug}`) -// const transformed = await transform(response as any) -// const result = get(transformed?.data, path) -// if (!path) -// return { -// ...transformed?.data, -// pathname: getPathname(transformed), -// } -// return result ? result : valuePart -// } else if (collection) { -// const response = await getCollection(collection as CollectionKey) -// if (!response) -// throw new Error(`Entry not found: ${collection}/${slug}`) -// const mapped = response?.map(async (entry: any) => { -// const transformed = await transform(entry?.data) -// return get(transformed, path) -// }) -// const result = await all(mapped) -// return result ? result : valuePart -// } - -// return valuePart -// }) -// ) -// if (mappedParts.length == 1) return mappedParts[0] -// else return mappedParts.join(' ') -// }) -// ) -// return unflatten(mappedValues) -// } diff --git a/src/utils/_archive/transform/transformSelfs.ts b/src/utils/_archive/transform/transformSelfs.ts deleted file mode 100644 index cd5705e65..000000000 --- a/src/utils/_archive/transform/transformSelfs.ts +++ /dev/null @@ -1,20 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { camel, get, isString, mapValues } from 'radash' - -// export const transformSelfs = (data: any): any => { -// const flat = flatten(data) as any -// const mapped = mapValues(flat, (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const result = parts.map((part) => { -// if (!part.startsWith('$.')) return part -// const pathParts = part.replace('$.', '').split('.') -// const camelCased = pathParts.map((part) => camel(part)) -// const path = 'data.' + camelCased.join('.') -// const result = get(data, path) -// return result ? result : part -// }) -// return result.join(' ') -// }) -// return unflatten(mapped) -// } diff --git a/src/utils/_archive/transform/transformUnderscores.ts b/src/utils/_archive/transform/transformUnderscores.ts deleted file mode 100644 index ce2bcc31a..000000000 --- a/src/utils/_archive/transform/transformUnderscores.ts +++ /dev/null @@ -1,19 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { isString } from 'radash' -// import { mapKeys } from 'remeda' - -// export const transformUnderscores = (data: any): any => { -// const flat: any = flatten(data) -// const merged = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = key.split('.') -// const result = parts.map((part) => { -// return part.replace(/^_+/, '') -// }) -// const filtered = result.filter(Boolean) -// const joined = filtered.join('.') -// return joined -// }) -// const nested = unflatten(merged) -// return nested -// } diff --git a/src/utils/cart.ts b/src/utils/cart.ts new file mode 100644 index 000000000..81863ece8 --- /dev/null +++ b/src/utils/cart.ts @@ -0,0 +1,27 @@ +import { slugify } from './slugify.ts' + +export const generateProductId = ( + slug: string, + variants?: string[] | undefined +): string => { + const slugified = slugify(slug) + + if (variants && variants.length > 0) + return `${slugified}--${variants.map((variant) => slugify(variant)).join('--')}` + + return slugified +} + +export const generateProductName = ( + title: string, + variants?: string[] | undefined +): string => { + if (variants && variants.length > 0) + return `${title} / ${variants.join(' / ')}` + + return title +} + +export const formatPrice = (price: number): string => { + return `€${price?.toFixed(2).replace('.', ',')}` +} diff --git a/src/utils/getHref.ts b/src/utils/getHref.ts new file mode 100644 index 000000000..7cc1ecb9b --- /dev/null +++ b/src/utils/getHref.ts @@ -0,0 +1,6 @@ +import type { CollectionEntry } from 'astro:content' + +export function getHref(slug: CollectionEntry<'pages'>['slug']) { + if (slug === 'index') return '/' + else return `/${slug}/` +} diff --git a/src/utils/mergeEntries.ts b/src/utils/mergeEntries.ts deleted file mode 100644 index cef69be2d..000000000 --- a/src/utils/mergeEntries.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { getEntry } from 'astro:content' -import { assign } from 'radash' - -export const mergeEntries = async (entry: any) => { - if (!entry) return entry - const { data, slug } = entry - const baseSettings = await getEntry('settings', 'base') - const enSettings = await getEntry('settings', 'en') - const deSettings = await getEntry('settings', 'de') - const frSettings = await getEntry('settings', 'fr') - const pageSettings = data.settings && (await getEntry(data.settings)) - const i18nSettings = data.i18n && (await getEntry(data.i18n)) - - let merged = {} - merged = assign(merged, baseSettings?.data ?? {}) - slug?.startsWith('en') && (merged = assign(merged, enSettings?.data ?? {})) - slug?.startsWith('de') && (merged = assign(merged, deSettings?.data ?? {})) - slug?.startsWith('fr') && (merged = assign(merged, frSettings?.data ?? {})) - merged = assign(merged, i18nSettings?.data ?? {}) - merged = assign(merged, pageSettings?.data ?? {}) - merged = assign(merged, data) - - const newEntry = { - ...entry, - data: merged, - } - return newEntry -} diff --git a/src/utils/slugify.ts b/src/utils/slugify.ts new file mode 100644 index 000000000..e1fda3dbc --- /dev/null +++ b/src/utils/slugify.ts @@ -0,0 +1,6 @@ +export const slugify = (input: string): string => { + return input + .toLowerCase() + .replace(/[^a-z0-9]+/g, '-') + .replace(/^-+|-+$/g, '') +} diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 000000000..522c1ef6a --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,5 @@ +import { vitePreprocess } from '@astrojs/svelte'; + +export default { + preprocess: vitePreprocess(), +} diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 000000000..630dab39d --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,72 @@ +import tailwindcssScrollbar from 'tailwind-scrollbar' +import type { Config } from 'tailwindcss' +import tailwindcssAnimate from 'tailwindcss-animate' + +export default { + darkMode: ['class'], + content: [ + './src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}', + 'node_modules/fulldev-ui/src/**/*.astro', + ], + theme: { + container: { + screens: ['1536px'], + }, + extend: { + spacing: { + gutter: 'clamp(16px, 4vw, 32px)', + container: 'var(--container, 1536px)', + hero: 'calc(100vh - var(--header-height, 0px) - var(--subheader-height, 0px) - var(--banner-height, 0px))', + header: 'var(--header-height, 0px)', + 'sticky-8': 'calc(var(--header-height, 0px) + 2rem)', + 'sticky-16': 'calc(var(--header-height, 0px) + 4rem)', + }, + colors: { + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))', + // hover: 'hsl(var(--primary) / 85%)', + hover: 'hsl(var(--primary) / 75%)', + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))', + hover: 'hsl(var(--secondary) / 75%)', + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))', + hover: 'hsl(var(--muted) / 75%)', + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))', + hover: 'hsl(var(--accent) / 75%)', + }, + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))', + hover: 'hsl(var(--card) / 75%)', + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))', + }, + }, + borderRadius: { + lg: `var(--radius)`, + md: `calc(var(--radius) - 2px)`, + sm: 'calc(var(--radius) - 4px)', + }, + borderColor: { + DEFAULT: 'hsl(var(--border))', + }, + }, + }, + plugins: [tailwindcssAnimate, tailwindcssScrollbar({ nocompatible: true })], +} satisfies Config diff --git a/tsconfig.json b/tsconfig.json index 7c119d37d..27a4e2617 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,12 @@ { - "extends": "astro/tsconfigs/strict", + "extends": "astro/tsconfigs/strictest", + "include": ["src", "astro.config.ts", "virtual.d.ts"], "compilerOptions": { - "jsx": "preserve", + "module": "NodeNext", + "moduleResolution": "NodeNext", "baseUrl": ".", "paths": { - "fulldev-ui/*": [ - "src/*" - ] + "fulldev-ui/*": ["src/*"], } }, - "exclude": [ - "dist" - ] } \ No newline at end of file diff --git a/virtual.d.ts b/virtual.d.ts new file mode 100644 index 000000000..8c009ed84 --- /dev/null +++ b/virtual.d.ts @@ -0,0 +1,5 @@ +declare module 'virtual:fulldev-ui/config' { + import type { Config } from 'fulldev-ui/integration' + const content: Config + export default content +}
+ {capitalize(key)} +
+ Please reference + + {path} + for now. +
This is an example of HTML content inserted into the Content block.
This is an example of HTML content inserted into the Content2 block. It demonstrates how you can use HTML to structure your content within the block.
Adding more content to make it longer. You can include various HTML elements such as headings, paragraphs, lists, images, and more to enrich your content.
Here is another paragraph to further extend the content. This allows you to provide more information and details within the Content2 block.
+ This is an example of HTML content inserted into the Content4 block. Lorem + ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus quia, nulla! + Maiores et perferendis eaque, exercitationem praesentium nihil. Lorem ipsum + dolor sit amet consectetur adipisicing elit. Praesent sapien massa, + convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget + malesuada. +
I'm a live preview`} /> +``` + +Will render as: + +I'm a live preview`} /> + +## Usage in markdown + +Thanks to [this great plugin](https://github.com/mattjennings/astro-live-code) you can also use it directly in markdown files. + +The following code will translate to the example at the top of this page: + +````html +```astro live +I'm a live preview +``` +```` diff --git a/src/content/pages/docs/structures/container.mdx b/src/content/pages/docs/structures/container.mdx new file mode 100644 index 000000000..606c24bf2 --- /dev/null +++ b/src/content/pages/docs/structures/container.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Container +description: Sets a max-width, padding and centers the content +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/drawer.mdx b/src/content/pages/docs/structures/drawer.mdx new file mode 100644 index 000000000..60637f417 --- /dev/null +++ b/src/content/pages/docs/structures/drawer.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Drawer +description: A panel that slides out from the side of the screen +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the Header blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/group.mdx b/src/content/pages/docs/structures/group.mdx new file mode 100644 index 000000000..e029447d0 --- /dev/null +++ b/src/content/pages/docs/structures/group.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Group +description: Group buttons and similar components +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/layout.mdx b/src/content/pages/docs/structures/layout.mdx new file mode 100644 index 000000000..c6aebe59b --- /dev/null +++ b/src/content/pages/docs/structures/layout.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Container +description: Sets a head, body and some base styles +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the layouts for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/masonry.mdx b/src/content/pages/docs/structures/masonry.mdx new file mode 100644 index 000000000..0d153d984 --- /dev/null +++ b/src/content/pages/docs/structures/masonry.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Masonry +description: Places items like cards in a masonry layout +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/matrix.mdx b/src/content/pages/docs/structures/matrix.mdx new file mode 100644 index 000000000..cdce5e31b --- /dev/null +++ b/src/content/pages/docs/structures/matrix.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Matrix +description: Places items like cards in a grid +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/panel.mdx b/src/content/pages/docs/structures/panel.mdx new file mode 100644 index 000000000..39507c239 --- /dev/null +++ b/src/content/pages/docs/structures/panel.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Panel +description: A box with a border, padding and rounded corners used for sections +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/prose.mdx b/src/content/pages/docs/structures/prose.mdx new file mode 100644 index 000000000..4b75ded1a --- /dev/null +++ b/src/content/pages/docs/structures/prose.mdx @@ -0,0 +1,33 @@ +--- +_block: Content7 +title: Prose +description: Applies styling to child components +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Prose from 'fulldev-ui/structures/Prose.astro' +--- + + + Welcome to Our Blog + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia + odio vitae vestibulum vestibulum. + + + Key Features + + Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. + + + Simple and elegant design + Responsive layout + Easy customization + + +``` diff --git a/src/content/pages/docs/structures/section.mdx b/src/content/pages/docs/structures/section.mdx new file mode 100644 index 000000000..3f4535b0b --- /dev/null +++ b/src/content/pages/docs/structures/section.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Section +description: Sets vertical padding and some base styles +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/stack.mdx b/src/content/pages/docs/structures/stack.mdx new file mode 100644 index 000000000..526318912 --- /dev/null +++ b/src/content/pages/docs/structures/stack.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Stack +description: Places items like cards in a horizontal or vertical stack +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/writeup.mdx b/src/content/pages/docs/structures/writeup.mdx new file mode 100644 index 000000000..0a8a58b51 --- /dev/null +++ b/src/content/pages/docs/structures/writeup.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Writeup +description: Applies styling to child components, similar to Prose +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/index.mdx b/src/content/pages/index.mdx index 87835c12e..db3a9e0f1 100644 --- a/src/content/pages/index.mdx +++ b/src/content/pages/index.mdx @@ -1,66 +1,52 @@ --- -seo: - title: Fulldev UI - Astro component and block library, open-source - description: Make websites rapidly with pre-built components and blocks. - image: /images/og-image.png +_schema: page +_block: Hero1 -sections: - hero: - _bookshop_name: Hero - color: brand - badge: - as: a - text: We just released our biggest update yet 🎉 - href: https://discord.gg/vXZqMbadm8 - heading: The Astro UI library to build content sites - text: Make websites with prebuilt components and blocks - buttons: - - text: Get Started - href: /overview/installation - - text: GitHub - href: https://github.com/fulldotdev/ui - target: _blank - icon: brand-github +title: Fulldev UI - Astro component and block library, open-source +description: Make websites rapidly with pre-built components and blocks. +heading: Build complete websites with this Astro UI library +paragraph: Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation. +buttons: + - text: Get Started + href: /docs/ + - text: GitHub + href: https://github.com/fulldotdev/ui + icon: brand-github + target: _blank - blocks: - _bookshop_name: Content - color: brand - label: Blocks +sections: + - _block: Content2 + tagline: Blocks heading: Use pre-built blocks with just props - text: we created a great gallery of blocks to build content sites with a modern look and feel, all of our blocks are build with components from the library to achieve a consistent look. - image: /images/block-code.png - reverse: odd + paragraph: We created a great gallery of blocks to build content sites with a modern look and feel, all of our blocks are build with components from the library to achieve a consistent look. + image: + src: /images/block-code.png buttons: - - href: /blocks + - href: /docs/blocks/ icon: layout text: View blocks + variant: secondary - components: - _bookshop_name: Content - color: brand - label: Components + - _block: Content2 + tagline: Components heading: Or build your own, with easy to use components - text: our rich set of components make it easy to build your own blocks with great customizability through props and global theming. - image: /images/component-code.png - reverse: odd + paragraph: Our rich set of components make it easy to build your own blocks with great customizability through props and global theming. + image: + src: /images/component-code.png buttons: - - href: /base/badge + - text: View components + href: /docs/components/ icon: code - text: View components + variant: secondary - cta: - _bookshop_name: Cta - size: lg - variant: primary + - _block: Cta1 heading: Build content websites in a fraction of time - text: A library of components and blocks to build content sites, fast. + paragraph: A library of components and blocks to build content sites, fast. buttons: - text: Get Started - href: /overview/installation - color: brand + href: /docs/ - text: Github href: https://github.com/fulldotdev/ui - target: _blank icon: brand-github - color: brand + target: _blank --- diff --git a/src/content/pages/overview/frameworks.mdx b/src/content/pages/overview/frameworks.mdx deleted file mode 100644 index 6c2831153..000000000 --- a/src/content/pages/overview/frameworks.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -# Frameworks - -Fulldev UI is written in vanilla CSS and .astro files. It is framework agnostic. - -## JS frameworks - -All styles in Fulldev UI use regular CSS and classes. Classes use the following naming convention: - -- Component classes are the same as the component name, like `button` for ``. -- Prop classes have the prop name as prefix, like `variant-primary` for ``. -- If a prop is a boolean the class is added without a prefix, like `contrast`. - -This means you can apply Fulldev UI styles to any framework component as follows: - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - - Button - Button -``` - -## CSS frameworks - -A TailwindCSS plugin and UnoCSS preset is available. - -### TailwindCSS - -In your `tailwind.config.ts` add the following: - -```ts -// tailwind.config.ts -import fulldevUI from 'fulldev-ui/tailwind' - -export default { - plugins: [fulldevUI], -} -``` - -In your `astro.config.ts` add the following: - -```ts -// astro.config.ts -import tailwind from '@astrojs/tailwind' - -export default defineConfig({ - integrations: [ - tailwind({ - // Disable injecting styles, import manually instead - applyBaseStyles: false, - }), - ], -}) -``` - -Import the css file file below anywhere in your project. - -```css -@tailwind base layer(base); -@tailwind components; -@tailwind utilities; -``` - -### UnoCSS - -In your `uno.config.ts` add the following: - -```ts -// uno.config.ts -import fulldevUI from 'fulldev-ui/unocss' - -export default defineConfig({ - injectReset: false, - presets: [fulldevUI], -}) -``` - -Do not use `injectReset` when using the UnoCSS preset, as it will conflict with the reset provided by Fulldev UI. If you do want a style reset, be sure to import it in the `base` layer, similar to the TailwindCSS example above. - -## Utility classes - -The following classes are available when using the Tailwind plugin or UnoCSS preset. - -### Spacing - -The following spacing classes are added to your tailwind/uno config. - -You can use them like `p-space-1`, `m-space-1`, `h-space-1`, `w-space-1`, etc. - -```ts -spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', -}, -``` - -### Font size - -The following spacing classes are added to your tailwind/uno config. - -You can use them like `text-1`, `text-2`, `text-3`, etc. - -```ts -fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', -} -``` - -### Border radius - -The following border radius classes are added to your tailwind/uno config. - -You can use them like `rounded-1`, `rounded-2`, `rounded-3`, etc. - -```ts -borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', -} -``` - -### Color classes - -The following color classes are added to your tailwind/uno config. - -You can use them like `bg-color-1`, `text-base-2`, `border-base-6`, etc. - -```ts -colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - } -} -``` diff --git a/src/content/pages/overview/installation.mdx b/src/content/pages/overview/installation.mdx deleted file mode 100644 index 961174d02..000000000 --- a/src/content/pages/overview/installation.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Installation - -Install fulldev-ui with your favorite package manager and you are ready to go. To get started with the integration see the integration page. - -```bash -pnpm i fulldev-ui -# or -bun i fulldev-ui -# or -yarn add fulldev-ui -# or -npm i fulldev-ui -``` diff --git a/src/content/pages/overview/integration.mdx b/src/content/pages/overview/integration.mdx deleted file mode 100644 index c032bacec..000000000 --- a/src/content/pages/overview/integration.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Integration - -After installation you can generate your color palettes via an Astro integration. You can optionally add a custom css file and define custom colors and other theming options, see the theming page for more information. - -```ts -import { defineConfig } from 'astro/config' -import fulldev from 'fulldev-ui/integration' - -// https://astro.build/config -export default defineConfig({ - integrations: [ - fulldev({ - css: '/src/css/custom.css', - colors: { - theme: 'dark', - dark: { - background: '#111110', - base: '#6F6D66', - brand: '#F50', - }, - light: { - background: '#EEEEEC', - base: '#6F6D66', - brand: '#F50', - }, - }, - }), - ], -}) -``` diff --git a/src/content/pages/overview/introduction.mdx b/src/content/pages/overview/introduction.mdx deleted file mode 100644 index f783756f8..000000000 --- a/src/content/pages/overview/introduction.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -# Introduction - -Fulldev UI focuses on content websites rather than applications. - -##### Build entire websites with just components - -Fulldev UI is unique in that it introduces larger components to build entire pages, and even websites. Like a Section component that just works. - -##### Integrates with any JS / CSS framework - -Want to use Tailwind, or something else? You can overwrite all styles. Need an interactive framework component? Styles can be applied with one simple class. - -##### Automated colors, spacing and sizes - -Everything is carefully designed to be fully responsive. Component adapt to their environment, like a Heading being different in a Section than in a Card. You can also customize via simple props. diff --git a/src/content/pages/overview/theming.mdx b/src/content/pages/overview/theming.mdx deleted file mode 100644 index 2bfc03a4b..000000000 --- a/src/content/pages/overview/theming.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Theming - -## Colors - -The color theme is inspired by / compatible with Radix Colors. - -### Automatic setup - -With the fulldev-ui integration you can easily set a theme and generate a radix color palette. See the integration page for details. - -### Manual setup - -You can define a `base` and a `brand` theme, both with 12 steps and 1 contrast step for text on step 9. For a detailed explenation see this page. - -```css -:root, -.theme-light { - --base-1: ; - --base-2: ; - --base-3: ; - --base-4: ; - --base-5: ; - --base-6: ; - --base-7: ; - --base-8: ; - --base-9: ; - --base-10: ; - --base-11: ; - --base-12: ; - --base-contrast: ; - - --brand-1: ; - --brand-2: ; - --brand-3: ; - --brand-4: ; - --brand-5: ; - --brand-6: ; - --brand-7: ; - --brand-8: ; - --brand-9: ; - --brand-10: ; - --brand-11: ; - --brand-12: ; - --brand-contrast: ; -} -``` - -### Dark theme - -Dark mode is set via a simple `.theme-dark` class. - -If you want to use a dark theme by default, remove the `:root` selector from the light theme and add it to the dark theme. - -Components in Fulldev UI that support theme switching have the `theme` prop available, which adds either the `theme-dark` or `theme-light` class - -```css -.theme-dark { - /* Same variables here as above */ -} -``` - -## Radius - -The `--border-radius` variable is a multiplier applied to all radius values. The default value is `1`. - -```css -:root { - --border-radius: 1; -} -``` - -## Other - -Since Fulldev UI uses just regular CSS with low specificity, you can customize anything else using custom CSS. - -We plan to add more customization via variables later. diff --git a/src/content/pages/showcase.mdx b/src/content/pages/showcase.mdx index 76d4a3cfb..a5be8f421 100644 --- a/src/content/pages/showcase.mdx +++ b/src/content/pages/showcase.mdx @@ -1,62 +1,30 @@ --- -showcase: - # Add your project here below 👇 - - - heading: Van Dillen Antieke Bouwmaterialen - image: /showcase/van-dillen-antieke-bouwmaterialen.webp - href: 'https://vdabouwmaterialen.nl' - - heading: Anti Slip Profiles - image: /showcase/anti-slip-profiles.webp - href: 'https://antislipprofiles.com' - - heading: Fulldev UI - image: /showcase/fulldev-ui.webp - href: 'https://ui.full.dev' - - heading: The Gym Haren - image: /showcase/the-gym-haren.webp - href: 'https://thegymharen.nl' - - heading: Lavis Detailing - image: /showcase/lavis-detailing.webp - href: 'https://lavisdetailing.nl' - - heading: Leren Trainingsacteren - image: /showcase/leren-trainingsacteren.webp - href: 'https://lerentrainingsacteren.nl' - - heading: Miele Witgoedcenter Amsterdam - image: /showcase/miele-witgoedcenter-amsterdam.webp - href: 'https://witgoedcenteramsterdam.nl' - - heading: Sloepverhuur Bolsward - image: /showcase/sloepverhuur-bolsward.webp - href: 'https://sloepverhuurbolsward.nl' - - heading: Stark Vulcanising Products - image: /showcase/stark-vulcanising-products.webp - -_layout: PostLayout -settings: components +title: Showcase --- -import Masonry from 'fulldev-ui/components/Masonry.astro' -import Card from 'fulldev-ui/components/Card.astro' +import Card from 'fulldev-ui/structures/Card.astro' +import { getCollection } from 'astro:content' + +export const projects = ( + await getCollection( + 'pages', + ({ slug }) => slug.startsWith('showcase') && slug !== 'showcase' + ) +).map((p) => p.data) # Showcase Projects that are built with Fulldev UI. - - - {frontmatter.showcase.map((showcase) => ( - - ))} - diff --git a/src/content/pages/structure/_row.mdx b/src/content/pages/structure/_row.mdx deleted file mode 100644 index 6eee78f5d..000000000 --- a/src/content/pages/structure/_row.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -_layout: BlockLayout -title: Row -description: Structures children in a horizontal row. This component sizes dynamically, the margin between a heading and a paragraph is smaller than the margin between a paragraph an image. ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Row from 'fulldev-ui/components/Row.astro' ---- - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/_wrap.mdx b/src/content/pages/structure/_wrap.mdx deleted file mode 100644 index 978414a38..000000000 --- a/src/content/pages/structure/_wrap.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Wrap -description: Structures children onto one line or can wrap onto multiple lines. ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Wrap from 'fulldev-ui/components/Wrap.astro' ---- - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/carousel.mdx b/src/content/pages/structure/carousel.mdx deleted file mode 100644 index 33c3b6fb5..000000000 --- a/src/content/pages/structure/carousel.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Carousel ---- - -```astro live ---- -import Carousel from 'fulldev-ui/components/Carousel.astro' -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/column.mdx b/src/content/pages/structure/column.mdx deleted file mode 100644 index da37a9380..000000000 --- a/src/content/pages/structure/column.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Column ---- - -```astro live ---- -import Column from 'fulldev-ui/components/Column.astro' -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/grid.mdx b/src/content/pages/structure/grid.mdx deleted file mode 100644 index c0a330a1a..000000000 --- a/src/content/pages/structure/grid.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Grid ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Grid from 'fulldev-ui/components/Grid.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/masonry.mdx b/src/content/pages/structure/masonry.mdx deleted file mode 100644 index a458b7a8d..000000000 --- a/src/content/pages/structure/masonry.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Masonry ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Masonry from 'fulldev-ui/components/Masonry.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/split.mdx b/src/content/pages/structure/split.mdx deleted file mode 100644 index fcb8a10e4..000000000 --- a/src/content/pages/structure/split.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Split ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Split from 'fulldev-ui/components/Split.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/spread.mdx b/src/content/pages/structure/spread.mdx deleted file mode 100644 index 5f152608f..000000000 --- a/src/content/pages/structure/spread.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Spread ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Spread from 'fulldev-ui/components/Spread.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/stack.mdx b/src/content/pages/structure/stack.mdx deleted file mode 100644 index 505dfd082..000000000 --- a/src/content/pages/structure/stack.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Stack ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Stack from 'fulldev-ui/components/Stack.astro' ---- - - - - - - - - -``` diff --git a/src/content/pages/typography/heading.mdx b/src/content/pages/typography/heading.mdx deleted file mode 100644 index e87c82ca6..000000000 --- a/src/content/pages/typography/heading.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Heading ---- - -# Heading - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -``` - -## Props - - - -## Examples - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` diff --git a/src/content/pages/typography/link.mdx b/src/content/pages/typography/link.mdx deleted file mode 100644 index c51412579..000000000 --- a/src/content/pages/typography/link.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Link ---- - -# Link - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -``` - -## Props - - - -## Examples - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -``` diff --git a/src/content/pages/typography/list.mdx b/src/content/pages/typography/list.mdx deleted file mode 100644 index a36aeb554..000000000 --- a/src/content/pages/typography/list.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: List ---- - -# List - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - - -``` - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - -``` - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - -``` diff --git a/src/content/pages/typography/text.mdx b/src/content/pages/typography/text.mdx deleted file mode 100644 index e3cbbc4cd..000000000 --- a/src/content/pages/typography/text.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Text ---- - -# Text - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -``` - -## Props - - - -## Examples - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` diff --git a/src/content/records/record.yml b/src/content/records/record.yml deleted file mode 100644 index d99e1b8f7..000000000 --- a/src/content/records/record.yml +++ /dev/null @@ -1 +0,0 @@ -title: Test diff --git a/src/content/settings/base.yml b/src/content/settings/base.yml deleted file mode 100644 index 265bdfa5e..000000000 --- a/src/content/settings/base.yml +++ /dev/null @@ -1,63 +0,0 @@ -seo: - image: /images/og-image.png - -code: - head: | - - -header: - heading: Fulldev UI - variant: base - links: - - text: Docs - href: /overview/introduction - - text: Components - href: /typography/heading - - text: Blocks - href: /blocks - - text: Showcase - href: /showcase - search: - icon: search - variant: soft - buttons: - - href: https://github.com/fulldotdev/ui - target: _blank - aria-label: GitHub - icon: brand-github - - href: https://discord.gg/vXZqMbadm8 - target: _blank - aria-label: Discord - icon: brand-discord - drawer: - - links: - - text: Docs - href: /overview/introduction - - text: Components - href: /typography/heading - - text: Blocks - href: /blocks - - heading: Overview - links: - - text: Introduction - href: /overview/introduction - - text: Installation - href: /overview/installation - - text: Integration - href: /overview/integration - - text: Theming - href: /overview/theming - - text: Frameworks - href: /overview/frameworks - - text: Showcase - href: /showcase - - heading: Typography - folder: typography - - heading: Base - folder: base - - heading: Structure - folder: structure diff --git a/src/content/settings/components.yml b/src/content/settings/components.yml deleted file mode 100644 index d26552028..000000000 --- a/src/content/settings/components.yml +++ /dev/null @@ -1,29 +0,0 @@ -sidebar: - - heading: Overview - links: - - text: Introduction - href: /overview/introduction - - text: Installation - href: /overview/installation - - text: Integration - href: /overview/integration - - text: Theming - href: /overview/theming - - text: Frameworks - href: /overview/frameworks - - text: Showcase - href: /showcase - - heading: Typography - folder: typography - - heading: Base - folder: base - - heading: Structure - folder: structure - -toc: - - heading: On this page - links: - - text: Props - href: /overview/introduction - - text: Examples - href: /overview/installation diff --git a/src/css/color.css b/src/css/color.css deleted file mode 100644 index 98636e1dc..000000000 --- a/src/css/color.css +++ /dev/null @@ -1,168 +0,0 @@ -.theme-light, -.theme-light * { - color-scheme: light; -} - -.theme-dark, -.theme-dark * { - color-scheme: dark; -} - -:where(:root), -:where(.theme-light), -:where(.theme-dark), -.color-base, -.color-base - *:where(:not([class*='color-']):not(.color-base [class*='color-'] *)) { - --color-1: var(--base-1); - --color-2: var(--base-2); - --color-3: var(--base-3); - --color-4: var(--base-4); - --color-5: var(--base-5); - --color-6: var(--base-6); - --color-7: var(--base-7); - --color-8: var(--base-8); - --color-9: var(--base-9); - --color-10: var(--base-10); - --color-11: var(--base-11); - --color-12: var(--base-12); - - --color-a1: var(--base-a1, var(--base-1)); - --color-a2: var(--base-a2, var(--base-2)); - --color-a3: var(--base-a3, var(--base-3)); - --color-a4: var(--base-a4, var(--base-4)); - --color-a5: var(--base-a5, var(--base-5)); - --color-a6: var(--base-a6, var(--base-6)); - --color-a7: var(--base-a7, var(--base-7)); - --color-a8: var(--base-a8, var(--base-8)); - --color-a9: var(--base-a9, var(--base-9)); - --color-a10: var(--base-a10, var(--base-10)); - --color-a11: var(--base-a11, var(--base-11)); - --color-a12: var(--base-a12, var(--base-12)); - - --color-contrast: var(--base-contrast); - --color-background: var(--base-background); -} - -.color-brand, -.color-brand - *:where(:not([class*='color-']):not(.color-brand [class*='color-'] *)) { - --color-1: var(--brand-1); - --color-2: var(--brand-2); - --color-3: var(--brand-3); - --color-4: var(--brand-4); - --color-5: var(--brand-5); - --color-6: var(--brand-6); - --color-7: var(--brand-7); - --color-8: var(--brand-8); - --color-9: var(--brand-9); - --color-10: var(--brand-10); - --color-11: var(--brand-11); - --color-12: var(--brand-12); - - --color-a1: var(--brand-a1, var(--brand-1)); - --color-a2: var(--brand-a2, var(--brand-2)); - --color-a3: var(--brand-a3, var(--brand-3)); - --color-a4: var(--brand-a4, var(--brand-4)); - --color-a5: var(--brand-a5, var(--brand-5)); - --color-a6: var(--brand-a6, var(--brand-6)); - --color-a7: var(--brand-a7, var(--brand-7)); - --color-a8: var(--brand-a8, var(--brand-8)); - --color-a9: var(--brand-a9, var(--brand-9)); - --color-a10: var(--brand-a10, var(--brand-10)); - --color-a11: var(--brand-a11, var(--brand-11)); - --color-a12: var(--brand-a12, var(--brand-12)); - - --color-contrast: var(--brand-contrast); - --color-background: var(--brand-background); -} - -.contrast, -.contrast * { - --color-9: var(--color-12); - --color-10: var(--color-12); - --color-11: var(--color-12); - --color-contrast: var(--color-1); -} - -/* :where(:root), -:where(.theme-light), -:where(.theme-dark), -:where(.color-base), -:where(.color-brand), -.variant-base, -.variant-base - *:not([class*='variant-']):not(.variant-base [class*='variant-'] *) { - --background: var(--color-background, var(--color-1)); - --background-hover: var(--color-1); - --background-active: var(--color-1); - --border: var(--color-6); - --border-hover: var(--color-6); - --text: var(--color-11); -} - -.variant-subtle, -.variant-subtle - *:not([class*='variant-']):not(.variant-subtle [class*='variant-'] *) { - --background: var(--color-2); - --background-hover: var(--color-2); - --background-active: var(--color-2); - --border: var(--color-6); - --border-hover: var(--color-6); - --text: var(--color-11); -} - -.variant-ghost, -.variant-ghost - *:not([class*='variant-']):not(.variant-ghost [class*='variant-'] *) { - --background: transparent; - --background-hover: var(--color-3); - --background-active: var(--color-4); - --border: transparent; - --border-hover: transparent; - --text: var(--color-11); -} - -.variant-outline, -.variant-outline - *:not([class*='variant-']):not(.variant-outline [class*='variant-'] *) { - --background: transparent; - --background-hover: var(--color-3); - --background-active: var(--color-5); - --border: var(--color-7); - --border-hover: var(--color-8); - --text: var(--color-11); -} - -.variant-soft, -.variant-soft - *:not([class*='variant-']):not(.variant-soft [class*='variant-'] *) { - --background: var(--color-3); - --background-hover: var(--color-4); - --background-active: var(--color-5); - --border: transparent; - --border-hover: transparent; - --text: var(--color-11); -} - -.variant-surface, -.variant-surface - *:not([class*='variant-']):not(.variant-surface [class*='variant-'] *) { - --background: var(--color-3); - --background-hover: var(--color-4); - --background-active: var(--color-5); - --border: var(--color-7); - --border-hover: var(--color-8); - --text: var(--color-11); -} - -.variant-solid, -.variant-solid - *:not([class*='variant-']):not(.variant-solid [class*='variant-'] *) { - --background: var(--color-9); - --background-hover: var(--color-10); - --background-active: var(--color-10); - --border: transparent; - --border-hover: transparent; - --text: var(--color-contrast); -} */ diff --git a/src/css/custom.css b/src/css/custom.css index 7966013c6..13cf57172 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1,69 +1,20 @@ -/* TODO: temporary decreased due to z-index issue over header */ -.hero:not(.window .hero)::before { - position: absolute; - top: 0; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.1), - #f500 70% - ); - width: 100%; - height: 100%; - content: ''; -} -/* .hero:not(.window .hero)::before { - position: absolute; - top: -80%; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.1), - #f500 90% - ); - width: 100%; - height: 170%; - content: ''; -} */ +@import url(https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900); -.header:not(.window .header) { - backdrop-filter: blur(10px); - border-color: var(--base-a6) !important; - background-color: rgba(17, 17, 16, 0.2) !important; +mark { + background-color: var(--brand-12) !important; + color: var(--brand-1) !important; } -.cta:not(.window .cta) { - backdrop-filter: blur(10px); - border-color: var(--base-a6) !important; - background-color: rgba(17, 17, 16, 0.2) !important; - overflow: visible; - - &::before { - position: absolute; - top: -30%; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.06), - #f500 90% - ); - width: 100%; - height: 160%; - content: ''; - } +.rounded-full { + border-radius: 999px !important; } -mark { - background-color: var(--brand-12) !important; - color: var(--brand-1) !important; +.hero .heading, +.hero .lead { + max-width: 680px; + text-wrap: balance; } -.astro-code { - border: 1px solid var(--base-6); - border-radius: var(--radius-2); - background-color: var(--base-2) !important; - padding: var(--space-5); +.logo .image { + border-radius: 2px; } diff --git a/src/css/size.css b/src/css/size.css deleted file mode 100644 index af17c5922..000000000 --- a/src/css/size.css +++ /dev/null @@ -1,130 +0,0 @@ -:root { - --space-sm-1: 4px; - --space-sm-2: 6px; - --space-sm-3: 8px; - --space-sm-4: 12px; - --space-sm-5: 20px; - --space-sm-6: 40px; - --space-sm-7: 60px; - - --space-md-1: 5px; - --space-md-2: 8px; - --space-md-3: 11px; - --space-md-4: 14px; - --space-md-5: 28px; - --space-md-6: 56px; - --space-md-7: 84px; - - --space-lg-1: 6px; - --space-lg-2: 10px; - --space-lg-3: 14px; - --space-lg-4: 18px; - --space-lg-5: 36px; - --space-lg-6: 72px; - --space-lg-7: 120px; - - --text-sm-1: 12px; - --text-sm-2: 14px; - --text-sm-3: 14px; - --text-sm-4: 16px; - --text-sm-5: 18px; - --text-sm-6: 20px; - --text-sm-7: 24px; - --text-sm-8: 30px; - - --text-md-1: 12px; - --text-md-2: 14px; - --text-md-3: 16px; - --text-md-4: 18px; - --text-md-5: 20px; - --text-md-6: 24px; - --text-md-7: 30px; - --text-md-8: 36px; - - --text-lg-1: 14px; - --text-lg-2: 14px; - --text-lg-3: 18px; - --text-lg-4: 20px; - --text-lg-5: 24px; - --text-lg-6: 30px; - --text-lg-7: 36px; - --text-lg-8: 48px; -} - -@media (min-width: 768px) { - :root { - --text-sm-8: 36px; - --text-md-8: 48px; - --text-lg-8: 60px; - } -} - -.size-sm { - --space-1: var(--space-sm-1); - --space-2: var(--space-sm-2); - --space-3: var(--space-sm-3); - --space-4: var(--space-sm-4); - --space-5: var(--space-sm-5); - --space-6: var(--space-sm-6); - --space-7: var(--space-sm-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-sm-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-sm-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-sm-3)); - - --text-1: var(--text-sm-1); - --text-2: var(--text-sm-2); - --text-3: var(--text-sm-3); - --text-4: var(--text-sm-4); - --text-5: var(--text-sm-5); - --text-6: var(--text-sm-6); - --text-7: var(--text-sm-7); - --text-8: var(--text-sm-8); -} - -:root, -.size-md { - --space-1: var(--space-md-1); - --space-2: var(--space-md-2); - --space-3: var(--space-md-3); - --space-4: var(--space-md-4); - --space-5: var(--space-md-5); - --space-6: var(--space-md-6); - --space-7: var(--space-md-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-md-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-md-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-md-3)); - - --text-1: var(--text-md-1); - --text-2: var(--text-md-2); - --text-3: var(--text-md-3); - --text-4: var(--text-md-4); - --text-5: var(--text-md-5); - --text-6: var(--text-md-6); - --text-7: var(--text-md-7); - --text-8: var(--text-md-8); -} - -.size-lg { - --space-1: var(--space-lg-1); - --space-2: var(--space-lg-2); - --space-3: var(--space-lg-3); - --space-4: var(--space-lg-4); - --space-5: var(--space-lg-5); - --space-6: var(--space-lg-6); - --space-7: var(--space-lg-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-lg-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-lg-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-lg-3)); - - --text-1: var(--text-lg-1); - --text-2: var(--text-lg-2); - --text-3: var(--text-lg-3); - --text-4: var(--text-lg-4); - --text-5: var(--text-lg-5); - --text-6: var(--text-lg-6); - --text-7: var(--text-lg-7); - --text-8: var(--text-lg-8); -} diff --git a/src/css/space.css b/src/css/space.css deleted file mode 100644 index 46e44de34..000000000 --- a/src/css/space.css +++ /dev/null @@ -1,85 +0,0 @@ -.root + .root, -.root + .box, -.root + .masonry, -.root + .carousel, -.image + .root, -.icon + .root { - --space-auto: var(--space-6); -} - -.root + .group, -.root + .row, -.root + .wrap, -.root + .button, -.root + .price, -.root + .switch { - --space-auto: var(--space-5); -} - -.card - :is( - .root + .root, - .root + .box, - .root + .masonry, - .root + .carousel, - .image + .root, - .icon + .root, - .root + .group, - .root + .row, - .root + .wrap, - .root + .button, - .root + .price, - .root + .switch - ) { - --space-auto: var(--space-4); -} - -.root + .heading, -.root + .link, -.root + .paragraph, -.root + .text, -.root + .tagline, -.root + .input, -.root + .textarea, -.root + .select, -.root + .badge, -.root + .rating { - --space-auto: var(--space-4); -} - -.paragraph + .paragraph, -.text + .text, -.button + .button, -.input + .button { - --space-auto: var(--space-3); -} - -.root + .label, -.label + .input, -.label + .textarea, -.label + .select, -.icon + .icon { - --space-auto: var(--space-2); -} - -.rating + .text, -.text + .rating { - --space-auto: var(--space-1); -} - -.image + .root, -.icon + .root { - --space-auto: var(--space-6); -} - -.link + .heading { - --space-auto: var(--space-5); -} - -/* // .button:not(.variant-link) + .button:not(.variant-link) { -// margin-top: var(--space-3); -// } - -// .variant-link + .variant-link{ -// margin-top: var(--space-2); -// } */ diff --git a/src/css/styles.css b/src/css/styles.css deleted file mode 100644 index ca253ac1e..000000000 --- a/src/css/styles.css +++ /dev/null @@ -1,15 +0,0 @@ -@import url(https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900); - -:root, -.root { - --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.15s; - - --font-family: 'Inter', sans-serif; - --font-weight: 400; - - --text-heading-font-family: var(--font-family); - --text-heading-font-weight: 700; - - --button-font-family: var(--font-family); - --button-font-weight: 500; -} diff --git a/src/css/theme.css b/src/css/theme.css new file mode 100644 index 000000000..0e8cb8688 --- /dev/null +++ b/src/css/theme.css @@ -0,0 +1,62 @@ +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 0 0% 100%; + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + --ring: 20 14.3% 4.1%; + --radius: 0.5rem; + --chart-1: 12 76% 61%; + --chart-2: 173 58% 39%; + --chart-3: 197 37% 24%; + --chart-4: 43 74% 66%; + --chart-5: 27 87% 67%; + } + + .dark { + --background: 20 14.3% 4.1%; + --foreground: 60 4.8% 95.9%; + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 0 0% 100%; + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + --ring: 24 5.7% 82.9%; + --chart-1: 220 70% 50%; + --chart-2: 160 60% 45%; + --chart-3: 30 80% 55%; + --chart-4: 280 65% 60%; + --chart-5: 340 75% 55%; + + color-scheme: dark; + } +} + +.astro-code { + @apply mt-4 rounded-md p-4 text-sm first:mt-0; +} diff --git a/src/env.d.ts b/src/env.d.ts index 5b0a7e0c5..55722dadf 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,2 +1,3 @@ /// -/// \ No newline at end of file +/// +/// diff --git a/src/integration/generate-colors.ts b/src/integration/generate-colors.ts deleted file mode 100644 index 97d77b692..000000000 --- a/src/integration/generate-colors.ts +++ /dev/null @@ -1,637 +0,0 @@ -import * as RadixColors from '@radix-ui/colors' -import BezierEasing from 'bezier-easing' -import Color from 'colorjs.io' - -type ArrayOf12 = [T, T, T, T, T, T, T, T, T, T, T, T] -const arrayOf12 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] as const - -// prettier-ignore -const grayScaleNames = ['gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const; - -// prettier-ignore -const scaleNames = [...grayScaleNames, 'tomato', 'red', 'ruby', 'crimson', 'pink', -'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', -'grass', 'brown', 'orange', 'sky', 'mint', 'lime', 'yellow', 'amber'] as const; - -const lightColors = Object.fromEntries( - scaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}P3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof scaleNames)[number], ArrayOf12> - -const darkColors = Object.fromEntries( - scaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}DarkP3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof scaleNames)[number], ArrayOf12> - -const lightGrayColors = Object.fromEntries( - grayScaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}P3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof grayScaleNames)[number], ArrayOf12> - -const darkGrayColors = Object.fromEntries( - grayScaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}DarkP3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof grayScaleNames)[number], ArrayOf12> - -export const generateRadixColors = ({ - appearance, - ...args -}: { - appearance: 'light' | 'dark' - accent: string - gray: string - background: string -}) => { - const allScales = appearance === 'light' ? lightColors : darkColors - const grayScales = appearance === 'light' ? lightGrayColors : darkGrayColors - const backgroundColor = new Color(args.background).to('oklch') - - const grayBaseColor = new Color(args.gray).to('oklch') - const grayScaleColors = getScaleFromColor( - grayBaseColor, - grayScales, - backgroundColor - ) - - const accentBaseColor = new Color(args.accent).to('oklch') - - let accentScaleColors = getScaleFromColor( - accentBaseColor, - allScales, - backgroundColor - ) - - // Enforce srgb for the background color - const backgroundHex = backgroundColor.to('srgb').toString({ format: 'hex' }) - - // Make sure we use the tint from the gray scale for when base is pure white or black - const accentBaseHex = accentBaseColor.to('srgb').toString({ format: 'hex' }) - if (accentBaseHex === '#000' || accentBaseHex === '#fff') { - accentScaleColors = grayScaleColors.map((color) => - color.clone() - ) as ArrayOf12 - } - - const [accent9Color, accentContrastColor] = getStep9Colors( - accentScaleColors, - accentBaseColor - ) - - accentScaleColors[8] = accent9Color - accentScaleColors[9] = getButtonHoverColor(accent9Color, [accentScaleColors]) - - // Limit saturation of the text colors - accentScaleColors[10].coords[1] = Math.min( - Math.max(accentScaleColors[8].coords[1], accentScaleColors[7].coords[1]), - accentScaleColors[10].coords[1] - ) - accentScaleColors[11].coords[1] = Math.min( - Math.max(accentScaleColors[8].coords[1], accentScaleColors[7].coords[1]), - accentScaleColors[11].coords[1] - ) - - const accentScaleHex = accentScaleColors.map((color) => - color.to('srgb').toString({ format: 'hex' }) - ) as ArrayOf12 - - const accentScaleWideGamut = accentScaleColors.map( - toOklchString - ) as ArrayOf12 - - const accentScaleAlphaHex = accentScaleHex.map((color) => - getAlphaColorSrgb(color, backgroundHex) - ) as ArrayOf12 - - const accentScaleAlphaWideGamutString = accentScaleHex.map((color) => - getAlphaColorP3(color, backgroundHex) - ) as ArrayOf12 - - const accentContrastColorHex = accentContrastColor - .to('srgb') - .toString({ format: 'hex' }) - - const grayScaleHex = grayScaleColors.map((color) => - color.to('srgb').toString({ format: 'hex' }) - ) as ArrayOf12 - - const grayScaleWideGamut = grayScaleColors.map( - toOklchString - ) as ArrayOf12 - - const grayScaleAlphaHex = grayScaleHex.map((color) => - getAlphaColorSrgb(color, backgroundHex) - ) as ArrayOf12 - - const grayScaleAlphaWideGamutString = grayScaleHex.map((color) => - getAlphaColorP3(color, backgroundHex) - ) as ArrayOf12 - - const accentSurfaceHex = - appearance === 'light' - ? getAlphaColorSrgb(accentScaleHex[1], backgroundHex, 0.8) - : getAlphaColorSrgb(accentScaleHex[1], backgroundHex, 0.5) - - const accentSurfaceWideGamutString = - appearance === 'light' - ? getAlphaColorP3(accentScaleWideGamut[1], backgroundHex, 0.8) - : getAlphaColorP3(accentScaleWideGamut[1], backgroundHex, 0.5) - - return { - accentScale: accentScaleHex, - accentScaleAlpha: accentScaleAlphaHex, - accentScaleWideGamut: accentScaleWideGamut, - accentScaleAlphaWideGamut: accentScaleAlphaWideGamutString, - accentContrast: accentContrastColorHex, - - grayScale: grayScaleHex, - grayScaleAlpha: grayScaleAlphaHex, - grayScaleWideGamut: grayScaleWideGamut, - grayScaleAlphaWideGamut: grayScaleAlphaWideGamutString, - - graySurface: appearance === 'light' ? '#ffffffcc' : 'rgba(0, 0, 0, 0.05)', - graySurfaceWideGamut: - appearance === 'light' - ? 'color(display-p3 1 1 1 / 80%)' - : 'color(display-p3 0 0 0 / 5%)', - - accentSurface: accentSurfaceHex, - accentSurfaceWideGamut: accentSurfaceWideGamutString, - - background: backgroundHex, - } -} - -function getStep9Colors( - scale: ArrayOf12, - accentBaseColor: Color -): [Color, Color] { - const referenceBackgroundColor = scale[0] - const distance = accentBaseColor.deltaEOK(referenceBackgroundColor) * 100 - - // If the accent base color is close to the page background color, it's likely - // white on white or black on black, so we want to return something that makes sense instead - if (distance < 25) { - return [scale[8], getTextColor(scale[8])] - } - - return [accentBaseColor, getTextColor(accentBaseColor)] -} - -function getButtonHoverColor(source: Color, scales: ArrayOf12[]) { - const [L, C, H] = source.coords - const newL = L > 0.4 ? L - 0.03 / (L + 0.1) : L + 0.03 / (L + 0.1) - const newC = L > 0.4 && !isNaN(H) ? C * 0.93 + 0 : C - const buttonHoverColor = new Color('oklch', [newL, newC, H]) - - // Find closest in-scale color to donate the chroma and hue. - // Especially useful when the source color is pure white or black, - // but the gray scale is tinted. - let closestColor = buttonHoverColor - let minDistance = Infinity - - scales.forEach((scale) => { - for (const color of scale) { - const distance = buttonHoverColor.deltaEOK(color) - if (distance < minDistance) { - minDistance = distance - closestColor = color - } - } - }) - - buttonHoverColor.coords[1] = closestColor.coords[1] - buttonHoverColor.coords[2] = closestColor.coords[2] - return buttonHoverColor -} - -function getScaleFromColor( - source: Color, - scales: Record>, - backgroundColor: Color -) { - let allColors: { scale: string; color: Color; distance: number }[] = [] - - Object.entries(scales).forEach(([name, scale]) => { - for (const color of scale) { - const distance = source.deltaEOK(color) - allColors.push({ scale: name, distance, color }) - } - }) - - allColors.sort((a, b) => a.distance - b.distance) - - // Remove non-unique scales - let closestColors = allColors.filter( - (color, i, arr) => - i === arr.findIndex((value) => value.scale === color.scale) - ) - - // If the next two closest colors are both grays, remove the second one until it’s not a gray anymore. - // This is because up next we will be comparing how close the two closest colors are to the source color, - // and since the grays are all extremely close to each other, we won’t get any useful data from the second - // closest color if it’s also a gray. - const grayScaleNamesStr = grayScaleNames as readonly string[] - const allAreGrays = closestColors.every((color) => - grayScaleNamesStr.includes(color.scale) - ) - if (!allAreGrays && grayScaleNamesStr.includes(closestColors[0].scale)) { - while (grayScaleNamesStr.includes(closestColors[1].scale)) { - closestColors.splice(1, 1) - } - } - - let colorA = closestColors[0] - let colorB = closestColors[1] - - // Light trigonometry ahead. - // - // We want to determine the color that is the closest to the source color. Sometimes it makes sense - // to proportionally mix the two closest colors together, but sometimes it is not useful at all. - // Color coords are spatial in 3D, however we can treat the data we have as a 2D projection that is good enough. - // - // Case 1: - // If the distances between the source color, the 1st closest color (A) and the 2nd closest color (B) form - // a triangle where NEITHER angle A nor B are larger than 90 degrees, then we want to mix the 1st and the 2nd - // closest colors in the same proportion as distances AD and BD are to each other. Mixing the two would result - // in a color that would be closer to the source color than either of the two original closest colors. - // Example: source color is a desaturated blue, which is between "indigo" and "slate" scales. - // - // C ← Source color - // /|⟍ - // / | ⟍ - // b / | ⟍ a - // / | ⟍ - // / | ⟍ - // A --- D -------- B - // ↑ - // The color we want to use as the base, which is a mix of A and B. - // - // Case 2: - // If the distances between the source color, the 1st closest color (A) and the 2nd closest color (B) form - // a triangle where EITHER angle A or B are larger than 90 degrees, then we don’t care about point B because it’s - // directionally the same as A, as mixing A and B can’t provide us with a color that is any closer to the source. - // Example: source color is a saturated blue, with "blue" being the closest scale, and "indigo" just being further. - // - // C ← Source color - // \⟍ - // \ ⟍ - // \ ⟍ a - // b \ ⟍ - // \ ⟍ - // A ------- B - // ↑ - // The color we want to use as the base, which is not influenced by B. - - // We’ll need all the lengths of the triangle sides, named after the angles they look at: - const a = colorB.distance - const b = colorA.distance - const c = colorA.color.deltaEOK(colorB.color) - - // We can get the ratios of AD to BD lengths with trigonometry using tangents, - // as the ratio of the tangents of the opposite angles will match. - const cosA = (b ** 2 + c ** 2 - a ** 2) / (2 * b * c) - const radA = Math.acos(cosA) - const sinA = Math.sin(radA) - - const cosB = (a ** 2 + c ** 2 - b ** 2) / (2 * a * c) - const radB = Math.acos(cosB) - const sinB = Math.sin(radB) - - // Tangent of angle C in the ACD triangle - const tanC1 = cosA / sinA - - // Tangent of angle C in the BCD triangle - const tanC2 = cosB / sinB - - // The ratio of the tangents corresponds to the ratio of the distances AD to BD - // In the end, it means how much of scale B we want to mix into scale A. - // If it’s "0" or less, this is an obtuse triangle from case 2, and we use just scale A. - const ratio = Math.max(0, tanC1 / tanC2) * 0.5 - - // The base scale is going to be a mix of the two closest scales, with the mix ratio we determined before - const scaleA = scales[colorA.scale] - const scaleB = scales[colorB.scale] - const scale = arrayOf12.map((i) => - new Color(Color.mix(scaleA[i], scaleB[i], ratio)).to('oklch') - ) as ArrayOf12 - - // Get the closest color from the pre-mixed scale we created - const baseColor = scale - .slice() - .sort((a, b) => source.deltaEOK(a) - source.deltaEOK(b))[0] - - // Note the chroma difference between the source color and the base color - const ratioC = source.coords[1] / baseColor.coords[1] - - // Modify hue and chroma of the scale to match the source color - scale.forEach((color) => { - color.coords[1] = Math.min(source.coords[1] * 1.5, color.coords[1] * ratioC) - color.coords[2] = source.coords[2] - }) - - // Light mode - if (scale[0].coords[0] > 0.5) { - const lightnessScale = scale.map(({ coords }) => coords[0]) - const backgroundL = Math.max(0, Math.min(1, backgroundColor.coords[0])) - const newLightnessScale = transposeProgressionStart( - backgroundL, - // Add white as the first "step" of the light scale - [1, ...lightnessScale], - lightModeEasing - ) - - // Remove the step we added - newLightnessScale.shift() - - newLightnessScale.forEach((lightness, i) => { - scale[i].coords[0] = lightness - }) - - return scale - } - - // Dark mode - let ease: typeof darkModeEasing = [...darkModeEasing] - const referenceBackgroundColorL = scale[0].coords[0] - const backgroundColorL = Math.max(0, Math.min(1, backgroundColor.coords[0])) - - // If background is lighter than step 0, we want to gradually change the easing to linear - const ratioL = backgroundColorL / referenceBackgroundColorL - - if (ratioL > 1) { - const maxRatio = 1.5 - - for (let i = 0; i < ease.length; i++) { - const metaRatio = (ratioL - 1) * (maxRatio / (maxRatio - 1)) - ease[i] = ratioL > maxRatio ? 0 : Math.max(0, ease[i] * (1 - metaRatio)) - } - } - - const lightnessScale = scale.map(({ coords }) => coords[0]) - const backgroundL = backgroundColor.coords[0] - const newLightnessScale = transposeProgressionStart( - backgroundL, - lightnessScale, - ease - ) - - newLightnessScale.forEach((lightness, i) => { - scale[i].coords[0] = lightness - }) - - return scale -} - -function getTextColor(background: Color) { - const white = new Color('oklch', [1, 0, 0]) - - if (Math.abs(white.contrastAPCA(background)) < 40) { - const [C, H] = background.coords - return new Color('oklch', [0.25, Math.max(0.08 * C, 0.04), H]) - } - - return white -} - -// target = background * (1 - alpha) + foreground * alpha -// alpha = (target - background) / (foreground - background) -// Expects 0-1 numbers for the RGB channels -function getAlphaColor( - targetRgb: number[], - backgroundRgb: number[], - rgbPrecision: number, - alphaPrecision: number, - targetAlpha?: number -) { - const [tr, tg, tb] = targetRgb.map((c) => Math.round(c * rgbPrecision)) - const [br, bg, bb] = backgroundRgb.map((c) => Math.round(c * rgbPrecision)) - - if ( - tr === undefined || - tg === undefined || - tb === undefined || - br === undefined || - bg === undefined || - bb === undefined - ) { - throw Error('Color is undefined') - } - - // Is the background color lighter, RGB-wise, than target color? - // Decide whether we want to add as little color or as much color as possible, - // darkening or lightening the background respectively. - // If at least one of the bits of the target RGB value - // is lighter than the background, we want to lighten it. - let desiredRgb = 0 - if (tr > br) { - desiredRgb = rgbPrecision - } else if (tg > bg) { - desiredRgb = rgbPrecision - } else if (tb > bb) { - desiredRgb = rgbPrecision - } - - const alphaR = (tr - br) / (desiredRgb - br) - const alphaG = (tg - bg) / (desiredRgb - bg) - const alphaB = (tb - bb) / (desiredRgb - bb) - - const isPureGray = [alphaR, alphaG, alphaB].every((alpha) => alpha === alphaR) - - // No need for precision gymnastics with pure grays, and we can get cleaner output - if (!targetAlpha && isPureGray) { - // Convert back to 0-1 values - const V = desiredRgb / rgbPrecision - return [V, V, V, alphaR] as const - } - - const clampRgb = (n: number) => - isNaN(n) ? 0 : Math.min(rgbPrecision, Math.max(0, n)) - const clampA = (n: number) => - isNaN(n) ? 0 : Math.min(alphaPrecision, Math.max(0, n)) - const maxAlpha = targetAlpha ?? Math.max(alphaR, alphaG, alphaB) - - const A = clampA(Math.ceil(maxAlpha * alphaPrecision)) / alphaPrecision - let R = clampRgb(((br * (1 - A) - tr) / A) * -1) - let G = clampRgb(((bg * (1 - A) - tg) / A) * -1) - let B = clampRgb(((bb * (1 - A) - tb) / A) * -1) - - R = Math.ceil(R) - G = Math.ceil(G) - B = Math.ceil(B) - - const blendedR = blendAlpha(R, A, br) - const blendedG = blendAlpha(G, A, bg) - const blendedB = blendAlpha(B, A, bb) - - // Correct for rounding errors in light mode - if (desiredRgb === 0) { - if (tr <= br && tr !== blendedR) { - R = tr > blendedR ? R + 1 : R - 1 - } - - if (tg <= bg && tg !== blendedG) { - G = tg > blendedG ? G + 1 : G - 1 - } - - if (tb <= bb && tb !== blendedB) { - B = tb > blendedB ? B + 1 : B - 1 - } - } - - // Correct for rounding errors in dark mode - if (desiredRgb === rgbPrecision) { - if (tr >= br && tr !== blendedR) { - R = tr > blendedR ? R + 1 : R - 1 - } - - if (tg >= bg && tg !== blendedG) { - G = tg > blendedG ? G + 1 : G - 1 - } - - if (tb >= bb && tb !== blendedB) { - B = tb > blendedB ? B + 1 : B - 1 - } - } - - // Convert back to 0-1 values - R = R / rgbPrecision - G = G / rgbPrecision - B = B / rgbPrecision - - return [R, G, B, A] as const -} - -// Important – I empirically discovered that this rounding is how the browser actually overlays -// transparent RGB bits over each other. It does NOT round the whole result altogether. -function blendAlpha( - foreground: number, - alpha: number, - background: number, - round = true -) { - if (round) { - return Math.round(background * (1 - alpha)) + Math.round(foreground * alpha) - } - - return background * (1 - alpha) + foreground * alpha -} - -function getAlphaColorSrgb( - targetColor: string, - backgroundColor: string, - targetAlpha?: number -) { - const [r, g, b, a] = getAlphaColor( - new Color(targetColor).to('srgb').coords, - new Color(backgroundColor).to('srgb').coords, - 255, - 255, - targetAlpha - ) - - return formatHex(new Color('srgb', [r, g, b], a).toString({ format: 'hex' })) -} - -function getAlphaColorP3( - targetColor: string, - backgroundColor: string, - targetAlpha?: number -) { - const [r, g, b, a] = getAlphaColor( - new Color(targetColor).to('p3').coords, - new Color(backgroundColor).to('p3').coords, - // Not sure why, but the resulting P3 alpha colors are blended in the browser most precisely when - // rounded to 255 integers too. Is the browser using 0-255 rather than 0-1 under the hood for P3 too? - 255, - 1000, - targetAlpha - ) - - return ( - new Color('p3', [r, g, b], a) - .toString({ precision: 4 }) - // Important: in non-browser environments colorjs.io outputs a different format for some reason - .replace('color(p3 ', 'color(display-p3 ') - ) -} - -// Format shortform hex to longform -function formatHex(str: string) { - if (!str.startsWith('#')) { - return str - } - - if (str.length === 4) { - const hash = str.charAt(0) - const r = str.charAt(1) - const g = str.charAt(2) - const b = str.charAt(3) - return hash + r + r + g + g + b + b - } - - if (str.length === 5) { - const hash = str.charAt(0) - const r = str.charAt(1) - const g = str.charAt(2) - const b = str.charAt(3) - const a = str.charAt(4) - return hash + r + r + g + g + b + b + a + a - } - - return str -} - -const darkModeEasing = [1, 0, 1, 0] as [number, number, number, number] -const lightModeEasing = [0, 2, 0, 2] as [number, number, number, number] - -export function transposeProgressionStart( - to: number, - arr: number[], - curve: [number, number, number, number] -) { - return arr.map((n, i, arr) => { - const lastIndex = arr.length - 1 - const diff = arr[0] - to - const fn = BezierEasing(...curve) - return n - diff * fn(1 - i / lastIndex) - }) -} - -export function transposeProgressionEnd( - to: number, - arr: number[], - curve: [number, number, number, number] -) { - return arr.map((n, i, arr) => { - const lastIndex = arr.length - 1 - const diff = arr[lastIndex] - to - const fn = BezierEasing(...curve) - return n - diff * fn(i / lastIndex) - }) -} - -// Convert to OKLCH string with percentage for the lightness channel -// https://github.com/radix-ui/themes/issues/420 -function toOklchString(color: Color) { - const L = +(color.coords[0] * 100).toFixed(1) - return color - .to('oklch') - .toString({ precision: 4 }) - .replace(/(\S+)(.+)/, `oklch(${L}%$2`) -} diff --git a/src/integration/index.ts b/src/integration/index.ts index d6e3de993..dfef10e5a 100644 --- a/src/integration/index.ts +++ b/src/integration/index.ts @@ -1,156 +1,182 @@ +import mdx from '@astrojs/mdx' +import sitemap from '@astrojs/sitemap' import type { AstroIntegration } from 'astro' -import merge from 'deepmerge' +import favicons from 'astro-favicons' +import liveCode from 'astro-live-code' +import robotsTxt from 'astro-robots-txt' +import { envField } from 'astro/config' +import fs from 'fs' +import yaml from 'js-yaml' +import path from 'path' +import { assign } from 'radash' +import tailwindcss from 'tailwindcss' +import tailwindcssNesting from 'tailwindcss/nesting' +import { loadEnv } from 'vite' import virtual from 'vite-plugin-virtual' -import { generateRadixColors } from './generate-colors' - -type Color = { - background: Parameters[0]['background'] - base: Parameters[0]['gray'] - brand: Parameters[0]['accent'] -} +import tailwindConfig from '../../tailwind.config.ts' interface Config { + favicon?: string + company?: string css?: string injectRoutes?: boolean - colors: { - theme: 'light' | 'dark' - light?: Color - dark?: Color + cloudcannon?: boolean + cart?: boolean + overrides?: { + [k: string]: string } } -const defaultConfig: Config = { - colors: { - theme: 'light', - light: { - background: '#fff', - base: '#000', - brand: '#000', - }, - }, -} export default function fulldevIntegration( - userConfig?: Partial + config: Partial | undefined ): AstroIntegration { - const config = merge(defaultConfig ?? {}, userConfig ?? {}) - return { name: '/integration', hooks: { 'astro:config:setup': async ({ - config: astroConfig, updateConfig, - injectScript, injectRoute, + injectScript, }) => { // ---------------------- - // Inject css + // Update config // ---------------------- - config?.css && injectScript('page-ssr', `import "${config?.css}";`) - - const generateCss = ( - defaultTheme: 'light' | 'dark', - theme: 'light' | 'dark', - color: Color - ) => { - const { background, base, brand } = color - const generated = generateRadixColors({ - background, - appearance: theme, - gray: base, - accent: brand, - }) - - const scaleToString = ( - scale: any, - palette: 'base' | 'brand', - alpha?: boolean - ) => - scale - .map( - (color: any, i: any) => - `--${palette}-${alpha ? 'a' : ''}${i + 1}: ${color};` - ) - .join('\n') - - const baseString = scaleToString(generated.grayScale, 'base', false) - const baseAlphaString = scaleToString( - generated.grayScaleAlpha, - 'base', - true - ) - const brandString = scaleToString( - generated.accentScale, - 'brand', - false - ) - const brandAlphaString = scaleToString( - generated.accentScaleAlpha, - 'brand', - true - ) - const brandContrastString = `--brand-contrast: ${generated.accentContrast};` - const baseContrastString = `--base-contrast: ${generated.accentContrast};` - const baseBackgroundString = `--base-background: ${generated.background};` - const brandBackgroundString = `--brand-background: ${generated.background};` - const colorSchemeString = `--color-scheme: ${theme};` - - const css = `${defaultTheme == theme ? ':root, ' : ''} .theme-${theme} { - ${baseString} - ${baseAlphaString} - ${baseContrastString} - ${baseBackgroundString} - ${brandString} - ${brandAlphaString} - ${brandContrastString} - ${brandBackgroundString} - ${colorSchemeString} - }` - return css - } - - const lightCss = - (config.colors.light && - generateCss(config.colors.theme, 'light', config.colors.light)) || - '' - const darkCss = - (config.colors.dark && - generateCss(config.colors.theme, 'dark', config.colors.dark)) || - '' - - const css = lightCss + '\n' + darkCss - updateConfig({ + site: loadEnv(process.env.NODE_ENV as any, process.cwd(), '').URL, + experimental: { + contentLayer: true, + env: { + schema: { + URL: envField.string({ + context: 'client', + access: 'public', + }), + STRIPE_RESTRICTED_KEY: envField.string({ + context: 'client', + access: 'public', + optional: true, + }), + STRIPE_SECRET_KEY: envField.string({ + context: 'server', + access: 'secret', + optional: true, + }), + }, + validateSecrets: true, + }, + }, + integrations: [ + mdx(), + sitemap(), + robotsTxt(), + liveCode({ + layout: '/src/structures/Code.astro', + }), + ], vite: { + resolve: { + alias: { + ...config?.overrides, + }, + }, plugins: [ virtual({ - 'virtual:astro/config': `export default ${JSON.stringify(astroConfig)}`, - 'virtual:fulldev-ui/config': `export default ${JSON.stringify(config)}`, - 'virtual:colors.css': css, + 'virtual:fulldev-ui/config': config ?? {}, }), ], css: { - preprocessorOptions: { - scss: { - api: 'modern', - }, + postcss: { + plugins: [tailwindcss(tailwindConfig), tailwindcssNesting], }, }, }, }) - injectScript('page-ssr', `import "virtual:colors.css";`) + // ---------------------- + // Inject Favicon + // ---------------------- + config?.favicon && + config?.company && + updateConfig({ + integrations: [ + favicons({ + path: 'favicon', + masterPicture: config.favicon, + appName: config.company, + appShortName: config.company, + appDescription: config.company, + }), + ], + }) // ---------------------- // Inject routes // ---------------------- - if (config.injectRoutes) { - const pages = import.meta.glob('/src/pages/**/*.astro') - !pages['/src/pages/[...page].astro'] && - injectRoute({ - pattern: '/[...page]', - entrypoint: 'fulldev-ui/[...page].astro', - }) + if (config?.injectRoutes) { + injectRoute({ + pattern: '/[...page]', + entrypoint: 'fulldev-ui/pages/[...page].astro', + }) + } + + // ---------------------- + // Inject css + // ---------------------- + config?.css && injectScript('page-ssr', `import "${config?.css}";`) + + // ---------------------- + // merge Cloudcannon configs + // ---------------------- + + // ---------------------- + // Generate image YAML files + // ---------------------- + // if (config.generateImageEntries) { + // const srcDir = path.join(process.cwd(), 'src') + // const filesDir = path.join(srcDir, 'images') + // const entriesDir = path.join(srcDir, 'content', 'images') + + // try { + // await fs.mkdir(filesDir, { recursive: true }) + // await fs.mkdir(entriesDir, { recursive: true }) + + // const files = await fs.readdir(filesDir) + // files.forEach(async (file) => { + // const filename = path.parse(file).name + // const yamlPath = path.join(entriesDir, `${filename}.yml`) + + // try { + // await fs.access(yamlPath) + // } catch { + // const yamlContent = yaml.dump({ + // alt: '', + // }) + // await fs.writeFile(yamlPath, yamlContent, 'utf8') + // } + // }) + // } catch (error) { + // console.error('Error generating image YAML files:', error) + // } + // } + }, + 'astro:build:done': async () => { + if (config?.cloudcannon) { + const __dirname = path.dirname(new URL(import.meta.url).pathname) + const libDir = path.join(__dirname, '../../cloudcannon.config.yml') + const userDir = path.join(process.cwd(), 'cloudcannon.config.yml') + + const libConfig = yaml.load( + fs.readFileSync(path.resolve(libDir), 'utf8') + ) + + const userConfig = yaml.load( + fs.readFileSync(path.resolve(userDir), 'utf8') + ) + + const mergedConfig = assign(libConfig || {}, userConfig || {}) + const yamlContent = yaml.dump(mergedConfig) + + await fs.promises.writeFile(userDir, yamlContent, 'utf8') } }, }, diff --git a/src/integration/tailwind-plugin.ts b/src/integration/tailwind-plugin.ts deleted file mode 100644 index 2c3ff6115..000000000 --- a/src/integration/tailwind-plugin.ts +++ /dev/null @@ -1,80 +0,0 @@ -import plugin from 'tailwindcss/plugin' - -export default plugin(() => {}, { - theme: { - spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', - }, - borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', - }, - fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', - }, - colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - }, - }, - }, -}) diff --git a/src/integration/unocss-preset.ts b/src/integration/unocss-preset.ts deleted file mode 100644 index 170ce7c3c..000000000 --- a/src/integration/unocss-preset.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { definePreset, presetUno } from 'unocss' - -export default definePreset(() => { - return { - name: 'fullUI', - presets: [presetUno()], - theme: { - spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', - }, - borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', - }, - fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', - }, - colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - }, - }, - }, - } -}) diff --git a/src/layouts/BlockLayout.astro b/src/layouts/BlockLayout.astro deleted file mode 100644 index 525bca33b..000000000 --- a/src/layouts/BlockLayout.astro +++ /dev/null @@ -1,24 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Intro from 'fulldev-ui/blocks/Intro.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { Content } = await render() ---- - - - - - - diff --git a/src/layouts/BlockOverviewLayout.astro b/src/layouts/BlockOverviewLayout.astro deleted file mode 100644 index 06654cca8..000000000 --- a/src/layouts/BlockOverviewLayout.astro +++ /dev/null @@ -1,39 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Hero from 'fulldev-ui/blocks/Hero.astro' -import Block from 'fulldev-ui/components/Block.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data } = Astro.props ---- - - - - - - - diff --git a/src/layouts/ComponentLayout.astro b/src/layouts/ComponentLayout.astro deleted file mode 100644 index b202d94bb..000000000 --- a/src/layouts/ComponentLayout.astro +++ /dev/null @@ -1,23 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { render } = Astro.props -const { Content } = await render() ---- - - - - - - - - - diff --git a/src/layouts/JobsLayout.astro b/src/layouts/JobsLayout.astro deleted file mode 100644 index 1b8e9c260..000000000 --- a/src/layouts/JobsLayout.astro +++ /dev/null @@ -1,40 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import { getCollection } from 'astro:content' -import JobDeck from 'fulldev-ui/blocks/Jobs.astro' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, slug, ...rest } = Astro.props - -const childPages = ( - await getCollection('pages', (page: any) => page.slug.startsWith(slug)) -).map((page: any) => ({ href: `/${page.slug}/`, ...page.data })) ---- - - - - - - - - - - - - diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro deleted file mode 100644 index d8cf36e77..000000000 --- a/src/layouts/Layout.astro +++ /dev/null @@ -1,169 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Button from 'fulldev-ui/components/Button.astro' -import Head from 'fulldev-ui/components/Head.astro' -import Header from 'fulldev-ui/components/Header.astro' -import Sidebar from 'fulldev-ui/components/Sidebar.astro' -import Toc from 'fulldev-ui/components/Toc.astro' -import NavigationButtons from '../components/docs/NavigationButtons.astro' - -type Props = Partial> & { - class?: string - theme?: 'light' | 'dark' -} - -const { slug, data, theme, class: classes, render } = Astro.props -const { logo, header, footer, footers, channels, sidebar, toc } = data || {} - -const { headings } = render ? await render() : { headings: [] } - -const h2Headings = headings.filter((heading: any) => heading.depth === 2) ---- - - - - - - - - - - - - - - - - - - { - channels?.whatsapp && ( - - ) - } - - - - - - - diff --git a/src/layouts/OverviewLayout.astro b/src/layouts/OverviewLayout.astro deleted file mode 100644 index eda484f57..000000000 --- a/src/layouts/OverviewLayout.astro +++ /dev/null @@ -1,45 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { sections, blocks, children, references } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro new file mode 100644 index 000000000..f67525f24 --- /dev/null +++ b/src/layouts/Page.astro @@ -0,0 +1,63 @@ +--- +import type { ComponentProps } from 'astro/types' +import type { CollectionEntry } from 'astro:content' +import Block from 'fulldev-ui/components/Block.astro' +import Element from 'fulldev-ui/components/Element.astro' +import type { PageSchema } from 'fulldev-ui/schemas/page.ts' +import Layout from 'fulldev-ui/structures/Layout.astro' + +type Props = ComponentProps & + PageSchema & { + render: CollectionEntry<'pages'>['render'] + } + +const { + _block, + title, + heading, + description, + paragraph, + banner, + sidebar, + header, + sections, + footer, + render, + navigation, + ...rest +} = Astro.props + +const { Content, headings } = await render() +--- + + + + + + + + + {sections?.map((section) => )} + + + diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro deleted file mode 100644 index ed8111443..000000000 --- a/src/layouts/PageLayout.astro +++ /dev/null @@ -1,32 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { hero, section, sections, block, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro deleted file mode 100644 index ec8ae413b..000000000 --- a/src/layouts/PostLayout.astro +++ /dev/null @@ -1,32 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Intro from 'fulldev-ui/blocks/Intro.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { section, sections, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - diff --git a/src/layouts/ProductLayout.astro b/src/layouts/ProductLayout.astro deleted file mode 100644 index 686a69635..000000000 --- a/src/layouts/ProductLayout.astro +++ /dev/null @@ -1,31 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { section, sections, block, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/_Product.astro b/src/layouts/_Product.astro new file mode 100644 index 000000000..a2490deb1 --- /dev/null +++ b/src/layouts/_Product.astro @@ -0,0 +1,115 @@ + diff --git a/src/pages/[...page].astro b/src/pages/[...page].astro index 2f3605c27..79c77add6 100644 --- a/src/pages/[...page].astro +++ b/src/pages/[...page].astro @@ -1,40 +1,49 @@ --- -import { getCollection } from 'astro:content' -import PageLayout from 'fulldev-ui/layouts/PageLayout.astro' -import { mapKeys } from 'radash' -import { mergeEntries } from '../utils/mergeEntries' +import { getCollection, getEntry } from 'astro:content' +import { getHref } from 'fulldev-ui/utils/getHref.ts' +import { dash, pascal } from 'radash' +import { mergeDeep } from 'remeda' export async function getStaticPaths() { - const pages = await getCollection('pages') - return pages.map((page) => ({ + const collection = await getCollection('pages') + return collection.map((entry) => ({ params: { - page: page.slug === 'index' ? undefined : page.slug, + page: getHref(entry.slug), }, - props: page, + props: entry, })) } -const { data, slug, ...rest } = Astro.props +const layoutName = Astro.props.data._layout ?? 'Page' +const layoutComponentName = pascal(layoutName) -const merged = (await mergeEntries({ data, slug })) as any +const layoutsComponents = { + ...import.meta.glob('/src/layouts/**/*.astro'), + ...import.meta.glob('../layouts/**/*.astro'), +} -const packageLayouts = import.meta.glob('../layouts/**/*.astro') -const userLayouts = import.meta.glob('/src/layouts/**/*.astro') +const layoutComponentPath = Object.keys(layoutsComponents).find( + (path) => path.split('/').pop()?.split('.')[0] === layoutComponentName +) -const mapBlockKeys = (blocks: any) => - mapKeys(blocks, (key: any) => key.split('/').pop().split('.').shift()) +const LayoutComponent = + layoutComponentPath && + (await (layoutsComponents[layoutComponentPath] as any)()).default -const components = { - ...mapBlockKeys(packageLayouts), - ...mapBlockKeys(userLayouts), -} +const layoutEntryName = dash(layoutName) +const layoutEntry = await getEntry('layouts', layoutEntryName) +const baseLayout = await getEntry('layouts', 'base') +const mergedLayouts = mergeDeep(baseLayout || {}, layoutEntry || {}) +const merged = mergeDeep(mergedLayouts, Astro.props) -const found = components[(merged.data._layout ?? 'PageLayout') as string] as any -const functioncomp = found && (await found()) -const Layout = functioncomp?.default ?? PageLayout +const { data, ...rest } = merged --- - +{ + LayoutComponent && ( + + ) +} diff --git a/src/pages/test.astro b/src/pages/test.astro new file mode 100644 index 000000000..d4f92294f --- /dev/null +++ b/src/pages/test.astro @@ -0,0 +1,16 @@ + + + + Sign up + diff --git a/src/schemas/base.ts b/src/schemas/base.ts deleted file mode 100644 index 937d9a780..000000000 --- a/src/schemas/base.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { z } from 'astro:content' - -export const button = z - .object({ - text: z.string(), - href: z.string(), - icon: z.string(), - }) - .partial() - .passthrough() - -export const link = z - .object({ - text: z.string(), - href: z.string(), - }) - .partial() - .passthrough() - -export const base = z - .object({ - tagline: z.string(), - icon: z.string(), - badge: z.string().or( - z.object({ - text: z.string(), - href: z.string(), - }) - ), - heading: z.string(), - text: z.string(), - html: z.string(), - image: z.string(), - images: z.string().array(), - rating: z.number().or( - z - .object({ - value: z.number(), - label: z.string(), - avatars: z.string().array(), - avatar: z.string(), - }) - .partial() - ), - button: button, - buttons: button.array(), - link: link, - links: link.array(), - list: z.string().array(), - avatar: z.string(), - price: z.number(), - input: z - .object({ - placeholder: z.string(), - submit: z.string(), - }) - .partial() - .passthrough(), - logos: z.string().array(), - logo: z.string(), - channels: z - .object({ - phone: z.string(), - email: z.string(), - address: z.string(), - }) - .partial() - .passthrough(), - socials: z - .object({ - facebook: z.string(), - instagram: z.string(), - }) - .partial() - .passthrough(), - hours: z - .object({ - monday: z.string(), - tuesday: z.string(), - wednesday: z.string(), - thursday: z.string(), - friday: z.string(), - saturday: z.string(), - sunday: z.string(), - }) - .partial() - .passthrough(), - }) - .partial() - .passthrough() diff --git a/src/schemas/block.ts b/src/schemas/block.ts index 6e70c3ec7..fef54f512 100644 --- a/src/schemas/block.ts +++ b/src/schemas/block.ts @@ -1,15 +1,32 @@ import { z } from 'astro:content' -import { base } from './base' -import { card } from './card' -import { pathSchema } from './utils' +import { cardSchema } from 'fulldev-ui/schemas/card.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' +import { pathSchema } from 'fulldev-ui/schemas/path.ts' -export const block = base +export const blockSchema = cardSchema .extend({ - columns: card.array(), - cards: z.array(card), - source: z.enum(['children', 'references']), - pages: pathSchema('pages').array(), - records: pathSchema('records').array(), + _block: z.string().optional(), + depth: z.union([z.literal(1), z.literal(2), z.literal(3)]).optional(), + themer: z.boolean().optional(), + search: z.boolean().optional(), + cart: z.boolean().optional(), + cards: cardSchema.array().optional(), + pages: pathSchema('pages').array().optional(), + records: pathSchema('records').array().optional(), + soldout: z.boolean().optional(), + variants: z.record(z.string(), z.string().array()).optional(), + categories: pathSchema('pages').array().optional(), + menus: menuSchema.array().optional(), + headings: z + .array( + z.object({ + depth: z.number(), + slug: z.string(), + text: z.string(), + }) + ) + .optional(), }) - .partial() - .passthrough() + .strict() + +export type BlockSchema = z.infer diff --git a/src/schemas/button.ts b/src/schemas/button.ts new file mode 100644 index 000000000..c0bb5c615 --- /dev/null +++ b/src/schemas/button.ts @@ -0,0 +1,17 @@ +import { z } from 'astro:content' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const buttonSchema = z + .object({ + icon: z.string().optional(), + image: imageSchema.optional(), + text: z.string().optional(), + href: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + reverse: z.boolean().optional(), + variant: z.enum(['primary', 'secondary', 'outline', 'ghost']).optional(), + }) + .strict() + +export type ButtonSchema = z.infer diff --git a/src/schemas/card.ts b/src/schemas/card.ts index d41315cbf..af5c8d4a9 100644 --- a/src/schemas/card.ts +++ b/src/schemas/card.ts @@ -1,3 +1,43 @@ -import { base } from './base' +import { z } from 'astro:content' +import { buttonSchema } from 'fulldev-ui/schemas/button.ts' +import { channelSchema } from 'fulldev-ui/schemas/channel.ts' +import { chipSchema } from 'fulldev-ui/schemas/chip.ts' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' +import { proofSchema } from 'fulldev-ui/schemas/proof.ts' -export const card = base +export const cardSchema = z + .object({ + target: z.string().optional(), + href: z.string().optional(), + order: z.number().optional(), + dark: z.boolean().optional(), + text: z.string().optional(), + content: z.string().optional(), + tagline: z.string().optional(), + heading: z.string().optional(), + paragraph: z.string().optional(), + list: z.string().array().optional(), + socials: z.string().array().optional(), + logo: logoSchema.optional(), + link: linkSchema.optional(), + links: linkSchema.array().optional(), + menus: menuSchema.array().optional(), + chip: chipSchema.optional(), + badges: z.string().array().optional(), + button: buttonSchema.optional(), + buttons: buttonSchema.array().optional(), + image: imageSchema.optional(), + images: imageSchema.array().optional(), + channels: channelSchema.array().optional(), + proof: proofSchema.optional(), + price: z.number().optional(), + icon: z.string().optional(), + rating: z.number().optional(), + avatar: imageSchema.optional(), + avatars: imageSchema.array().optional(), + soldout: z.boolean().optional(), + }) + .strict() diff --git a/src/schemas/channel.ts b/src/schemas/channel.ts new file mode 100644 index 000000000..7fd62d6ae --- /dev/null +++ b/src/schemas/channel.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Channel from 'fulldev-ui/components/Channel.astro' + +export const channelSchema = z + .object({ + icon: z.string().optional(), + heading: z.string().optional(), + text: z.string().optional(), + href: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['secondary', 'outline']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/checkbox.ts b/src/schemas/checkbox.ts new file mode 100644 index 000000000..b5aa7b835 --- /dev/null +++ b/src/schemas/checkbox.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Checkbox from 'fulldev-ui/components/Checkbox.astro' + +export const checkboxSchema = z + .object({ + name: z.string().optional(), + label: z.string().optional(), + id: z.string().optional(), + value: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/chip.ts b/src/schemas/chip.ts new file mode 100644 index 000000000..047ebd140 --- /dev/null +++ b/src/schemas/chip.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Chip from 'fulldev-ui/components/Chip.astro' + +export const chipSchema = z + .object({ + icon: z.string().optional(), + text: z.string().optional(), + href: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['primary', 'secondary', 'outline']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/footer.ts b/src/schemas/footer.ts new file mode 100644 index 000000000..4d9a8d800 --- /dev/null +++ b/src/schemas/footer.ts @@ -0,0 +1,17 @@ +import { z } from 'astro:content' +import { channelSchema } from 'fulldev-ui/schemas/channel.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' + +export const footerSchema = z + .object({ + logo: logoSchema.optional(), + heading: z.string().optional(), + paragraph: z.string().optional(), + socials: z.string().url().array().optional(), + channels: channelSchema.array().optional(), + menus: menuSchema.array().optional(), + }) + .strict() + +export type FooterSchema = z.infer diff --git a/src/schemas/head.ts b/src/schemas/head.ts new file mode 100644 index 000000000..4d4bd67dc --- /dev/null +++ b/src/schemas/head.ts @@ -0,0 +1,17 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Head from 'fulldev-ui/components/Head.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const headSchema = z + .object({ + title: z.string().optional(), + description: z.string().optional(), + image: imageSchema.optional(), + theme: z.enum(['light', 'dark', 'system']).optional(), + favicon: z.string().optional(), + company: z.string().optional(), + scripts: z.string().array().optional(), + code: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/header.ts b/src/schemas/header.ts new file mode 100644 index 000000000..28f2387a8 --- /dev/null +++ b/src/schemas/header.ts @@ -0,0 +1,21 @@ +import { z } from 'astro:content' +import { buttonSchema } from 'fulldev-ui/schemas/button.ts' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' + +export const headerSchema = z + .object({ + logo: logoSchema.optional(), + heading: z.string().optional(), + links: linkSchema.array().optional(), + socials: z.string().array().optional(), + buttons: buttonSchema.array().optional(), + menus: menuSchema.array().optional(), + themer: z.boolean().optional(), + cart: z.boolean().optional(), + search: z.boolean().optional(), + }) + .strict() + +export type HeaderSchema = z.infer diff --git a/src/schemas/image.ts b/src/schemas/image.ts new file mode 100644 index 000000000..17b1b61ed --- /dev/null +++ b/src/schemas/image.ts @@ -0,0 +1,53 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Image from 'fulldev-ui/components/Image.astro' + +// const imagePath = z.preprocess((data: unknown) => { +// if (typeof data === 'string') { +// return data.split('/').pop() +// } +// return data +// }, reference('images')) + +// export const imageSchema = z +// .union([imagePath, z.object({}).passthrough()]) +// .pipe( +// z +// .object({ +// id: z +// .string() +// .refine(async (data) => await reference('images').parseAsync(data)), +// src: z.string(), +// alt: z.string(), +// width: z.number(), +// height: z.number(), +// }) +// .partial() +// .passthrough() +// ) +// .optional() + +// export const imageSchema = z +// .object({ +// src: z.string().optional(), +// alt: z.string().optional(), +// width: z.number().optional(), +// height: z.number().optional(), +// }) +// .strict() satisfies z.ZodType> + +const image = z + .object({ + src: z.string().optional(), + alt: z.string().optional(), + width: z.number().optional(), + height: z.number().optional(), + }) + .strict() satisfies z.ZodType> + +export const imageSchema = z + .preprocess( + (data: unknown) => (typeof data === 'string' ? { src: data } : data), + image + ) + .optional() as z.ZodType> diff --git a/src/schemas/input.ts b/src/schemas/input.ts new file mode 100644 index 000000000..11b9156ef --- /dev/null +++ b/src/schemas/input.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Input from 'fulldev-ui/components/Input.astro' + +export const inputSchema = z + .object({ + icon: z.string().optional(), + label: z.string().optional(), + placeholder: z.string().optional(), + value: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/link.ts b/src/schemas/link.ts new file mode 100644 index 000000000..bb91689df --- /dev/null +++ b/src/schemas/link.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Link from 'fulldev-ui/components/Link.astro' + +export const linkSchema = z + .object({ + text: z.string().optional(), + href: z.string().optional(), + icon: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['primary', 'underline', 'muted']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/logo.ts b/src/schemas/logo.ts new file mode 100644 index 000000000..faf75915b --- /dev/null +++ b/src/schemas/logo.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Logo from 'fulldev-ui/components/Logo.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const logoSchema = z + .object({ + image: imageSchema.optional(), + text: z.string().optional(), + href: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/menu.ts b/src/schemas/menu.ts new file mode 100644 index 000000000..a825cceef --- /dev/null +++ b/src/schemas/menu.ts @@ -0,0 +1,11 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Menu from 'fulldev-ui/components/Menu.astro' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' + +export const menuSchema = z + .object({ + heading: z.string().optional(), + links: linkSchema.array().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/page.ts b/src/schemas/page.ts index ced52e1a9..a7a586110 100644 --- a/src/schemas/page.ts +++ b/src/schemas/page.ts @@ -1,43 +1,23 @@ import { z } from 'astro:content' -import { base } from './base' -import { block } from './block' -import { pathSchema } from './utils' +import { blockSchema } from 'fulldev-ui/schemas/block.ts' +import { headSchema } from 'fulldev-ui/schemas/head.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' -export const page = base +export const pageSchema = blockSchema .extend({ - i18n: pathSchema('pages'), - settings: pathSchema('settings'), - seo: z - .object({ - title: z.string(), - description: z.string(), - image: z.string(), - }) - .partial() - .passthrough(), - code: z - .object({ - head: z.string(), - body: z.string(), - }) - .partial() - .passthrough(), - pages: pathSchema('pages').array(), - records: pathSchema('records').array(), - title: z.string(), - description: z.string(), - header: block.or(z.literal(false)), - headers: block.array().or(z.literal(false)), - hero: block.or(z.literal(false)), - block: block.or(z.literal(false)), - section: block.or(z.literal(false)), - blocks: block.array().or(z.object({}).catchall(block)), - sections: block.array().or(z.object({}).catchall(block)), - cta: block.or(z.literal(false)), - footer: block.or(z.literal(false)), - footers: block.array().or(z.literal(false)), + _layout: z.string().optional(), + _schema: z.string().optional(), + title: z.string().optional(), + description: z.string().optional(), + head: headSchema.optional(), + banner: blockSchema.optional(), + navigation: blockSchema.optional(), + header: blockSchema.optional(), + sections: blockSchema.array().optional(), + subheader: blockSchema.array().optional(), + sidebar: menuSchema.array().optional(), + footer: blockSchema.optional(), }) - .partial() - .passthrough() + .strict() -export type Page = z.infer +export type PageSchema = z.infer diff --git a/src/schemas/utils.ts b/src/schemas/path.ts similarity index 61% rename from src/schemas/utils.ts rename to src/schemas/path.ts index a749ac209..e5513828c 100644 --- a/src/schemas/utils.ts +++ b/src/schemas/path.ts @@ -1,19 +1,10 @@ import { reference, z, type AnyEntryMap } from 'astro:content' -// export const pagesPath = z -// .string() -// .transform((value) => { -// const fullpath = value?.split(`pages/`).pop() -// const slug = fullpath?.split('.').shift() -// return slug -// }) -// .pipe(reference('pages')) - +// TODO: preprocess instead export const pathSchema = (collection: C) => z .string() .transform((value) => { - // @ts-ignore const fullpath = value?.split(`${collection}/`).pop() const slug = fullpath?.split('.').shift() const noIndexEnding = slug?.replace('/index', '') diff --git a/src/schemas/proof.ts b/src/schemas/proof.ts new file mode 100644 index 000000000..686231ab8 --- /dev/null +++ b/src/schemas/proof.ts @@ -0,0 +1,12 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Proof from 'fulldev-ui/components/Proof.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const proofSchema = z + .object({ + rating: z.number().optional(), + avatars: imageSchema.array().optional(), + text: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/textarea.ts b/src/schemas/textarea.ts new file mode 100644 index 000000000..b54687c98 --- /dev/null +++ b/src/schemas/textarea.ts @@ -0,0 +1,11 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Textarea from 'fulldev-ui/components/Textarea.astro' + +export const textareaSchema = z + .object({ + label: z.string().optional(), + placeholder: z.string().optional(), + value: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/stores/cart.svelte.ts b/src/stores/cart.svelte.ts new file mode 100644 index 000000000..5da624751 --- /dev/null +++ b/src/stores/cart.svelte.ts @@ -0,0 +1,78 @@ +import { derived, writable } from 'svelte/store' + +export type CartItem = { + uid: string + quantity: number + slug: string + title: string + price?: number | undefined + image?: string | undefined + variants?: + | { + [k: string]: string | undefined + } + | undefined +} + +export type Cart = CartItem[] + +const isServer = import.meta.env.SSR +const storageJson = !isServer && localStorage.getItem('cart') +const storageData = storageJson ? JSON.parse(storageJson) : [] + +export const cart = writable(storageData) + +cart.subscribe((newCart) => { + if (isServer) return + const json = JSON.stringify(newCart) + localStorage.setItem('cart', json) +}) + +export const getUid = ( + slug: CartItem['slug'], + variants?: CartItem['variants'] +) => (variants ? `${slug}-${Object.values(variants)?.join('-')}` : slug) + +export const getItemIndex = (currentCart: Cart, uid: CartItem['uid']) => { + const index = currentCart.findIndex((i) => i.uid === uid) + if (index === -1) throw new Error(`Item with uid ${uid} not found`) + return index +} + +export const addItem = (item: CartItem) => + cart.update((currentCart) => [...currentCart, item]) + +export const removeItem = (uid: CartItem['uid']) => + cart.update((currentCart) => { + const index = getItemIndex(currentCart, uid) + currentCart.splice(index, 1) + return [...currentCart] + }) + +export const updateQuantity = ( + uid: CartItem['uid'], + quantity: CartItem['quantity'] +) => + cart.update((currentCart) => { + const index = getItemIndex(currentCart, uid) + if (currentCart[index]) currentCart[index].quantity = quantity + return [...currentCart] + }) + +export const openCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.showModal() +} + +export const closeCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.close() +} + +export const totalPrice = derived(cart, ($cart) => { + return $cart.length + // return $cart.reduce( + // (acc, item) => acc + (item.price || 0) * (item.quantity || 0), + // 0 + // ) +}) diff --git a/src/stores/cart.ts b/src/stores/cart.ts new file mode 100644 index 000000000..0bb77204b --- /dev/null +++ b/src/stores/cart.ts @@ -0,0 +1,76 @@ +import { persistentAtom } from '@nanostores/persistent' +import { computed } from 'nanostores' + +type Item = { + slug: string + title: string + price: number + image: string + quantity: number + variants: string[] +} + +type Cart = Item[] | [] + +export const $cart = persistentAtom('cart', [], { + encode: JSON.stringify, + decode: JSON.parse, +}) + +// for svelte files +export const cart = $cart + +export const getCart = () => $cart.get() + +export const setCart = (cart: Cart) => $cart.set(cart) + +export const removeItem = (slug: string) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex((item) => item.slug === slug) + newCart.splice(index, 1) + $cart.set(newCart) +} + +export const addItem = (item: Item) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex( + (i) => i.slug === item.slug && i.variants.join() === item.variants.join() + ) + if (index === -1) newCart.push(item) + else { + let newItem = { ...newCart[index] } as Item + newItem.quantity += item.quantity + newCart[index] = newItem + } + setCart(newCart) +} + +export const updateQuantity = (slug: string, quantity: number) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex((item) => item.slug === slug) + let newItem = { ...newCart[index] } as Item + newItem.quantity = quantity + newCart[index] = newItem + setCart(newCart) +} + +export const $totalPrice = computed($cart, ($cart) => + $cart.reduce((a, b) => +a + b.price * b.quantity, 0) +) + +export const openCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.showModal() +} + +export const closeCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.close() +} + +// export const totalQuantity = computed(cart, ($cart) => +// $cart.reduce((a, b) => +a + b.quantity, 0) +// ) diff --git a/src/structures/Card.astro b/src/structures/Card.astro new file mode 100644 index 000000000..68e0c36e7 --- /dev/null +++ b/src/structures/Card.astro @@ -0,0 +1,35 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'a'>, HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { href, as = href ? 'a' : 'div', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Carousel.astro b/src/structures/Carousel.astro new file mode 100644 index 000000000..1fa2e1c34 --- /dev/null +++ b/src/structures/Carousel.astro @@ -0,0 +1,106 @@ +--- +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props {} +--- + + + + + + + + + + + + diff --git a/src/structures/Code.astro b/src/structures/Code.astro new file mode 100644 index 000000000..a3c5d8c8a --- /dev/null +++ b/src/structures/Code.astro @@ -0,0 +1,53 @@ +--- +import type { ComponentProps } from 'astro/types' +import { Code as AstroCode } from 'astro:components' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends ComponentProps {} + +const { lang = 'astro', code, ...rest } = Astro.props +--- + + + + + + + + { + code && ( + + ) + } + + + diff --git a/src/structures/Container.astro b/src/structures/Container.astro new file mode 100644 index 000000000..5840700af --- /dev/null +++ b/src/structures/Container.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Drawer.astro b/src/structures/Drawer.astro new file mode 100644 index 000000000..7bd771632 --- /dev/null +++ b/src/structures/Drawer.astro @@ -0,0 +1,80 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props + extends HTMLAttributes<'aside'>, + Pick, 'variant' | 'size' | 'text' | 'icon'> { + id: string + icon: string +} + +const { id, variant = 'ghost', size = 'md', icon, text, ...rest } = Astro.props + +const slot = await Astro.slots.render('default') +const render = slot?.trim().length > 0 +--- + +{ + render && ( + + + + + + + + + + + ) +} + + diff --git a/src/structures/Group.astro b/src/structures/Group.astro new file mode 100644 index 000000000..f722dd9a0 --- /dev/null +++ b/src/structures/Group.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Layout.astro b/src/structures/Layout.astro new file mode 100644 index 000000000..1d3f58054 --- /dev/null +++ b/src/structures/Layout.astro @@ -0,0 +1,34 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Head from 'fulldev-ui/components/Head.astro' + +type Props = Omit, 'title'> & { + head?: ComponentProps +} + +const { head, ...rest } = Astro.props +--- + + + + + + + + + diff --git a/src/structures/Masonry.astro b/src/structures/Masonry.astro new file mode 100644 index 000000000..cf19ccc0f --- /dev/null +++ b/src/structures/Masonry.astro @@ -0,0 +1,42 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Matrix.astro b/src/structures/Matrix.astro new file mode 100644 index 000000000..5098252b5 --- /dev/null +++ b/src/structures/Matrix.astro @@ -0,0 +1,39 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + size?: 'sm' | 'md' | 'lg' | undefined +} + +const { size = 'md', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Panel.astro b/src/structures/Panel.astro new file mode 100644 index 000000000..ce0b15d2a --- /dev/null +++ b/src/structures/Panel.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Prose.astro b/src/structures/Prose.astro new file mode 100644 index 000000000..ac90de9f9 --- /dev/null +++ b/src/structures/Prose.astro @@ -0,0 +1,88 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'center' | 'middle' | 'columns' +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Section.astro b/src/structures/Section.astro new file mode 100644 index 000000000..8bb0391ac --- /dev/null +++ b/src/structures/Section.astro @@ -0,0 +1,26 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'section'> { + as?: HTMLTag +} + +const { as = 'section', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Sidebar.astro b/src/structures/Sidebar.astro new file mode 100644 index 000000000..de72b863e --- /dev/null +++ b/src/structures/Sidebar.astro @@ -0,0 +1,36 @@ +--- +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'aside'> {} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Split.astro b/src/structures/Split.astro new file mode 100644 index 000000000..b9fc5abf8 --- /dev/null +++ b/src/structures/Split.astro @@ -0,0 +1,38 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'start' | 'center' | 'sticky' +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Stack.astro b/src/structures/Stack.astro new file mode 100644 index 000000000..429aacbcf --- /dev/null +++ b/src/structures/Stack.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Writeup.astro b/src/structures/Writeup.astro new file mode 100644 index 000000000..40fec3e63 --- /dev/null +++ b/src/structures/Writeup.astro @@ -0,0 +1,67 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'left' | 'center' | 'right' +} + +const { align = 'start', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/_Bento.astro b/src/structures/_Bento.astro new file mode 100644 index 000000000..a1c5e809c --- /dev/null +++ b/src/structures/_Bento.astro @@ -0,0 +1,34 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/utils/_archive/Childmorphic.ts b/src/utils/_archive/Childmorphic.ts deleted file mode 100644 index 0409b50a5..000000000 --- a/src/utils/_archive/Childmorphic.ts +++ /dev/null @@ -1,8 +0,0 @@ -// import type { AstroGlobal } from 'astro' - -// export type Childmorphic = { -// [Key in keyof C & string as -// | Lowercase -// | Capitalize -// | `${string}${Capitalize}`]?: C[Key] -// } diff --git a/src/utils/_archive/getAllCollections.ts b/src/utils/_archive/getAllCollections.ts deleted file mode 100644 index f5547ac7d..000000000 --- a/src/utils/_archive/getAllCollections.ts +++ /dev/null @@ -1,10 +0,0 @@ -// import type { CollectionKey } from 'astro:content' -// import { getCollection } from 'astro:content' - -// export const getAllCollections = async (names: CollectionKey[]) => { -// const promises = names.map((name) => getCollection(name)) -// const resolved = await Promise.all(promises) -// const flattened = resolved.flat() -// const filtered = flattened.filter(Boolean) -// return filtered -// } diff --git a/src/utils/_archive/getCollectionCascade.ts b/src/utils/_archive/getCollectionCascade.ts deleted file mode 100644 index aba39bab2..000000000 --- a/src/utils/_archive/getCollectionCascade.ts +++ /dev/null @@ -1,33 +0,0 @@ -// import { -// getCollection, -// type CollectionEntry, -// type CollectionKey, -// type ContentCollectionKey, -// type DataCollectionKey, -// } from 'astro:content' -// import { unflatten } from 'flat' -// import { objectify } from 'radash' -// import { mapValues } from 'remeda' - -// export type CollectionCascade = { -// [Key in ContentCollectionKey]: { -// [Key in CollectionEntry['slug']]: any -// } -// } & { -// [Key in DataCollectionKey]: { -// [Key in CollectionEntry['id']]: any -// } -// } - -// export const getCollectionCascade = async (collectionKeys: CollectionKey[]) => { -// const promises = collectionKeys.map((key) => getCollection(key)) -// const resolved = await Promise.all(promises) -// const flattened = resolved.flat() -// const object = objectify( -// flattened, -// ({ collection, slug, id }) => `${collection}.${slug || id}` -// ) -// const mapped = mapValues(object, (value) => value.data) -// const unflattened = unflatten(mapped) -// return unflattened as CollectionCascade -// } diff --git a/src/utils/_archive/getPathname.ts b/src/utils/_archive/getPathname.ts deleted file mode 100644 index e0503f5c9..000000000 --- a/src/utils/_archive/getPathname.ts +++ /dev/null @@ -1,18 +0,0 @@ -// import type { AstroGlobal } from 'astro' -// import type { CollectionEntry, ContentCollectionKey } from 'astro:content' - -// export const getPathname = ({ -// slug, -// collection, -// data, -// }: CollectionEntry): -// | AstroGlobal['url']['pathname'] -// | undefined => { -// if (!slug) return -// if (data.draft) return -// if (data.output === false) return -// if (collection === 'pages' && slug === 'index') return '/' -// if (collection === 'pages') return `/${slug}` -// if (slug === 'index') return `/${collection}` -// return `/${collection}/${slug}` -// } diff --git a/src/utils/_archive/staticPageSchema.ts b/src/utils/_archive/staticPageSchema.ts deleted file mode 100644 index b53084964..000000000 --- a/src/utils/_archive/staticPageSchema.ts +++ /dev/null @@ -1,124 +0,0 @@ -// import { -// getCollection, -// getEntry, -// z, -// type CollectionEntry, -// type CollectionKey, -// } from 'astro:content' -// import { flatten, unflatten } from 'flat' -// import { all, camel, construct, get, isString, mapValues } from 'radash' -// import { mapKeys, merge } from 'remeda' - -// interface Options { -// casing: boolean -// layouts: boolean -// references: boolean -// selfs: boolean -// } - -// const defaults: Options = { -// casing: true, -// layouts: true, -// references: true, -// selfs: true, -// } - -// const transformReferences = async (data: object) => -// await all( -// mapValues(flatten(data) as any, async (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const results = await all( -// parts.map(async (valuePart) => { -// if (!valuePart.startsWith('$')) return valuePart -// if (valuePart.startsWith('$self')) return valuePart - -// const reference = valuePart.split('.')[0].replace('$', '') -// const collection = reference.split('/')[0] -// const slug = reference.split('/').slice(1).join('/') -// const path = valuePart.split('.').slice(1).join('.') - -// if (collection && slug) { -// let response = await getEntry(collection as CollectionKey, slug) -// const result = get(response?.data, path) -// return result -// } else if (collection) { -// const response = await getCollection(collection as CollectionKey) -// const result = response?.map((entry: any) => get(entry?.data, path)) -// return result -// } - -// return valuePart -// }) -// ) -// if (results.length == 1) return results[0] -// return results.join(' ') -// }) -// ) - -// const transformLayouts = (data: object) => { -// const flat: any = flatten(data) -// let store: any = {} -// let i: number = 0 - -// const merged = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = key.split('.') -// const result = parts.map((part) => { -// return part.replace(/^_+/, '') -// }) -// const filtered = result.filter(Boolean) -// const joined = filtered.join('.') -// return joined -// }) -// const nested = construct(merged) -// return nested -// } - -// const transformSelfs = (data: object) => { -// const flat = flatten(data) as any -// const mapped = mapValues(flat, (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const result = parts.map((part) => { -// if (!part.startsWith('$self')) return part -// const pathParts = part.split('.').slice(1) -// const camelCased = pathParts.map((part) => camel(part)) -// const path = camelCased.join('.') -// const result = get(data, path) -// return result ? result : part -// }) -// return result.join(' ') -// }) -// return unflatten(mapped) -// } - -// const transformCasing = (object: object) => { -// const flat = flatten(object) -// const mapped = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = (key as string).split('.') -// const result = parts.map((part) => camel(part)) -// return result.join('.') -// }) -// return unflatten(mapped) -// } - -// export const pageSchema = (options: Partial = {}) => -// z.any().transform(async (data: CollectionEntry['data']) => { -// const { layouts, casing, references, selfs } = merge(defaults, options) - -// if (references) data = await transformReferences(data) -// // console.log('references', JSON.stringify(data, null, 2)) - -// if (layouts) data = transformLayouts(data) -// // console.log('layouts', data) - -// if (casing) data = transformCasing(data) -// // console.log('casing', data) - -// if (selfs) data = transformSelfs(data) -// // console.log('selfs', data) - -// return data -// }) diff --git a/src/utils/_archive/transform/transform.ts b/src/utils/_archive/transform/transform.ts deleted file mode 100644 index 16aa65be5..000000000 --- a/src/utils/_archive/transform/transform.ts +++ /dev/null @@ -1,25 +0,0 @@ -// import type { CollectionEntry, CollectionKey } from 'astro:content' -// import { transformCasing } from './transformCasing' -// import { transformReferences } from './transformReferences' -// import { transformSelfs } from './transformSelfs' -// import { transformUnderscores } from './transformUnderscores' - -// export const transform = async ( -// entry: CollectionEntry -// ): Promise => { -// // console.log('entry', entry.data) - -// entry = await transformReferences(entry) -// // console.log('references', entry) - -// entry = transformUnderscores(entry) -// // console.log('underscores', entry) - -// entry = transformCasing(entry) -// // console.log('casing', entry) - -// entry = transformSelfs(entry) -// // console.log('selfs', entry) - -// return entry -// } diff --git a/src/utils/_archive/transform/transformCasing.ts b/src/utils/_archive/transform/transformCasing.ts deleted file mode 100644 index c934a9477..000000000 --- a/src/utils/_archive/transform/transformCasing.ts +++ /dev/null @@ -1,24 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { camel, isObject } from 'radash' -// import { isArray, isString, mapKeys } from 'remeda' - -// export const transformCasing = (data: any) => { -// if (!isObject(data) && !isArray(data)) return data - -// const flat: any = flatten(data) -// const transformedData = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = (key as string).split('.') -// const result = parts.map((part) => { -// const leadingUnderscores = part.match(/^_+/) || [''] -// const withoutLeadingUnderscores = part.replace(/^_+/, '') -// const camelCased = camel(withoutLeadingUnderscores) -// const result = leadingUnderscores + camelCased -// return result -// }) -// return result.join('.') -// }) - -// const nested = unflatten(transformedData) -// return nested -// } diff --git a/src/utils/_archive/transform/transformReferences.ts b/src/utils/_archive/transform/transformReferences.ts deleted file mode 100644 index 830cf492c..000000000 --- a/src/utils/_archive/transform/transformReferences.ts +++ /dev/null @@ -1,54 +0,0 @@ -// import { getCollection, getEntry, type CollectionKey } from 'astro:content' -// import { flatten, unflatten } from 'flat' -// import { all, get, isString, mapValues } from 'radash' -// import { getPathname } from '../getPathname' -// import { transform } from './transform' - -// export const transformReferences = async (data: object): Promise => { -// const flat = flatten(data) -// const mappedValues = await all( -// mapValues(flat as any, async (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const mappedParts = await all( -// parts.map(async (valuePart) => { -// if (!valuePart.startsWith('$/')) return valuePart - -// const reference = valuePart.split('.')[0].replace('$/', '') -// const collection = reference.split('/')[0] -// const slug = reference.split('/').slice(1).join('/') -// const path = valuePart.split('.').slice(1).join('.') - -// if (collection && slug) { -// let response = await getEntry(collection as CollectionKey, slug) -// if (!response) -// throw new Error(`Entry not found: ${collection}/${slug}`) -// const transformed = await transform(response as any) -// const result = get(transformed?.data, path) -// if (!path) -// return { -// ...transformed?.data, -// pathname: getPathname(transformed), -// } -// return result ? result : valuePart -// } else if (collection) { -// const response = await getCollection(collection as CollectionKey) -// if (!response) -// throw new Error(`Entry not found: ${collection}/${slug}`) -// const mapped = response?.map(async (entry: any) => { -// const transformed = await transform(entry?.data) -// return get(transformed, path) -// }) -// const result = await all(mapped) -// return result ? result : valuePart -// } - -// return valuePart -// }) -// ) -// if (mappedParts.length == 1) return mappedParts[0] -// else return mappedParts.join(' ') -// }) -// ) -// return unflatten(mappedValues) -// } diff --git a/src/utils/_archive/transform/transformSelfs.ts b/src/utils/_archive/transform/transformSelfs.ts deleted file mode 100644 index cd5705e65..000000000 --- a/src/utils/_archive/transform/transformSelfs.ts +++ /dev/null @@ -1,20 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { camel, get, isString, mapValues } from 'radash' - -// export const transformSelfs = (data: any): any => { -// const flat = flatten(data) as any -// const mapped = mapValues(flat, (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const result = parts.map((part) => { -// if (!part.startsWith('$.')) return part -// const pathParts = part.replace('$.', '').split('.') -// const camelCased = pathParts.map((part) => camel(part)) -// const path = 'data.' + camelCased.join('.') -// const result = get(data, path) -// return result ? result : part -// }) -// return result.join(' ') -// }) -// return unflatten(mapped) -// } diff --git a/src/utils/_archive/transform/transformUnderscores.ts b/src/utils/_archive/transform/transformUnderscores.ts deleted file mode 100644 index ce2bcc31a..000000000 --- a/src/utils/_archive/transform/transformUnderscores.ts +++ /dev/null @@ -1,19 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { isString } from 'radash' -// import { mapKeys } from 'remeda' - -// export const transformUnderscores = (data: any): any => { -// const flat: any = flatten(data) -// const merged = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = key.split('.') -// const result = parts.map((part) => { -// return part.replace(/^_+/, '') -// }) -// const filtered = result.filter(Boolean) -// const joined = filtered.join('.') -// return joined -// }) -// const nested = unflatten(merged) -// return nested -// } diff --git a/src/utils/cart.ts b/src/utils/cart.ts new file mode 100644 index 000000000..81863ece8 --- /dev/null +++ b/src/utils/cart.ts @@ -0,0 +1,27 @@ +import { slugify } from './slugify.ts' + +export const generateProductId = ( + slug: string, + variants?: string[] | undefined +): string => { + const slugified = slugify(slug) + + if (variants && variants.length > 0) + return `${slugified}--${variants.map((variant) => slugify(variant)).join('--')}` + + return slugified +} + +export const generateProductName = ( + title: string, + variants?: string[] | undefined +): string => { + if (variants && variants.length > 0) + return `${title} / ${variants.join(' / ')}` + + return title +} + +export const formatPrice = (price: number): string => { + return `€${price?.toFixed(2).replace('.', ',')}` +} diff --git a/src/utils/getHref.ts b/src/utils/getHref.ts new file mode 100644 index 000000000..7cc1ecb9b --- /dev/null +++ b/src/utils/getHref.ts @@ -0,0 +1,6 @@ +import type { CollectionEntry } from 'astro:content' + +export function getHref(slug: CollectionEntry<'pages'>['slug']) { + if (slug === 'index') return '/' + else return `/${slug}/` +} diff --git a/src/utils/mergeEntries.ts b/src/utils/mergeEntries.ts deleted file mode 100644 index cef69be2d..000000000 --- a/src/utils/mergeEntries.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { getEntry } from 'astro:content' -import { assign } from 'radash' - -export const mergeEntries = async (entry: any) => { - if (!entry) return entry - const { data, slug } = entry - const baseSettings = await getEntry('settings', 'base') - const enSettings = await getEntry('settings', 'en') - const deSettings = await getEntry('settings', 'de') - const frSettings = await getEntry('settings', 'fr') - const pageSettings = data.settings && (await getEntry(data.settings)) - const i18nSettings = data.i18n && (await getEntry(data.i18n)) - - let merged = {} - merged = assign(merged, baseSettings?.data ?? {}) - slug?.startsWith('en') && (merged = assign(merged, enSettings?.data ?? {})) - slug?.startsWith('de') && (merged = assign(merged, deSettings?.data ?? {})) - slug?.startsWith('fr') && (merged = assign(merged, frSettings?.data ?? {})) - merged = assign(merged, i18nSettings?.data ?? {}) - merged = assign(merged, pageSettings?.data ?? {}) - merged = assign(merged, data) - - const newEntry = { - ...entry, - data: merged, - } - return newEntry -} diff --git a/src/utils/slugify.ts b/src/utils/slugify.ts new file mode 100644 index 000000000..e1fda3dbc --- /dev/null +++ b/src/utils/slugify.ts @@ -0,0 +1,6 @@ +export const slugify = (input: string): string => { + return input + .toLowerCase() + .replace(/[^a-z0-9]+/g, '-') + .replace(/^-+|-+$/g, '') +} diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 000000000..522c1ef6a --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,5 @@ +import { vitePreprocess } from '@astrojs/svelte'; + +export default { + preprocess: vitePreprocess(), +} diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 000000000..630dab39d --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,72 @@ +import tailwindcssScrollbar from 'tailwind-scrollbar' +import type { Config } from 'tailwindcss' +import tailwindcssAnimate from 'tailwindcss-animate' + +export default { + darkMode: ['class'], + content: [ + './src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}', + 'node_modules/fulldev-ui/src/**/*.astro', + ], + theme: { + container: { + screens: ['1536px'], + }, + extend: { + spacing: { + gutter: 'clamp(16px, 4vw, 32px)', + container: 'var(--container, 1536px)', + hero: 'calc(100vh - var(--header-height, 0px) - var(--subheader-height, 0px) - var(--banner-height, 0px))', + header: 'var(--header-height, 0px)', + 'sticky-8': 'calc(var(--header-height, 0px) + 2rem)', + 'sticky-16': 'calc(var(--header-height, 0px) + 4rem)', + }, + colors: { + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))', + // hover: 'hsl(var(--primary) / 85%)', + hover: 'hsl(var(--primary) / 75%)', + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))', + hover: 'hsl(var(--secondary) / 75%)', + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))', + hover: 'hsl(var(--muted) / 75%)', + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))', + hover: 'hsl(var(--accent) / 75%)', + }, + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))', + hover: 'hsl(var(--card) / 75%)', + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))', + }, + }, + borderRadius: { + lg: `var(--radius)`, + md: `calc(var(--radius) - 2px)`, + sm: 'calc(var(--radius) - 4px)', + }, + borderColor: { + DEFAULT: 'hsl(var(--border))', + }, + }, + }, + plugins: [tailwindcssAnimate, tailwindcssScrollbar({ nocompatible: true })], +} satisfies Config diff --git a/tsconfig.json b/tsconfig.json index 7c119d37d..27a4e2617 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,12 @@ { - "extends": "astro/tsconfigs/strict", + "extends": "astro/tsconfigs/strictest", + "include": ["src", "astro.config.ts", "virtual.d.ts"], "compilerOptions": { - "jsx": "preserve", + "module": "NodeNext", + "moduleResolution": "NodeNext", "baseUrl": ".", "paths": { - "fulldev-ui/*": [ - "src/*" - ] + "fulldev-ui/*": ["src/*"], } }, - "exclude": [ - "dist" - ] } \ No newline at end of file diff --git a/virtual.d.ts b/virtual.d.ts new file mode 100644 index 000000000..8c009ed84 --- /dev/null +++ b/virtual.d.ts @@ -0,0 +1,5 @@ +declare module 'virtual:fulldev-ui/config' { + import type { Config } from 'fulldev-ui/integration' + const content: Config + export default content +}
I'm a live preview`} /> + +## Usage in markdown + +Thanks to [this great plugin](https://github.com/mattjennings/astro-live-code) you can also use it directly in markdown files. + +The following code will translate to the example at the top of this page: + +````html +```astro live +I'm a live preview +``` +```` diff --git a/src/content/pages/docs/structures/container.mdx b/src/content/pages/docs/structures/container.mdx new file mode 100644 index 000000000..606c24bf2 --- /dev/null +++ b/src/content/pages/docs/structures/container.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Container +description: Sets a max-width, padding and centers the content +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/drawer.mdx b/src/content/pages/docs/structures/drawer.mdx new file mode 100644 index 000000000..60637f417 --- /dev/null +++ b/src/content/pages/docs/structures/drawer.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Drawer +description: A panel that slides out from the side of the screen +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the Header blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/group.mdx b/src/content/pages/docs/structures/group.mdx new file mode 100644 index 000000000..e029447d0 --- /dev/null +++ b/src/content/pages/docs/structures/group.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Group +description: Group buttons and similar components +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/layout.mdx b/src/content/pages/docs/structures/layout.mdx new file mode 100644 index 000000000..c6aebe59b --- /dev/null +++ b/src/content/pages/docs/structures/layout.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Container +description: Sets a head, body and some base styles +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the layouts for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/masonry.mdx b/src/content/pages/docs/structures/masonry.mdx new file mode 100644 index 000000000..0d153d984 --- /dev/null +++ b/src/content/pages/docs/structures/masonry.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Masonry +description: Places items like cards in a masonry layout +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/matrix.mdx b/src/content/pages/docs/structures/matrix.mdx new file mode 100644 index 000000000..cdce5e31b --- /dev/null +++ b/src/content/pages/docs/structures/matrix.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Matrix +description: Places items like cards in a grid +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/panel.mdx b/src/content/pages/docs/structures/panel.mdx new file mode 100644 index 000000000..39507c239 --- /dev/null +++ b/src/content/pages/docs/structures/panel.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Panel +description: A box with a border, padding and rounded corners used for sections +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/prose.mdx b/src/content/pages/docs/structures/prose.mdx new file mode 100644 index 000000000..4b75ded1a --- /dev/null +++ b/src/content/pages/docs/structures/prose.mdx @@ -0,0 +1,33 @@ +--- +_block: Content7 +title: Prose +description: Applies styling to child components +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +```astro live +--- +import Prose from 'fulldev-ui/structures/Prose.astro' +--- + + + Welcome to Our Blog + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia + odio vitae vestibulum vestibulum. + + + Key Features + + Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. + + + Simple and elegant design + Responsive layout + Easy customization + + +``` diff --git a/src/content/pages/docs/structures/section.mdx b/src/content/pages/docs/structures/section.mdx new file mode 100644 index 000000000..3f4535b0b --- /dev/null +++ b/src/content/pages/docs/structures/section.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Section +description: Sets vertical padding and some base styles +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/stack.mdx b/src/content/pages/docs/structures/stack.mdx new file mode 100644 index 000000000..526318912 --- /dev/null +++ b/src/content/pages/docs/structures/stack.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Stack +description: Places items like cards in a horizontal or vertical stack +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/docs/structures/writeup.mdx b/src/content/pages/docs/structures/writeup.mdx new file mode 100644 index 000000000..0a8a58b51 --- /dev/null +++ b/src/content/pages/docs/structures/writeup.mdx @@ -0,0 +1,15 @@ +--- +_block: Content7 +title: Writeup +description: Applies styling to child components, similar to Prose +--- + +import Props from 'fulldev-ui/components/docs/Props.astro' + +## Props + + + +## Examples + +Please reference the blocks for examples on how to use the wrapper components. diff --git a/src/content/pages/index.mdx b/src/content/pages/index.mdx index 87835c12e..db3a9e0f1 100644 --- a/src/content/pages/index.mdx +++ b/src/content/pages/index.mdx @@ -1,66 +1,52 @@ --- -seo: - title: Fulldev UI - Astro component and block library, open-source - description: Make websites rapidly with pre-built components and blocks. - image: /images/og-image.png +_schema: page +_block: Hero1 -sections: - hero: - _bookshop_name: Hero - color: brand - badge: - as: a - text: We just released our biggest update yet 🎉 - href: https://discord.gg/vXZqMbadm8 - heading: The Astro UI library to build content sites - text: Make websites with prebuilt components and blocks - buttons: - - text: Get Started - href: /overview/installation - - text: GitHub - href: https://github.com/fulldotdev/ui - target: _blank - icon: brand-github +title: Fulldev UI - Astro component and block library, open-source +description: Make websites rapidly with pre-built components and blocks. +heading: Build complete websites with this Astro UI library +paragraph: Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation. +buttons: + - text: Get Started + href: /docs/ + - text: GitHub + href: https://github.com/fulldotdev/ui + icon: brand-github + target: _blank - blocks: - _bookshop_name: Content - color: brand - label: Blocks +sections: + - _block: Content2 + tagline: Blocks heading: Use pre-built blocks with just props - text: we created a great gallery of blocks to build content sites with a modern look and feel, all of our blocks are build with components from the library to achieve a consistent look. - image: /images/block-code.png - reverse: odd + paragraph: We created a great gallery of blocks to build content sites with a modern look and feel, all of our blocks are build with components from the library to achieve a consistent look. + image: + src: /images/block-code.png buttons: - - href: /blocks + - href: /docs/blocks/ icon: layout text: View blocks + variant: secondary - components: - _bookshop_name: Content - color: brand - label: Components + - _block: Content2 + tagline: Components heading: Or build your own, with easy to use components - text: our rich set of components make it easy to build your own blocks with great customizability through props and global theming. - image: /images/component-code.png - reverse: odd + paragraph: Our rich set of components make it easy to build your own blocks with great customizability through props and global theming. + image: + src: /images/component-code.png buttons: - - href: /base/badge + - text: View components + href: /docs/components/ icon: code - text: View components + variant: secondary - cta: - _bookshop_name: Cta - size: lg - variant: primary + - _block: Cta1 heading: Build content websites in a fraction of time - text: A library of components and blocks to build content sites, fast. + paragraph: A library of components and blocks to build content sites, fast. buttons: - text: Get Started - href: /overview/installation - color: brand + href: /docs/ - text: Github href: https://github.com/fulldotdev/ui - target: _blank icon: brand-github - color: brand + target: _blank --- diff --git a/src/content/pages/overview/frameworks.mdx b/src/content/pages/overview/frameworks.mdx deleted file mode 100644 index 6c2831153..000000000 --- a/src/content/pages/overview/frameworks.mdx +++ /dev/null @@ -1,198 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -# Frameworks - -Fulldev UI is written in vanilla CSS and .astro files. It is framework agnostic. - -## JS frameworks - -All styles in Fulldev UI use regular CSS and classes. Classes use the following naming convention: - -- Component classes are the same as the component name, like `button` for ``. -- Prop classes have the prop name as prefix, like `variant-primary` for ``. -- If a prop is a boolean the class is added without a prefix, like `contrast`. - -This means you can apply Fulldev UI styles to any framework component as follows: - -```astro live ---- -import Button from 'fulldev-ui/components/Button.astro' ---- - - Button - Button -``` - -## CSS frameworks - -A TailwindCSS plugin and UnoCSS preset is available. - -### TailwindCSS - -In your `tailwind.config.ts` add the following: - -```ts -// tailwind.config.ts -import fulldevUI from 'fulldev-ui/tailwind' - -export default { - plugins: [fulldevUI], -} -``` - -In your `astro.config.ts` add the following: - -```ts -// astro.config.ts -import tailwind from '@astrojs/tailwind' - -export default defineConfig({ - integrations: [ - tailwind({ - // Disable injecting styles, import manually instead - applyBaseStyles: false, - }), - ], -}) -``` - -Import the css file file below anywhere in your project. - -```css -@tailwind base layer(base); -@tailwind components; -@tailwind utilities; -``` - -### UnoCSS - -In your `uno.config.ts` add the following: - -```ts -// uno.config.ts -import fulldevUI from 'fulldev-ui/unocss' - -export default defineConfig({ - injectReset: false, - presets: [fulldevUI], -}) -``` - -Do not use `injectReset` when using the UnoCSS preset, as it will conflict with the reset provided by Fulldev UI. If you do want a style reset, be sure to import it in the `base` layer, similar to the TailwindCSS example above. - -## Utility classes - -The following classes are available when using the Tailwind plugin or UnoCSS preset. - -### Spacing - -The following spacing classes are added to your tailwind/uno config. - -You can use them like `p-space-1`, `m-space-1`, `h-space-1`, `w-space-1`, etc. - -```ts -spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', -}, -``` - -### Font size - -The following spacing classes are added to your tailwind/uno config. - -You can use them like `text-1`, `text-2`, `text-3`, etc. - -```ts -fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', -} -``` - -### Border radius - -The following border radius classes are added to your tailwind/uno config. - -You can use them like `rounded-1`, `rounded-2`, `rounded-3`, etc. - -```ts -borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', -} -``` - -### Color classes - -The following color classes are added to your tailwind/uno config. - -You can use them like `bg-color-1`, `text-base-2`, `border-base-6`, etc. - -```ts -colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - } -} -``` diff --git a/src/content/pages/overview/installation.mdx b/src/content/pages/overview/installation.mdx deleted file mode 100644 index 961174d02..000000000 --- a/src/content/pages/overview/installation.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Installation - -Install fulldev-ui with your favorite package manager and you are ready to go. To get started with the integration see the integration page. - -```bash -pnpm i fulldev-ui -# or -bun i fulldev-ui -# or -yarn add fulldev-ui -# or -npm i fulldev-ui -``` diff --git a/src/content/pages/overview/integration.mdx b/src/content/pages/overview/integration.mdx deleted file mode 100644 index c032bacec..000000000 --- a/src/content/pages/overview/integration.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Integration - -After installation you can generate your color palettes via an Astro integration. You can optionally add a custom css file and define custom colors and other theming options, see the theming page for more information. - -```ts -import { defineConfig } from 'astro/config' -import fulldev from 'fulldev-ui/integration' - -// https://astro.build/config -export default defineConfig({ - integrations: [ - fulldev({ - css: '/src/css/custom.css', - colors: { - theme: 'dark', - dark: { - background: '#111110', - base: '#6F6D66', - brand: '#F50', - }, - light: { - background: '#EEEEEC', - base: '#6F6D66', - brand: '#F50', - }, - }, - }), - ], -}) -``` diff --git a/src/content/pages/overview/introduction.mdx b/src/content/pages/overview/introduction.mdx deleted file mode 100644 index f783756f8..000000000 --- a/src/content/pages/overview/introduction.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -# Introduction - -Fulldev UI focuses on content websites rather than applications. - -##### Build entire websites with just components - -Fulldev UI is unique in that it introduces larger components to build entire pages, and even websites. Like a Section component that just works. - -##### Integrates with any JS / CSS framework - -Want to use Tailwind, or something else? You can overwrite all styles. Need an interactive framework component? Styles can be applied with one simple class. - -##### Automated colors, spacing and sizes - -Everything is carefully designed to be fully responsive. Component adapt to their environment, like a Heading being different in a Section than in a Card. You can also customize via simple props. diff --git a/src/content/pages/overview/theming.mdx b/src/content/pages/overview/theming.mdx deleted file mode 100644 index 2bfc03a4b..000000000 --- a/src/content/pages/overview/theming.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -_layout: PostLayout -settings: components ---- - -import Link from 'fulldev-ui/components/Link.astro' - -# Theming - -## Colors - -The color theme is inspired by / compatible with Radix Colors. - -### Automatic setup - -With the fulldev-ui integration you can easily set a theme and generate a radix color palette. See the integration page for details. - -### Manual setup - -You can define a `base` and a `brand` theme, both with 12 steps and 1 contrast step for text on step 9. For a detailed explenation see this page. - -```css -:root, -.theme-light { - --base-1: ; - --base-2: ; - --base-3: ; - --base-4: ; - --base-5: ; - --base-6: ; - --base-7: ; - --base-8: ; - --base-9: ; - --base-10: ; - --base-11: ; - --base-12: ; - --base-contrast: ; - - --brand-1: ; - --brand-2: ; - --brand-3: ; - --brand-4: ; - --brand-5: ; - --brand-6: ; - --brand-7: ; - --brand-8: ; - --brand-9: ; - --brand-10: ; - --brand-11: ; - --brand-12: ; - --brand-contrast: ; -} -``` - -### Dark theme - -Dark mode is set via a simple `.theme-dark` class. - -If you want to use a dark theme by default, remove the `:root` selector from the light theme and add it to the dark theme. - -Components in Fulldev UI that support theme switching have the `theme` prop available, which adds either the `theme-dark` or `theme-light` class - -```css -.theme-dark { - /* Same variables here as above */ -} -``` - -## Radius - -The `--border-radius` variable is a multiplier applied to all radius values. The default value is `1`. - -```css -:root { - --border-radius: 1; -} -``` - -## Other - -Since Fulldev UI uses just regular CSS with low specificity, you can customize anything else using custom CSS. - -We plan to add more customization via variables later. diff --git a/src/content/pages/showcase.mdx b/src/content/pages/showcase.mdx index 76d4a3cfb..a5be8f421 100644 --- a/src/content/pages/showcase.mdx +++ b/src/content/pages/showcase.mdx @@ -1,62 +1,30 @@ --- -showcase: - # Add your project here below 👇 - - - heading: Van Dillen Antieke Bouwmaterialen - image: /showcase/van-dillen-antieke-bouwmaterialen.webp - href: 'https://vdabouwmaterialen.nl' - - heading: Anti Slip Profiles - image: /showcase/anti-slip-profiles.webp - href: 'https://antislipprofiles.com' - - heading: Fulldev UI - image: /showcase/fulldev-ui.webp - href: 'https://ui.full.dev' - - heading: The Gym Haren - image: /showcase/the-gym-haren.webp - href: 'https://thegymharen.nl' - - heading: Lavis Detailing - image: /showcase/lavis-detailing.webp - href: 'https://lavisdetailing.nl' - - heading: Leren Trainingsacteren - image: /showcase/leren-trainingsacteren.webp - href: 'https://lerentrainingsacteren.nl' - - heading: Miele Witgoedcenter Amsterdam - image: /showcase/miele-witgoedcenter-amsterdam.webp - href: 'https://witgoedcenteramsterdam.nl' - - heading: Sloepverhuur Bolsward - image: /showcase/sloepverhuur-bolsward.webp - href: 'https://sloepverhuurbolsward.nl' - - heading: Stark Vulcanising Products - image: /showcase/stark-vulcanising-products.webp - -_layout: PostLayout -settings: components +title: Showcase --- -import Masonry from 'fulldev-ui/components/Masonry.astro' -import Card from 'fulldev-ui/components/Card.astro' +import Card from 'fulldev-ui/structures/Card.astro' +import { getCollection } from 'astro:content' + +export const projects = ( + await getCollection( + 'pages', + ({ slug }) => slug.startsWith('showcase') && slug !== 'showcase' + ) +).map((p) => p.data) # Showcase Projects that are built with Fulldev UI. - - - {frontmatter.showcase.map((showcase) => ( - - ))} - diff --git a/src/content/pages/structure/_row.mdx b/src/content/pages/structure/_row.mdx deleted file mode 100644 index 6eee78f5d..000000000 --- a/src/content/pages/structure/_row.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -_layout: BlockLayout -title: Row -description: Structures children in a horizontal row. This component sizes dynamically, the margin between a heading and a paragraph is smaller than the margin between a paragraph an image. ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Row from 'fulldev-ui/components/Row.astro' ---- - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/_wrap.mdx b/src/content/pages/structure/_wrap.mdx deleted file mode 100644 index 978414a38..000000000 --- a/src/content/pages/structure/_wrap.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Wrap -description: Structures children onto one line or can wrap onto multiple lines. ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Wrap from 'fulldev-ui/components/Wrap.astro' ---- - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/carousel.mdx b/src/content/pages/structure/carousel.mdx deleted file mode 100644 index 33c3b6fb5..000000000 --- a/src/content/pages/structure/carousel.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Carousel ---- - -```astro live ---- -import Carousel from 'fulldev-ui/components/Carousel.astro' -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/column.mdx b/src/content/pages/structure/column.mdx deleted file mode 100644 index da37a9380..000000000 --- a/src/content/pages/structure/column.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Column ---- - -```astro live ---- -import Column from 'fulldev-ui/components/Column.astro' -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/grid.mdx b/src/content/pages/structure/grid.mdx deleted file mode 100644 index c0a330a1a..000000000 --- a/src/content/pages/structure/grid.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Grid ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Grid from 'fulldev-ui/components/Grid.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/masonry.mdx b/src/content/pages/structure/masonry.mdx deleted file mode 100644 index a458b7a8d..000000000 --- a/src/content/pages/structure/masonry.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Masonry ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Masonry from 'fulldev-ui/components/Masonry.astro' -import Section from 'fulldev-ui/components/Section.astro' ---- - - - - - - - - - - - - - - - - - - -``` diff --git a/src/content/pages/structure/split.mdx b/src/content/pages/structure/split.mdx deleted file mode 100644 index fcb8a10e4..000000000 --- a/src/content/pages/structure/split.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Split ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Split from 'fulldev-ui/components/Split.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/spread.mdx b/src/content/pages/structure/spread.mdx deleted file mode 100644 index 5f152608f..000000000 --- a/src/content/pages/structure/spread.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Spread ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Spread from 'fulldev-ui/components/Spread.astro' ---- - - - - - - - -``` diff --git a/src/content/pages/structure/stack.mdx b/src/content/pages/structure/stack.mdx deleted file mode 100644 index 505dfd082..000000000 --- a/src/content/pages/structure/stack.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -_layout: BlockLayout -settings: components - -title: Stack ---- - -```astro live ---- -import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Stack from 'fulldev-ui/components/Stack.astro' ---- - - - - - - - - -``` diff --git a/src/content/pages/typography/heading.mdx b/src/content/pages/typography/heading.mdx deleted file mode 100644 index e87c82ca6..000000000 --- a/src/content/pages/typography/heading.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Heading ---- - -# Heading - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -``` - -## Props - - - -## Examples - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Heading from 'fulldev-ui/components/Heading.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` diff --git a/src/content/pages/typography/link.mdx b/src/content/pages/typography/link.mdx deleted file mode 100644 index c51412579..000000000 --- a/src/content/pages/typography/link.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Link ---- - -# Link - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -``` - -## Props - - - -## Examples - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -``` - -```astro live ---- -import Link from 'fulldev-ui/components/Link.astro' ---- - -Link -Link -``` diff --git a/src/content/pages/typography/list.mdx b/src/content/pages/typography/list.mdx deleted file mode 100644 index a36aeb554..000000000 --- a/src/content/pages/typography/list.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: List ---- - -# List - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - -``` - -## Props - - - -## Examples - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - - -``` - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - -``` - -```astro live ---- -import List from 'fulldev-ui/components/List.astro' ---- - - - -``` diff --git a/src/content/pages/typography/text.mdx b/src/content/pages/typography/text.mdx deleted file mode 100644 index e3cbbc4cd..000000000 --- a/src/content/pages/typography/text.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -_layout: ComponentLayout -settings: components - -title: Text ---- - -# Text - -import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro' - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -``` - -## Props - - - -## Examples - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -The quick brown fox jumps over the lazy dog -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` - -```astro live ---- -import Text from 'fulldev-ui/components/Text.astro' ---- - -The quick brown fox jumps -The quick brown fox jumps -``` diff --git a/src/content/records/record.yml b/src/content/records/record.yml deleted file mode 100644 index d99e1b8f7..000000000 --- a/src/content/records/record.yml +++ /dev/null @@ -1 +0,0 @@ -title: Test diff --git a/src/content/settings/base.yml b/src/content/settings/base.yml deleted file mode 100644 index 265bdfa5e..000000000 --- a/src/content/settings/base.yml +++ /dev/null @@ -1,63 +0,0 @@ -seo: - image: /images/og-image.png - -code: - head: | - - -header: - heading: Fulldev UI - variant: base - links: - - text: Docs - href: /overview/introduction - - text: Components - href: /typography/heading - - text: Blocks - href: /blocks - - text: Showcase - href: /showcase - search: - icon: search - variant: soft - buttons: - - href: https://github.com/fulldotdev/ui - target: _blank - aria-label: GitHub - icon: brand-github - - href: https://discord.gg/vXZqMbadm8 - target: _blank - aria-label: Discord - icon: brand-discord - drawer: - - links: - - text: Docs - href: /overview/introduction - - text: Components - href: /typography/heading - - text: Blocks - href: /blocks - - heading: Overview - links: - - text: Introduction - href: /overview/introduction - - text: Installation - href: /overview/installation - - text: Integration - href: /overview/integration - - text: Theming - href: /overview/theming - - text: Frameworks - href: /overview/frameworks - - text: Showcase - href: /showcase - - heading: Typography - folder: typography - - heading: Base - folder: base - - heading: Structure - folder: structure diff --git a/src/content/settings/components.yml b/src/content/settings/components.yml deleted file mode 100644 index d26552028..000000000 --- a/src/content/settings/components.yml +++ /dev/null @@ -1,29 +0,0 @@ -sidebar: - - heading: Overview - links: - - text: Introduction - href: /overview/introduction - - text: Installation - href: /overview/installation - - text: Integration - href: /overview/integration - - text: Theming - href: /overview/theming - - text: Frameworks - href: /overview/frameworks - - text: Showcase - href: /showcase - - heading: Typography - folder: typography - - heading: Base - folder: base - - heading: Structure - folder: structure - -toc: - - heading: On this page - links: - - text: Props - href: /overview/introduction - - text: Examples - href: /overview/installation diff --git a/src/css/color.css b/src/css/color.css deleted file mode 100644 index 98636e1dc..000000000 --- a/src/css/color.css +++ /dev/null @@ -1,168 +0,0 @@ -.theme-light, -.theme-light * { - color-scheme: light; -} - -.theme-dark, -.theme-dark * { - color-scheme: dark; -} - -:where(:root), -:where(.theme-light), -:where(.theme-dark), -.color-base, -.color-base - *:where(:not([class*='color-']):not(.color-base [class*='color-'] *)) { - --color-1: var(--base-1); - --color-2: var(--base-2); - --color-3: var(--base-3); - --color-4: var(--base-4); - --color-5: var(--base-5); - --color-6: var(--base-6); - --color-7: var(--base-7); - --color-8: var(--base-8); - --color-9: var(--base-9); - --color-10: var(--base-10); - --color-11: var(--base-11); - --color-12: var(--base-12); - - --color-a1: var(--base-a1, var(--base-1)); - --color-a2: var(--base-a2, var(--base-2)); - --color-a3: var(--base-a3, var(--base-3)); - --color-a4: var(--base-a4, var(--base-4)); - --color-a5: var(--base-a5, var(--base-5)); - --color-a6: var(--base-a6, var(--base-6)); - --color-a7: var(--base-a7, var(--base-7)); - --color-a8: var(--base-a8, var(--base-8)); - --color-a9: var(--base-a9, var(--base-9)); - --color-a10: var(--base-a10, var(--base-10)); - --color-a11: var(--base-a11, var(--base-11)); - --color-a12: var(--base-a12, var(--base-12)); - - --color-contrast: var(--base-contrast); - --color-background: var(--base-background); -} - -.color-brand, -.color-brand - *:where(:not([class*='color-']):not(.color-brand [class*='color-'] *)) { - --color-1: var(--brand-1); - --color-2: var(--brand-2); - --color-3: var(--brand-3); - --color-4: var(--brand-4); - --color-5: var(--brand-5); - --color-6: var(--brand-6); - --color-7: var(--brand-7); - --color-8: var(--brand-8); - --color-9: var(--brand-9); - --color-10: var(--brand-10); - --color-11: var(--brand-11); - --color-12: var(--brand-12); - - --color-a1: var(--brand-a1, var(--brand-1)); - --color-a2: var(--brand-a2, var(--brand-2)); - --color-a3: var(--brand-a3, var(--brand-3)); - --color-a4: var(--brand-a4, var(--brand-4)); - --color-a5: var(--brand-a5, var(--brand-5)); - --color-a6: var(--brand-a6, var(--brand-6)); - --color-a7: var(--brand-a7, var(--brand-7)); - --color-a8: var(--brand-a8, var(--brand-8)); - --color-a9: var(--brand-a9, var(--brand-9)); - --color-a10: var(--brand-a10, var(--brand-10)); - --color-a11: var(--brand-a11, var(--brand-11)); - --color-a12: var(--brand-a12, var(--brand-12)); - - --color-contrast: var(--brand-contrast); - --color-background: var(--brand-background); -} - -.contrast, -.contrast * { - --color-9: var(--color-12); - --color-10: var(--color-12); - --color-11: var(--color-12); - --color-contrast: var(--color-1); -} - -/* :where(:root), -:where(.theme-light), -:where(.theme-dark), -:where(.color-base), -:where(.color-brand), -.variant-base, -.variant-base - *:not([class*='variant-']):not(.variant-base [class*='variant-'] *) { - --background: var(--color-background, var(--color-1)); - --background-hover: var(--color-1); - --background-active: var(--color-1); - --border: var(--color-6); - --border-hover: var(--color-6); - --text: var(--color-11); -} - -.variant-subtle, -.variant-subtle - *:not([class*='variant-']):not(.variant-subtle [class*='variant-'] *) { - --background: var(--color-2); - --background-hover: var(--color-2); - --background-active: var(--color-2); - --border: var(--color-6); - --border-hover: var(--color-6); - --text: var(--color-11); -} - -.variant-ghost, -.variant-ghost - *:not([class*='variant-']):not(.variant-ghost [class*='variant-'] *) { - --background: transparent; - --background-hover: var(--color-3); - --background-active: var(--color-4); - --border: transparent; - --border-hover: transparent; - --text: var(--color-11); -} - -.variant-outline, -.variant-outline - *:not([class*='variant-']):not(.variant-outline [class*='variant-'] *) { - --background: transparent; - --background-hover: var(--color-3); - --background-active: var(--color-5); - --border: var(--color-7); - --border-hover: var(--color-8); - --text: var(--color-11); -} - -.variant-soft, -.variant-soft - *:not([class*='variant-']):not(.variant-soft [class*='variant-'] *) { - --background: var(--color-3); - --background-hover: var(--color-4); - --background-active: var(--color-5); - --border: transparent; - --border-hover: transparent; - --text: var(--color-11); -} - -.variant-surface, -.variant-surface - *:not([class*='variant-']):not(.variant-surface [class*='variant-'] *) { - --background: var(--color-3); - --background-hover: var(--color-4); - --background-active: var(--color-5); - --border: var(--color-7); - --border-hover: var(--color-8); - --text: var(--color-11); -} - -.variant-solid, -.variant-solid - *:not([class*='variant-']):not(.variant-solid [class*='variant-'] *) { - --background: var(--color-9); - --background-hover: var(--color-10); - --background-active: var(--color-10); - --border: transparent; - --border-hover: transparent; - --text: var(--color-contrast); -} */ diff --git a/src/css/custom.css b/src/css/custom.css index 7966013c6..13cf57172 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1,69 +1,20 @@ -/* TODO: temporary decreased due to z-index issue over header */ -.hero:not(.window .hero)::before { - position: absolute; - top: 0; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.1), - #f500 70% - ); - width: 100%; - height: 100%; - content: ''; -} -/* .hero:not(.window .hero)::before { - position: absolute; - top: -80%; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.1), - #f500 90% - ); - width: 100%; - height: 170%; - content: ''; -} */ +@import url(https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900); -.header:not(.window .header) { - backdrop-filter: blur(10px); - border-color: var(--base-a6) !important; - background-color: rgba(17, 17, 16, 0.2) !important; +mark { + background-color: var(--brand-12) !important; + color: var(--brand-1) !important; } -.cta:not(.window .cta) { - backdrop-filter: blur(10px); - border-color: var(--base-a6) !important; - background-color: rgba(17, 17, 16, 0.2) !important; - overflow: visible; - - &::before { - position: absolute; - top: -30%; - left: 0; - z-index: -1; - background: radial-gradient( - ellipse closest-side, - rgba(255, 85, 0, 0.06), - #f500 90% - ); - width: 100%; - height: 160%; - content: ''; - } +.rounded-full { + border-radius: 999px !important; } -mark { - background-color: var(--brand-12) !important; - color: var(--brand-1) !important; +.hero .heading, +.hero .lead { + max-width: 680px; + text-wrap: balance; } -.astro-code { - border: 1px solid var(--base-6); - border-radius: var(--radius-2); - background-color: var(--base-2) !important; - padding: var(--space-5); +.logo .image { + border-radius: 2px; } diff --git a/src/css/size.css b/src/css/size.css deleted file mode 100644 index af17c5922..000000000 --- a/src/css/size.css +++ /dev/null @@ -1,130 +0,0 @@ -:root { - --space-sm-1: 4px; - --space-sm-2: 6px; - --space-sm-3: 8px; - --space-sm-4: 12px; - --space-sm-5: 20px; - --space-sm-6: 40px; - --space-sm-7: 60px; - - --space-md-1: 5px; - --space-md-2: 8px; - --space-md-3: 11px; - --space-md-4: 14px; - --space-md-5: 28px; - --space-md-6: 56px; - --space-md-7: 84px; - - --space-lg-1: 6px; - --space-lg-2: 10px; - --space-lg-3: 14px; - --space-lg-4: 18px; - --space-lg-5: 36px; - --space-lg-6: 72px; - --space-lg-7: 120px; - - --text-sm-1: 12px; - --text-sm-2: 14px; - --text-sm-3: 14px; - --text-sm-4: 16px; - --text-sm-5: 18px; - --text-sm-6: 20px; - --text-sm-7: 24px; - --text-sm-8: 30px; - - --text-md-1: 12px; - --text-md-2: 14px; - --text-md-3: 16px; - --text-md-4: 18px; - --text-md-5: 20px; - --text-md-6: 24px; - --text-md-7: 30px; - --text-md-8: 36px; - - --text-lg-1: 14px; - --text-lg-2: 14px; - --text-lg-3: 18px; - --text-lg-4: 20px; - --text-lg-5: 24px; - --text-lg-6: 30px; - --text-lg-7: 36px; - --text-lg-8: 48px; -} - -@media (min-width: 768px) { - :root { - --text-sm-8: 36px; - --text-md-8: 48px; - --text-lg-8: 60px; - } -} - -.size-sm { - --space-1: var(--space-sm-1); - --space-2: var(--space-sm-2); - --space-3: var(--space-sm-3); - --space-4: var(--space-sm-4); - --space-5: var(--space-sm-5); - --space-6: var(--space-sm-6); - --space-7: var(--space-sm-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-sm-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-sm-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-sm-3)); - - --text-1: var(--text-sm-1); - --text-2: var(--text-sm-2); - --text-3: var(--text-sm-3); - --text-4: var(--text-sm-4); - --text-5: var(--text-sm-5); - --text-6: var(--text-sm-6); - --text-7: var(--text-sm-7); - --text-8: var(--text-sm-8); -} - -:root, -.size-md { - --space-1: var(--space-md-1); - --space-2: var(--space-md-2); - --space-3: var(--space-md-3); - --space-4: var(--space-md-4); - --space-5: var(--space-md-5); - --space-6: var(--space-md-6); - --space-7: var(--space-md-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-md-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-md-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-md-3)); - - --text-1: var(--text-md-1); - --text-2: var(--text-md-2); - --text-3: var(--text-md-3); - --text-4: var(--text-md-4); - --text-5: var(--text-md-5); - --text-6: var(--text-md-6); - --text-7: var(--text-md-7); - --text-8: var(--text-md-8); -} - -.size-lg { - --space-1: var(--space-lg-1); - --space-2: var(--space-lg-2); - --space-3: var(--space-lg-3); - --space-4: var(--space-lg-4); - --space-5: var(--space-lg-5); - --space-6: var(--space-lg-6); - --space-7: var(--space-lg-7); - - --radius-1: calc(var(--border-radius, 1) * var(--space-lg-1)); - --radius-2: calc(var(--border-radius, 1) * var(--space-lg-2)); - --radius-3: calc(var(--border-radius, 1) * var(--space-lg-3)); - - --text-1: var(--text-lg-1); - --text-2: var(--text-lg-2); - --text-3: var(--text-lg-3); - --text-4: var(--text-lg-4); - --text-5: var(--text-lg-5); - --text-6: var(--text-lg-6); - --text-7: var(--text-lg-7); - --text-8: var(--text-lg-8); -} diff --git a/src/css/space.css b/src/css/space.css deleted file mode 100644 index 46e44de34..000000000 --- a/src/css/space.css +++ /dev/null @@ -1,85 +0,0 @@ -.root + .root, -.root + .box, -.root + .masonry, -.root + .carousel, -.image + .root, -.icon + .root { - --space-auto: var(--space-6); -} - -.root + .group, -.root + .row, -.root + .wrap, -.root + .button, -.root + .price, -.root + .switch { - --space-auto: var(--space-5); -} - -.card - :is( - .root + .root, - .root + .box, - .root + .masonry, - .root + .carousel, - .image + .root, - .icon + .root, - .root + .group, - .root + .row, - .root + .wrap, - .root + .button, - .root + .price, - .root + .switch - ) { - --space-auto: var(--space-4); -} - -.root + .heading, -.root + .link, -.root + .paragraph, -.root + .text, -.root + .tagline, -.root + .input, -.root + .textarea, -.root + .select, -.root + .badge, -.root + .rating { - --space-auto: var(--space-4); -} - -.paragraph + .paragraph, -.text + .text, -.button + .button, -.input + .button { - --space-auto: var(--space-3); -} - -.root + .label, -.label + .input, -.label + .textarea, -.label + .select, -.icon + .icon { - --space-auto: var(--space-2); -} - -.rating + .text, -.text + .rating { - --space-auto: var(--space-1); -} - -.image + .root, -.icon + .root { - --space-auto: var(--space-6); -} - -.link + .heading { - --space-auto: var(--space-5); -} - -/* // .button:not(.variant-link) + .button:not(.variant-link) { -// margin-top: var(--space-3); -// } - -// .variant-link + .variant-link{ -// margin-top: var(--space-2); -// } */ diff --git a/src/css/styles.css b/src/css/styles.css deleted file mode 100644 index ca253ac1e..000000000 --- a/src/css/styles.css +++ /dev/null @@ -1,15 +0,0 @@ -@import url(https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900); - -:root, -.root { - --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.15s; - - --font-family: 'Inter', sans-serif; - --font-weight: 400; - - --text-heading-font-family: var(--font-family); - --text-heading-font-weight: 700; - - --button-font-family: var(--font-family); - --button-font-weight: 500; -} diff --git a/src/css/theme.css b/src/css/theme.css new file mode 100644 index 000000000..0e8cb8688 --- /dev/null +++ b/src/css/theme.css @@ -0,0 +1,62 @@ +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 0 0% 100%; + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + --ring: 20 14.3% 4.1%; + --radius: 0.5rem; + --chart-1: 12 76% 61%; + --chart-2: 173 58% 39%; + --chart-3: 197 37% 24%; + --chart-4: 43 74% 66%; + --chart-5: 27 87% 67%; + } + + .dark { + --background: 20 14.3% 4.1%; + --foreground: 60 4.8% 95.9%; + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 0 0% 100%; + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + --ring: 24 5.7% 82.9%; + --chart-1: 220 70% 50%; + --chart-2: 160 60% 45%; + --chart-3: 30 80% 55%; + --chart-4: 280 65% 60%; + --chart-5: 340 75% 55%; + + color-scheme: dark; + } +} + +.astro-code { + @apply mt-4 rounded-md p-4 text-sm first:mt-0; +} diff --git a/src/env.d.ts b/src/env.d.ts index 5b0a7e0c5..55722dadf 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,2 +1,3 @@ /// -/// \ No newline at end of file +/// +/// diff --git a/src/integration/generate-colors.ts b/src/integration/generate-colors.ts deleted file mode 100644 index 97d77b692..000000000 --- a/src/integration/generate-colors.ts +++ /dev/null @@ -1,637 +0,0 @@ -import * as RadixColors from '@radix-ui/colors' -import BezierEasing from 'bezier-easing' -import Color from 'colorjs.io' - -type ArrayOf12 = [T, T, T, T, T, T, T, T, T, T, T, T] -const arrayOf12 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] as const - -// prettier-ignore -const grayScaleNames = ['gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const; - -// prettier-ignore -const scaleNames = [...grayScaleNames, 'tomato', 'red', 'ruby', 'crimson', 'pink', -'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', -'grass', 'brown', 'orange', 'sky', 'mint', 'lime', 'yellow', 'amber'] as const; - -const lightColors = Object.fromEntries( - scaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}P3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof scaleNames)[number], ArrayOf12> - -const darkColors = Object.fromEntries( - scaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}DarkP3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof scaleNames)[number], ArrayOf12> - -const lightGrayColors = Object.fromEntries( - grayScaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}P3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof grayScaleNames)[number], ArrayOf12> - -const darkGrayColors = Object.fromEntries( - grayScaleNames.map((scaleName) => [ - scaleName, - Object.values(RadixColors[`${scaleName}DarkP3`]).map((str) => - new Color(str).to('oklch') - ), - ]) -) as Record<(typeof grayScaleNames)[number], ArrayOf12> - -export const generateRadixColors = ({ - appearance, - ...args -}: { - appearance: 'light' | 'dark' - accent: string - gray: string - background: string -}) => { - const allScales = appearance === 'light' ? lightColors : darkColors - const grayScales = appearance === 'light' ? lightGrayColors : darkGrayColors - const backgroundColor = new Color(args.background).to('oklch') - - const grayBaseColor = new Color(args.gray).to('oklch') - const grayScaleColors = getScaleFromColor( - grayBaseColor, - grayScales, - backgroundColor - ) - - const accentBaseColor = new Color(args.accent).to('oklch') - - let accentScaleColors = getScaleFromColor( - accentBaseColor, - allScales, - backgroundColor - ) - - // Enforce srgb for the background color - const backgroundHex = backgroundColor.to('srgb').toString({ format: 'hex' }) - - // Make sure we use the tint from the gray scale for when base is pure white or black - const accentBaseHex = accentBaseColor.to('srgb').toString({ format: 'hex' }) - if (accentBaseHex === '#000' || accentBaseHex === '#fff') { - accentScaleColors = grayScaleColors.map((color) => - color.clone() - ) as ArrayOf12 - } - - const [accent9Color, accentContrastColor] = getStep9Colors( - accentScaleColors, - accentBaseColor - ) - - accentScaleColors[8] = accent9Color - accentScaleColors[9] = getButtonHoverColor(accent9Color, [accentScaleColors]) - - // Limit saturation of the text colors - accentScaleColors[10].coords[1] = Math.min( - Math.max(accentScaleColors[8].coords[1], accentScaleColors[7].coords[1]), - accentScaleColors[10].coords[1] - ) - accentScaleColors[11].coords[1] = Math.min( - Math.max(accentScaleColors[8].coords[1], accentScaleColors[7].coords[1]), - accentScaleColors[11].coords[1] - ) - - const accentScaleHex = accentScaleColors.map((color) => - color.to('srgb').toString({ format: 'hex' }) - ) as ArrayOf12 - - const accentScaleWideGamut = accentScaleColors.map( - toOklchString - ) as ArrayOf12 - - const accentScaleAlphaHex = accentScaleHex.map((color) => - getAlphaColorSrgb(color, backgroundHex) - ) as ArrayOf12 - - const accentScaleAlphaWideGamutString = accentScaleHex.map((color) => - getAlphaColorP3(color, backgroundHex) - ) as ArrayOf12 - - const accentContrastColorHex = accentContrastColor - .to('srgb') - .toString({ format: 'hex' }) - - const grayScaleHex = grayScaleColors.map((color) => - color.to('srgb').toString({ format: 'hex' }) - ) as ArrayOf12 - - const grayScaleWideGamut = grayScaleColors.map( - toOklchString - ) as ArrayOf12 - - const grayScaleAlphaHex = grayScaleHex.map((color) => - getAlphaColorSrgb(color, backgroundHex) - ) as ArrayOf12 - - const grayScaleAlphaWideGamutString = grayScaleHex.map((color) => - getAlphaColorP3(color, backgroundHex) - ) as ArrayOf12 - - const accentSurfaceHex = - appearance === 'light' - ? getAlphaColorSrgb(accentScaleHex[1], backgroundHex, 0.8) - : getAlphaColorSrgb(accentScaleHex[1], backgroundHex, 0.5) - - const accentSurfaceWideGamutString = - appearance === 'light' - ? getAlphaColorP3(accentScaleWideGamut[1], backgroundHex, 0.8) - : getAlphaColorP3(accentScaleWideGamut[1], backgroundHex, 0.5) - - return { - accentScale: accentScaleHex, - accentScaleAlpha: accentScaleAlphaHex, - accentScaleWideGamut: accentScaleWideGamut, - accentScaleAlphaWideGamut: accentScaleAlphaWideGamutString, - accentContrast: accentContrastColorHex, - - grayScale: grayScaleHex, - grayScaleAlpha: grayScaleAlphaHex, - grayScaleWideGamut: grayScaleWideGamut, - grayScaleAlphaWideGamut: grayScaleAlphaWideGamutString, - - graySurface: appearance === 'light' ? '#ffffffcc' : 'rgba(0, 0, 0, 0.05)', - graySurfaceWideGamut: - appearance === 'light' - ? 'color(display-p3 1 1 1 / 80%)' - : 'color(display-p3 0 0 0 / 5%)', - - accentSurface: accentSurfaceHex, - accentSurfaceWideGamut: accentSurfaceWideGamutString, - - background: backgroundHex, - } -} - -function getStep9Colors( - scale: ArrayOf12, - accentBaseColor: Color -): [Color, Color] { - const referenceBackgroundColor = scale[0] - const distance = accentBaseColor.deltaEOK(referenceBackgroundColor) * 100 - - // If the accent base color is close to the page background color, it's likely - // white on white or black on black, so we want to return something that makes sense instead - if (distance < 25) { - return [scale[8], getTextColor(scale[8])] - } - - return [accentBaseColor, getTextColor(accentBaseColor)] -} - -function getButtonHoverColor(source: Color, scales: ArrayOf12[]) { - const [L, C, H] = source.coords - const newL = L > 0.4 ? L - 0.03 / (L + 0.1) : L + 0.03 / (L + 0.1) - const newC = L > 0.4 && !isNaN(H) ? C * 0.93 + 0 : C - const buttonHoverColor = new Color('oklch', [newL, newC, H]) - - // Find closest in-scale color to donate the chroma and hue. - // Especially useful when the source color is pure white or black, - // but the gray scale is tinted. - let closestColor = buttonHoverColor - let minDistance = Infinity - - scales.forEach((scale) => { - for (const color of scale) { - const distance = buttonHoverColor.deltaEOK(color) - if (distance < minDistance) { - minDistance = distance - closestColor = color - } - } - }) - - buttonHoverColor.coords[1] = closestColor.coords[1] - buttonHoverColor.coords[2] = closestColor.coords[2] - return buttonHoverColor -} - -function getScaleFromColor( - source: Color, - scales: Record>, - backgroundColor: Color -) { - let allColors: { scale: string; color: Color; distance: number }[] = [] - - Object.entries(scales).forEach(([name, scale]) => { - for (const color of scale) { - const distance = source.deltaEOK(color) - allColors.push({ scale: name, distance, color }) - } - }) - - allColors.sort((a, b) => a.distance - b.distance) - - // Remove non-unique scales - let closestColors = allColors.filter( - (color, i, arr) => - i === arr.findIndex((value) => value.scale === color.scale) - ) - - // If the next two closest colors are both grays, remove the second one until it’s not a gray anymore. - // This is because up next we will be comparing how close the two closest colors are to the source color, - // and since the grays are all extremely close to each other, we won’t get any useful data from the second - // closest color if it’s also a gray. - const grayScaleNamesStr = grayScaleNames as readonly string[] - const allAreGrays = closestColors.every((color) => - grayScaleNamesStr.includes(color.scale) - ) - if (!allAreGrays && grayScaleNamesStr.includes(closestColors[0].scale)) { - while (grayScaleNamesStr.includes(closestColors[1].scale)) { - closestColors.splice(1, 1) - } - } - - let colorA = closestColors[0] - let colorB = closestColors[1] - - // Light trigonometry ahead. - // - // We want to determine the color that is the closest to the source color. Sometimes it makes sense - // to proportionally mix the two closest colors together, but sometimes it is not useful at all. - // Color coords are spatial in 3D, however we can treat the data we have as a 2D projection that is good enough. - // - // Case 1: - // If the distances between the source color, the 1st closest color (A) and the 2nd closest color (B) form - // a triangle where NEITHER angle A nor B are larger than 90 degrees, then we want to mix the 1st and the 2nd - // closest colors in the same proportion as distances AD and BD are to each other. Mixing the two would result - // in a color that would be closer to the source color than either of the two original closest colors. - // Example: source color is a desaturated blue, which is between "indigo" and "slate" scales. - // - // C ← Source color - // /|⟍ - // / | ⟍ - // b / | ⟍ a - // / | ⟍ - // / | ⟍ - // A --- D -------- B - // ↑ - // The color we want to use as the base, which is a mix of A and B. - // - // Case 2: - // If the distances between the source color, the 1st closest color (A) and the 2nd closest color (B) form - // a triangle where EITHER angle A or B are larger than 90 degrees, then we don’t care about point B because it’s - // directionally the same as A, as mixing A and B can’t provide us with a color that is any closer to the source. - // Example: source color is a saturated blue, with "blue" being the closest scale, and "indigo" just being further. - // - // C ← Source color - // \⟍ - // \ ⟍ - // \ ⟍ a - // b \ ⟍ - // \ ⟍ - // A ------- B - // ↑ - // The color we want to use as the base, which is not influenced by B. - - // We’ll need all the lengths of the triangle sides, named after the angles they look at: - const a = colorB.distance - const b = colorA.distance - const c = colorA.color.deltaEOK(colorB.color) - - // We can get the ratios of AD to BD lengths with trigonometry using tangents, - // as the ratio of the tangents of the opposite angles will match. - const cosA = (b ** 2 + c ** 2 - a ** 2) / (2 * b * c) - const radA = Math.acos(cosA) - const sinA = Math.sin(radA) - - const cosB = (a ** 2 + c ** 2 - b ** 2) / (2 * a * c) - const radB = Math.acos(cosB) - const sinB = Math.sin(radB) - - // Tangent of angle C in the ACD triangle - const tanC1 = cosA / sinA - - // Tangent of angle C in the BCD triangle - const tanC2 = cosB / sinB - - // The ratio of the tangents corresponds to the ratio of the distances AD to BD - // In the end, it means how much of scale B we want to mix into scale A. - // If it’s "0" or less, this is an obtuse triangle from case 2, and we use just scale A. - const ratio = Math.max(0, tanC1 / tanC2) * 0.5 - - // The base scale is going to be a mix of the two closest scales, with the mix ratio we determined before - const scaleA = scales[colorA.scale] - const scaleB = scales[colorB.scale] - const scale = arrayOf12.map((i) => - new Color(Color.mix(scaleA[i], scaleB[i], ratio)).to('oklch') - ) as ArrayOf12 - - // Get the closest color from the pre-mixed scale we created - const baseColor = scale - .slice() - .sort((a, b) => source.deltaEOK(a) - source.deltaEOK(b))[0] - - // Note the chroma difference between the source color and the base color - const ratioC = source.coords[1] / baseColor.coords[1] - - // Modify hue and chroma of the scale to match the source color - scale.forEach((color) => { - color.coords[1] = Math.min(source.coords[1] * 1.5, color.coords[1] * ratioC) - color.coords[2] = source.coords[2] - }) - - // Light mode - if (scale[0].coords[0] > 0.5) { - const lightnessScale = scale.map(({ coords }) => coords[0]) - const backgroundL = Math.max(0, Math.min(1, backgroundColor.coords[0])) - const newLightnessScale = transposeProgressionStart( - backgroundL, - // Add white as the first "step" of the light scale - [1, ...lightnessScale], - lightModeEasing - ) - - // Remove the step we added - newLightnessScale.shift() - - newLightnessScale.forEach((lightness, i) => { - scale[i].coords[0] = lightness - }) - - return scale - } - - // Dark mode - let ease: typeof darkModeEasing = [...darkModeEasing] - const referenceBackgroundColorL = scale[0].coords[0] - const backgroundColorL = Math.max(0, Math.min(1, backgroundColor.coords[0])) - - // If background is lighter than step 0, we want to gradually change the easing to linear - const ratioL = backgroundColorL / referenceBackgroundColorL - - if (ratioL > 1) { - const maxRatio = 1.5 - - for (let i = 0; i < ease.length; i++) { - const metaRatio = (ratioL - 1) * (maxRatio / (maxRatio - 1)) - ease[i] = ratioL > maxRatio ? 0 : Math.max(0, ease[i] * (1 - metaRatio)) - } - } - - const lightnessScale = scale.map(({ coords }) => coords[0]) - const backgroundL = backgroundColor.coords[0] - const newLightnessScale = transposeProgressionStart( - backgroundL, - lightnessScale, - ease - ) - - newLightnessScale.forEach((lightness, i) => { - scale[i].coords[0] = lightness - }) - - return scale -} - -function getTextColor(background: Color) { - const white = new Color('oklch', [1, 0, 0]) - - if (Math.abs(white.contrastAPCA(background)) < 40) { - const [C, H] = background.coords - return new Color('oklch', [0.25, Math.max(0.08 * C, 0.04), H]) - } - - return white -} - -// target = background * (1 - alpha) + foreground * alpha -// alpha = (target - background) / (foreground - background) -// Expects 0-1 numbers for the RGB channels -function getAlphaColor( - targetRgb: number[], - backgroundRgb: number[], - rgbPrecision: number, - alphaPrecision: number, - targetAlpha?: number -) { - const [tr, tg, tb] = targetRgb.map((c) => Math.round(c * rgbPrecision)) - const [br, bg, bb] = backgroundRgb.map((c) => Math.round(c * rgbPrecision)) - - if ( - tr === undefined || - tg === undefined || - tb === undefined || - br === undefined || - bg === undefined || - bb === undefined - ) { - throw Error('Color is undefined') - } - - // Is the background color lighter, RGB-wise, than target color? - // Decide whether we want to add as little color or as much color as possible, - // darkening or lightening the background respectively. - // If at least one of the bits of the target RGB value - // is lighter than the background, we want to lighten it. - let desiredRgb = 0 - if (tr > br) { - desiredRgb = rgbPrecision - } else if (tg > bg) { - desiredRgb = rgbPrecision - } else if (tb > bb) { - desiredRgb = rgbPrecision - } - - const alphaR = (tr - br) / (desiredRgb - br) - const alphaG = (tg - bg) / (desiredRgb - bg) - const alphaB = (tb - bb) / (desiredRgb - bb) - - const isPureGray = [alphaR, alphaG, alphaB].every((alpha) => alpha === alphaR) - - // No need for precision gymnastics with pure grays, and we can get cleaner output - if (!targetAlpha && isPureGray) { - // Convert back to 0-1 values - const V = desiredRgb / rgbPrecision - return [V, V, V, alphaR] as const - } - - const clampRgb = (n: number) => - isNaN(n) ? 0 : Math.min(rgbPrecision, Math.max(0, n)) - const clampA = (n: number) => - isNaN(n) ? 0 : Math.min(alphaPrecision, Math.max(0, n)) - const maxAlpha = targetAlpha ?? Math.max(alphaR, alphaG, alphaB) - - const A = clampA(Math.ceil(maxAlpha * alphaPrecision)) / alphaPrecision - let R = clampRgb(((br * (1 - A) - tr) / A) * -1) - let G = clampRgb(((bg * (1 - A) - tg) / A) * -1) - let B = clampRgb(((bb * (1 - A) - tb) / A) * -1) - - R = Math.ceil(R) - G = Math.ceil(G) - B = Math.ceil(B) - - const blendedR = blendAlpha(R, A, br) - const blendedG = blendAlpha(G, A, bg) - const blendedB = blendAlpha(B, A, bb) - - // Correct for rounding errors in light mode - if (desiredRgb === 0) { - if (tr <= br && tr !== blendedR) { - R = tr > blendedR ? R + 1 : R - 1 - } - - if (tg <= bg && tg !== blendedG) { - G = tg > blendedG ? G + 1 : G - 1 - } - - if (tb <= bb && tb !== blendedB) { - B = tb > blendedB ? B + 1 : B - 1 - } - } - - // Correct for rounding errors in dark mode - if (desiredRgb === rgbPrecision) { - if (tr >= br && tr !== blendedR) { - R = tr > blendedR ? R + 1 : R - 1 - } - - if (tg >= bg && tg !== blendedG) { - G = tg > blendedG ? G + 1 : G - 1 - } - - if (tb >= bb && tb !== blendedB) { - B = tb > blendedB ? B + 1 : B - 1 - } - } - - // Convert back to 0-1 values - R = R / rgbPrecision - G = G / rgbPrecision - B = B / rgbPrecision - - return [R, G, B, A] as const -} - -// Important – I empirically discovered that this rounding is how the browser actually overlays -// transparent RGB bits over each other. It does NOT round the whole result altogether. -function blendAlpha( - foreground: number, - alpha: number, - background: number, - round = true -) { - if (round) { - return Math.round(background * (1 - alpha)) + Math.round(foreground * alpha) - } - - return background * (1 - alpha) + foreground * alpha -} - -function getAlphaColorSrgb( - targetColor: string, - backgroundColor: string, - targetAlpha?: number -) { - const [r, g, b, a] = getAlphaColor( - new Color(targetColor).to('srgb').coords, - new Color(backgroundColor).to('srgb').coords, - 255, - 255, - targetAlpha - ) - - return formatHex(new Color('srgb', [r, g, b], a).toString({ format: 'hex' })) -} - -function getAlphaColorP3( - targetColor: string, - backgroundColor: string, - targetAlpha?: number -) { - const [r, g, b, a] = getAlphaColor( - new Color(targetColor).to('p3').coords, - new Color(backgroundColor).to('p3').coords, - // Not sure why, but the resulting P3 alpha colors are blended in the browser most precisely when - // rounded to 255 integers too. Is the browser using 0-255 rather than 0-1 under the hood for P3 too? - 255, - 1000, - targetAlpha - ) - - return ( - new Color('p3', [r, g, b], a) - .toString({ precision: 4 }) - // Important: in non-browser environments colorjs.io outputs a different format for some reason - .replace('color(p3 ', 'color(display-p3 ') - ) -} - -// Format shortform hex to longform -function formatHex(str: string) { - if (!str.startsWith('#')) { - return str - } - - if (str.length === 4) { - const hash = str.charAt(0) - const r = str.charAt(1) - const g = str.charAt(2) - const b = str.charAt(3) - return hash + r + r + g + g + b + b - } - - if (str.length === 5) { - const hash = str.charAt(0) - const r = str.charAt(1) - const g = str.charAt(2) - const b = str.charAt(3) - const a = str.charAt(4) - return hash + r + r + g + g + b + b + a + a - } - - return str -} - -const darkModeEasing = [1, 0, 1, 0] as [number, number, number, number] -const lightModeEasing = [0, 2, 0, 2] as [number, number, number, number] - -export function transposeProgressionStart( - to: number, - arr: number[], - curve: [number, number, number, number] -) { - return arr.map((n, i, arr) => { - const lastIndex = arr.length - 1 - const diff = arr[0] - to - const fn = BezierEasing(...curve) - return n - diff * fn(1 - i / lastIndex) - }) -} - -export function transposeProgressionEnd( - to: number, - arr: number[], - curve: [number, number, number, number] -) { - return arr.map((n, i, arr) => { - const lastIndex = arr.length - 1 - const diff = arr[lastIndex] - to - const fn = BezierEasing(...curve) - return n - diff * fn(i / lastIndex) - }) -} - -// Convert to OKLCH string with percentage for the lightness channel -// https://github.com/radix-ui/themes/issues/420 -function toOklchString(color: Color) { - const L = +(color.coords[0] * 100).toFixed(1) - return color - .to('oklch') - .toString({ precision: 4 }) - .replace(/(\S+)(.+)/, `oklch(${L}%$2`) -} diff --git a/src/integration/index.ts b/src/integration/index.ts index d6e3de993..dfef10e5a 100644 --- a/src/integration/index.ts +++ b/src/integration/index.ts @@ -1,156 +1,182 @@ +import mdx from '@astrojs/mdx' +import sitemap from '@astrojs/sitemap' import type { AstroIntegration } from 'astro' -import merge from 'deepmerge' +import favicons from 'astro-favicons' +import liveCode from 'astro-live-code' +import robotsTxt from 'astro-robots-txt' +import { envField } from 'astro/config' +import fs from 'fs' +import yaml from 'js-yaml' +import path from 'path' +import { assign } from 'radash' +import tailwindcss from 'tailwindcss' +import tailwindcssNesting from 'tailwindcss/nesting' +import { loadEnv } from 'vite' import virtual from 'vite-plugin-virtual' -import { generateRadixColors } from './generate-colors' - -type Color = { - background: Parameters[0]['background'] - base: Parameters[0]['gray'] - brand: Parameters[0]['accent'] -} +import tailwindConfig from '../../tailwind.config.ts' interface Config { + favicon?: string + company?: string css?: string injectRoutes?: boolean - colors: { - theme: 'light' | 'dark' - light?: Color - dark?: Color + cloudcannon?: boolean + cart?: boolean + overrides?: { + [k: string]: string } } -const defaultConfig: Config = { - colors: { - theme: 'light', - light: { - background: '#fff', - base: '#000', - brand: '#000', - }, - }, -} export default function fulldevIntegration( - userConfig?: Partial + config: Partial | undefined ): AstroIntegration { - const config = merge(defaultConfig ?? {}, userConfig ?? {}) - return { name: '/integration', hooks: { 'astro:config:setup': async ({ - config: astroConfig, updateConfig, - injectScript, injectRoute, + injectScript, }) => { // ---------------------- - // Inject css + // Update config // ---------------------- - config?.css && injectScript('page-ssr', `import "${config?.css}";`) - - const generateCss = ( - defaultTheme: 'light' | 'dark', - theme: 'light' | 'dark', - color: Color - ) => { - const { background, base, brand } = color - const generated = generateRadixColors({ - background, - appearance: theme, - gray: base, - accent: brand, - }) - - const scaleToString = ( - scale: any, - palette: 'base' | 'brand', - alpha?: boolean - ) => - scale - .map( - (color: any, i: any) => - `--${palette}-${alpha ? 'a' : ''}${i + 1}: ${color};` - ) - .join('\n') - - const baseString = scaleToString(generated.grayScale, 'base', false) - const baseAlphaString = scaleToString( - generated.grayScaleAlpha, - 'base', - true - ) - const brandString = scaleToString( - generated.accentScale, - 'brand', - false - ) - const brandAlphaString = scaleToString( - generated.accentScaleAlpha, - 'brand', - true - ) - const brandContrastString = `--brand-contrast: ${generated.accentContrast};` - const baseContrastString = `--base-contrast: ${generated.accentContrast};` - const baseBackgroundString = `--base-background: ${generated.background};` - const brandBackgroundString = `--brand-background: ${generated.background};` - const colorSchemeString = `--color-scheme: ${theme};` - - const css = `${defaultTheme == theme ? ':root, ' : ''} .theme-${theme} { - ${baseString} - ${baseAlphaString} - ${baseContrastString} - ${baseBackgroundString} - ${brandString} - ${brandAlphaString} - ${brandContrastString} - ${brandBackgroundString} - ${colorSchemeString} - }` - return css - } - - const lightCss = - (config.colors.light && - generateCss(config.colors.theme, 'light', config.colors.light)) || - '' - const darkCss = - (config.colors.dark && - generateCss(config.colors.theme, 'dark', config.colors.dark)) || - '' - - const css = lightCss + '\n' + darkCss - updateConfig({ + site: loadEnv(process.env.NODE_ENV as any, process.cwd(), '').URL, + experimental: { + contentLayer: true, + env: { + schema: { + URL: envField.string({ + context: 'client', + access: 'public', + }), + STRIPE_RESTRICTED_KEY: envField.string({ + context: 'client', + access: 'public', + optional: true, + }), + STRIPE_SECRET_KEY: envField.string({ + context: 'server', + access: 'secret', + optional: true, + }), + }, + validateSecrets: true, + }, + }, + integrations: [ + mdx(), + sitemap(), + robotsTxt(), + liveCode({ + layout: '/src/structures/Code.astro', + }), + ], vite: { + resolve: { + alias: { + ...config?.overrides, + }, + }, plugins: [ virtual({ - 'virtual:astro/config': `export default ${JSON.stringify(astroConfig)}`, - 'virtual:fulldev-ui/config': `export default ${JSON.stringify(config)}`, - 'virtual:colors.css': css, + 'virtual:fulldev-ui/config': config ?? {}, }), ], css: { - preprocessorOptions: { - scss: { - api: 'modern', - }, + postcss: { + plugins: [tailwindcss(tailwindConfig), tailwindcssNesting], }, }, }, }) - injectScript('page-ssr', `import "virtual:colors.css";`) + // ---------------------- + // Inject Favicon + // ---------------------- + config?.favicon && + config?.company && + updateConfig({ + integrations: [ + favicons({ + path: 'favicon', + masterPicture: config.favicon, + appName: config.company, + appShortName: config.company, + appDescription: config.company, + }), + ], + }) // ---------------------- // Inject routes // ---------------------- - if (config.injectRoutes) { - const pages = import.meta.glob('/src/pages/**/*.astro') - !pages['/src/pages/[...page].astro'] && - injectRoute({ - pattern: '/[...page]', - entrypoint: 'fulldev-ui/[...page].astro', - }) + if (config?.injectRoutes) { + injectRoute({ + pattern: '/[...page]', + entrypoint: 'fulldev-ui/pages/[...page].astro', + }) + } + + // ---------------------- + // Inject css + // ---------------------- + config?.css && injectScript('page-ssr', `import "${config?.css}";`) + + // ---------------------- + // merge Cloudcannon configs + // ---------------------- + + // ---------------------- + // Generate image YAML files + // ---------------------- + // if (config.generateImageEntries) { + // const srcDir = path.join(process.cwd(), 'src') + // const filesDir = path.join(srcDir, 'images') + // const entriesDir = path.join(srcDir, 'content', 'images') + + // try { + // await fs.mkdir(filesDir, { recursive: true }) + // await fs.mkdir(entriesDir, { recursive: true }) + + // const files = await fs.readdir(filesDir) + // files.forEach(async (file) => { + // const filename = path.parse(file).name + // const yamlPath = path.join(entriesDir, `${filename}.yml`) + + // try { + // await fs.access(yamlPath) + // } catch { + // const yamlContent = yaml.dump({ + // alt: '', + // }) + // await fs.writeFile(yamlPath, yamlContent, 'utf8') + // } + // }) + // } catch (error) { + // console.error('Error generating image YAML files:', error) + // } + // } + }, + 'astro:build:done': async () => { + if (config?.cloudcannon) { + const __dirname = path.dirname(new URL(import.meta.url).pathname) + const libDir = path.join(__dirname, '../../cloudcannon.config.yml') + const userDir = path.join(process.cwd(), 'cloudcannon.config.yml') + + const libConfig = yaml.load( + fs.readFileSync(path.resolve(libDir), 'utf8') + ) + + const userConfig = yaml.load( + fs.readFileSync(path.resolve(userDir), 'utf8') + ) + + const mergedConfig = assign(libConfig || {}, userConfig || {}) + const yamlContent = yaml.dump(mergedConfig) + + await fs.promises.writeFile(userDir, yamlContent, 'utf8') } }, }, diff --git a/src/integration/tailwind-plugin.ts b/src/integration/tailwind-plugin.ts deleted file mode 100644 index 2c3ff6115..000000000 --- a/src/integration/tailwind-plugin.ts +++ /dev/null @@ -1,80 +0,0 @@ -import plugin from 'tailwindcss/plugin' - -export default plugin(() => {}, { - theme: { - spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', - }, - borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', - }, - fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', - }, - colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - }, - }, - }, -}) diff --git a/src/integration/unocss-preset.ts b/src/integration/unocss-preset.ts deleted file mode 100644 index 170ce7c3c..000000000 --- a/src/integration/unocss-preset.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { definePreset, presetUno } from 'unocss' - -export default definePreset(() => { - return { - name: 'fullUI', - presets: [presetUno()], - theme: { - spacing: { - 'space-1': 'var(--space-1)', - 'space-2': 'var(--space-2)', - 'space-3': 'var(--space-3)', - 'space-4': 'var(--space-4)', - 'space-5': 'var(--space-5)', - 'space-6': 'var(--space-6)', - 'space-7': 'var(--space-7)', - }, - borderRadius: { - 1: 'var(--radius-1)', - 2: 'var(--radius-2)', - 3: 'var(--radius-3)', - }, - fontSize: { - 1: 'var(--text-1)', - 2: 'var(--text-2)', - 3: 'var(--text-3)', - 4: 'var(--text-4)', - 5: 'var(--text-5)', - 6: 'var(--text-6)', - 7: 'var(--text-7)', - 8: 'var(--text-8)', - }, - colors: { - color: { - 1: 'var(--color-1)', - 2: 'var(--color-2)', - 3: 'var(--color-3)', - 4: 'var(--color-4)', - 5: 'var(--color-5)', - 6: 'var(--color-6)', - 7: 'var(--color-7)', - 8: 'var(--color-8)', - 9: 'var(--color-9)', - 10: 'var(--color-10)', - 11: 'var(--color-11)', - 12: 'var(--color-12)', - contrast: 'var(--color-contrast)', - background: 'var(--color-background)', - }, - base: { - 1: 'var(--color-base-1)', - 2: 'var(--color-base-2)', - 3: 'var(--color-base-3)', - 4: 'var(--color-base-4)', - 5: 'var(--color-base-5)', - 6: 'var(--color-base-6)', - 7: 'var(--color-base-7)', - 8: 'var(--color-base-8)', - 9: 'var(--color-base-9)', - 10: 'var(--color-base-10)', - 11: 'var(--color-base-11)', - 12: 'var(--color-base-12)', - contrast: 'var(--color-base-contrast)', - background: 'var(--color-base-background)', - }, - brand: { - 1: 'var(--color-brand-1)', - 2: 'var(--color-brand-2)', - 3: 'var(--color-brand-3)', - 4: 'var(--color-brand-4)', - 5: 'var(--color-brand-5)', - 6: 'var(--color-brand-6)', - 7: 'var(--color-brand-7)', - 8: 'var(--color-brand-8)', - 9: 'var(--color-brand-9)', - 10: 'var(--color-brand-10)', - 11: 'var(--color-brand-11)', - 12: 'var(--color-brand-12)', - contrast: 'var(--color-brand-contrast)', - background: 'var(--color-brand-background)', - }, - }, - }, - } -}) diff --git a/src/layouts/BlockLayout.astro b/src/layouts/BlockLayout.astro deleted file mode 100644 index 525bca33b..000000000 --- a/src/layouts/BlockLayout.astro +++ /dev/null @@ -1,24 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Intro from 'fulldev-ui/blocks/Intro.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { Content } = await render() ---- - - - - - - diff --git a/src/layouts/BlockOverviewLayout.astro b/src/layouts/BlockOverviewLayout.astro deleted file mode 100644 index 06654cca8..000000000 --- a/src/layouts/BlockOverviewLayout.astro +++ /dev/null @@ -1,39 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Hero from 'fulldev-ui/blocks/Hero.astro' -import Block from 'fulldev-ui/components/Block.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data } = Astro.props ---- - - - - - - - diff --git a/src/layouts/ComponentLayout.astro b/src/layouts/ComponentLayout.astro deleted file mode 100644 index b202d94bb..000000000 --- a/src/layouts/ComponentLayout.astro +++ /dev/null @@ -1,23 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { render } = Astro.props -const { Content } = await render() ---- - - - - - - - - - diff --git a/src/layouts/JobsLayout.astro b/src/layouts/JobsLayout.astro deleted file mode 100644 index 1b8e9c260..000000000 --- a/src/layouts/JobsLayout.astro +++ /dev/null @@ -1,40 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import { getCollection } from 'astro:content' -import JobDeck from 'fulldev-ui/blocks/Jobs.astro' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, slug, ...rest } = Astro.props - -const childPages = ( - await getCollection('pages', (page: any) => page.slug.startsWith(slug)) -).map((page: any) => ({ href: `/${page.slug}/`, ...page.data })) ---- - - - - - - - - - - - - diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro deleted file mode 100644 index d8cf36e77..000000000 --- a/src/layouts/Layout.astro +++ /dev/null @@ -1,169 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Button from 'fulldev-ui/components/Button.astro' -import Head from 'fulldev-ui/components/Head.astro' -import Header from 'fulldev-ui/components/Header.astro' -import Sidebar from 'fulldev-ui/components/Sidebar.astro' -import Toc from 'fulldev-ui/components/Toc.astro' -import NavigationButtons from '../components/docs/NavigationButtons.astro' - -type Props = Partial> & { - class?: string - theme?: 'light' | 'dark' -} - -const { slug, data, theme, class: classes, render } = Astro.props -const { logo, header, footer, footers, channels, sidebar, toc } = data || {} - -const { headings } = render ? await render() : { headings: [] } - -const h2Headings = headings.filter((heading: any) => heading.depth === 2) ---- - - - - - - - - - - - - - - - - - - { - channels?.whatsapp && ( - - ) - } - - - - - - - diff --git a/src/layouts/OverviewLayout.astro b/src/layouts/OverviewLayout.astro deleted file mode 100644 index eda484f57..000000000 --- a/src/layouts/OverviewLayout.astro +++ /dev/null @@ -1,45 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { sections, blocks, children, references } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/Page.astro b/src/layouts/Page.astro new file mode 100644 index 000000000..f67525f24 --- /dev/null +++ b/src/layouts/Page.astro @@ -0,0 +1,63 @@ +--- +import type { ComponentProps } from 'astro/types' +import type { CollectionEntry } from 'astro:content' +import Block from 'fulldev-ui/components/Block.astro' +import Element from 'fulldev-ui/components/Element.astro' +import type { PageSchema } from 'fulldev-ui/schemas/page.ts' +import Layout from 'fulldev-ui/structures/Layout.astro' + +type Props = ComponentProps & + PageSchema & { + render: CollectionEntry<'pages'>['render'] + } + +const { + _block, + title, + heading, + description, + paragraph, + banner, + sidebar, + header, + sections, + footer, + render, + navigation, + ...rest +} = Astro.props + +const { Content, headings } = await render() +--- + + + + + + + + + {sections?.map((section) => )} + + + diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro deleted file mode 100644 index ed8111443..000000000 --- a/src/layouts/PageLayout.astro +++ /dev/null @@ -1,32 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { hero, section, sections, block, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro deleted file mode 100644 index ec8ae413b..000000000 --- a/src/layouts/PostLayout.astro +++ /dev/null @@ -1,32 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Intro from 'fulldev-ui/blocks/Intro.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { section, sections, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - diff --git a/src/layouts/ProductLayout.astro b/src/layouts/ProductLayout.astro deleted file mode 100644 index 686a69635..000000000 --- a/src/layouts/ProductLayout.astro +++ /dev/null @@ -1,31 +0,0 @@ ---- -import type { CollectionEntry } from 'astro:content' -import Block from 'fulldev-ui/components/Block.astro' -import Blocks from 'fulldev-ui/components/Blocks.astro' -import Prose from 'fulldev-ui/components/experimental/Prose.astro' -import Section from 'fulldev-ui/components/Section.astro' -import Layout from 'fulldev-ui/layouts/Layout.astro' - -type Props = CollectionEntry<'pages'> - -const { data, render } = Astro.props -const { section, sections, block, blocks } = data -const { Content } = await render() ---- - - - - - - - - - - - - - - diff --git a/src/layouts/_Product.astro b/src/layouts/_Product.astro new file mode 100644 index 000000000..a2490deb1 --- /dev/null +++ b/src/layouts/_Product.astro @@ -0,0 +1,115 @@ + diff --git a/src/pages/[...page].astro b/src/pages/[...page].astro index 2f3605c27..79c77add6 100644 --- a/src/pages/[...page].astro +++ b/src/pages/[...page].astro @@ -1,40 +1,49 @@ --- -import { getCollection } from 'astro:content' -import PageLayout from 'fulldev-ui/layouts/PageLayout.astro' -import { mapKeys } from 'radash' -import { mergeEntries } from '../utils/mergeEntries' +import { getCollection, getEntry } from 'astro:content' +import { getHref } from 'fulldev-ui/utils/getHref.ts' +import { dash, pascal } from 'radash' +import { mergeDeep } from 'remeda' export async function getStaticPaths() { - const pages = await getCollection('pages') - return pages.map((page) => ({ + const collection = await getCollection('pages') + return collection.map((entry) => ({ params: { - page: page.slug === 'index' ? undefined : page.slug, + page: getHref(entry.slug), }, - props: page, + props: entry, })) } -const { data, slug, ...rest } = Astro.props +const layoutName = Astro.props.data._layout ?? 'Page' +const layoutComponentName = pascal(layoutName) -const merged = (await mergeEntries({ data, slug })) as any +const layoutsComponents = { + ...import.meta.glob('/src/layouts/**/*.astro'), + ...import.meta.glob('../layouts/**/*.astro'), +} -const packageLayouts = import.meta.glob('../layouts/**/*.astro') -const userLayouts = import.meta.glob('/src/layouts/**/*.astro') +const layoutComponentPath = Object.keys(layoutsComponents).find( + (path) => path.split('/').pop()?.split('.')[0] === layoutComponentName +) -const mapBlockKeys = (blocks: any) => - mapKeys(blocks, (key: any) => key.split('/').pop().split('.').shift()) +const LayoutComponent = + layoutComponentPath && + (await (layoutsComponents[layoutComponentPath] as any)()).default -const components = { - ...mapBlockKeys(packageLayouts), - ...mapBlockKeys(userLayouts), -} +const layoutEntryName = dash(layoutName) +const layoutEntry = await getEntry('layouts', layoutEntryName) +const baseLayout = await getEntry('layouts', 'base') +const mergedLayouts = mergeDeep(baseLayout || {}, layoutEntry || {}) +const merged = mergeDeep(mergedLayouts, Astro.props) -const found = components[(merged.data._layout ?? 'PageLayout') as string] as any -const functioncomp = found && (await found()) -const Layout = functioncomp?.default ?? PageLayout +const { data, ...rest } = merged --- - +{ + LayoutComponent && ( + + ) +} diff --git a/src/pages/test.astro b/src/pages/test.astro new file mode 100644 index 000000000..d4f92294f --- /dev/null +++ b/src/pages/test.astro @@ -0,0 +1,16 @@ + + + + Sign up + diff --git a/src/schemas/base.ts b/src/schemas/base.ts deleted file mode 100644 index 937d9a780..000000000 --- a/src/schemas/base.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { z } from 'astro:content' - -export const button = z - .object({ - text: z.string(), - href: z.string(), - icon: z.string(), - }) - .partial() - .passthrough() - -export const link = z - .object({ - text: z.string(), - href: z.string(), - }) - .partial() - .passthrough() - -export const base = z - .object({ - tagline: z.string(), - icon: z.string(), - badge: z.string().or( - z.object({ - text: z.string(), - href: z.string(), - }) - ), - heading: z.string(), - text: z.string(), - html: z.string(), - image: z.string(), - images: z.string().array(), - rating: z.number().or( - z - .object({ - value: z.number(), - label: z.string(), - avatars: z.string().array(), - avatar: z.string(), - }) - .partial() - ), - button: button, - buttons: button.array(), - link: link, - links: link.array(), - list: z.string().array(), - avatar: z.string(), - price: z.number(), - input: z - .object({ - placeholder: z.string(), - submit: z.string(), - }) - .partial() - .passthrough(), - logos: z.string().array(), - logo: z.string(), - channels: z - .object({ - phone: z.string(), - email: z.string(), - address: z.string(), - }) - .partial() - .passthrough(), - socials: z - .object({ - facebook: z.string(), - instagram: z.string(), - }) - .partial() - .passthrough(), - hours: z - .object({ - monday: z.string(), - tuesday: z.string(), - wednesday: z.string(), - thursday: z.string(), - friday: z.string(), - saturday: z.string(), - sunday: z.string(), - }) - .partial() - .passthrough(), - }) - .partial() - .passthrough() diff --git a/src/schemas/block.ts b/src/schemas/block.ts index 6e70c3ec7..fef54f512 100644 --- a/src/schemas/block.ts +++ b/src/schemas/block.ts @@ -1,15 +1,32 @@ import { z } from 'astro:content' -import { base } from './base' -import { card } from './card' -import { pathSchema } from './utils' +import { cardSchema } from 'fulldev-ui/schemas/card.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' +import { pathSchema } from 'fulldev-ui/schemas/path.ts' -export const block = base +export const blockSchema = cardSchema .extend({ - columns: card.array(), - cards: z.array(card), - source: z.enum(['children', 'references']), - pages: pathSchema('pages').array(), - records: pathSchema('records').array(), + _block: z.string().optional(), + depth: z.union([z.literal(1), z.literal(2), z.literal(3)]).optional(), + themer: z.boolean().optional(), + search: z.boolean().optional(), + cart: z.boolean().optional(), + cards: cardSchema.array().optional(), + pages: pathSchema('pages').array().optional(), + records: pathSchema('records').array().optional(), + soldout: z.boolean().optional(), + variants: z.record(z.string(), z.string().array()).optional(), + categories: pathSchema('pages').array().optional(), + menus: menuSchema.array().optional(), + headings: z + .array( + z.object({ + depth: z.number(), + slug: z.string(), + text: z.string(), + }) + ) + .optional(), }) - .partial() - .passthrough() + .strict() + +export type BlockSchema = z.infer diff --git a/src/schemas/button.ts b/src/schemas/button.ts new file mode 100644 index 000000000..c0bb5c615 --- /dev/null +++ b/src/schemas/button.ts @@ -0,0 +1,17 @@ +import { z } from 'astro:content' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const buttonSchema = z + .object({ + icon: z.string().optional(), + image: imageSchema.optional(), + text: z.string().optional(), + href: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + reverse: z.boolean().optional(), + variant: z.enum(['primary', 'secondary', 'outline', 'ghost']).optional(), + }) + .strict() + +export type ButtonSchema = z.infer diff --git a/src/schemas/card.ts b/src/schemas/card.ts index d41315cbf..af5c8d4a9 100644 --- a/src/schemas/card.ts +++ b/src/schemas/card.ts @@ -1,3 +1,43 @@ -import { base } from './base' +import { z } from 'astro:content' +import { buttonSchema } from 'fulldev-ui/schemas/button.ts' +import { channelSchema } from 'fulldev-ui/schemas/channel.ts' +import { chipSchema } from 'fulldev-ui/schemas/chip.ts' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' +import { proofSchema } from 'fulldev-ui/schemas/proof.ts' -export const card = base +export const cardSchema = z + .object({ + target: z.string().optional(), + href: z.string().optional(), + order: z.number().optional(), + dark: z.boolean().optional(), + text: z.string().optional(), + content: z.string().optional(), + tagline: z.string().optional(), + heading: z.string().optional(), + paragraph: z.string().optional(), + list: z.string().array().optional(), + socials: z.string().array().optional(), + logo: logoSchema.optional(), + link: linkSchema.optional(), + links: linkSchema.array().optional(), + menus: menuSchema.array().optional(), + chip: chipSchema.optional(), + badges: z.string().array().optional(), + button: buttonSchema.optional(), + buttons: buttonSchema.array().optional(), + image: imageSchema.optional(), + images: imageSchema.array().optional(), + channels: channelSchema.array().optional(), + proof: proofSchema.optional(), + price: z.number().optional(), + icon: z.string().optional(), + rating: z.number().optional(), + avatar: imageSchema.optional(), + avatars: imageSchema.array().optional(), + soldout: z.boolean().optional(), + }) + .strict() diff --git a/src/schemas/channel.ts b/src/schemas/channel.ts new file mode 100644 index 000000000..7fd62d6ae --- /dev/null +++ b/src/schemas/channel.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Channel from 'fulldev-ui/components/Channel.astro' + +export const channelSchema = z + .object({ + icon: z.string().optional(), + heading: z.string().optional(), + text: z.string().optional(), + href: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['secondary', 'outline']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/checkbox.ts b/src/schemas/checkbox.ts new file mode 100644 index 000000000..b5aa7b835 --- /dev/null +++ b/src/schemas/checkbox.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Checkbox from 'fulldev-ui/components/Checkbox.astro' + +export const checkboxSchema = z + .object({ + name: z.string().optional(), + label: z.string().optional(), + id: z.string().optional(), + value: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/chip.ts b/src/schemas/chip.ts new file mode 100644 index 000000000..047ebd140 --- /dev/null +++ b/src/schemas/chip.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Chip from 'fulldev-ui/components/Chip.astro' + +export const chipSchema = z + .object({ + icon: z.string().optional(), + text: z.string().optional(), + href: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['primary', 'secondary', 'outline']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/footer.ts b/src/schemas/footer.ts new file mode 100644 index 000000000..4d9a8d800 --- /dev/null +++ b/src/schemas/footer.ts @@ -0,0 +1,17 @@ +import { z } from 'astro:content' +import { channelSchema } from 'fulldev-ui/schemas/channel.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' + +export const footerSchema = z + .object({ + logo: logoSchema.optional(), + heading: z.string().optional(), + paragraph: z.string().optional(), + socials: z.string().url().array().optional(), + channels: channelSchema.array().optional(), + menus: menuSchema.array().optional(), + }) + .strict() + +export type FooterSchema = z.infer diff --git a/src/schemas/head.ts b/src/schemas/head.ts new file mode 100644 index 000000000..4d4bd67dc --- /dev/null +++ b/src/schemas/head.ts @@ -0,0 +1,17 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Head from 'fulldev-ui/components/Head.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const headSchema = z + .object({ + title: z.string().optional(), + description: z.string().optional(), + image: imageSchema.optional(), + theme: z.enum(['light', 'dark', 'system']).optional(), + favicon: z.string().optional(), + company: z.string().optional(), + scripts: z.string().array().optional(), + code: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/header.ts b/src/schemas/header.ts new file mode 100644 index 000000000..28f2387a8 --- /dev/null +++ b/src/schemas/header.ts @@ -0,0 +1,21 @@ +import { z } from 'astro:content' +import { buttonSchema } from 'fulldev-ui/schemas/button.ts' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' +import { logoSchema } from 'fulldev-ui/schemas/logo.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' + +export const headerSchema = z + .object({ + logo: logoSchema.optional(), + heading: z.string().optional(), + links: linkSchema.array().optional(), + socials: z.string().array().optional(), + buttons: buttonSchema.array().optional(), + menus: menuSchema.array().optional(), + themer: z.boolean().optional(), + cart: z.boolean().optional(), + search: z.boolean().optional(), + }) + .strict() + +export type HeaderSchema = z.infer diff --git a/src/schemas/image.ts b/src/schemas/image.ts new file mode 100644 index 000000000..17b1b61ed --- /dev/null +++ b/src/schemas/image.ts @@ -0,0 +1,53 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Image from 'fulldev-ui/components/Image.astro' + +// const imagePath = z.preprocess((data: unknown) => { +// if (typeof data === 'string') { +// return data.split('/').pop() +// } +// return data +// }, reference('images')) + +// export const imageSchema = z +// .union([imagePath, z.object({}).passthrough()]) +// .pipe( +// z +// .object({ +// id: z +// .string() +// .refine(async (data) => await reference('images').parseAsync(data)), +// src: z.string(), +// alt: z.string(), +// width: z.number(), +// height: z.number(), +// }) +// .partial() +// .passthrough() +// ) +// .optional() + +// export const imageSchema = z +// .object({ +// src: z.string().optional(), +// alt: z.string().optional(), +// width: z.number().optional(), +// height: z.number().optional(), +// }) +// .strict() satisfies z.ZodType> + +const image = z + .object({ + src: z.string().optional(), + alt: z.string().optional(), + width: z.number().optional(), + height: z.number().optional(), + }) + .strict() satisfies z.ZodType> + +export const imageSchema = z + .preprocess( + (data: unknown) => (typeof data === 'string' ? { src: data } : data), + image + ) + .optional() as z.ZodType> diff --git a/src/schemas/input.ts b/src/schemas/input.ts new file mode 100644 index 000000000..11b9156ef --- /dev/null +++ b/src/schemas/input.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Input from 'fulldev-ui/components/Input.astro' + +export const inputSchema = z + .object({ + icon: z.string().optional(), + label: z.string().optional(), + placeholder: z.string().optional(), + value: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/link.ts b/src/schemas/link.ts new file mode 100644 index 000000000..bb91689df --- /dev/null +++ b/src/schemas/link.ts @@ -0,0 +1,14 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Link from 'fulldev-ui/components/Link.astro' + +export const linkSchema = z + .object({ + text: z.string().optional(), + href: z.string().optional(), + icon: z.string().optional(), + target: z.literal('_blank').optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + variant: z.enum(['primary', 'underline', 'muted']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/logo.ts b/src/schemas/logo.ts new file mode 100644 index 000000000..faf75915b --- /dev/null +++ b/src/schemas/logo.ts @@ -0,0 +1,13 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Logo from 'fulldev-ui/components/Logo.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const logoSchema = z + .object({ + image: imageSchema.optional(), + text: z.string().optional(), + href: z.string().optional(), + size: z.enum(['sm', 'md', 'lg']).optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/menu.ts b/src/schemas/menu.ts new file mode 100644 index 000000000..a825cceef --- /dev/null +++ b/src/schemas/menu.ts @@ -0,0 +1,11 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import Menu from 'fulldev-ui/components/Menu.astro' +import { linkSchema } from 'fulldev-ui/schemas/link.ts' + +export const menuSchema = z + .object({ + heading: z.string().optional(), + links: linkSchema.array().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/page.ts b/src/schemas/page.ts index ced52e1a9..a7a586110 100644 --- a/src/schemas/page.ts +++ b/src/schemas/page.ts @@ -1,43 +1,23 @@ import { z } from 'astro:content' -import { base } from './base' -import { block } from './block' -import { pathSchema } from './utils' +import { blockSchema } from 'fulldev-ui/schemas/block.ts' +import { headSchema } from 'fulldev-ui/schemas/head.ts' +import { menuSchema } from 'fulldev-ui/schemas/menu.ts' -export const page = base +export const pageSchema = blockSchema .extend({ - i18n: pathSchema('pages'), - settings: pathSchema('settings'), - seo: z - .object({ - title: z.string(), - description: z.string(), - image: z.string(), - }) - .partial() - .passthrough(), - code: z - .object({ - head: z.string(), - body: z.string(), - }) - .partial() - .passthrough(), - pages: pathSchema('pages').array(), - records: pathSchema('records').array(), - title: z.string(), - description: z.string(), - header: block.or(z.literal(false)), - headers: block.array().or(z.literal(false)), - hero: block.or(z.literal(false)), - block: block.or(z.literal(false)), - section: block.or(z.literal(false)), - blocks: block.array().or(z.object({}).catchall(block)), - sections: block.array().or(z.object({}).catchall(block)), - cta: block.or(z.literal(false)), - footer: block.or(z.literal(false)), - footers: block.array().or(z.literal(false)), + _layout: z.string().optional(), + _schema: z.string().optional(), + title: z.string().optional(), + description: z.string().optional(), + head: headSchema.optional(), + banner: blockSchema.optional(), + navigation: blockSchema.optional(), + header: blockSchema.optional(), + sections: blockSchema.array().optional(), + subheader: blockSchema.array().optional(), + sidebar: menuSchema.array().optional(), + footer: blockSchema.optional(), }) - .partial() - .passthrough() + .strict() -export type Page = z.infer +export type PageSchema = z.infer diff --git a/src/schemas/utils.ts b/src/schemas/path.ts similarity index 61% rename from src/schemas/utils.ts rename to src/schemas/path.ts index a749ac209..e5513828c 100644 --- a/src/schemas/utils.ts +++ b/src/schemas/path.ts @@ -1,19 +1,10 @@ import { reference, z, type AnyEntryMap } from 'astro:content' -// export const pagesPath = z -// .string() -// .transform((value) => { -// const fullpath = value?.split(`pages/`).pop() -// const slug = fullpath?.split('.').shift() -// return slug -// }) -// .pipe(reference('pages')) - +// TODO: preprocess instead export const pathSchema = (collection: C) => z .string() .transform((value) => { - // @ts-ignore const fullpath = value?.split(`${collection}/`).pop() const slug = fullpath?.split('.').shift() const noIndexEnding = slug?.replace('/index', '') diff --git a/src/schemas/proof.ts b/src/schemas/proof.ts new file mode 100644 index 000000000..686231ab8 --- /dev/null +++ b/src/schemas/proof.ts @@ -0,0 +1,12 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Proof from 'fulldev-ui/components/Proof.astro' +import { imageSchema } from 'fulldev-ui/schemas/image.ts' + +export const proofSchema = z + .object({ + rating: z.number().optional(), + avatars: imageSchema.array().optional(), + text: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/schemas/textarea.ts b/src/schemas/textarea.ts new file mode 100644 index 000000000..b54687c98 --- /dev/null +++ b/src/schemas/textarea.ts @@ -0,0 +1,11 @@ +import type { ComponentProps } from 'astro/types' +import { z } from 'astro:content' +import type Textarea from 'fulldev-ui/components/Textarea.astro' + +export const textareaSchema = z + .object({ + label: z.string().optional(), + placeholder: z.string().optional(), + value: z.string().optional(), + }) + .strict() satisfies z.ZodType> diff --git a/src/stores/cart.svelte.ts b/src/stores/cart.svelte.ts new file mode 100644 index 000000000..5da624751 --- /dev/null +++ b/src/stores/cart.svelte.ts @@ -0,0 +1,78 @@ +import { derived, writable } from 'svelte/store' + +export type CartItem = { + uid: string + quantity: number + slug: string + title: string + price?: number | undefined + image?: string | undefined + variants?: + | { + [k: string]: string | undefined + } + | undefined +} + +export type Cart = CartItem[] + +const isServer = import.meta.env.SSR +const storageJson = !isServer && localStorage.getItem('cart') +const storageData = storageJson ? JSON.parse(storageJson) : [] + +export const cart = writable(storageData) + +cart.subscribe((newCart) => { + if (isServer) return + const json = JSON.stringify(newCart) + localStorage.setItem('cart', json) +}) + +export const getUid = ( + slug: CartItem['slug'], + variants?: CartItem['variants'] +) => (variants ? `${slug}-${Object.values(variants)?.join('-')}` : slug) + +export const getItemIndex = (currentCart: Cart, uid: CartItem['uid']) => { + const index = currentCart.findIndex((i) => i.uid === uid) + if (index === -1) throw new Error(`Item with uid ${uid} not found`) + return index +} + +export const addItem = (item: CartItem) => + cart.update((currentCart) => [...currentCart, item]) + +export const removeItem = (uid: CartItem['uid']) => + cart.update((currentCart) => { + const index = getItemIndex(currentCart, uid) + currentCart.splice(index, 1) + return [...currentCart] + }) + +export const updateQuantity = ( + uid: CartItem['uid'], + quantity: CartItem['quantity'] +) => + cart.update((currentCart) => { + const index = getItemIndex(currentCart, uid) + if (currentCart[index]) currentCart[index].quantity = quantity + return [...currentCart] + }) + +export const openCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.showModal() +} + +export const closeCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.close() +} + +export const totalPrice = derived(cart, ($cart) => { + return $cart.length + // return $cart.reduce( + // (acc, item) => acc + (item.price || 0) * (item.quantity || 0), + // 0 + // ) +}) diff --git a/src/stores/cart.ts b/src/stores/cart.ts new file mode 100644 index 000000000..0bb77204b --- /dev/null +++ b/src/stores/cart.ts @@ -0,0 +1,76 @@ +import { persistentAtom } from '@nanostores/persistent' +import { computed } from 'nanostores' + +type Item = { + slug: string + title: string + price: number + image: string + quantity: number + variants: string[] +} + +type Cart = Item[] | [] + +export const $cart = persistentAtom('cart', [], { + encode: JSON.stringify, + decode: JSON.parse, +}) + +// for svelte files +export const cart = $cart + +export const getCart = () => $cart.get() + +export const setCart = (cart: Cart) => $cart.set(cart) + +export const removeItem = (slug: string) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex((item) => item.slug === slug) + newCart.splice(index, 1) + $cart.set(newCart) +} + +export const addItem = (item: Item) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex( + (i) => i.slug === item.slug && i.variants.join() === item.variants.join() + ) + if (index === -1) newCart.push(item) + else { + let newItem = { ...newCart[index] } as Item + newItem.quantity += item.quantity + newCart[index] = newItem + } + setCart(newCart) +} + +export const updateQuantity = (slug: string, quantity: number) => { + const currentCart = getCart() + const newCart = [...currentCart] + const index = currentCart.findIndex((item) => item.slug === slug) + let newItem = { ...newCart[index] } as Item + newItem.quantity = quantity + newCart[index] = newItem + setCart(newCart) +} + +export const $totalPrice = computed($cart, ($cart) => + $cart.reduce((a, b) => +a + b.price * b.quantity, 0) +) + +export const openCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.showModal() +} + +export const closeCart = () => { + const cartDialog = document.querySelector('dialog#cart') + if (cartDialog instanceof HTMLDialogElement) cartDialog.close() +} + +// export const totalQuantity = computed(cart, ($cart) => +// $cart.reduce((a, b) => +a + b.quantity, 0) +// ) diff --git a/src/structures/Card.astro b/src/structures/Card.astro new file mode 100644 index 000000000..68e0c36e7 --- /dev/null +++ b/src/structures/Card.astro @@ -0,0 +1,35 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'a'>, HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { href, as = href ? 'a' : 'div', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Carousel.astro b/src/structures/Carousel.astro new file mode 100644 index 000000000..1fa2e1c34 --- /dev/null +++ b/src/structures/Carousel.astro @@ -0,0 +1,106 @@ +--- +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props {} +--- + + + + + + + + + + + + diff --git a/src/structures/Code.astro b/src/structures/Code.astro new file mode 100644 index 000000000..a3c5d8c8a --- /dev/null +++ b/src/structures/Code.astro @@ -0,0 +1,53 @@ +--- +import type { ComponentProps } from 'astro/types' +import { Code as AstroCode } from 'astro:components' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends ComponentProps {} + +const { lang = 'astro', code, ...rest } = Astro.props +--- + + + + + + + + { + code && ( + + ) + } + + + diff --git a/src/structures/Container.astro b/src/structures/Container.astro new file mode 100644 index 000000000..5840700af --- /dev/null +++ b/src/structures/Container.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Drawer.astro b/src/structures/Drawer.astro new file mode 100644 index 000000000..7bd771632 --- /dev/null +++ b/src/structures/Drawer.astro @@ -0,0 +1,80 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Button from 'fulldev-ui/components/Button.astro' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props + extends HTMLAttributes<'aside'>, + Pick, 'variant' | 'size' | 'text' | 'icon'> { + id: string + icon: string +} + +const { id, variant = 'ghost', size = 'md', icon, text, ...rest } = Astro.props + +const slot = await Astro.slots.render('default') +const render = slot?.trim().length > 0 +--- + +{ + render && ( + + + + + + + + + + + ) +} + + diff --git a/src/structures/Group.astro b/src/structures/Group.astro new file mode 100644 index 000000000..f722dd9a0 --- /dev/null +++ b/src/structures/Group.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Layout.astro b/src/structures/Layout.astro new file mode 100644 index 000000000..1d3f58054 --- /dev/null +++ b/src/structures/Layout.astro @@ -0,0 +1,34 @@ +--- +import type { ComponentProps, HTMLAttributes } from 'astro/types' +import Head from 'fulldev-ui/components/Head.astro' + +type Props = Omit, 'title'> & { + head?: ComponentProps +} + +const { head, ...rest } = Astro.props +--- + + + + + + + + + diff --git a/src/structures/Masonry.astro b/src/structures/Masonry.astro new file mode 100644 index 000000000..cf19ccc0f --- /dev/null +++ b/src/structures/Masonry.astro @@ -0,0 +1,42 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Matrix.astro b/src/structures/Matrix.astro new file mode 100644 index 000000000..5098252b5 --- /dev/null +++ b/src/structures/Matrix.astro @@ -0,0 +1,39 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + size?: 'sm' | 'md' | 'lg' | undefined +} + +const { size = 'md', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Panel.astro b/src/structures/Panel.astro new file mode 100644 index 000000000..ce0b15d2a --- /dev/null +++ b/src/structures/Panel.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Prose.astro b/src/structures/Prose.astro new file mode 100644 index 000000000..ac90de9f9 --- /dev/null +++ b/src/structures/Prose.astro @@ -0,0 +1,88 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'center' | 'middle' | 'columns' +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Section.astro b/src/structures/Section.astro new file mode 100644 index 000000000..8bb0391ac --- /dev/null +++ b/src/structures/Section.astro @@ -0,0 +1,26 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'section'> { + as?: HTMLTag +} + +const { as = 'section', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Sidebar.astro b/src/structures/Sidebar.astro new file mode 100644 index 000000000..de72b863e --- /dev/null +++ b/src/structures/Sidebar.astro @@ -0,0 +1,36 @@ +--- +import type { HTMLAttributes } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'aside'> {} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Split.astro b/src/structures/Split.astro new file mode 100644 index 000000000..b9fc5abf8 --- /dev/null +++ b/src/structures/Split.astro @@ -0,0 +1,38 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'start' | 'center' | 'sticky' +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Stack.astro b/src/structures/Stack.astro new file mode 100644 index 000000000..429aacbcf --- /dev/null +++ b/src/structures/Stack.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/Writeup.astro b/src/structures/Writeup.astro new file mode 100644 index 000000000..40fec3e63 --- /dev/null +++ b/src/structures/Writeup.astro @@ -0,0 +1,67 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag + align?: 'left' | 'center' | 'right' +} + +const { align = 'start', ...rest } = Astro.props +--- + + + + + + diff --git a/src/structures/_Bento.astro b/src/structures/_Bento.astro new file mode 100644 index 000000000..a1c5e809c --- /dev/null +++ b/src/structures/_Bento.astro @@ -0,0 +1,34 @@ +--- +import type { HTMLAttributes, HTMLTag } from 'astro/types' +import Element from 'fulldev-ui/components/Element.astro' + +interface Props extends HTMLAttributes<'div'> { + as?: HTMLTag +} + +const { ...rest } = Astro.props +--- + + + + + + diff --git a/src/utils/_archive/Childmorphic.ts b/src/utils/_archive/Childmorphic.ts deleted file mode 100644 index 0409b50a5..000000000 --- a/src/utils/_archive/Childmorphic.ts +++ /dev/null @@ -1,8 +0,0 @@ -// import type { AstroGlobal } from 'astro' - -// export type Childmorphic = { -// [Key in keyof C & string as -// | Lowercase -// | Capitalize -// | `${string}${Capitalize}`]?: C[Key] -// } diff --git a/src/utils/_archive/getAllCollections.ts b/src/utils/_archive/getAllCollections.ts deleted file mode 100644 index f5547ac7d..000000000 --- a/src/utils/_archive/getAllCollections.ts +++ /dev/null @@ -1,10 +0,0 @@ -// import type { CollectionKey } from 'astro:content' -// import { getCollection } from 'astro:content' - -// export const getAllCollections = async (names: CollectionKey[]) => { -// const promises = names.map((name) => getCollection(name)) -// const resolved = await Promise.all(promises) -// const flattened = resolved.flat() -// const filtered = flattened.filter(Boolean) -// return filtered -// } diff --git a/src/utils/_archive/getCollectionCascade.ts b/src/utils/_archive/getCollectionCascade.ts deleted file mode 100644 index aba39bab2..000000000 --- a/src/utils/_archive/getCollectionCascade.ts +++ /dev/null @@ -1,33 +0,0 @@ -// import { -// getCollection, -// type CollectionEntry, -// type CollectionKey, -// type ContentCollectionKey, -// type DataCollectionKey, -// } from 'astro:content' -// import { unflatten } from 'flat' -// import { objectify } from 'radash' -// import { mapValues } from 'remeda' - -// export type CollectionCascade = { -// [Key in ContentCollectionKey]: { -// [Key in CollectionEntry['slug']]: any -// } -// } & { -// [Key in DataCollectionKey]: { -// [Key in CollectionEntry['id']]: any -// } -// } - -// export const getCollectionCascade = async (collectionKeys: CollectionKey[]) => { -// const promises = collectionKeys.map((key) => getCollection(key)) -// const resolved = await Promise.all(promises) -// const flattened = resolved.flat() -// const object = objectify( -// flattened, -// ({ collection, slug, id }) => `${collection}.${slug || id}` -// ) -// const mapped = mapValues(object, (value) => value.data) -// const unflattened = unflatten(mapped) -// return unflattened as CollectionCascade -// } diff --git a/src/utils/_archive/getPathname.ts b/src/utils/_archive/getPathname.ts deleted file mode 100644 index e0503f5c9..000000000 --- a/src/utils/_archive/getPathname.ts +++ /dev/null @@ -1,18 +0,0 @@ -// import type { AstroGlobal } from 'astro' -// import type { CollectionEntry, ContentCollectionKey } from 'astro:content' - -// export const getPathname = ({ -// slug, -// collection, -// data, -// }: CollectionEntry): -// | AstroGlobal['url']['pathname'] -// | undefined => { -// if (!slug) return -// if (data.draft) return -// if (data.output === false) return -// if (collection === 'pages' && slug === 'index') return '/' -// if (collection === 'pages') return `/${slug}` -// if (slug === 'index') return `/${collection}` -// return `/${collection}/${slug}` -// } diff --git a/src/utils/_archive/staticPageSchema.ts b/src/utils/_archive/staticPageSchema.ts deleted file mode 100644 index b53084964..000000000 --- a/src/utils/_archive/staticPageSchema.ts +++ /dev/null @@ -1,124 +0,0 @@ -// import { -// getCollection, -// getEntry, -// z, -// type CollectionEntry, -// type CollectionKey, -// } from 'astro:content' -// import { flatten, unflatten } from 'flat' -// import { all, camel, construct, get, isString, mapValues } from 'radash' -// import { mapKeys, merge } from 'remeda' - -// interface Options { -// casing: boolean -// layouts: boolean -// references: boolean -// selfs: boolean -// } - -// const defaults: Options = { -// casing: true, -// layouts: true, -// references: true, -// selfs: true, -// } - -// const transformReferences = async (data: object) => -// await all( -// mapValues(flatten(data) as any, async (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const results = await all( -// parts.map(async (valuePart) => { -// if (!valuePart.startsWith('$')) return valuePart -// if (valuePart.startsWith('$self')) return valuePart - -// const reference = valuePart.split('.')[0].replace('$', '') -// const collection = reference.split('/')[0] -// const slug = reference.split('/').slice(1).join('/') -// const path = valuePart.split('.').slice(1).join('.') - -// if (collection && slug) { -// let response = await getEntry(collection as CollectionKey, slug) -// const result = get(response?.data, path) -// return result -// } else if (collection) { -// const response = await getCollection(collection as CollectionKey) -// const result = response?.map((entry: any) => get(entry?.data, path)) -// return result -// } - -// return valuePart -// }) -// ) -// if (results.length == 1) return results[0] -// return results.join(' ') -// }) -// ) - -// const transformLayouts = (data: object) => { -// const flat: any = flatten(data) -// let store: any = {} -// let i: number = 0 - -// const merged = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = key.split('.') -// const result = parts.map((part) => { -// return part.replace(/^_+/, '') -// }) -// const filtered = result.filter(Boolean) -// const joined = filtered.join('.') -// return joined -// }) -// const nested = construct(merged) -// return nested -// } - -// const transformSelfs = (data: object) => { -// const flat = flatten(data) as any -// const mapped = mapValues(flat, (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const result = parts.map((part) => { -// if (!part.startsWith('$self')) return part -// const pathParts = part.split('.').slice(1) -// const camelCased = pathParts.map((part) => camel(part)) -// const path = camelCased.join('.') -// const result = get(data, path) -// return result ? result : part -// }) -// return result.join(' ') -// }) -// return unflatten(mapped) -// } - -// const transformCasing = (object: object) => { -// const flat = flatten(object) -// const mapped = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = (key as string).split('.') -// const result = parts.map((part) => camel(part)) -// return result.join('.') -// }) -// return unflatten(mapped) -// } - -// export const pageSchema = (options: Partial = {}) => -// z.any().transform(async (data: CollectionEntry['data']) => { -// const { layouts, casing, references, selfs } = merge(defaults, options) - -// if (references) data = await transformReferences(data) -// // console.log('references', JSON.stringify(data, null, 2)) - -// if (layouts) data = transformLayouts(data) -// // console.log('layouts', data) - -// if (casing) data = transformCasing(data) -// // console.log('casing', data) - -// if (selfs) data = transformSelfs(data) -// // console.log('selfs', data) - -// return data -// }) diff --git a/src/utils/_archive/transform/transform.ts b/src/utils/_archive/transform/transform.ts deleted file mode 100644 index 16aa65be5..000000000 --- a/src/utils/_archive/transform/transform.ts +++ /dev/null @@ -1,25 +0,0 @@ -// import type { CollectionEntry, CollectionKey } from 'astro:content' -// import { transformCasing } from './transformCasing' -// import { transformReferences } from './transformReferences' -// import { transformSelfs } from './transformSelfs' -// import { transformUnderscores } from './transformUnderscores' - -// export const transform = async ( -// entry: CollectionEntry -// ): Promise => { -// // console.log('entry', entry.data) - -// entry = await transformReferences(entry) -// // console.log('references', entry) - -// entry = transformUnderscores(entry) -// // console.log('underscores', entry) - -// entry = transformCasing(entry) -// // console.log('casing', entry) - -// entry = transformSelfs(entry) -// // console.log('selfs', entry) - -// return entry -// } diff --git a/src/utils/_archive/transform/transformCasing.ts b/src/utils/_archive/transform/transformCasing.ts deleted file mode 100644 index c934a9477..000000000 --- a/src/utils/_archive/transform/transformCasing.ts +++ /dev/null @@ -1,24 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { camel, isObject } from 'radash' -// import { isArray, isString, mapKeys } from 'remeda' - -// export const transformCasing = (data: any) => { -// if (!isObject(data) && !isArray(data)) return data - -// const flat: any = flatten(data) -// const transformedData = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = (key as string).split('.') -// const result = parts.map((part) => { -// const leadingUnderscores = part.match(/^_+/) || [''] -// const withoutLeadingUnderscores = part.replace(/^_+/, '') -// const camelCased = camel(withoutLeadingUnderscores) -// const result = leadingUnderscores + camelCased -// return result -// }) -// return result.join('.') -// }) - -// const nested = unflatten(transformedData) -// return nested -// } diff --git a/src/utils/_archive/transform/transformReferences.ts b/src/utils/_archive/transform/transformReferences.ts deleted file mode 100644 index 830cf492c..000000000 --- a/src/utils/_archive/transform/transformReferences.ts +++ /dev/null @@ -1,54 +0,0 @@ -// import { getCollection, getEntry, type CollectionKey } from 'astro:content' -// import { flatten, unflatten } from 'flat' -// import { all, get, isString, mapValues } from 'radash' -// import { getPathname } from '../getPathname' -// import { transform } from './transform' - -// export const transformReferences = async (data: object): Promise => { -// const flat = flatten(data) -// const mappedValues = await all( -// mapValues(flat as any, async (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const mappedParts = await all( -// parts.map(async (valuePart) => { -// if (!valuePart.startsWith('$/')) return valuePart - -// const reference = valuePart.split('.')[0].replace('$/', '') -// const collection = reference.split('/')[0] -// const slug = reference.split('/').slice(1).join('/') -// const path = valuePart.split('.').slice(1).join('.') - -// if (collection && slug) { -// let response = await getEntry(collection as CollectionKey, slug) -// if (!response) -// throw new Error(`Entry not found: ${collection}/${slug}`) -// const transformed = await transform(response as any) -// const result = get(transformed?.data, path) -// if (!path) -// return { -// ...transformed?.data, -// pathname: getPathname(transformed), -// } -// return result ? result : valuePart -// } else if (collection) { -// const response = await getCollection(collection as CollectionKey) -// if (!response) -// throw new Error(`Entry not found: ${collection}/${slug}`) -// const mapped = response?.map(async (entry: any) => { -// const transformed = await transform(entry?.data) -// return get(transformed, path) -// }) -// const result = await all(mapped) -// return result ? result : valuePart -// } - -// return valuePart -// }) -// ) -// if (mappedParts.length == 1) return mappedParts[0] -// else return mappedParts.join(' ') -// }) -// ) -// return unflatten(mappedValues) -// } diff --git a/src/utils/_archive/transform/transformSelfs.ts b/src/utils/_archive/transform/transformSelfs.ts deleted file mode 100644 index cd5705e65..000000000 --- a/src/utils/_archive/transform/transformSelfs.ts +++ /dev/null @@ -1,20 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { camel, get, isString, mapValues } from 'radash' - -// export const transformSelfs = (data: any): any => { -// const flat = flatten(data) as any -// const mapped = mapValues(flat, (value) => { -// if (!isString(value)) return value -// const parts = (value as string).split(' ') -// const result = parts.map((part) => { -// if (!part.startsWith('$.')) return part -// const pathParts = part.replace('$.', '').split('.') -// const camelCased = pathParts.map((part) => camel(part)) -// const path = 'data.' + camelCased.join('.') -// const result = get(data, path) -// return result ? result : part -// }) -// return result.join(' ') -// }) -// return unflatten(mapped) -// } diff --git a/src/utils/_archive/transform/transformUnderscores.ts b/src/utils/_archive/transform/transformUnderscores.ts deleted file mode 100644 index ce2bcc31a..000000000 --- a/src/utils/_archive/transform/transformUnderscores.ts +++ /dev/null @@ -1,19 +0,0 @@ -// import { flatten, unflatten } from 'flat' -// import { isString } from 'radash' -// import { mapKeys } from 'remeda' - -// export const transformUnderscores = (data: any): any => { -// const flat: any = flatten(data) -// const merged = mapKeys(flat, (key) => { -// if (!isString(key)) return key -// const parts = key.split('.') -// const result = parts.map((part) => { -// return part.replace(/^_+/, '') -// }) -// const filtered = result.filter(Boolean) -// const joined = filtered.join('.') -// return joined -// }) -// const nested = unflatten(merged) -// return nested -// } diff --git a/src/utils/cart.ts b/src/utils/cart.ts new file mode 100644 index 000000000..81863ece8 --- /dev/null +++ b/src/utils/cart.ts @@ -0,0 +1,27 @@ +import { slugify } from './slugify.ts' + +export const generateProductId = ( + slug: string, + variants?: string[] | undefined +): string => { + const slugified = slugify(slug) + + if (variants && variants.length > 0) + return `${slugified}--${variants.map((variant) => slugify(variant)).join('--')}` + + return slugified +} + +export const generateProductName = ( + title: string, + variants?: string[] | undefined +): string => { + if (variants && variants.length > 0) + return `${title} / ${variants.join(' / ')}` + + return title +} + +export const formatPrice = (price: number): string => { + return `€${price?.toFixed(2).replace('.', ',')}` +} diff --git a/src/utils/getHref.ts b/src/utils/getHref.ts new file mode 100644 index 000000000..7cc1ecb9b --- /dev/null +++ b/src/utils/getHref.ts @@ -0,0 +1,6 @@ +import type { CollectionEntry } from 'astro:content' + +export function getHref(slug: CollectionEntry<'pages'>['slug']) { + if (slug === 'index') return '/' + else return `/${slug}/` +} diff --git a/src/utils/mergeEntries.ts b/src/utils/mergeEntries.ts deleted file mode 100644 index cef69be2d..000000000 --- a/src/utils/mergeEntries.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { getEntry } from 'astro:content' -import { assign } from 'radash' - -export const mergeEntries = async (entry: any) => { - if (!entry) return entry - const { data, slug } = entry - const baseSettings = await getEntry('settings', 'base') - const enSettings = await getEntry('settings', 'en') - const deSettings = await getEntry('settings', 'de') - const frSettings = await getEntry('settings', 'fr') - const pageSettings = data.settings && (await getEntry(data.settings)) - const i18nSettings = data.i18n && (await getEntry(data.i18n)) - - let merged = {} - merged = assign(merged, baseSettings?.data ?? {}) - slug?.startsWith('en') && (merged = assign(merged, enSettings?.data ?? {})) - slug?.startsWith('de') && (merged = assign(merged, deSettings?.data ?? {})) - slug?.startsWith('fr') && (merged = assign(merged, frSettings?.data ?? {})) - merged = assign(merged, i18nSettings?.data ?? {}) - merged = assign(merged, pageSettings?.data ?? {}) - merged = assign(merged, data) - - const newEntry = { - ...entry, - data: merged, - } - return newEntry -} diff --git a/src/utils/slugify.ts b/src/utils/slugify.ts new file mode 100644 index 000000000..e1fda3dbc --- /dev/null +++ b/src/utils/slugify.ts @@ -0,0 +1,6 @@ +export const slugify = (input: string): string => { + return input + .toLowerCase() + .replace(/[^a-z0-9]+/g, '-') + .replace(/^-+|-+$/g, '') +} diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 000000000..522c1ef6a --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,5 @@ +import { vitePreprocess } from '@astrojs/svelte'; + +export default { + preprocess: vitePreprocess(), +} diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 000000000..630dab39d --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,72 @@ +import tailwindcssScrollbar from 'tailwind-scrollbar' +import type { Config } from 'tailwindcss' +import tailwindcssAnimate from 'tailwindcss-animate' + +export default { + darkMode: ['class'], + content: [ + './src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}', + 'node_modules/fulldev-ui/src/**/*.astro', + ], + theme: { + container: { + screens: ['1536px'], + }, + extend: { + spacing: { + gutter: 'clamp(16px, 4vw, 32px)', + container: 'var(--container, 1536px)', + hero: 'calc(100vh - var(--header-height, 0px) - var(--subheader-height, 0px) - var(--banner-height, 0px))', + header: 'var(--header-height, 0px)', + 'sticky-8': 'calc(var(--header-height, 0px) + 2rem)', + 'sticky-16': 'calc(var(--header-height, 0px) + 4rem)', + }, + colors: { + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))', + // hover: 'hsl(var(--primary) / 85%)', + hover: 'hsl(var(--primary) / 75%)', + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))', + hover: 'hsl(var(--secondary) / 75%)', + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))', + hover: 'hsl(var(--muted) / 75%)', + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))', + hover: 'hsl(var(--accent) / 75%)', + }, + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))', + hover: 'hsl(var(--card) / 75%)', + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))', + }, + }, + borderRadius: { + lg: `var(--radius)`, + md: `calc(var(--radius) - 2px)`, + sm: 'calc(var(--radius) - 4px)', + }, + borderColor: { + DEFAULT: 'hsl(var(--border))', + }, + }, + }, + plugins: [tailwindcssAnimate, tailwindcssScrollbar({ nocompatible: true })], +} satisfies Config diff --git a/tsconfig.json b/tsconfig.json index 7c119d37d..27a4e2617 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,12 @@ { - "extends": "astro/tsconfigs/strict", + "extends": "astro/tsconfigs/strictest", + "include": ["src", "astro.config.ts", "virtual.d.ts"], "compilerOptions": { - "jsx": "preserve", + "module": "NodeNext", + "moduleResolution": "NodeNext", "baseUrl": ".", "paths": { - "fulldev-ui/*": [ - "src/*" - ] + "fulldev-ui/*": ["src/*"], } }, - "exclude": [ - "dist" - ] } \ No newline at end of file diff --git a/virtual.d.ts b/virtual.d.ts new file mode 100644 index 000000000..8c009ed84 --- /dev/null +++ b/virtual.d.ts @@ -0,0 +1,5 @@ +declare module 'virtual:fulldev-ui/config' { + import type { Config } from 'fulldev-ui/integration' + const content: Config + export default content +}
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia + odio vitae vestibulum vestibulum. +
+ Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. +