diff --git a/.changeset/curvy-mirrors-play.md b/.changeset/curvy-mirrors-play.md new file mode 100644 index 000000000..988a91c58 --- /dev/null +++ b/.changeset/curvy-mirrors-play.md @@ -0,0 +1,10 @@ +--- +"@studiocms/ui": patch +--- + +Applied various changes and fixes to different parts of the UI libary. + +- Fixed a CSS leak caused by importing css files instead of having scoped styles +- Adjusted dropdown helper API for better DX +- Adjusted modal helper API for better DX +- Various CSS fixes for different components diff --git a/.changeset/metal-steaks-sparkle.md b/.changeset/metal-steaks-sparkle.md new file mode 100644 index 000000000..31fc96d1d --- /dev/null +++ b/.changeset/metal-steaks-sparkle.md @@ -0,0 +1,5 @@ +--- +"@studiocms/devapps": patch +--- + +[Feat]: Add Wordpress importer app diff --git a/.changeset/thin-hounds-happen.md b/.changeset/thin-hounds-happen.md new file mode 100644 index 000000000..2a495c9fb --- /dev/null +++ b/.changeset/thin-hounds-happen.md @@ -0,0 +1,7 @@ +--- +"@studiocms/dashboard": patch +"@studiocms/core": patch +"studiocms": patch +--- + +Adjusted strings to account for Astro Studio sunsetting diff --git a/.vscode/settings.json b/.vscode/settings.json index cd7fb6d02..450627957 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,8 @@ "quickfix.biome": "explicit", "source.organizeImports.biome": "explicit" }, - "editor.defaultFormatter": "biomejs.biome" + "editor.defaultFormatter": "biomejs.biome", + "[mdx]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } diff --git a/README.md b/README.md index d014d794e..8ea2be8e0 100644 --- a/README.md +++ b/README.md @@ -19,28 +19,7 @@ To see how to get started, check out the [StudioCMS README](./packages/studiocms ## Contributing -We welcome contributions from the community! Whether it's bug reports, feature requests, or code contributions, we appreciate your help in making this project better. - -### Bug Reports and Feature Requests - -If you encounter any bugs or have ideas for new features, please open an issue on our [GitHub repository](https://github.com/astrolicious/studiocms). When creating a new issue, please provide as much detail as possible, including steps to reproduce the issue (for bugs) and a clear description of the proposed feature. - -### Code Contributions - -If you'd like to contribute code to this project, please follow these steps: - -1. Fork the repository and create a new branch for your contribution. -2. Make your changes and ensure that the code follows our coding conventions and style guidelines. -3. Write tests for your changes, if applicable. -4. Update the documentation, if necessary. -5. Commit your changes and push them to your forked repository. -6. Open a pull request against the main repository, providing a clear description of your changes and their purpose. - -We will review your contribution as soon as possible and provide feedback or merge it into the main codebase if everything looks good. - -Please note that by contributing to this project, you agree to our [Code of Conduct](https://github.com/astrolicious/.github/blob/main/.github/CODE_OF_CONDUCT.md). - -Thank you for your interest in contributing to this project! +We welcome contributions from the community! Whether it's bug reports, feature requests, or code contributions, we appreciate your help in making this project better. To get started read our [Contributing Guide](https://docs.studiocms.xyz/start-here/contributing/) ## Chat with Us @@ -80,7 +59,6 @@ Steps to get a running playground should be the following: Commands to run: - `pnpm playground:login` - Login your CLI to Astro Studio - - `pnpm playground:link` - Link to Astro Studio and Create a new DB for your CMS Installation - `pnpm playground:push` - Creates the base tables on the remote database. - `pnpm playground:dev` - Starts the Dev server connected to the linked database diff --git a/biome.json b/biome.json index d5e8a371e..192101cf9 100644 --- a/biome.json +++ b/biome.json @@ -31,7 +31,10 @@ "linter": { "enabled": true, "rules": { - "recommended": true + "recommended": true, + "suspicious": { + "noExplicitAny": "warn" + } } }, "overrides": [ diff --git a/packages/studiocms/src/index.ts b/packages/studiocms/src/index.ts index 7595d7774..c5a1f7079 100644 --- a/packages/studiocms/src/index.ts +++ b/packages/studiocms/src/index.ts @@ -1,25 +1,27 @@ import { defineStudioCMSConfig, defineStudioCMSPlugin } from '@studiocms/core/lib'; +import type { CustomRenderer, Renderer, StudioCMSOptions } from '@studiocms/core/schemas'; import type { StudioCMSPluginOptions } from '@studiocms/core/types'; import integration from './integration'; /** - * # Astro Studio CMS Integration + * **StudioCMS Integration** * * A CMS built for Astro by the Astro Community for the Astro Community. * - * Checkout our [GitHub Repo `@astrolicious/studiocms`](https://github.com/astrolicious/studiocms) - * - * Check out [Astro-StudioCMS.xyz](https://astro-studiocms.xyz) or the Built-in JSDocs *(Hover Docs like this)* for more information. - * * > **Note: Astro SSR adapters that are configured for Image Optimization will automatically take full control of the Image Optimization Service. Making the `imageService` option in this integration not have any effect.** * + * @see [GitHub Repo: 'astrolicious/studiocms'](https://github.com/astrolicious/studiocms) for more information on how to contribute to StudioCMS. + * @see [StudioCMS Docs](https://docs.studiocms.xyz) for more information on how to use StudioCMS. + * */ export const studioCMS = integration; export default studioCMS; // Config Utility -export { defineStudioCMSConfig }; +export { defineStudioCMSConfig, type StudioCMSOptions }; // Plugin System export { defineStudioCMSPlugin, type StudioCMSPluginOptions }; + +export type { CustomRenderer, Renderer }; diff --git a/packages/studiocms_blog/index.ts b/packages/studiocms_blog/index.ts index c24a15b35..8d474fab2 100644 --- a/packages/studiocms_blog/index.ts +++ b/packages/studiocms_blog/index.ts @@ -14,12 +14,14 @@ const studioCMSBlogTheme = defineTheme({ export type ATP_ThemeOptions = Parameters[0]; /** - * # StudioCMS Blog Theme(Integration) - * #### Powered by [`astro-theme-provider`](https://github.com/astrolicious/astro-theme-provider) by [Bryce Russell](https://github.com/BryceRussell) + * **StudioCMS Blog Theme(Integration)** + * + * **Powered by [`astro-theme-provider`](https://github.com/astrolicious/astro-theme-provider) by [Bryce Russell](https://github.com/BryceRussell)** * * This theme provides a Blog Index Page and RSS Feed for your StudioCMS Site as well as route handling for Blog Posts. * * @example + * ```js * import { defineConfig } from 'astro/config'; * import db from '@astrojs/db'; * import studioCMS from 'studiocms'; @@ -41,8 +43,9 @@ export type ATP_ThemeOptions = Parameters[0]; * }), * ], * }); + * ``` */ -export function studioCMSBlog(options: ATP_ThemeOptions) { +export function studioCMSBlog(options?: ATP_ThemeOptions) { let slug: string; if (typeof options?.pages?.['/blog'] === 'string') { diff --git a/packages/studiocms_core/src/components/Avatar.astro b/packages/studiocms_core/src/components/Avatar.astro index 59713202b..4114e5b87 100644 --- a/packages/studiocms_core/src/components/Avatar.astro +++ b/packages/studiocms_core/src/components/Avatar.astro @@ -33,7 +33,7 @@ const { isLoggedIn, dbUser: userProfile } = Astro.locals; )) } { enabled === false && ( - + Authentication Disabled; +export type StudioCMSOptions = typeof StudioCMSOptionsSchema._input; diff --git a/packages/studiocms_core/src/schemas/config/rendererConfig.ts b/packages/studiocms_core/src/schemas/config/rendererConfig.ts index 6189f111e..6c9dd08c6 100644 --- a/packages/studiocms_core/src/schemas/config/rendererConfig.ts +++ b/packages/studiocms_core/src/schemas/config/rendererConfig.ts @@ -6,6 +6,20 @@ import { mdxConfigSchema } from './mdx'; export type Renderer = (content: string) => Promise; export type { markdocRenderer }; +/** + * Custom Renderer Type + * @description A custom renderer that can be used in StudioCMS + * @property {string} name - The name of the renderer + * @property {Renderer} renderer - The renderer function + * @example + * ```ts + * const customRenderer: CustomRenderer = { + * name: 'custom', + * renderer: async (content: string) => { + * return content; + * }, + * }; + */ export type CustomRenderer = { name: string; renderer: Renderer; diff --git a/packages/studiocms_core/src/strings.ts b/packages/studiocms_core/src/strings.ts index 4fd20121e..be4f9a5a7 100644 --- a/packages/studiocms_core/src/strings.ts +++ b/packages/studiocms_core/src/strings.ts @@ -9,9 +9,9 @@ export const CoreStrings = { }; export const DbErrors = { - AstroConfigOutput: "Astro Studio CMS is only supported in 'Output: server' SSR mode.", + AstroConfigOutput: "StudioCMS is only supported in 'Output: server' SSR mode.", AstroConfigSiteURL: - "Astro Studio CMS requires a 'site' configuration in your Astro Config. This can be your domain ( 'https://example.com' ) or localhost ( 'http://localhost:4321' - localhost should only be used during development and should not be used in production).", + "StudioCMS requires a 'site' configuration in your Astro Config. This can be your domain ( 'https://example.com' ) or localhost ( 'http://localhost:4321' - localhost should only be used during development and should not be used in production).", DbStartPage: 'Start Page is Enabled. This will be the only page available until you initialize your database and disable the config option forcing this page to be displayed. To get started, visit http://localhost:4321/start/ in your browser to initialize your database. And Setup your installation.', astroDbMissingMessage: 'Astro DB Integration not found in Astro Config', @@ -39,10 +39,10 @@ export const DashboardStrings = { Setup: 'Setting up StudioCMS Dashboard...', AddIntegrations: 'Adding Dashboard Integrations...', TestAndDemo: - 'Testing and Demo Mode is Enabled, Authentication will not be required to access dashboard pages. But you will only be able to edit the database from the Astro Studio Dashboard, https://studio.astro.build/', + 'Testing and Demo Mode is Enabled, Authentication will not be required to access dashboard pages. But you will only be able to edit the database directly', AuthEnabled: 'Auth is Enabled, Setting Up...', AuthDisabled: - 'Auth is Disabled by the User Configuration. You will only be able to edit the database from the Astro Studio Dashboard, https://studio.astro.build/', + 'Auth is Disabled by the User Configuration. You will only be able to edit the database directly', AuthRoutes: 'Setting up Auth Routes...', DashboardEnabled: 'Dashboard is Enabled.', DashboardDisabled: diff --git a/packages/studiocms_dashboard/src/routes/configuration/admins.astro b/packages/studiocms_dashboard/src/routes/configuration/admins.astro index 4916c126b..7058a5f8d 100644 --- a/packages/studiocms_dashboard/src/routes/configuration/admins.astro +++ b/packages/studiocms_dashboard/src/routes/configuration/admins.astro @@ -87,7 +87,7 @@ if (permissionLevel !== 'admin') {
- Note: To delete admins you can do this from your Astro Studio Dashboard. + Note: To delete admins you can do this from your database.
diff --git a/packages/studiocms_devapps/README.md b/packages/studiocms_devapps/README.md index a7c411038..6d12c6eda 100644 --- a/packages/studiocms_devapps/README.md +++ b/packages/studiocms_devapps/README.md @@ -72,6 +72,20 @@ The following env variables set (`@astrojs/db`): ![pageview](./assets/preview-page.png) +### WordPress Importer + +#### Requires + +- StudioCMS Integration +- A current WP Install +- `@studiocms/blog` (Optional for importing Posts under a blog) + +#### Preview + +- Toolbar app + +![WP-importer](./assets/wp-importer.png) + ## Licensing [MIT Licensed](https://github.com/astrolicious/studiocms/blob/main/LICENSE). diff --git a/packages/studiocms_devapps/assets/wp-importer.png b/packages/studiocms_devapps/assets/wp-importer.png new file mode 100644 index 000000000..3ffbb04eb Binary files /dev/null and b/packages/studiocms_devapps/assets/wp-importer.png differ diff --git a/packages/studiocms_devapps/env.d.ts b/packages/studiocms_devapps/env.d.ts index fbf4966aa..881617f2d 100644 --- a/packages/studiocms_devapps/env.d.ts +++ b/packages/studiocms_devapps/env.d.ts @@ -13,3 +13,17 @@ declare module 'virtual:studiocms-devapps/libsql-viewer' { }; export default value; } + +declare module 'virtual:studiocms-devapps/wp-api/configPath' { + const value: { + readonly projectRoot: string; + }; + export default value; +} + +declare module 'virtual:studiocms-devapps/wp-api-importer' { + const value: { + readonly endpointPath: string; + }; + export default value; +} diff --git a/packages/studiocms_devapps/package.json b/packages/studiocms_devapps/package.json index 6c892c450..f37ea6049 100644 --- a/packages/studiocms_devapps/package.json +++ b/packages/studiocms_devapps/package.json @@ -38,8 +38,14 @@ }, "type": "module", "dependencies": { + "@studiocms/core": "workspace:*", "@libsql/client": "^0.14.0", - "astro-integration-kit": "catalog:" + "astro-integration-kit": "catalog:", + "cheerio": "^1.0.0", + "@types/cheerio": "^0.22.35", + "turndown": "^7.2.0", + "@types/turndown": "^5.0.5", + "html-entities": "^2.5.2" }, "peerDependencies": { "@astrojs/db": "catalog:min", diff --git a/packages/studiocms_devapps/src/apps/libsqlViewer.ts b/packages/studiocms_devapps/src/apps/libsqlViewer.ts index 45b6b99e7..56f52b950 100644 --- a/packages/studiocms_devapps/src/apps/libsqlViewer.ts +++ b/packages/studiocms_devapps/src/apps/libsqlViewer.ts @@ -1,12 +1,15 @@ import config from 'virtual:studiocms-devapps/libsql-viewer'; import { defineToolbarApp } from 'astro/toolbar'; +import { closeOnOutsideClick } from './utils'; export default defineToolbarApp({ - init(canvas) { + init(canvas, eventTarget) { const appWindow = document.createElement('astro-dev-toolbar-window'); appWindow.style.width = '95%'; appWindow.style.height = '80vh'; + closeOnOutsideClick(eventTarget); + const link = document.createElement('a'); link.href = config.endpointPath; link.target = '_blank'; diff --git a/packages/studiocms_devapps/src/apps/utils/index.ts b/packages/studiocms_devapps/src/apps/utils/index.ts new file mode 100644 index 000000000..288e9f50e --- /dev/null +++ b/packages/studiocms_devapps/src/apps/utils/index.ts @@ -0,0 +1,42 @@ +export function createWindowElement(content: string) { + const windowElement = document.createElement('astro-dev-toolbar-window'); + windowElement.innerHTML = content; + windowElement.placement = 'bottom-center'; + return windowElement; +} + +export function closeOnOutsideClick( + eventTarget: EventTarget, + additionalCheck?: (target: Element) => boolean +) { + interface AppToggledEventDetail { + state: boolean; + } + + const isCustomEvent = (event: Event): event is CustomEvent => { + return 'detail' in event; + }; + + function onPageClick(event: MouseEvent) { + const target = event.target as Element | null; + if (!target) return; + if (!target.closest) return; + if (target.closest('astro-dev-toolbar')) return; + if (additionalCheck?.(target)) return; + eventTarget.dispatchEvent( + new CustomEvent('toggle-app', { + detail: { + state: false, + }, + }) + ); + } + eventTarget.addEventListener('app-toggled', (event: Event) => { + if (!isCustomEvent(event)) return; + if (event.detail.state === true) { + document.addEventListener('click', onPageClick, true); + } else { + document.removeEventListener('click', onPageClick, true); + } + }); +} diff --git a/packages/studiocms_devapps/src/apps/wp-importer.ts b/packages/studiocms_devapps/src/apps/wp-importer.ts new file mode 100644 index 000000000..4847fb901 --- /dev/null +++ b/packages/studiocms_devapps/src/apps/wp-importer.ts @@ -0,0 +1,226 @@ +import config from 'virtual:studiocms-devapps/wp-api-importer'; +import { defineToolbarApp } from 'astro/toolbar'; +import { closeOnOutsideClick, createWindowElement } from './utils'; + +export default defineToolbarApp({ + init(canvas, eventTarget) { + createCanvas(); + + document.addEventListener('astro:after-swap', createCanvas); + + closeOnOutsideClick(eventTarget); + function createCanvas() { + const windowComponent = createWindowElement( + ` + +
+
+

Wordpress Importer

+
+
+
+ +
+
+

Import posts and pages into StudioCMS from a WordPress site.
(Requires StudioCMS)

+
+
+
+
+ + +
+ +
+ + +
+ +
+ +
+
+ + +
+
+
+ +
+ +
+ + + + + + +
+
+
+
+
+
+
+ ` + ); + + const form = windowComponent.querySelector('#importer-form'); + + form?.addEventListener('submit', async (event) => { + event.preventDefault(); + + form.classList.add('loading-active'); // Show spinner + + const url = form.querySelector('#importer-url')?.value; + const type = form.querySelector('#importer-type')?.value; + const plugins = form.querySelectorAll( + 'input[name="importer-plugins[]"]:checked' + ); + + const useBlogPlugin = Array.from(plugins).some( + (checkbox) => checkbox.value === 'blog-plugin' + ); + + if (!url || !type) { + alert('Please fill in the required fields'); + form.classList.remove('loading-active'); + return; + } + + const formData = new FormData(); + + formData.append('url', url); + formData.append('type', type); + formData.append('useBlogPlugin', useBlogPlugin ? 'true' : 'false'); + + console.log('formData', formData); + + const response = await fetch(config.endpointPath, { + method: 'POST', + body: formData, + }); + + const responseStatus = response.status; + const responseText = response.statusText; + form.classList.remove('loading-active'); + + if (responseStatus === 200) { + alert( + 'Imported successfully! You can now view/edit the imported content in your StudioCMS dashboard.' + ); + } else { + alert(`Failed to import: ${responseText}`); + } + }); + + canvas.append(windowComponent); + } + }, +}); diff --git a/packages/studiocms_devapps/src/index.ts b/packages/studiocms_devapps/src/index.ts index ea729a350..6c51c798f 100644 --- a/packages/studiocms_devapps/src/index.ts +++ b/packages/studiocms_devapps/src/index.ts @@ -1,5 +1,10 @@ import integration from './integration'; +/** + * **StudioCMS DevApps** + * + * A Collection of useful tools available during dev mode in Astro. + */ export const devApps = integration; export default devApps; diff --git a/packages/studiocms_devapps/src/integration.ts b/packages/studiocms_devapps/src/integration.ts index 0325b1216..7288ca9b7 100644 --- a/packages/studiocms_devapps/src/integration.ts +++ b/packages/studiocms_devapps/src/integration.ts @@ -16,16 +16,22 @@ export default defineIntegration({ name, options: { endpointPath, - appsConfig: { libSQLViewer }, + appsConfig: { libSQLViewer, wpApiImporter }, verbose, }, }) { const { resolve } = createResolver(import.meta.url); + + // Generate Endpoint Path + const EndpointPath = pathGenerator(endpointPath); + + const WP_API_URL = EndpointPath(wpApiImporter.endpoint); + return { hooks: { 'astro:config:setup': async (params) => { // Destructure Params - const { logger, addDevToolbarApp, command } = params; + const { logger, addDevToolbarApp, command, config } = params; // Log logger.info(`Starting, Version: ${version}`); @@ -35,8 +41,10 @@ export default defineIntegration({ logger.info(`[${name}] Verbose Mode`); } - // Generate Endpoint Path - const EndpointPath = pathGenerator(endpointPath); + // Get Astro Project Root + const root = config.root.pathname; + + logger.info(`Root: ${root}`); // Enforce dev mode only if (command === 'dev') { @@ -45,6 +53,8 @@ export default defineIntegration({ name, imports: { 'virtual:studiocms-devapps/libsql-viewer': `export default ${JSON.stringify({ endpointPath: EndpointPath(libSQLViewer.endpoint) })};`, + 'virtual:studiocms-devapps/wp-api/configPath': `export default ${JSON.stringify({ projectRoot: root })};`, + 'virtual:studiocms-devapps/wp-api-importer': `export default ${JSON.stringify({ endpointPath: WP_API_URL })};`, }, }); @@ -64,6 +74,21 @@ export default defineIntegration({ entrypoint: resolve('./apps/libsqlViewer'), }); } + + // WP-API Importer + if (wpApiImporter.enabled) { + verbose && logger.info('Adding Dev Toolbar App: WP-API Importer'); + injectDevRoute(params, { + entrypoint: resolve('routes/wp-api-importer.ts'), + pattern: WP_API_URL, + }); + addDevToolbarApp({ + name: 'Wordpress API Importer', + id: 'wp-api-importer', + icon: ``, + entrypoint: resolve('./apps/wp-importer'), + }); + } } }, }, diff --git a/packages/studiocms_devapps/src/routes/wp-api-importer.ts b/packages/studiocms_devapps/src/routes/wp-api-importer.ts new file mode 100644 index 000000000..34e38b116 --- /dev/null +++ b/packages/studiocms_devapps/src/routes/wp-api-importer.ts @@ -0,0 +1,56 @@ +import type { APIContext, APIRoute } from 'astro'; +import { importPagesFromWPAPI, importPostsFromWPAPI } from '../utils/wp-api'; + +export const POST: APIRoute = async ({ request }: APIContext) => { + const data = await request.formData(); + + const url = data.get('url'); + const type = data.get('type'); + const useBlogPlugin = data.get('useBlogPlugin'); + + if (!url || !type) { + return new Response(null, { + status: 400, + statusText: 'Bad Request', + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Headers': '*', + }, + }); + } + + if (typeof url !== 'string' || typeof type !== 'string') { + return new Response(null, { + status: 400, + statusText: 'Bad Request', + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Headers': '*', + }, + }); + } + + console.log('Starting Import:', url, '\n Type:', type, '\n useBlogPlugin:', useBlogPlugin); + + const useBlogPluginValue = useBlogPlugin === 'true'; + + switch (type) { + case 'pages': + await importPagesFromWPAPI(url); + break; + case 'posts': + await importPostsFromWPAPI(url, useBlogPluginValue); + break; + default: + throw new Error('Invalid import type'); + } + + return new Response(null, { + status: 200, + statusText: 'success', + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Headers': '*', + }, + }); +}; diff --git a/packages/studiocms_devapps/src/schema/appsConfig.ts b/packages/studiocms_devapps/src/schema/appsConfig.ts index 73edf9981..bc27e0c90 100644 --- a/packages/studiocms_devapps/src/schema/appsConfig.ts +++ b/packages/studiocms_devapps/src/schema/appsConfig.ts @@ -2,6 +2,9 @@ import { z } from 'astro/zod'; export const AppsConfigSchema = z .object({ + /** + * libSQLViewer App Config + */ libSQLViewer: z .object({ /** @@ -17,6 +20,24 @@ export const AppsConfigSchema = z }) .optional() .default({}), + /** + * WP API Importer App Config + */ + wpApiImporter: z + .object({ + /** + * Enable WP API Importer app (Requires StudioCMS Integration) + * @default false + */ + enabled: z.boolean().optional().default(false), + /** + * Endpoint path for WP API Importer API endpoint + * @default '/wp-api-importer' + */ + endpoint: z.string().optional().default('/wp-api-importer'), + }) + .optional() + .default({}), }) .optional() .default({}); diff --git a/packages/studiocms_devapps/src/schema/index.ts b/packages/studiocms_devapps/src/schema/index.ts index 081a53520..706a16126 100644 --- a/packages/studiocms_devapps/src/schema/index.ts +++ b/packages/studiocms_devapps/src/schema/index.ts @@ -11,7 +11,7 @@ export const optionsSchema = z */ endpointPath: z.string().optional().default('/_studiocms-devapps'), /** - * Verbose mode + * Verbose logging mode * @default false */ verbose: z.boolean().optional().default(false), diff --git a/packages/studiocms_devapps/src/schema/wp-api/index.ts b/packages/studiocms_devapps/src/schema/wp-api/index.ts new file mode 100644 index 000000000..cae120d1a --- /dev/null +++ b/packages/studiocms_devapps/src/schema/wp-api/index.ts @@ -0,0 +1,47 @@ +import { z } from 'astro/zod'; + +const OpenClosedSchema = z.enum(['open', 'closed', '']); + +export const PageSchema = z.object({ + id: z.number(), + date: z.coerce.date(), + date_gmt: z.coerce.date(), + guid: z.object({ rendered: z.string() }), + modified: z.coerce.date(), + modified_gmt: z.coerce.date(), + slug: z.string(), + status: z.enum(['publish', 'future', 'draft', 'pending', 'private']), + type: z.string(), + title: z.object({ rendered: z.string() }), + content: z.object({ rendered: z.string(), protected: z.boolean() }), + excerpt: z.object({ rendered: z.string(), protected: z.boolean() }), + author: z.number(), + featured_media: z.number(), + parent: z.number(), + menu_order: z.number(), + comment_status: OpenClosedSchema, + ping_status: OpenClosedSchema, + template: z.string(), + meta: z.array(z.any().or(z.record(z.any()))), +}); + +export const PostSchema = PageSchema.extend({ + format: z.enum([ + 'standard', + 'aside', + 'chat', + 'gallery', + 'link', + 'image', + 'quote', + 'status', + 'video', + 'audio', + '', + ]), + categories: z.array(z.number()), + tags: z.array(z.number()), +}); + +export type Page = typeof PageSchema._output; +export type Post = typeof PostSchema._output; diff --git a/packages/studiocms_devapps/src/utils/wp-api/converters.ts b/packages/studiocms_devapps/src/utils/wp-api/converters.ts new file mode 100644 index 000000000..ae431b9b1 --- /dev/null +++ b/packages/studiocms_devapps/src/utils/wp-api/converters.ts @@ -0,0 +1,138 @@ +import path from 'node:path'; +import Config from 'virtual:studiocms-devapps/wp-api/configPath'; +import { decode } from 'html-entities'; +import TurndownService from 'turndown'; +import type { Page, Post } from '../../schema/wp-api'; +import type { PageContent, PageData } from './index'; +import { + apiEndpoint, + cleanUpHtml, + downloadAndUpdateImages, + downloadPostImage, + stripHtml, +} from './utils'; + +const ASTROPUBLICFOLDER = path.resolve(Config.projectRoot, 'public'); +const WPImportFolder = path.resolve(ASTROPUBLICFOLDER, 'wp-import'); +const pagesImagesFolder = path.resolve(WPImportFolder, 'pages'); +const postsImagesFolder = path.resolve(WPImportFolder, 'posts'); + +export const ConvertToPageData = async (page: unknown): Promise => { + const data = page as Page; + + const titleImageId = data.featured_media; + const titleImageURL = apiEndpoint(`${titleImageId}`, 'media'); + const titleImageResponse = await fetch(titleImageURL); + const titleImageJson = await titleImageResponse.json(); + const titleImage = await downloadPostImage(titleImageJson.source_url, pagesImagesFolder); + + const pageData: PageData = { + id: crypto.randomUUID(), + title: data.title.rendered, + description: decode(stripHtml(data.excerpt.rendered)), + slug: data.slug, + publishedAt: new Date(data.date_gmt), + updatedAt: new Date(data.modified_gmt), + showOnNav: false, + contentLang: 'default', + package: 'studiocms', + }; + + if (titleImage) { + pageData.heroImage = titleImage; + } + + return pageData; +}; + +export const ConvertToPageContent = async ( + pageData: PageData, + page: unknown +): Promise => { + const data = page as Page; + + if (pageData.id === undefined) { + throw new Error('pageData is missing id'); + } + + const cleanupContent = cleanUpHtml(data.content.rendered); + const htmlWithImages = await downloadAndUpdateImages(cleanupContent, pagesImagesFolder); + + const turndownService = new TurndownService({ + bulletListMarker: '-', + codeBlockStyle: 'fenced', + emDelimiter: '*', + }); + + const content = turndownService.turndown(htmlWithImages); + + const pageContent: PageContent = { + id: crypto.randomUUID(), + contentId: pageData.id, + contentLang: 'default', + content: content, + }; + + return pageContent; +}; + +export const ConvertToPostData = async (post: unknown, useBlogPkg: boolean): Promise => { + const data = post as Post; + + const titleImageId = data.featured_media; + const titleImageURL = apiEndpoint(`${titleImageId}`, 'media'); + const titleImageResponse = await fetch(titleImageURL); + const titleImageJson = await titleImageResponse.json(); + const titleImage = await downloadPostImage(titleImageJson.source_url, pagesImagesFolder); + + const pkg = useBlogPkg ? '@studiocms/blog' : 'studiocms'; + + const pageData: PageData = { + id: crypto.randomUUID(), + title: data.title.rendered, + description: decode(stripHtml(data.excerpt.rendered)), + slug: data.slug, + publishedAt: new Date(data.date_gmt), + updatedAt: new Date(data.modified_gmt), + showOnNav: false, + contentLang: 'default', + package: pkg, + }; + + if (titleImage) { + pageData.heroImage = titleImage; + } + + return pageData; +}; + +export const ConvertToPostContent = async ( + pageData: PageData, + post: unknown +): Promise => { + const data = post as Post; + + if (pageData.id === undefined) { + throw new Error('pageData is missing id'); + } + + const cleanupContent = cleanUpHtml(data.content.rendered); + const htmlWithImages = await downloadAndUpdateImages(cleanupContent, postsImagesFolder); + + const turndownService = new TurndownService({ + bulletListMarker: '-', + codeBlockStyle: 'fenced', + emDelimiter: '*', + }); + + const content = turndownService.turndown(htmlWithImages); + + const pageContent: PageContent = { + id: crypto.randomUUID(), + contentId: pageData.id, + contentLang: 'default', + content: content, + }; + + return pageContent; +}; diff --git a/packages/studiocms_devapps/src/utils/wp-api/index.ts b/packages/studiocms_devapps/src/utils/wp-api/index.ts new file mode 100644 index 000000000..a5ed7c12f --- /dev/null +++ b/packages/studiocms_devapps/src/utils/wp-api/index.ts @@ -0,0 +1,118 @@ +/// +import { db } from 'astro:db'; +import { tsPageContent, tsPageData } from '@studiocms/core/db/tsTables'; +import type { Page } from '../../schema/wp-api'; +import { + ConvertToPageContent, + ConvertToPageData, + ConvertToPostContent, + ConvertToPostData, +} from './converters'; +import { apiEndpoint, fetchAll } from './utils'; + +export type PageData = typeof tsPageData.$inferInsert; +export type PageContent = typeof tsPageContent.$inferInsert; + +const generatePageFromData = async (page: unknown) => { + const pageData = await ConvertToPageData(page); + const pageContent = await ConvertToPageContent(pageData, page); + + return { pageData, pageContent }; +}; + +const generatePostFromData = async (post: unknown, useBlogPkg: boolean) => { + const pageData = await ConvertToPostData(post, useBlogPkg); + const pageContent = await ConvertToPostContent(pageData, post); + + return { pageData, pageContent }; +}; + +const importPage = async (page: unknown) => { + const { pageData, pageContent } = await generatePageFromData(page); + + const pageDataResult = await db + .insert(tsPageData) + .values(pageData) + .returning({ id: tsPageData.id, title: tsPageData.title }) + .get(); + + if (pageDataResult === undefined) { + throw new Error('Failed to insert page data'); + } + + const pageContentResult = await db + .insert(tsPageContent) + .values(pageContent) + .returning({ id: tsPageContent.id }) + .get(); + + if (pageContentResult === undefined) { + throw new Error('Failed to insert page content'); + } + + console.log('- Imported new page from WP-API: ', pageDataResult.title); +}; + +export const importPagesFromWPAPI = async (endpoint: string) => { + const url = apiEndpoint(endpoint, 'pages'); + + console.log('fetching pages from: ', url.origin); + + const pages: Page[] = await fetchAll(url); + + console.log('Total pages: ', pages.length); + + try { + for (const page of pages) { + console.log('importing page:', page.title.rendered); + await importPage(page); + } + } catch (error) { + console.error('Failed to import pages from WP-API:', error); + } +}; + +const importPost = async (post: unknown, useBlogPkg: boolean) => { + const { pageData, pageContent } = await generatePostFromData(post, useBlogPkg); + + const pageDataResult = await db + .insert(tsPageData) + .values(pageData) + .returning({ id: tsPageData.id, title: tsPageData.title }) + .get(); + + if (pageDataResult === undefined) { + throw new Error('Failed to insert post data'); + } + + const pageContentResult = await db + .insert(tsPageContent) + .values(pageContent) + .returning({ id: tsPageContent.id }) + .get(); + + if (pageContentResult === undefined) { + throw new Error('Failed to insert post content'); + } + + console.log('- Imported new post from WP-API:', pageDataResult.title); +}; + +export const importPostsFromWPAPI = async (endpoint: string, useBlogPkg: boolean) => { + const url = apiEndpoint(endpoint, 'posts'); + + console.log('Fetching posts from: ', url.origin); + + const posts: Page[] = await fetchAll(url); + + console.log('Total posts: ', posts.length); + + try { + for (const post of posts) { + console.log('importing post: ', post.title.rendered); + await importPost(post, useBlogPkg); + } + } catch (error) { + console.error('Failed to import posts from WP-API: ', error); + } +}; diff --git a/packages/studiocms_devapps/src/utils/wp-api/utils.ts b/packages/studiocms_devapps/src/utils/wp-api/utils.ts new file mode 100644 index 000000000..dcdc920d8 --- /dev/null +++ b/packages/studiocms_devapps/src/utils/wp-api/utils.ts @@ -0,0 +1,166 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { AstroError } from 'astro/errors'; +import * as cheerio from 'cheerio'; + +const imagesNotDownloaded = []; + +export function stripHtml(string: string) { + return string.replace(/<[^>]*>/g, ''); +} + +export const cleanUpHtml = (html: string) => { + const $ = cheerio.load(html); + + const images = $('img'); + for (const image of images) { + $(image).removeAttr('class width height data-recalc-dims sizes srcset'); + } + + $('.wp-polls').html( + 'Polls have been temporarily removed while we migrate to a new platform.' + ); + $('.wp-polls-loading').remove(); + + return $.html(); +}; + +export async function downloadImage(imageUrl: string | URL, destination: string | URL) { + if (fs.existsSync(destination)) { + console.error('File already exists:', destination); + return true; + } + + try { + const response = await fetch(imageUrl); + + if (response.ok && response.body) { + const reader = response.body.getReader(); + const chunks = []; + let done = false; + + while (!done) { + const { done: readerDone, value } = await reader.read(); + if (value) { + chunks.push(value); + } + done = readerDone; + } + + const fileBuffer = Buffer.concat(chunks); + fs.writeFileSync(destination, fileBuffer, { flag: 'wx' }); + + console.log('Downloaded image:', imageUrl); + + return true; + } + + console.error('Failed to download image:', imageUrl); + return false; + } catch (error) { + console.error('Failed to download image:', imageUrl, error); + return false; + } +} + +export const downloadPostImage = async (src: string, pathToFolder: string) => { + if (!src || !pathToFolder) { + return; + } + + if (!fs.existsSync(pathToFolder)) { + fs.mkdirSync(pathToFolder, { recursive: true }); + } + + // biome-ignore lint/style/noNonNullAssertion: + const fileName = path.basename(src).split('?')[0]!; + const destinationFile = path.resolve(pathToFolder, fileName); + + if (fs.existsSync(destinationFile)) { + console.log(`Post/Page image "${destinationFile}" already exists, skipping...`); + return fileName; + } + + const imageDownloaded = await downloadImage(src, destinationFile); + + if (!imageDownloaded) { + imagesNotDownloaded.push(src); + } + + return imageDownloaded ? fileName : undefined; +}; + +export const downloadAndUpdateImages = async (html: string, pathToFolder: string) => { + const $ = cheerio.load(html); + const images = $('img'); + + for (const image of images) { + const src = $(image).attr('src'); + if (src) { + const newSrc = await downloadPostImage(src, pathToFolder); + // biome-ignore lint/style/noNonNullAssertion: + $(image).attr('src', newSrc!); + } + } + + return $.html(); +}; + +export const apiEndpoint = (endpoint: string, type: 'posts' | 'pages' | 'media') => { + if (!endpoint) { + throw new AstroError( + 'Missing `endpoint` argument.', + 'Please pass a URL to your WordPress website as the `endpoint` option to the WordPress importer. Most commonly this looks something like `https://example.com/`' + ); + } + let newEndpoint = endpoint; + if (!newEndpoint.endsWith('/')) newEndpoint += '/'; + const apiBase = new URL(newEndpoint); + apiBase.pathname = `wp-json/wp/v2/${type}`; + return apiBase; +}; + +/** + * Fetch all pages for a paginated WP endpoint. + */ +// biome-ignore lint/suspicious/noExplicitAny: +export async function fetchAll(url: URL, page = 1, results: any[] = []) { + // Search params + url.searchParams.set('per_page', '100'); + url.searchParams.set('page', String(page)); + + // Fetch + const response = await fetch(url); + let data = await response.json(); + + // Check for errors + if (!Array.isArray(data)) { + if (typeof data === 'object') { + data = Object.entries(data).map(([id, val]) => { + if (typeof val === 'object') return { id, ...val }; + return { id }; + }); + } else { + throw new AstroError( + 'Expected WordPress API to return an array of items.', + `Received ${typeof data}:\n\n\`\`\`json\n${JSON.stringify(data, null, 2)}\n\`\`\`` + ); + } + } + + // Append + results.push(...data); + + // Check for pagination + const totalPages = Number.parseInt(response.headers.get('X-WP-TotalPages') || '1'); + console.log('Fetched page', page, 'of', totalPages); + + // Recurse + if (page < totalPages) { + console.log('Fetching next page...'); + return fetchAll(url, page + 1, results); + } + + // Done + return results; +} diff --git a/packages/studiocms_robotstxt/src/index.ts b/packages/studiocms_robotstxt/src/index.ts index 80b32826a..6d0b99d7c 100644 --- a/packages/studiocms_robotstxt/src/index.ts +++ b/packages/studiocms_robotstxt/src/index.ts @@ -123,7 +123,7 @@ export interface PolicyOptions { * [ Optional ] Indicates to the robot that the page URL contains parameters (like UTM tags) that should be ignored when indexing it. * * @example - * ```hash + * ```bash * # for URLs like: * www.example2.com/index.php?page=1&sid=2564126ebdec301c607e5df * www.example2.com/index.php?page=1&sid=974017dcd170d6c4a5d76ae diff --git a/packages/studiocms_ui/src/components/Button.astro b/packages/studiocms_ui/src/components/Button.astro new file mode 100644 index 000000000..da41519dd --- /dev/null +++ b/packages/studiocms_ui/src/components/Button.astro @@ -0,0 +1,337 @@ +--- +import type { HTMLTag, Polymorphic } from 'astro/types'; +import type { StudioCMSColorway } from '../utils/colors'; + +type Props = Omit, 'as'> & { + as?: As; + size?: 'sm' | 'md' | 'lg'; + fullWidth?: boolean; + color?: StudioCMSColorway; + variant?: 'solid' | 'outlined' | 'flat'; + class?: string; + disabled?: boolean; +}; + +const { + size = 'md', + fullWidth = false, + color = 'default', + variant = 'default', + as: As = 'button', + class: className, + disabled = false, + ...props +} = Astro.props; +--- + + + + + + + diff --git a/packages/studiocms_ui/src/components/Button/Button.astro b/packages/studiocms_ui/src/components/Button/Button.astro deleted file mode 100644 index b69107409..000000000 --- a/packages/studiocms_ui/src/components/Button/Button.astro +++ /dev/null @@ -1,45 +0,0 @@ ---- -import './Button.css'; - -import type { HTMLTag, Polymorphic } from 'astro/types'; -import type { StudioCMSColorway } from '../../utils/colors'; - -type Props = Omit, 'as'> & { - as?: As; - size?: 'sm' | 'md' | 'lg'; - fullWidth?: boolean; - color?: StudioCMSColorway; - variant?: 'solid' | 'outlined' | 'flat'; - class?: string; - disabled?: boolean; -}; - -const { - size = 'md', - fullWidth = false, - color = 'default', - variant = 'default', - as: As = 'button', - class: className, - disabled = false, - ...props -} = Astro.props; ---- - - - - - - \ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Button/Button.css b/packages/studiocms_ui/src/components/Button/Button.css deleted file mode 100644 index 8484a52b4..000000000 --- a/packages/studiocms_ui/src/components/Button/Button.css +++ /dev/null @@ -1,292 +0,0 @@ -/* Default Styles */ -.button { - display: flex; - flex-direction: row; - align-items: center; - text-align: center; - - position: relative; - - /* Move gaps & radii to spacings.css later on */ - gap: 0.5rem; - - outline: none; - border: none; - - font-weight: 400; - - border-radius: 0.5rem; - - transition: all 0.15s ease; - - cursor: pointer; - - /* Default colorway */ - - background-color: hsl(var(--default-base)); - border-color: hsl(var(--border)); - color: hsl(var(--text-muted)); - - min-width: fit-content; - - will-change: transform; - - text-decoration: none; -} - -.button.disabled { - pointer-events: none; - opacity: 0.5; -} - -.button.outlined { - border-width: 1px; - border-style: solid; -} - -.button:hover { - background-color: hsl(var(--default-hover)); -} - -.button:active { - background-color: hsl(var(--default-active)); - transform: scale(0.95); -} - -.button.flat { - background: hsla(var(--default-flat)); -} - -.button.flat:hover { - background: hsla(var(--default-flat-hover)); -} - -.button.flat:active { - background: hsla(var(--default-flat-active)); -} - -/* Sizes */ -.button.sm { - height: 32px; - padding: 0.5rem 0.75rem; - - font-size: 0.825em; -} - -.button.md { - height: 40px; - padding: 0.5rem 0.75rem; - - font-size: 0.875em; -} - -.button.lg { - height: 48px; - padding: 0.75rem 1rem; - - font-size: 1em; -} - -/* Primary Colorway */ -.button.primary { - background-color: hsl(var(--primary-base)); - border-color: hsl(var(--primary-base)); - color: hsl(var(--text-inverted)); -} - -.button.primary:hover { - background-color: hsl(var(--primary-hover)); -} - -.button.primary:active { - background-color: hsl(var(--primary-active)); -} - -.button.primary.outlined { - background-color: hsl(var(--default-base)); - color: hsl(var(--text-normal)); -} - -.button.primary.outlined:hover { - background-color: hsl(var(--default-hover)); -} - -.button.primary.outlined:active { - background-color: hsl(var(--default-active)); -} - -.button.primary.flat { - background-color: hsla(var(--primary-flat)); - color: hsl(259, 96%, 79%); -} - -.button.primary.flat:hover { - background-color: hsla(var(--primary-flat-hover)); -} - -.button.primary.flat:active { - background-color: hsla(var(--primary-flat-active)); -} - -/* Success Colorway */ -.button.success { - background-color: hsl(var(--success-base)); - border-color: hsl(var(--success-base)); - color: hsl(var(--text-dark)); -} - -.button.success:hover { - background-color: hsl(var(--success-hover)); -} - -.button.success:active { - background-color: hsl(var(--success-active)); -} - -.button.success.outlined { - background-color: hsl(var(--default-base)); - color: hsl(var(--text-normal)); -} - -.button.success.outlined:hover { - background-color: hsl(var(--default-hover)); -} - -.button.success.outlined:active { - background-color: hsl(var(--default-active)); -} - -.button.success.flat { - background-color: hsla(var(--success-flat)); - color: hsl(var(--success-base)); -} - -.button.success.flat:hover { - background-color: hsla(var(--success-flat-hover)); -} - -.button.success.flat:active { - background-color: hsla(var(--success-flat-active)); -} - -/* Warning Colorway */ -.button.warning { - background-color: hsl(var(--warning-base)); - border-color: hsl(var(--warning-base)); - color: hsl(var(--text-dark)); -} - -.button.warning:hover { - background-color: hsl(var(--warning-hover)); -} - -.button.warning:active { - background-color: hsl(var(--warning-active)); -} - -.button.warning.outlined { - background-color: hsl(var(--default-base)); - color: hsl(var(--text-normal)); -} - -.button.warning.outlined:hover { - background-color: hsl(var(--default-hover)); -} - -.button.warning.outlined:active { - background-color: hsl(var(--default-active)); -} - -.button.warning.flat { - background-color: hsla(var(--warning-flat)); - color: hsl(var(--warning-base)); -} - -.button.warning.flat:hover { - background-color: hsla(var(--warning-flat-hover)); -} - -.button.warning.flat:active { - background-color: hsla(var(--warning-flat-active)); -} - -/* Danger Colorway */ -.button.danger { - background-color: hsl(var(--danger-base)); - border-color: hsl(var(--danger-base)); - color: hsl(var(--text-light)); -} - -.button.danger:hover { - background-color: hsl(var(--danger-hover)); -} - -.button.danger:active { - background-color: hsl(var(--danger-active)); -} - -.button.danger.outlined { - background-color: hsl(var(--default-base)); - color: hsl(var(--text-normal)); -} - -.button.danger.outlined:hover { - background-color: hsl(var(--default-hover)); -} - -.button.danger.outlined:active { - background-color: hsl(var(--default-active)); -} - -.button.danger.flat { - background-color: hsla(var(--danger-flat)); - color: hsl(337, 92%, 71%); -} - -.button.danger.flat:hover { - background-color: hsla(var(--danger-flat-hover)); -} - -.button.danger.flat:active { - background-color: hsla(var(--danger-flat-active)); -} - -.button.full { - width: 100%; -} - -[data-theme="light"] { - .button.primary.flat { - color: hsl(259, 84%, 45%); - } - - .button.success.flat { - background-color: hsl(var(--success-base), 0.2); - color: hsl(143, 59%, 20%); - } - - .button.success.flat:hover { - background-color: hsla(var(--success-flat-hover)); - } - - .button.success.flat:active { - background-color: hsla(var(--success-flat-active)); - } - - .button.warning.flat { - background-color: hsla(var(--warning-base), 0.2); - color: hsl(48, 78%, 20%); - } - - .button.warning.flat:hover { - background-color: hsla(var(--warning-base), 0.25); - } - - .button.warning.flat:active { - background-color: hsla(var(--warning-base), 0.4); - } - - .button.danger.flat { - color: hsl(339, 97%, 29%); - } -} diff --git a/packages/studiocms_ui/src/components/Card.astro b/packages/studiocms_ui/src/components/Card.astro new file mode 100644 index 000000000..140b9d6be --- /dev/null +++ b/packages/studiocms_ui/src/components/Card.astro @@ -0,0 +1,62 @@ +--- +import type { HTMLTag, Polymorphic } from 'astro/types'; + +type Props = Omit, 'as'> & { + as?: As; + class?: string; + fullWidth?: boolean; + fullHeight?: boolean; +}; + +const { as: As = 'div', class: className, fullWidth, fullHeight, ...props } = Astro.props; +--- + +
+ +
+
+ +
+ +
+ diff --git a/packages/studiocms_ui/src/components/Card/Card.astro b/packages/studiocms_ui/src/components/Card/Card.astro deleted file mode 100644 index 83fb87b4a..000000000 --- a/packages/studiocms_ui/src/components/Card/Card.astro +++ /dev/null @@ -1,25 +0,0 @@ ---- -import './Card.css'; - -import type { HTMLTag, Polymorphic } from 'astro/types'; - -type Props = Omit, 'as'> & { - as?: As; - class?: string; - fullWidth?: boolean; - fullHeight?: boolean; -}; - -const { as: As = 'div', class: className, fullWidth, fullHeight, ...props } = Astro.props; ---- - -
- -
-
- -
- -
\ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Card/Card.css b/packages/studiocms_ui/src/components/Card/Card.css deleted file mode 100644 index 110bbe87c..000000000 --- a/packages/studiocms_ui/src/components/Card/Card.css +++ /dev/null @@ -1,37 +0,0 @@ -.card { - border: 1px solid hsl(var(--border)); - background-color: hsl(var(--background-base)); - border-radius: .5rem; - width: fit-content; - height: fit-content; -} - -.card.full-w { - width: 100%; -} - -.card.full-h { - height: 100%; -} - -.card-header:has(*) { - padding: 1rem 1rem 0rem 1rem; - * { - margin: 0; - } -} - -.card-body { - padding: 1rem; -} - -.card-footer:has(*) { - border-top: 1px solid hsl(var(--border)); - padding: 1rem; -} - -@media screen and (max-width: 840px) { - .card { - width: 100%; - } -} diff --git a/packages/studiocms_ui/src/components/Center.astro b/packages/studiocms_ui/src/components/Center.astro new file mode 100644 index 000000000..12ccf9d71 --- /dev/null +++ b/packages/studiocms_ui/src/components/Center.astro @@ -0,0 +1,16 @@ + +
+ +
+ diff --git a/packages/studiocms_ui/src/components/Center/Center.astro b/packages/studiocms_ui/src/components/Center/Center.astro deleted file mode 100644 index 8f4564cd7..000000000 --- a/packages/studiocms_ui/src/components/Center/Center.astro +++ /dev/null @@ -1,7 +0,0 @@ ---- -import './Center.css'; ---- - -
- -
\ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Center/Center.css b/packages/studiocms_ui/src/components/Center/Center.css deleted file mode 100644 index df55d5ec0..000000000 --- a/packages/studiocms_ui/src/components/Center/Center.css +++ /dev/null @@ -1,10 +0,0 @@ -.center { - display: flex; - align-items: center; - justify-content: center; - - width: 100%; - height: 100%; - - text-align: center; -} diff --git a/packages/studiocms_ui/src/components/Checkbox.astro b/packages/studiocms_ui/src/components/Checkbox.astro new file mode 100644 index 000000000..d0048dd9c --- /dev/null +++ b/packages/studiocms_ui/src/components/Checkbox.astro @@ -0,0 +1,181 @@ +--- +import Icon from '../utils/Icon.astro'; +import type { StudioCMSColorway } from '../utils/colors'; +import { generateID } from '../utils/generateID'; + +type Props = { + label: string; + size?: 'sm' | 'md' | 'lg'; + color?: StudioCMSColorway; + defaultChecked?: boolean; + disabled?: boolean; + name?: string; + isRequired?: boolean; +}; + +const { + size = 'md', + color = 'default', + defaultChecked, + disabled, + name = generateID('checkbox'), + label, + isRequired, +} = Astro.props; + +const iconSizes = { + sm: 14, + md: 16, + lg: 24, +}; +--- + + + diff --git a/packages/studiocms_ui/src/components/Checkbox/Checkbox.astro b/packages/studiocms_ui/src/components/Checkbox/Checkbox.astro deleted file mode 100644 index 5c28ae08e..000000000 --- a/packages/studiocms_ui/src/components/Checkbox/Checkbox.astro +++ /dev/null @@ -1,63 +0,0 @@ ---- -import './Checkbox.css'; - -import Icon from '../../utils/Icon.astro'; -import type { StudioCMSColorway } from '../../utils/colors'; -import { generateID } from '../../utils/generateID'; - -type Props = { - label: string; - size?: 'sm' | 'md' | 'lg'; - color?: StudioCMSColorway; - defaultChecked?: boolean; - disabled?: boolean; - name?: string; - isRequired?: boolean; -}; - -const { - size = 'md', - color = 'default', - defaultChecked, - disabled, - name = generateID('checkbox'), - label, - isRequired, -} = Astro.props; - -const iconSizes = { - sm: 14, - md: 16, - lg: 24, -}; ---- - \ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Checkbox/Checkbox.css b/packages/studiocms_ui/src/components/Checkbox/Checkbox.css deleted file mode 100644 index 64e3dbe42..000000000 --- a/packages/studiocms_ui/src/components/Checkbox/Checkbox.css +++ /dev/null @@ -1,117 +0,0 @@ -.checkmark-label { - display: flex; - flex-direction: row; - align-items: center; - gap: .5rem; - position: relative; - margin: .25rem 0; -} - -.checkmark-label.disabled { - opacity: 0.5; - pointer-events: none; - color: hsl(var(--text-muted)); -} - -.checkmark-container { - display: flex; - align-items: center; - justify-content: center; - background-color: hsl(var(--default-base)); - border: 2px solid hsl(var(--default-base)); - border-radius: .5rem; - cursor: pointer; - transition: all .15s ease; -} - -.checkmark-label:hover .checkmark-container { - background-color: hsl(var(--default-hover)); -} - -.checkmark-label:active .checkmark-container { - background-color: hsl(var(--default-active)); - scale: 0.9; -} - -.checkmark-label.sm { - font-size: .875em; -} - -.checkmark-label.sm .checkmark-container { - width: 1.25rem; - height: 1.25rem; -} - -.checkmark-label.md .checkmark-container { - width: 1.5rem; - height: 1.5rem; -} - -.checkmark-label.lg { - font-size: 1.125em; -} - -.checkmark-label.lg .checkmark-container { - width: 1.75rem; - height: 1.75rem; -} - -.primary .checkmark-container:has(.checkbox:checked) { - border-color: hsl(var(--primary-base)); - background-color: hsl(var(--primary-base)); -} - -.success .checkmark-container:has(.checkbox:checked) { - border-color: hsl(var(--success-base)); - background-color: hsl(var(--success-base)); -} - -.warning .checkmark-container:has(.checkbox:checked) { - border-color: hsl(var(--warning-base)); - background-color: hsl(var(--warning-base)); -} - -.danger .checkmark-container:has(.checkbox:checked) { - border-color: hsl(var(--danger-base)); - background-color: hsl(var(--danger-base)); -} - -.req-star { - color: hsl(var(--danger-base)); - font-weight: 700; -} - -.checkbox { - width: 0; - height: 0; - visibility: hidden; - opacity: 0; - margin: 0; -} - -.checkmark polyline { - transition: all .15s ease; - color: hsl(var(--text-normal)); -} - -.primary .checkmark polyline { - color: hsl(var(--text-inverted)); -} - -.success .checkmark polyline { - color: hsl(var(--text-dark)); -} - -.warning .checkmark polyline { - color: hsl(var(--text-dark)); -} - -.danger .checkmark polyline { - color: hsl(var(--text-light)); -} - -.checkmark-container:has(.checkbox:checked) { - .checkmark polyline { - stroke-dashoffset: 44; - } -} diff --git a/packages/studiocms_ui/src/components/Divider.astro b/packages/studiocms_ui/src/components/Divider.astro new file mode 100644 index 000000000..3b7e179d3 --- /dev/null +++ b/packages/studiocms_ui/src/components/Divider.astro @@ -0,0 +1,33 @@ +
+
+
+ +
+
+ diff --git a/packages/studiocms_ui/src/components/Divider/Divider.astro b/packages/studiocms_ui/src/components/Divider/Divider.astro deleted file mode 100644 index 215f711ab..000000000 --- a/packages/studiocms_ui/src/components/Divider/Divider.astro +++ /dev/null @@ -1,9 +0,0 @@ ---- -import './Divider.css'; ---- -
-
-
- -
-
\ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Divider/Divider.css b/packages/studiocms_ui/src/components/Divider/Divider.css deleted file mode 100644 index 921a114b7..000000000 --- a/packages/studiocms_ui/src/components/Divider/Divider.css +++ /dev/null @@ -1,25 +0,0 @@ -.divide-container { - display: flex; - width: 100%; - align-items: center; - justify-content: center; - position: relative; -} - -.line { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 100%; - height: 1px; - background-color: hsl(var(--border)); - z-index: 1; -} - -.content { - background-color: hsl(var(--background-base)); - padding: .25rem .5rem; - z-index: 2; - color: hsl(var(--text-muted)); -} diff --git a/packages/studiocms_ui/src/components/Dropdown/Dropdown.astro b/packages/studiocms_ui/src/components/Dropdown/Dropdown.astro index 96e6525a9..565a1eea7 100644 --- a/packages/studiocms_ui/src/components/Dropdown/Dropdown.astro +++ b/packages/studiocms_ui/src/components/Dropdown/Dropdown.astro @@ -1,6 +1,4 @@ --- -import './Dropdown.css'; - import type { StudioCMSColorway } from '../../utils/colors'; type Option = { @@ -44,4 +42,183 @@ const { options, disabled = false, align = 'center', id, triggerOn = 'left' } = ))} -
\ No newline at end of file +
+ diff --git a/packages/studiocms_ui/src/components/Dropdown/Dropdown.css b/packages/studiocms_ui/src/components/Dropdown/Dropdown.css deleted file mode 100644 index 8266b15c0..000000000 --- a/packages/studiocms_ui/src/components/Dropdown/Dropdown.css +++ /dev/null @@ -1,183 +0,0 @@ -.dropdown-toggle { - width: fit-content; -} - -.dropdown-container { - position: relative; - display: flex; - flex-direction: column; - gap: .25rem; -} - -.dropdown { - position: absolute; - list-style: none; - margin: 0; - padding: 0; - flex-direction: column; - border-radius: .5rem; - background-color: hsl(var(--background-step-2)); - overflow: hidden; - top: calc(100% + .25rem); - left: 0; - z-index: 90; - min-width: 200px; - max-width: min-content; - - height: 0; - border: none; - pointer-events: none; - - animation: pop-down .15s ease forwards; - - box-shadow: 0px 4px 8px hsl(var(--shadow), 0.5); -} - -.icon { - width: 20px; - height: 20px; - min-width: 20px; -} - -@keyframes pop-up { - 0% { - scale: 0.9; - opacity: 0; - } - - 100% { - scale: 1; - opacity: 1; - } -} - -@keyframes pop-down { - 0% { - scale: 1; - height: auto; - border: initial; - pointer-events: all; - top: auto; - bottom: auto; - border: 1px solid hsl(var(--border)); - opacity: 1; - } - - 99.9999% { - scale: 0.9; - height: auto; - border: initial; - pointer-events: all; - bottom: initial; - top: auto; - bottom: auto; - border: 1px solid hsl(var(--border)); - opacity: 0; - } - - 100% { - height: 0; - border: none; - pointer-events: none; - } -} - -.dropdown.active { - display: flex; - border: 1px solid hsl(var(--border)); - height: auto; - pointer-events: all; - - animation: pop-up .15s ease forwards; -} - -.dropdown.below { - top: calc(100% + .25rem) !important; - bottom: auto; - - transform-origin: top center; -} - -.dropdown.below.start { - transform-origin: top left; -} - -.dropdown.below.end { - transform-origin: top right; -} - -.dropdown.above { - top: auto; - bottom: calc(100% + .25rem) !important; - transform-origin: bottom center; -} - -.dropdown.above.start { - transform-origin: bottom left; -} - -.dropdown.above.end { - transform-origin: bottom right; -} - -.dropdown-option { - padding: .75rem; - cursor: pointer; - font-size: .975em; - transition: all .15s ease; - display: flex; - flex-direction: row; - gap: .5rem; - align-items: center; - width: 100%; - white-space: normal; -} - -.dropdown-option:hover { - background-color: hsl(var(--background-step-3)); -} - -.dropdown-option.primary { - color: hsl(var(--primary-base)); -} - -.dropdown-option.primary:hover { - background-color: hsl(var(--primary-base)); - color: hsl(var(--text-inverted)); -} - -.dropdown-option.success { - color: hsl(var(--success-base)); -} - -.dropdown-option.success:hover { - background-color: hsl(var(--success-base)); - color: hsl(var(--text-dark)); -} - -.dropdown-option.warning { - color: hsl(var(--warning-base)); -} - -.dropdown-option.warning:hover { - background-color: hsl(var(--warning-base)); - color: hsl(var(--text-dark)); -} - -.dropdown-option.danger { - color: hsl(var(--danger-base)); -} - -.dropdown-option.danger:hover { - background-color: hsl(var(--danger-base)); - color: hsl(var(--text-light)); -} - -.dropdown-option.disabled { - pointer-events: none; - color: hsl(var(--text-muted)); -} - -.dropdown-option.end { - justify-content: space-between; -} diff --git a/packages/studiocms_ui/src/components/Dropdown/dropdown.ts b/packages/studiocms_ui/src/components/Dropdown/dropdown.ts index d792cc695..7fe9efc14 100644 --- a/packages/studiocms_ui/src/components/Dropdown/dropdown.ts +++ b/packages/studiocms_ui/src/components/Dropdown/dropdown.ts @@ -1,6 +1,6 @@ class DropdownHelper { container: HTMLDivElement; - toggle: HTMLDivElement; + toggleEl: HTMLDivElement; dropdown: HTMLUListElement; alignment: 'start' | 'center' | 'end'; @@ -17,25 +17,25 @@ class DropdownHelper { this.alignment = this.container.dataset.align as 'start' | 'center' | 'end'; this.triggerOn = this.container.dataset.trigger as 'left' | 'right' | 'both'; - this.toggle = document.getElementById(`${id}-toggle-btn`) as HTMLDivElement; + this.toggleEl = document.getElementById(`${id}-toggle-btn`) as HTMLDivElement; this.dropdown = document.getElementById(`${id}-dropdown`) as HTMLUListElement; if (this.triggerOn === 'left') { - this.toggle.addEventListener('click', this.toggleDropdown); + this.toggleEl.addEventListener('click', this.toggle); } else if (this.triggerOn === 'both') { - this.toggle.addEventListener('click', this.toggleDropdown); - this.toggle.addEventListener('contextmenu', (e) => { + this.toggleEl.addEventListener('click', this.toggle); + this.toggleEl.addEventListener('contextmenu', (e) => { e.preventDefault(); - this.toggleDropdown(); + this.toggle(); }); } else { - this.toggle.addEventListener('contextmenu', (e) => { + this.toggleEl.addEventListener('contextmenu', (e) => { e.preventDefault(); - this.toggleDropdown(); + this.toggle(); }); } - window.addEventListener('scroll', this.hideDropdown); + window.addEventListener('scroll', this.hide); this.hideOnClickOutside(this.container); @@ -46,11 +46,11 @@ class DropdownHelper { const dropdownOpts = this.dropdown.querySelectorAll('li'); for (const opt of dropdownOpts) { - opt.removeEventListener('click', this.hideDropdown); + opt.removeEventListener('click', this.hide); opt.addEventListener('click', () => { func(opt.dataset.value || ''); - this.hideDropdown(); + this.hide(); }); } }; @@ -59,16 +59,27 @@ class DropdownHelper { const dropdownOpts = this.dropdown.querySelectorAll('li'); for (const opt of dropdownOpts) { - opt.addEventListener('click', this.hideDropdown); + opt.addEventListener('click', this.hide); } }; - public toggleDropdown = () => { + public toggle = () => { if (this.active) { - this.hideDropdown(); + this.hide(); return; } + this.show(); + }; + + public hide = () => { + this.dropdown.classList.remove('active'); + this.active = false; + + setTimeout(() => this.dropdown.classList.remove('above', 'below'), 200); + }; + + public show = () => { const isMobile = window.matchMedia('screen and (max-width: 840px)').matches; const { @@ -79,7 +90,7 @@ class DropdownHelper { x, y, height, - } = this.toggle.getBoundingClientRect(); + } = this.toggleEl.getBoundingClientRect(); const { width: dropdownWidth } = this.dropdown.getBoundingClientRect(); const optionHeight = 44; @@ -102,7 +113,6 @@ class DropdownHelper { this.active = true; if (isMobile) { - console.log('match'); this.dropdown.style.maxWidth = `${parentWidth}px`; this.dropdown.style.minWidth = 'unset'; this.dropdown.style.width = `${parentWidth}px`; @@ -129,20 +139,13 @@ class DropdownHelper { } }; - public hideDropdown = () => { - this.dropdown.classList.remove('active'); - this.active = false; - - setTimeout(() => this.dropdown.classList.remove('above', 'below'), 200); - }; - private hideOnClickOutside = (element: HTMLElement) => { const outsideClickListener = (event: MouseEvent) => { if (!event.target) return; if (!element.contains(event.target as Node) && isVisible(element) && this.active === true) { // or use: event.target.closest(selector) === null - this.hideDropdown(); + this.hide(); } }; diff --git a/packages/studiocms_ui/src/components/Dropdown/index.ts b/packages/studiocms_ui/src/components/Dropdown/index.ts new file mode 100644 index 000000000..3ca32e860 --- /dev/null +++ b/packages/studiocms_ui/src/components/Dropdown/index.ts @@ -0,0 +1,2 @@ +export { default as Dropdown } from './Dropdown.astro'; +export { DropdownHelper } from './dropdown'; diff --git a/packages/studiocms_ui/src/components/Input.astro b/packages/studiocms_ui/src/components/Input.astro new file mode 100644 index 000000000..e9623b025 --- /dev/null +++ b/packages/studiocms_ui/src/components/Input.astro @@ -0,0 +1,89 @@ +--- +import { generateID } from '../utils/generateID'; + +type Props = { + label?: string; + type?: 'text' | 'password'; + placeholder?: string; + isRequired?: boolean; + name?: string; + disabled?: boolean; + defaultValue?: string; + class?: string; +}; + +const { + label, + placeholder, + name = generateID('input'), + type = 'text', + defaultValue, + isRequired = false, + disabled = false, + class: className, +} = Astro.props; +--- + + + diff --git a/packages/studiocms_ui/src/components/Input/Input.astro b/packages/studiocms_ui/src/components/Input/Input.astro deleted file mode 100644 index 77cde2284..000000000 --- a/packages/studiocms_ui/src/components/Input/Input.astro +++ /dev/null @@ -1,43 +0,0 @@ ---- -import './Input.css'; - -import { generateID } from '../../utils/generateID'; - -type Props = { - label?: string; - type?: 'text' | 'password'; - placeholder?: string; - isRequired?: boolean; - name?: string; - disabled?: boolean; - defaultValue?: string; - class?: string; -}; - -const { - label, - placeholder, - name = generateID('input'), - type = 'text', - defaultValue, - isRequired = false, - disabled = false, - class: className, -} = Astro.props; ---- - - \ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Input/Input.css b/packages/studiocms_ui/src/components/Input/Input.css deleted file mode 100644 index 7549c986c..000000000 --- a/packages/studiocms_ui/src/components/Input/Input.css +++ /dev/null @@ -1,46 +0,0 @@ -.input-label { - width: 100%; - display: flex; - flex-direction: column; - gap: .25rem; - margin-top: .5rem; -} - -.input-label.disabled { - opacity: 0.5; - pointer-events: none; - color: hsl(var(--text-muted)); -} - -.label { - font-size: 14px; -} - -.input { - padding: .65rem 1rem; - border-radius: 8px; - border: 1px solid hsl(var(--border)); - background: hsl(var(--background-step-2)); - color: hsl(var(--text-normal)); - transition: all .15s ease; -} - -.input:hover { - background: hsl(var(--background-step-3)); -} - -.input:active, -.input:focus { - border: 1px solid hsl(var(--primary-base)); - outline: none; - background: hsl(var(--background-step-2)); -} - -.disabled .input:active { - border: 1px solid hsl(var(--border)); -} - -.req-star { - color: hsl(var(--danger-base)); - font-weight: 700; -} diff --git a/packages/studiocms_ui/src/components/Modal/Modal.astro b/packages/studiocms_ui/src/components/Modal/Modal.astro index 256fdb61a..14ef2c4b5 100644 --- a/packages/studiocms_ui/src/components/Modal/Modal.astro +++ b/packages/studiocms_ui/src/components/Modal/Modal.astro @@ -1,8 +1,6 @@ --- -import './Modal.css'; - import Icon from '../../utils/Icon.astro'; -import Button from '../Button/Button.astro'; +import Button from '../Button.astro'; type ModalButton = 'cancel' | 'confirm'; @@ -28,7 +26,7 @@ const { id, size = 'md', dismissable = true, isForm = false, buttons = [] } = As > - \ No newline at end of file + + diff --git a/packages/studiocms_ui/src/components/Modal/Modal.css b/packages/studiocms_ui/src/components/Modal/Modal.css deleted file mode 100644 index 2e616a3c8..000000000 --- a/packages/studiocms_ui/src/components/Modal/Modal.css +++ /dev/null @@ -1,109 +0,0 @@ -.modal { - border: 1px solid hsl(var(--border)); - border-radius: .5rem; - padding: 1.5rem; - box-shadow: 0px 6px 8px hsl(var(--shadow)); - animation: hide .25s ease; - overflow: visible; -} - -.modal.sm { - width: 384px; -} - -.modal.md { - width: 448px; -} - -.modal.lg { - width: 512px; -} - -.modal[open] { - animation: show .25s ease-in-out; -} - -html:has(.modal[open]), -body:has(.modal[open]) { - overflow: hidden; -} - -.modal[open]::backdrop { - background-color: rgba(0, 0, 0, 0.75); - animation: backdrop .3s ease-in-out forwards; -} - -.modal-header:has(*) { - margin-bottom: 1rem; - - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 1rem; - - * { - margin: 0; - } -} - -.x-mark-container { - cursor: pointer; - height: 1.5rem; - width: 1.5rem; - display: flex; - align-items: center; - justify-content: center; - transition: background-color .15s ease; - border-radius: .25rem; -} - -.x-mark-container:hover { - background-color: hsl(var(--default-base)); -} - -.modal-footer { - display: none; -} - -.modal-footer:has(*) { - display: flex; - flex-direction: row; - gap: 1rem; - margin-top: 1rem; - justify-content: end; -} - -@keyframes hide { - 0% { - scale: 1; - opacity: 1; - display: block; - } - 100% { - scale: 0.85; - opacity: 0; - display: none; - } -} - -@keyframes show { - 0% { - scale: 0.85; - opacity: 0; - display: none; - } - 100% { - scale: 1; - opacity: 1; - display: block; - } -} - -@keyframes backdrop { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} diff --git a/packages/studiocms_ui/src/components/Modal/index.ts b/packages/studiocms_ui/src/components/Modal/index.ts new file mode 100644 index 000000000..ab8b3299c --- /dev/null +++ b/packages/studiocms_ui/src/components/Modal/index.ts @@ -0,0 +1,2 @@ +export { default as Modal } from './Modal.astro'; +export { ModalHelper } from './modal'; diff --git a/packages/studiocms_ui/src/components/Modal/modal.ts b/packages/studiocms_ui/src/components/Modal/modal.ts index 5c575bc25..fb866a71e 100644 --- a/packages/studiocms_ui/src/components/Modal/modal.ts +++ b/packages/studiocms_ui/src/components/Modal/modal.ts @@ -6,7 +6,7 @@ class ModalHelper { private isForm = false; private modalForm: HTMLFormElement; - constructor(id: string) { + constructor(id: string, triggerID?: string) { const element = document.getElementById(id) as HTMLDialogElement; if (!element) { @@ -26,10 +26,14 @@ class ModalHelper { if (isForm) this.isForm = true; this.addButtonListeners(id, isDismissable); + + if (triggerID) { + this.bindTrigger(triggerID); + } } private addButtonListeners = (id: string, dismissable: boolean) => { - if (dismissable) { + if (dismissable || !this.element.dataset.buttons) { const xMarkButton = document.getElementById(`${id}-btn-x`) as HTMLButtonElement; xMarkButton.addEventListener('click', this.hide); } diff --git a/packages/studiocms_ui/src/components/RadioGroup.astro b/packages/studiocms_ui/src/components/RadioGroup.astro new file mode 100644 index 000000000..9da81dd67 --- /dev/null +++ b/packages/studiocms_ui/src/components/RadioGroup.astro @@ -0,0 +1,175 @@ +--- +import type { StudioCMSColorway } from '../utils/colors'; +import { generateID } from '../utils/generateID'; + +type Option = { + label: string; + value: string; + disabled?: boolean; +}; + +type Props = { + label: string; + color?: StudioCMSColorway; + defaultValue?: string; + options: Option[]; + disabled?: boolean; + name?: string; + isRequired?: boolean; + horizontal?: boolean; + class?: string; +}; + +const { + label, + color, + defaultValue, + options, + disabled, + name = generateID('radio'), + isRequired, + horizontal, + class: className, +} = Astro.props; +--- + +
+ + {label} {isRequired && "*"} + +
+ {options.map(({ label, value, disabled: individuallyDisabled }) => ( +
+ diff --git a/packages/studiocms_ui/src/components/RadioGroup/RadioGroup.astro b/packages/studiocms_ui/src/components/RadioGroup/RadioGroup.astro deleted file mode 100644 index 61edc444f..000000000 --- a/packages/studiocms_ui/src/components/RadioGroup/RadioGroup.astro +++ /dev/null @@ -1,74 +0,0 @@ ---- -import './RadioGroup.css'; - -import type { StudioCMSColorway } from '../../utils/colors'; -import { generateID } from '../../utils/generateID'; - -type Option = { - label: string; - value: string; - disabled?: boolean; -}; - -type Props = { - label: string; - color?: StudioCMSColorway; - defaultValue?: string; - options: Option[]; - disabled?: boolean; - name?: string; - isRequired?: boolean; - horizontal?: boolean; - class?: string; -}; - -const { - label, - color, - defaultValue, - options, - disabled, - name = generateID('radio'), - isRequired, - horizontal, - class: className, -} = Astro.props; ---- - -
- - {label} {isRequired && "*"} - -
- {options.map(({ label, value, disabled: individuallyDisabled }) => ( -
\ No newline at end of file diff --git a/packages/studiocms_ui/src/components/RadioGroup/RadioGroup.css b/packages/studiocms_ui/src/components/RadioGroup/RadioGroup.css deleted file mode 100644 index 55b1ea0ce..000000000 --- a/packages/studiocms_ui/src/components/RadioGroup/RadioGroup.css +++ /dev/null @@ -1,100 +0,0 @@ -.radio-container { - display: flex; - flex-direction: column; - gap: .5rem; -} - -.radio-container.disabled { - opacity: 0.5; - color: hsl(var(--text-muted)); -} - -.radio-label.disabled { - opacity: 0.5; - color: hsl(var(--text-muted)); - pointer-events: none; -} - -.req-star { - color: hsl(var(--danger-base)); - font-weight: 700; -} - -.radio-inputs { - display: flex; - flex-direction: column; - gap: .75rem; -} - -.radio-container.horizontal .radio-inputs { - flex-direction: row; -} - -.radio-label { - display: flex; - flex-direction: row; - gap: .5rem; - position: relative; -} - -.radio-label:hover .radio-box { - outline-color: hsl(var(--default-hover)); -} - -.radio-container:not(.disabled) .radio-label:active .radio-box { - outline-color: hsl(var(--default-active)); - scale: 0.9; -} - -.radio-label:has(.radio-toggle:checked) .radio-box { - background-color: hsl(var(--text-normal)); - outline-color: hsl(var(--text-normal)); -} - -.radio-container.primary .radio-label:has(.radio-toggle:checked) .radio-box { - background-color: hsl(var(--primary-base)); - outline-color: hsl(var(--primary-base)); -} - -.radio-container.success .radio-label:has(.radio-toggle:checked) .radio-box { - background-color: hsl(var(--success-base)); - outline-color: hsl(var(--success-base)); -} - -.radio-container.warning .radio-label:has(.radio-toggle:checked) .radio-box { - background-color: hsl(var(--warning-base)); - outline-color: hsl(var(--warning-base)); -} - -.radio-container.danger .radio-label:has(.radio-toggle:checked) .radio-box { - background-color: hsl(var(--danger-base)); - outline-color: hsl(var(--danger-base)); -} - -.radio-box-container { - width: 20px; - height: 20px; - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - cursor: pointer; -} - -.radio-box { - width: 12px; - height: 12px; - border-radius: 20px; - outline: 1px solid hsl(var(--default-base)); - outline-offset: 4px; - transition: all .15s ease; -} - -.radio-toggle { - width: 0; - height: 0; - visibility: hidden; - opacity: 0; - margin: 0; - position: absolute; -} diff --git a/packages/studiocms_ui/src/components/Row.astro b/packages/studiocms_ui/src/components/Row.astro new file mode 100644 index 000000000..09debd3c8 --- /dev/null +++ b/packages/studiocms_ui/src/components/Row.astro @@ -0,0 +1,36 @@ +--- +type Props = { + alignCenter?: boolean; + gapSize?: 'sm' | 'md' | 'lg'; +}; + +const { alignCenter, gapSize = 'md' } = Astro.props; +--- + +
+ +
+ diff --git a/packages/studiocms_ui/src/components/Row/Row.astro b/packages/studiocms_ui/src/components/Row/Row.astro deleted file mode 100644 index 8520ca904..000000000 --- a/packages/studiocms_ui/src/components/Row/Row.astro +++ /dev/null @@ -1,14 +0,0 @@ ---- -import './Row.css'; - -type Props = { - alignCenter?: boolean; - gapSize?: 'sm' | 'md' | 'lg'; -}; - -const { alignCenter, gapSize = 'md' } = Astro.props; ---- - -
- -
\ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Row/Row.css b/packages/studiocms_ui/src/components/Row/Row.css deleted file mode 100644 index 151c9c2ec..000000000 --- a/packages/studiocms_ui/src/components/Row/Row.css +++ /dev/null @@ -1,22 +0,0 @@ -.row { - display: flex; - flex-direction: row; - position: relative; - flex-wrap: wrap; -} - -.row.align { - align-items: center; -} - -.row.sm { - gap: .5rem; -} - -.row.md { - gap: 1rem; -} - -.row.lg { - gap: 2rem; -} diff --git a/packages/studiocms_ui/src/components/Select/Select.astro b/packages/studiocms_ui/src/components/Select.astro similarity index 66% rename from packages/studiocms_ui/src/components/Select/Select.astro rename to packages/studiocms_ui/src/components/Select.astro index 1de1c82a7..62e9b5d75 100644 --- a/packages/studiocms_ui/src/components/Select/Select.astro +++ b/packages/studiocms_ui/src/components/Select.astro @@ -1,8 +1,6 @@ --- -import './Select.css'; - -import Icon from '../../utils/Icon.astro'; -import { generateID } from '../../utils/generateID'; +import Icon from '../utils/Icon.astro'; +import { generateID } from '../utils/generateID'; type Option = { label: string; @@ -176,4 +174,119 @@ const { // source (2018-03-11): https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js const isVisible = elem => !!elem && !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); - \ No newline at end of file + + diff --git a/packages/studiocms_ui/src/components/Select/Select.css b/packages/studiocms_ui/src/components/Select/Select.css deleted file mode 100644 index 29177b51a..000000000 --- a/packages/studiocms_ui/src/components/Select/Select.css +++ /dev/null @@ -1,113 +0,0 @@ -.select-label { - width: fit-content; - display: flex; - flex-direction: column; - gap: .25rem; - min-width: 200px; - position: relative; -} - -.select-label.full { - width: 100%; -} - -.select-label.disabled { - opacity: 0.5; - pointer-events: none; - color: hsl(var(--text-muted)); -} - -.label { - font-size: 14px; -} - -.req-star { - color: hsl(var(--danger-base)); - font-weight: 700; -} - -.select-button { - padding: .65rem .75rem .65rem 1rem; - border-radius: 8px; - border: 1px solid hsl(var(--border)); - background: hsl(var(--background-step-2)); - color: hsl(var(--text-normal)); - transition: all .15s ease; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; - cursor: pointer; - gap: 1rem; -} - -.select-button:hover { - background: hsl(var(--background-step-3)); -} - -.select-button.active, -.select-button:active, -.select-button:has(+ .select-dropdown.active) { - border: 1px solid hsl(var(--primary-base)); - background: hsl(var(--background-step-2)); -} - -.select-dropdown { - position: absolute; - width: 100%; - border: 1px solid hsl(var(--border)); - list-style: none; - margin: 0; - padding: 0; - flex-direction: column; - border-radius: .5rem; - background-color: hsl(var(--background-step-2)); - overflow: hidden; - top: calc(100% + .25rem); - left: 0; - display: none; - z-index: 90; - box-shadow: 0px 4px 8px hsl(var(--shadow), 0.5); -} - -.select-dropdown.active { - display: flex; -} - -.select-dropdown.above { - top: auto; - bottom: calc(100% - 18px + .25rem); -} - -.select-option { - padding: .5rem; - cursor: pointer; - font-size: .975em; - transition: all .15s ease; -} - -.select-option.disabled { - pointer-events: none; - color: hsl(var(--text-muted)); -} - -.select-option:hover { - background-color: hsl(var(--background-step-3)); -} - -.select-option.selected { - background-color: hsl(var(--primary-base)); - color: hsl(var(--text-inverted)); - cursor: default; -} - -.hidden-select { - height: 0; - width: 0; - border: none; - outline: none; - position: absolute; - background-color: transparent; - pointer-events: none; - opacity: 0; -} diff --git a/packages/studiocms_ui/src/components/Sidebar/Double.astro b/packages/studiocms_ui/src/components/Sidebar/Double.astro index 09a0c7fb1..4b749663c 100644 --- a/packages/studiocms_ui/src/components/Sidebar/Double.astro +++ b/packages/studiocms_ui/src/components/Sidebar/Double.astro @@ -1,6 +1,3 @@ ---- -import './Double.css'; ---- + diff --git a/packages/studiocms_ui/src/components/Sidebar/Double.css b/packages/studiocms_ui/src/components/Sidebar/Double.css deleted file mode 100644 index 4cf769ab9..000000000 --- a/packages/studiocms_ui/src/components/Sidebar/Double.css +++ /dev/null @@ -1,142 +0,0 @@ -#sidebars { - --sidebars-container-width: calc((280px + 1px) * 2); - display: flex; - align-items: center; - width: var(--sidebars-container-width); - min-width: var(--sidebars-container-width); - overflow: hidden; - transition: all .3s ease; - z-index: 10; - height: 100%; -} - -#sidebars.active { - transform: translateX(0%); -} - -#sidebar-outer { - height: 100%; - min-width: 280px; - width: 280px; - background-color: hsl(var(--background-step-1)); - border-right: 1px solid hsl(var(--border)); - gap: 1rem; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - z-index: 10; - transition: all .3s ease; - padding: 1.5rem; -} - -#sidebar-inner { - min-width: 280px; - width: 280px; - height: 100%; - background-color: hsl(var(--background-step-2)); - border-right: 1px solid hsl(var(--border)); - display: flex; - flex-direction: column; - gap: 1rem; - align-items: center; - justify-content: center; - z-index: 5; - position: relative; - transition: all .3s ease; -} - -#navigate-to-outer-button { - display: none; - position: absolute; - top: 1rem; - left: 1rem; - padding: .25rem; - background-color: hsl(var(--background-step-3)); - cursor: pointer; - border-radius: 8px; - align-items: center; - color: hsl(var(--text-normal)); - outline: none; - border: none; - height: 32px; - width: 32px; -} - -#show-navbar-button { - z-index: 2; -} - -#swap-to-inner, -#swap-to-content { - display: none; -} - -@media screen and (max-width: 1200px) { - #sidebars { - --sidebars-container-width: calc(280px + 1px); - } - - #swap-to-inner { - display: block; - } - - #sidebars.inner { - #sidebar-outer, - #sidebar-inner { - transform: translateX(-100%); - } - } - - #navigate-to-outer-button { - display: flex; - } -} - -@media screen and (max-width: 840px) { - #sidebars { - transform: translateX(-100%); - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; - } - - #sidebar-outer, - #sidebar-inner { - width: 100%; - flex: 0 0 100%; - } - - #show-navbar-button { - display: flex; - } - - #swap-to-content { - display: block; - } -} - -#show-navbar-button { - display: none; - position: absolute; - top: 1rem; - left: 1rem; - padding: .25rem; - background-color: var(--background-step-3); - cursor: pointer; - border-radius: 8px; - align-items: center; - color: white; - outline: none; - border: none; - height: 32px; - width: 32px; -} - -@media screen and (max-width: 840px) { - #show-navbar-button { - display: flex; - } -} diff --git a/packages/studiocms_ui/src/components/Sidebar/Single.astro b/packages/studiocms_ui/src/components/Sidebar/Single.astro index 2883f679f..2ede271c6 100644 --- a/packages/studiocms_ui/src/components/Sidebar/Single.astro +++ b/packages/studiocms_ui/src/components/Sidebar/Single.astro @@ -1,6 +1,35 @@ ---- -import './Single.css'; ---- \ No newline at end of file + + diff --git a/packages/studiocms_ui/src/components/Sidebar/Single.css b/packages/studiocms_ui/src/components/Sidebar/Single.css deleted file mode 100644 index 8a8f49562..000000000 --- a/packages/studiocms_ui/src/components/Sidebar/Single.css +++ /dev/null @@ -1,38 +0,0 @@ -#sidebar { - height: 100%; - min-width: 280px; - width: 280px; - background-color: hsl(var(--background-step-1)); - border-right: 1px solid hsl(var(--border)); - gap: 1rem; - display: flex; - flex-direction: column; - align-items: center; - padding: 1.5rem; - z-index: 10; - transition: all .3s ease; -} - -#sidebar.active { - transform: translateX(0%); -} - -@media screen and (max-width: 840px) { - #sidebar { - transform: translateX(-100%); - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; - border-right: none; - } - - #show-navbar-button { - display: flex; - } - - #swap-to-content { - display: block; - } -} diff --git a/packages/studiocms_ui/src/components/Sidebar/index.ts b/packages/studiocms_ui/src/components/Sidebar/index.ts new file mode 100644 index 000000000..0f0d38fac --- /dev/null +++ b/packages/studiocms_ui/src/components/Sidebar/index.ts @@ -0,0 +1,3 @@ +export { default as SingleSidebar } from './Single.astro'; +export { default as DoubleSidebar } from './Double.astro'; +export { SingleSidebarHelper, DoubleSidebarHelper } from './helpers'; diff --git a/packages/studiocms_ui/src/components/Textarea.astro b/packages/studiocms_ui/src/components/Textarea.astro new file mode 100644 index 000000000..7d7edc4b9 --- /dev/null +++ b/packages/studiocms_ui/src/components/Textarea.astro @@ -0,0 +1,102 @@ +--- +import { generateID } from '../utils/generateID'; + +type Props = { + label?: string; + placeholder?: string; + isRequired?: boolean; + fullWidth?: boolean; + resize?: boolean; + name?: string; + disabled?: boolean; + defaultValue?: string; +}; + +const { + label, + placeholder, + isRequired, + fullWidth, + resize, + name = generateID('textarea'), + disabled, + defaultValue, +} = Astro.props; +--- + + diff --git a/packages/studiocms_ui/src/components/Textarea/Textarea.astro b/packages/studiocms_ui/src/components/Textarea/Textarea.astro deleted file mode 100644 index 3acc73200..000000000 --- a/packages/studiocms_ui/src/components/Textarea/Textarea.astro +++ /dev/null @@ -1,49 +0,0 @@ ---- -import './Textarea.css'; - -import { generateID } from '../../utils/generateID'; - -type Props = { - label?: string; - placeholder?: string; - isRequired?: boolean; - fullWidth?: boolean; - resize?: boolean; - name?: string; - disabled?: boolean; - defaultValue?: string; -}; - -const { - label, - placeholder, - isRequired, - fullWidth, - resize, - name = generateID('textarea'), - disabled, - defaultValue, -} = Astro.props; ---- - \ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Textarea/Textarea.css b/packages/studiocms_ui/src/components/Textarea/Textarea.css deleted file mode 100644 index 52ebf39b8..000000000 --- a/packages/studiocms_ui/src/components/Textarea/Textarea.css +++ /dev/null @@ -1,53 +0,0 @@ -.textarea-label { - display: flex; - flex-direction: column; - gap: .25rem; - margin-top: .5rem; - max-width: 80ch; -} - -.textarea-label.disabled { - opacity: 0.5; - pointer-events: none; - color: hsl(var(--text-muted)); -} - -.textarea-label.full { - width: 100%; - max-width: none; -} - -.label { - font-size: 14px; -} - -.textarea { - padding: .65rem 1rem; - border-radius: 8px; - border: 1px solid hsl(var(--border)); - background: hsl(var(--background-step-2)); - color: hsl(var(--text-normal)); - transition: all .15s ease; - resize: none; - min-height: 12ch; -} - -.textarea:hover { - background: hsl(var(--background-step-3)); -} - -.resize .textarea { - resize: both; -} - -.textarea:active, -.textarea:focus { - border: 1px solid hsl(var(--primary-base)); - outline: none; - background: hsl(var(--background-step-2)); -} - -.req-star { - color: hsl(var(--danger-base)); - font-weight: 700; -} diff --git a/packages/studiocms_ui/src/components/Toast/Toaster.astro b/packages/studiocms_ui/src/components/Toast/Toaster.astro index acddd29f7..04db7f8b7 100644 --- a/packages/studiocms_ui/src/components/Toast/Toaster.astro +++ b/packages/studiocms_ui/src/components/Toast/Toaster.astro @@ -1,6 +1,4 @@ --- -import './Toaster.css'; - type Props = { position?: | 'top-left' @@ -9,9 +7,7 @@ type Props = { | 'bottom-left' | 'bottom-right' | 'bottom-center'; - class?: string; duration?: number; - expand?: boolean; closeButton?: boolean; offset?: number; gap?: number; @@ -19,9 +15,7 @@ type Props = { const { position = 'top-center', - class: className, duration = 4000, - expand = false, closeButton = false, offset = 32, gap = 8, @@ -30,13 +24,9 @@ const {
\ No newline at end of file + + + diff --git a/packages/studiocms_ui/src/components/Toast/Toaster.css b/packages/studiocms_ui/src/components/Toast/Toaster.css deleted file mode 100644 index 1a8b72963..000000000 --- a/packages/studiocms_ui/src/components/Toast/Toaster.css +++ /dev/null @@ -1,160 +0,0 @@ -#toaster { - width: 100vw; - height: 100vh; - position: fixed; - top: 0; - left: 0; - z-index: 100; - pointer-events: none; -} - -#toast-drawer { - max-width: 420px; - width: 100%; - height: fit-content; - position: absolute; - display: flex; - flex-direction: column; -} - -#toaster.top-left #toast-drawer, -#toaster.bottom-left #toast-drawer { - left: 50%; - transform: translateX(-50%); -} - -.toast-container { - pointer-events: all; - padding: 1rem; - border-radius: .5rem; - border: 1px solid hsl(var(--border)); - background-color: hsl(var(--background-base)); - box-shadow: 0px 4px 8px hsl(var(--shadow), 0.5); - display: flex; - flex-direction: column; - gap: .5rem; - position: relative; - overflow: hidden; - margin-bottom: var(--gap); - animation: toast-pop-in .25s ease forwards; -} - -.toast-header { - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; -} - -.toast-header-left-side { - display: flex; - flex-direction: row; - gap: .5rem; - align-items: center; - font-weight: 500; - font-size: 1.125em; -} - -.toast-header-left-side svg { - color: hsl(var(--primary-base)); -} - -.toast-container.success .toast-header-left-side svg { - color: hsl(var(--success-base)); -} - -.toast-container.warning .toast-header-left-side svg { - color: hsl(var(--warning-base)); -} - -.toast-container.danger .toast-header-left-side svg { - color: hsl(var(--danger-base)); -} - -.toast-progress-bar { - position: absolute; - height: 4px; - width: 100%; - bottom: 0; - left: 0%; - background-color: hsl(var(--primary-base)); - animation: toast-progress forwards linear; -} - -.toast-container.success .toast-progress-bar { - background-color: hsl(var(--success-base)); -} - -.toast-container.warning .toast-progress-bar { - background-color: hsl(var(--warning-base)); -} - -.toast-container.danger .toast-progress-bar { - background-color: hsl(var(--danger-base)); -} - -.close-icon-container { - cursor: pointer; - height: 1.5rem; - width: 1.5rem; - display: flex; - align-items: center; - justify-content: center; - transition: background-color .15s ease; - border-radius: .25rem; -} - -.close-icon-container:hover { - background-color: hsl(var(--default-base)); -} - -.toast-container.closing { - animation: toast-closing .25s ease forwards; -} - -@keyframes toast-pop-in { - 0% { - opacity: 0; - scale: 0.75; - } - 100% { - opacity: 1; - scale: 1; - } -} - -@keyframes toast-closing { - 0% { - opacity: 1; - scale: 1; - max-height: 500px; - margin-bottom: var(--gap); - padding: 1rem; - border: 1px solid hsl(var(--border)); - } - 62.5% { - scale: 0.75; - opacity: 0; - max-height: 500px; - margin-bottom: var(--gap); - padding: 1rem; - border: 1px solid hsl(var(--border)); - } - 100% { - scale: 0.75; - opacity: 0; - max-height: 0px; - margin-bottom: 0; - padding: 0; - border: 0px solid hsl(var(--border)); - } -} - -@keyframes toast-progress { - 0% { - left: 0%; - } - 100% { - left: -100%; - } -} diff --git a/packages/studiocms_ui/src/components/Toast/index.ts b/packages/studiocms_ui/src/components/Toast/index.ts new file mode 100644 index 000000000..6a452210d --- /dev/null +++ b/packages/studiocms_ui/src/components/Toast/index.ts @@ -0,0 +1,2 @@ +export { default as Toaster } from './Toaster.astro'; +export { toast } from './toast'; diff --git a/packages/studiocms_ui/src/components/Toast/toast.ts b/packages/studiocms_ui/src/components/Toast/toast.ts index ca20402b3..b3974e450 100644 --- a/packages/studiocms_ui/src/components/Toast/toast.ts +++ b/packages/studiocms_ui/src/components/Toast/toast.ts @@ -1,5 +1,10 @@ import type { ToastProps } from '../../types'; +/** + * A function to create toasts with. + + * @param props The props to pass to the toast + */ function toast(props: ToastProps) { const createToast = new CustomEvent('createtoast', { detail: props, diff --git a/packages/studiocms_ui/src/components/Toggle.astro b/packages/studiocms_ui/src/components/Toggle.astro new file mode 100644 index 000000000..959fc0e97 --- /dev/null +++ b/packages/studiocms_ui/src/components/Toggle.astro @@ -0,0 +1,146 @@ +--- +import type { StudioCMSColorway } from '../utils/colors'; +import { generateID } from '../utils/generateID'; + +type Props = { + label: string; + size?: 'sm' | 'md' | 'lg'; + color?: StudioCMSColorway; + defaultChecked?: boolean; + disabled?: boolean; + name?: string; + isRequired?: boolean; +}; + +const { + size = 'md', + color = 'default', + defaultChecked, + disabled, + name = generateID('checkbox'), + label, + isRequired, +} = Astro.props; +--- +
+
+ +
+ + {label} {isRequired && "*"} + + + diff --git a/packages/studiocms_ui/src/components/Toggle/Toggle.astro b/packages/studiocms_ui/src/components/Toggle/Toggle.astro deleted file mode 100644 index 7f9928cb7..000000000 --- a/packages/studiocms_ui/src/components/Toggle/Toggle.astro +++ /dev/null @@ -1,51 +0,0 @@ ---- -import './Toggle.css'; - -import type { StudioCMSColorway } from '../../utils/colors'; -import { generateID } from '../../utils/generateID'; - -type Props = { - label: string; - size?: 'sm' | 'md' | 'lg'; - color?: StudioCMSColorway; - defaultChecked?: boolean; - disabled?: boolean; - name?: string; - isRequired?: boolean; -}; - -const { - size = 'md', - color = 'default', - defaultChecked, - disabled, - name = generateID('checkbox'), - label, - isRequired, -} = Astro.props; ---- -
-
- -
- - {label} {isRequired && "*"} - - \ No newline at end of file diff --git a/packages/studiocms_ui/src/components/Toggle/Toggle.css b/packages/studiocms_ui/src/components/Toggle/Toggle.css deleted file mode 100644 index 20b0c0412..000000000 --- a/packages/studiocms_ui/src/components/Toggle/Toggle.css +++ /dev/null @@ -1,95 +0,0 @@ -.toggle-label { - display: flex; - flex-direction: row; - align-items: center; - gap: .5rem; - position: relative; - margin: .25rem 0; -} - -.toggle-label.disabled { - opacity: 0.5; - pointer-events: none; - color: hsl(var(--text-muted)); -} - -.toggle-label:active .toggle-switch { - transform: scale(0.85); -} - -.toggle-container { - --toggle-height: 12px; - --toggle-width: 40px; - display: flex; - align-items: center; - cursor: pointer; - transition: all .15s ease; - background-color: hsl(var(--default-base)); - width: var(--toggle-width); - height: var(--toggle-height); - border-radius: var(--toggle-height); -} - -.toggle-switch { - --switch: calc(var(--toggle-height) * 1.75); - height: var(--switch); - width: var(--switch); - background-color: hsl(var(--text-muted)); - border-radius: var(--toggle-height); - position: relative; - left: 0; - transition: all .15s ease; - will-change: transform; -} - -.toggle-container:has(.checkbox:checked) .toggle-switch { - left: calc(100% - var(--switch)); - background-color: hsl(var(--text-normal)); -} - -.toggle-label.sm .toggle-container { - --toggle-height: 10px; - --toggle-width: 32px; -} - -.toggle-label.sm .toggle-switch { - --switch: calc(var(--toggle-height) * 1.65); -} - -.toggle-label.lg .toggle-container { - --toggle-height: 16px; - --toggle-width: 48px; -} - -.toggle-label.lg .toggle-switch { - --switch: calc(var(--toggle-height) * 1.65); -} - -.toggle-label.primary .toggle-container:has(.checkbox:checked) { - background-color: hsl(var(--primary-base)); -} - -.toggle-label.success .toggle-container:has(.checkbox:checked) { - background-color: hsl(var(--success-base)); -} - -.toggle-label.warning .toggle-container:has(.checkbox:checked) { - background-color: hsl(var(--warning-base)); -} - -.toggle-label.danger .toggle-container:has(.checkbox:checked) { - background-color: hsl(var(--danger-base)); -} - -.req-star { - color: hsl(var(--danger-base)); - font-weight: 700; -} - -.checkbox { - width: 0; - height: 0; - visibility: hidden; - opacity: 0; - margin: 0; -} diff --git a/packages/studiocms_ui/src/components/User.astro b/packages/studiocms_ui/src/components/User.astro new file mode 100644 index 000000000..8e11fc98b --- /dev/null +++ b/packages/studiocms_ui/src/components/User.astro @@ -0,0 +1,69 @@ +--- +import { Image } from 'astro:assets'; +import Icon from '../utils/Icon.astro'; + +type Props = { + name: string; + description: string; + avatar?: string; + class?: string; +}; + +const { name, description, avatar, class: className } = Astro.props; +--- +
+
+ + {avatar ? ( + {name} + ) : ( + + )} +
+
+ {name} + {description} +
+
+ diff --git a/packages/studiocms_ui/src/components/User/User.astro b/packages/studiocms_ui/src/components/User/User.astro deleted file mode 100644 index da25c4274..000000000 --- a/packages/studiocms_ui/src/components/User/User.astro +++ /dev/null @@ -1,29 +0,0 @@ ---- -import './User.css'; - -import { Image } from 'astro:assets'; -import Icon from '../../utils/Icon.astro'; - -type Props = { - name: string; - description: string; - avatar?: string; - class?: string; -}; - -const { name, description, avatar, class: className } = Astro.props; ---- -
-
- - {avatar ? ( - {name} - ) : ( - - )} -
-
- {name} - {description} -
-
\ No newline at end of file diff --git a/packages/studiocms_ui/src/components/User/User.css b/packages/studiocms_ui/src/components/User/User.css deleted file mode 100644 index ebbe4fa79..000000000 --- a/packages/studiocms_ui/src/components/User/User.css +++ /dev/null @@ -1,40 +0,0 @@ -.user-container { - display: flex; - flex-direction: row; - align-items: center; - gap: 1rem; -} - -.avatar-container { - width: 3rem; - height: 3rem; - background-color: hsl(var(--default-base)); - border-radius: 3rem; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - border: 1px solid hsl(var(--border)); -} - -.avatar-img { - width: 100%; - height: auto; -} - -.text-content { - display: flex; - flex-direction: column; - gap: .125rem; -} - -.name { - font-size: 1em; - font-weight: 600; -} - -.description { - font-size: .875em; - font-weight: 400; - color: hsl(var(--text-muted)); -} diff --git a/packages/studiocms_ui/src/components/index.ts b/packages/studiocms_ui/src/components/index.ts index 30aeb3808..066d20239 100644 --- a/packages/studiocms_ui/src/components/index.ts +++ b/packages/studiocms_ui/src/components/index.ts @@ -1,18 +1,18 @@ -export { default as Button } from './Button/Button.astro'; -export { default as Divider } from './Divider/Divider.astro'; -export { default as Input } from './Input/Input.astro'; -export { default as Row } from './Row/Row.astro'; -export { default as Center } from './Center/Center.astro'; -export { default as Textarea } from './Textarea/Textarea.astro'; -export { default as Checkbox } from './Checkbox/Checkbox.astro'; -export { default as Toggle } from './Toggle/Toggle.astro'; -export { default as RadioGroup } from './RadioGroup/RadioGroup.astro'; +export { default as Button } from './Button.astro'; +export { default as Divider } from './Divider.astro'; +export { default as Input } from './Input.astro'; +export { default as Row } from './Row.astro'; +export { default as Center } from './Center.astro'; +export { default as Textarea } from './Textarea.astro'; +export { default as Checkbox } from './Checkbox.astro'; +export { default as Toggle } from './Toggle.astro'; +export { default as RadioGroup } from './RadioGroup.astro'; export { default as Toaster } from './Toast/Toaster.astro'; -export { default as Card } from './Card/Card.astro'; +export { default as Card } from './Card.astro'; export { default as Modal } from './Modal/Modal.astro'; -export { default as Select } from './Select/Select.astro'; +export { default as Select } from './Select.astro'; export { default as Dropdown } from './Dropdown/Dropdown.astro'; -export { default as User } from './User/User.astro'; +export { default as User } from './User.astro'; export { default as Sidebar } from './Sidebar/Single.astro'; export { default as DoubleSidebar } from './Sidebar/Double.astro'; diff --git a/packages/studiocms_ui/src/types/index.ts b/packages/studiocms_ui/src/types/index.ts index e1c3d53d0..dcfd35488 100644 --- a/packages/studiocms_ui/src/types/index.ts +++ b/packages/studiocms_ui/src/types/index.ts @@ -1,16 +1,8 @@ -type PersistentToastProps = { - persistent: true; - closeButton: true; -}; - -type NormalToastProps = { - persistent?: false; - closeButton?: boolean; -}; - -export type ToastProps = (PersistentToastProps | NormalToastProps) & { +export type ToastProps = { title: string; description?: string; type: 'success' | 'warning' | 'danger' | 'info'; duration?: number; + persistent?: boolean; + closeButton?: boolean; }; diff --git a/playgrounds/node/astro.config.mts b/playgrounds/node/astro.config.mts index 7fcc9e5d7..3190f7424 100644 --- a/playgrounds/node/astro.config.mts +++ b/playgrounds/node/astro.config.mts @@ -4,7 +4,7 @@ import webvitals from '@astrojs/web-vitals'; import studioCMSBlog from '@studiocms/blog'; import devapps from '@studiocms/devapps'; import { defineConfig } from 'astro/config'; -import studioCMS from 'studiocms'; +import studioCMS from '../../packages/studiocms/src'; import { getCoolifyURL } from '../../www/hostUtils'; // https://astro.build/config @@ -22,7 +22,13 @@ export default defineConfig({ description: 'A simple blog built with Astro and StudioCMS', }, }), - devapps(), + devapps({ + appsConfig: { + wpApiImporter: { + enabled: true, + }, + }, + }), ], image: { remotePatterns: [ diff --git a/playgrounds/node/src/test.astro b/playgrounds/node/src/test.astro new file mode 100644 index 000000000..e69de29bb diff --git a/playgrounds/node/studiocms.config.mjs b/playgrounds/node/studiocms.config.mjs index 08d7fbf88..c78f3e10f 100644 --- a/playgrounds/node/studiocms.config.mjs +++ b/playgrounds/node/studiocms.config.mjs @@ -1,4 +1,4 @@ -import { defineStudioCMSConfig } from 'studiocms'; +import { defineStudioCMSConfig } from '../../packages/studiocms/src'; export default defineStudioCMSConfig({ dbStartPage: false, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 85a3b8a21..0234d9c22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ catalogs: specifier: ^4.0.7 version: 4.0.7 '@astrojs/starlight': - specifier: ^0.28.2 - version: 0.28.2 + specifier: ^0.28.3 + version: 0.28.3 '@astrojs/tailwind': specifier: ^5.1.0 version: 5.1.0 @@ -34,8 +34,8 @@ catalogs: specifier: ^20.14.11 version: 20.14.13 astro: - specifier: ^4.15.12 - version: 4.15.12 + specifier: ^4.16.3 + version: 4.16.3 astro-integration-kit: specifier: ^0.16.1 version: 0.16.1 @@ -52,9 +52,12 @@ catalogs: specifier: ^5.4.8 version: 5.4.8 docs: - '@shoelace-style/shoelace': - specifier: ^2.16.0 - version: 2.16.0 + '@11ty/eleventy-fetch': + specifier: ^4.0.1 + version: 4.0.1 + '@lorenzo_lewis/starlight-utils': + specifier: ^0.2.0 + version: 0.2.0 '@types/hast': specifier: ^3.0.4 version: 3.0.4 @@ -64,18 +67,18 @@ catalogs: hast: specifier: ^1.0.0 version: 1.0.0 + hast-util-select: + specifier: ^6.0.2 + version: 6.0.2 + p-retry: + specifier: ^6.2.0 + version: 6.2.0 rehype: specifier: ^13.0.1 version: 13.0.1 - starlight-package-managers: - specifier: ^0.7.0 - version: 0.7.0 starlight-typedoc: specifier: ^0.16.0 version: 0.16.0 - starlight-versions: - specifier: ^0.3.0 - version: 0.3.0 typedoc: specifier: ^0.26.8 version: 0.26.8 @@ -83,9 +86,6 @@ catalogs: specifier: ^4.2.9 version: 4.2.9 landing: - '@fontsource-variable/onest': - specifier: 5.1.0 - version: 5.1.0 '@tailwindcss/typography': specifier: ^0.5.15 version: 0.5.15 @@ -109,11 +109,11 @@ catalogs: version: 3.4.7 min: '@astrojs/db': - specifier: '>=0.14' - version: 0.14.0 + specifier: '>=0.14.2' + version: 0.14.2 astro: - specifier: '>=4.15' - version: 4.15.1 + specifier: '>=4.16' + version: 4.16.2 studiocms: '@types/semver': specifier: ^7.5.8 @@ -170,6 +170,9 @@ catalogs: '@astrojs/react': specifier: ^3.6.2 version: 3.6.2 + '@fontsource-variable/onest': + specifier: 5.1.0 + version: 5.1.0 '@iconify-json/heroicons': specifier: ^1.2.0 version: 1.2.0 @@ -273,22 +276,22 @@ importers: dependencies: '@astrojs/db': specifier: catalog:min - version: 0.14.0(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) + version: 0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) '@cloudinary/url-gen': specifier: catalog:studiocms-imagehandler version: 1.19.0 '@inox-tools/runtime-logger': specifier: catalog:studiocms-shared - version: 0.3.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@markdoc/markdoc': specifier: catalog:studiocms-shared version: 0.4.0(@types/react@18.3.5)(react@18.3.1) '@matthiesenxyz/astrolace': specifier: catalog:studiocms-shared - version: 0.3.2(@types/react@18.3.5)(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.2(@types/react@18.3.5)(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/integration-utils': specifier: catalog:studiocms-shared - version: 0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/unocss-preset-daisyui': specifier: catalog:studiocms-shared version: 0.1.2(daisyui@4.12.10(postcss@8.4.47))(unocss@0.62.3(postcss@8.4.47)(rollup@4.21.0)(vite@5.4.8(@types/node@22.0.0))) @@ -336,16 +339,16 @@ importers: version: 0.62.3 '@unpic/astro': specifier: catalog:studiocms-imagehandler - version: 0.0.46(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.0.46(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) arctic: specifier: catalog:studiocms-shared version: 1.9.2 astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) daisyui: specifier: catalog:studiocms-shared version: 4.12.10(postcss@8.4.47) @@ -409,7 +412,7 @@ importers: dependencies: astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) devDependencies: typescript: specifier: 'catalog:' @@ -422,19 +425,19 @@ importers: dependencies: '@astrojs/db': specifier: catalog:min - version: 0.14.0(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) + version: 0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) '@inox-tools/runtime-logger': specifier: catalog:studiocms-shared - version: 0.3.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/astrodtsbuilder': specifier: catalog:studiocms-shared - version: 0.1.2(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.1.2(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/astrolace': specifier: catalog:studiocms-shared - version: 0.3.2(@types/react@18.3.5)(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.2(@types/react@18.3.5)(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/integration-utils': specifier: catalog:studiocms-shared - version: 0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@noble/hashes': specifier: catalog:studiocms-shared version: 1.4.0 @@ -452,10 +455,10 @@ importers: version: 1.9.2 astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) lucia: specifier: catalog:studiocms-shared version: 3.2.0 @@ -483,7 +486,7 @@ importers: version: link:../studiocms_core astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) devDependencies: typescript: specifier: 'catalog:' @@ -505,10 +508,10 @@ importers: version: link:../studiocms_frontend astro: specifier: catalog:min - version: 4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) astro-theme-provider: specifier: 'catalog:' - version: 0.6.1(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.6.1(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) devDependencies: '@types/node': specifier: 'catalog:' @@ -518,19 +521,19 @@ importers: dependencies: '@astrojs/db': specifier: catalog:min - version: 0.14.0(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) + version: 0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) '@markdoc/markdoc': specifier: catalog:studiocms-shared version: 0.4.0(@types/react@18.3.5)(react@18.3.1) '@matthiesenxyz/astrodtsbuilder': specifier: catalog:studiocms-shared - version: 0.1.2(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.1.2(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/astrolace': specifier: catalog:studiocms-shared - version: 0.3.2(@types/react@18.3.5)(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.2(@types/react@18.3.5)(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/integration-utils': specifier: catalog:studiocms-shared - version: 0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@noble/hashes': specifier: catalog:studiocms-shared version: 1.4.0 @@ -539,10 +542,10 @@ importers: version: link:../studiocms_robotstxt astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) lucia: specifier: catalog:studiocms-shared version: 3.2.0 @@ -579,16 +582,16 @@ importers: dependencies: '@inox-tools/runtime-logger': specifier: catalog:studiocms-shared - version: 0.3.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/astrodtsbuilder': specifier: catalog:studiocms-shared - version: 0.1.2(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.1.2(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/astrolace': specifier: catalog:studiocms-shared - version: 0.3.2(@types/react@18.3.5)(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.2(@types/react@18.3.5)(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/integration-utils': specifier: catalog:studiocms-shared - version: 0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/unocss-preset-daisyui': specifier: catalog:studiocms-shared version: 0.1.2(daisyui@4.12.10(postcss@8.4.47))(unocss@0.62.3(postcss@8.4.47)(rollup@4.21.0)(vite@5.4.8(@types/node@22.0.0))) @@ -615,10 +618,10 @@ importers: version: 0.62.3 astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) daisyui: specifier: catalog:studiocms-shared version: 4.12.10(postcss@8.4.47) @@ -637,16 +640,34 @@ importers: dependencies: '@astrojs/db': specifier: catalog:min - version: 0.14.0(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) + version: 0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) '@libsql/client': specifier: ^0.14.0 version: 0.14.0 + '@studiocms/core': + specifier: workspace:* + version: link:../studiocms_core + '@types/cheerio': + specifier: ^0.22.35 + version: 0.22.35 + '@types/turndown': + specifier: ^5.0.5 + version: 5.0.5 astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + cheerio: + specifier: ^1.0.0 + version: 1.0.0 + html-entities: + specifier: ^2.5.2 + version: 2.5.2 + turndown: + specifier: ^7.2.0 + version: 7.2.0 devDependencies: typescript: specifier: 'catalog:' @@ -659,7 +680,7 @@ importers: dependencies: '@matthiesenxyz/integration-utils': specifier: catalog:studiocms-shared - version: 0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@studiocms/core': specifier: workspace:* version: link:../studiocms_core @@ -668,10 +689,10 @@ importers: version: link:../studiocms_renderers astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) devDependencies: typescript: specifier: 'catalog:' @@ -687,22 +708,22 @@ importers: version: 1.19.0 '@matthiesenxyz/astrodtsbuilder': specifier: catalog:studiocms-shared - version: 0.1.2(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.1.2(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/integration-utils': specifier: catalog:studiocms-shared - version: 0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@studiocms/core': specifier: workspace:* version: link:../studiocms_core '@unpic/astro': specifier: catalog:studiocms-imagehandler - version: 0.0.46(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.0.46(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) unpic: specifier: catalog:studiocms-shared version: 3.18.0 @@ -724,16 +745,16 @@ importers: version: 3.6.2(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.4.8(@types/node@22.0.0)) '@inox-tools/runtime-logger': specifier: catalog:studiocms-shared - version: 0.3.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.3.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@markdoc/markdoc': specifier: catalog:studiocms-shared version: 0.4.0(@types/react@18.3.5)(react@18.3.1) '@matthiesenxyz/astrodtsbuilder': specifier: catalog:studiocms-shared - version: 0.1.2(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.1.2(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@matthiesenxyz/integration-utils': specifier: catalog:studiocms-shared - version: 0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@mdx-js/mdx': specifier: catalog:studiocms-renderer version: 3.0.1 @@ -745,10 +766,10 @@ importers: version: link:../studiocms_core astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-integration-kit: specifier: 'catalog:' - version: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) marked: specifier: catalog:studiocms-shared version: 13.0.3 @@ -803,7 +824,7 @@ importers: dependencies: astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) packages/studiocms_ui: dependencies: @@ -812,7 +833,7 @@ importers: version: 5.1.0 astro: specifier: catalog:min - version: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) devDependencies: typescript: specifier: 'catalog:' @@ -828,7 +849,7 @@ importers: version: 0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) '@astrojs/node': specifier: 'catalog:' - version: 8.3.3(astro@4.15.12(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) + version: 8.3.3(astro@4.16.3(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) '@astrojs/web-vitals': specifier: 'catalog:' version: 3.0.0(@astrojs/db@0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1)) @@ -840,7 +861,7 @@ importers: version: link:../../packages/studiocms_devapps astro: specifier: 'catalog:' - version: 4.15.12(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.3(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) studiocms: specifier: workspace:* version: link:../../packages/studiocms @@ -856,7 +877,7 @@ importers: dependencies: '@astrojs/node': specifier: 'catalog:' - version: 8.3.3(astro@4.15.12(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) + version: 8.3.3(astro@4.16.3(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) '@fontsource-variable/onest': specifier: 5.1.0 version: 5.1.0 @@ -865,7 +886,7 @@ importers: version: link:../../packages/studiocms_ui astro: specifier: 'catalog:' - version: 4.15.12(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.3(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) devDependencies: '@types/node': specifier: 'catalog:' @@ -876,45 +897,120 @@ importers: www/docs: dependencies: + '@11ty/eleventy-fetch': + specifier: catalog:docs + version: 4.0.1 '@astrojs/check': specifier: 'catalog:' version: 0.9.3(typescript@5.6.3) + '@astrojs/db': + specifier: 'catalog:' + version: 0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1) + '@astrojs/node': + specifier: 'catalog:' + version: 8.3.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astrojs/react': + specifier: catalog:studiocms-shared + version: 3.6.2(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.4.8(@types/node@22.0.0)) '@astrojs/starlight': specifier: 'catalog:' - version: 0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - '@shoelace-style/shoelace': + version: 0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astrojs/web-vitals': + specifier: 'catalog:' + version: 3.0.0(@astrojs/db@0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1)) + '@fontsource-variable/onest': + specifier: catalog:studiocms-shared + version: 5.1.0 + '@lorenzo_lewis/starlight-utils': specifier: catalog:docs - version: 2.16.0(@types/react@18.3.5) + version: 0.2.0(@astrojs/starlight@0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@shikijs/transformers': + specifier: 1.22.0 + version: 1.22.0 + '@shikijs/twoslash': + specifier: 1.22.0 + version: 1.22.0(typescript@5.6.3) + '@studiocms/blog': + specifier: workspace:* + version: link:../../packages/studiocms_blog + '@studiocms/devapps': + specifier: workspace:* + version: link:../../packages/studiocms_devapps + '@studiocms/renderers': + specifier: workspace:* + version: link:../../packages/studiocms_renderers + '@studiocms/ui': + specifier: workspace:* + version: link:../../packages/studiocms_ui '@types/hast': specifier: catalog:docs version: 3.0.4 + '@types/html-escaper': + specifier: ^3.0.2 + version: 3.0.2 astro: specifier: 'catalog:' - version: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-embed: specifier: catalog:docs - version: 0.7.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + version: 0.7.2(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) hast: specifier: catalog:docs version: 1.0.0 hast-util-select: - specifier: ^6.0.2 + specifier: catalog:docs version: 6.0.2 + hast-util-to-string: + specifier: ^3.0.1 + version: 3.0.1 + hastscript: + specifier: ^9.0.0 + version: 9.0.0 + html-escaper: + specifier: ^3.0.3 + version: 3.0.3 + mdast-util-from-markdown: + specifier: ^2.0.1 + version: 2.0.1 + mdast-util-gfm: + specifier: ^3.0.0 + version: 3.0.0 + mdast-util-to-hast: + specifier: ^13.2.0 + version: 13.2.0 + p-retry: + specifier: catalog:docs + version: 6.2.0 rehype: specifier: catalog:docs version: 13.0.1 + rehype-autolink-headings: + specifier: ^7.1.0 + version: 7.1.0 + rehype-external-links: + specifier: ^3.0.0 + version: 3.0.0 + rehype-slug: + specifier: ^6.0.0 + version: 6.0.0 sharp: specifier: 'catalog:' version: 0.33.4 - starlight-package-managers: - specifier: catalog:docs - version: 0.7.0(@astrojs/starlight@0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + shiki: + specifier: 1.22.0 + version: 1.22.0 + shiki-transformer-color-highlight: + specifier: ^0.2.0 + version: 0.2.0 + starlight-image-zoom: + specifier: ^0.8.0 + version: 0.8.0(@astrojs/starlight@0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))) starlight-typedoc: specifier: catalog:docs - version: 0.16.0(@astrojs/starlight@0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(typedoc-plugin-markdown@4.2.9(typedoc@0.26.8(typescript@5.6.3)))(typedoc@0.26.8(typescript@5.6.3)) - starlight-versions: - specifier: catalog:docs - version: 0.3.0(@astrojs/starlight@0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))) + version: 0.16.0(@astrojs/starlight@0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(typedoc-plugin-markdown@4.2.9(typedoc@0.26.8(typescript@5.6.3)))(typedoc@0.26.8(typescript@5.6.3)) + studiocms: + specifier: workspace:* + version: link:../../packages/studiocms typedoc: specifier: catalog:docs version: 0.26.8(typescript@5.6.3) @@ -924,6 +1020,9 @@ importers: typescript: specifier: 'catalog:' version: 5.6.3 + unified: + specifier: ^11.0.5 + version: 11.0.5 www/web: dependencies: @@ -932,9 +1031,9 @@ importers: version: 0.9.3(typescript@5.6.3) '@astrojs/tailwind': specifier: 'catalog:' - version: 5.1.0(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(tailwindcss@3.4.7) + version: 5.1.0(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(tailwindcss@3.4.7) '@fontsource-variable/onest': - specifier: catalog:landing + specifier: catalog:studiocms-shared version: 5.1.0 '@iconify-json/heroicons': specifier: catalog:studiocms-shared @@ -947,7 +1046,7 @@ importers: version: 0.5.15(tailwindcss@3.4.7) astro: specifier: 'catalog:' - version: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + version: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) astro-icon: specifier: catalog:landing version: 1.1.1 @@ -984,6 +1083,10 @@ importers: packages: + '@11ty/eleventy-fetch@4.0.1': + resolution: {integrity: sha512-yIiLM5ziBmg86i4TlXpBdcIygJHvh/GgPJyAiFOckO9H4y9cQDM8eIcJCUQ4Mum0NEVui/OjhEut2R08xw0vlQ==} + engines: {node: '>=14'} + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -1033,9 +1136,6 @@ packages: '@astrojs/compiler@2.10.3': resolution: {integrity: sha512-bL/O7YBxsFt55YHU021oL+xz+B/9HvGNId3F9xURN16aeqDK9juHGktdkCSXz+U4nqFACq6ZFvWomOzhV+zfPw==} - '@astrojs/db@0.14.0': - resolution: {integrity: sha512-8If3Z0FN2Mdto/jrKGQ4sisrO/rpGdteogPmZCjvTnSzNo5GECFBkxflpOyWX4Xw9qaU865f1BeDgGdU27xeXg==} - '@astrojs/db@0.14.2': resolution: {integrity: sha512-eMudd6KupdcUr3sN58g5qagpCX5PApFy1zRrfPnOMvE6Ndnx+vQtjOkZPgqQ+5vTJ04GrMwzuqhjRB0waaJVoA==} @@ -1057,6 +1157,9 @@ packages: '@astrojs/markdown-remark@5.2.0': resolution: {integrity: sha512-vWGM24KZXz11jR3JO+oqYU3T2qpuOi4uGivJ9SQLCAI01+vEkHC60YJMRvHPc+hwd60F7euNs1PeOEixIIiNQw==} + '@astrojs/markdown-remark@5.3.0': + resolution: {integrity: sha512-r0Ikqr0e6ozPb5bvhup1qdWnSPUvQu6tub4ZLYaKyG50BXZ0ej6FhGz3GpChKpH7kglRFPObJd/bDyf2VM9pkg==} + '@astrojs/mdx@3.1.3': resolution: {integrity: sha512-hOM4dMM4RfJI254d3p/AnOZuk2VyKszRtuY5FBm+Xc4XdhIpGrR56OXMNEcWchtwz4HQyPe/eJSgvBjSROcQIQ==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} @@ -1087,8 +1190,8 @@ packages: '@astrojs/sitemap@3.1.6': resolution: {integrity: sha512-1Qp2NvAzVImqA6y+LubKi1DVhve/hXXgFvB0szxiipzh7BvtuKe4oJJ9dXSqaubaTkt4nMa6dv6RCCAYeB6xaQ==} - '@astrojs/starlight@0.28.2': - resolution: {integrity: sha512-Q1/Ujl2EzWX71qwqdt/0KP3wOyX6Rvyzcep/zD3hRCtw/Vi2TReh4Q2wLwz7mnbuYU9H7YvBKYknbkmjC+K/0w==} + '@astrojs/starlight@0.28.3': + resolution: {integrity: sha512-GXXIPKSu5d50mLVtgI4jf6pb3FPQm8n4MI6ZXuQQqqnA0xg7PJQ76WFSVyrICeqM5fKABSqcBksp/glyEJes/A==} peerDependencies: astro: ^4.14.0 @@ -1307,12 +1410,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx@7.25.2': - resolution: {integrity: sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx@7.25.7': resolution: {integrity: sha512-vILAg5nwGlR9EXE8JIOX4NHXd49lrYbN8hnjffDtoULwpL9hUx/N55nqh2qd0q6FyNDfjl9V79ecKGvFbcSA0Q==} engines: {node: '>=6.9.0'} @@ -2087,57 +2184,25 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@libsql/client@0.10.0': - resolution: {integrity: sha512-2ERn08T4XOVx34yBtUPq0RDjAdd9TJ5qNH/izugr208ml2F94mk92qC64kXyDVQINodWJvp3kAdq6P4zTtCZ7g==} - '@libsql/client@0.14.0': resolution: {integrity: sha512-/9HEKfn6fwXB5aTEEoMeFh4CtG0ZzbncBb1e++OCdVpgKZ/xyMsIVYXm0w7Pv4RUel803vE6LwniB3PqD72R0Q==} - '@libsql/core@0.10.0': - resolution: {integrity: sha512-rqynAXGaiSpTsykOZdBtI1N4z4O+KZ6mt33K/aHeXAY0gSIfK/ctxuWa0Y1Bjo4FMz1idBTCXz4Ps5kITOvZZw==} - '@libsql/core@0.14.0': resolution: {integrity: sha512-nhbuXf7GP3PSZgdCY2Ecj8vz187ptHlZQ0VRc751oB2C1W8jQUXKKklvt7t1LJiUTQBVJuadF628eUk+3cRi4Q==} - '@libsql/darwin-arm64@0.3.19': - resolution: {integrity: sha512-rmOqsLcDI65zzxlUOoEiPJLhqmbFsZF6p4UJQ2kMqB+Kc0Rt5/A1OAdOZ/Wo8fQfJWjR1IbkbpEINFioyKf+nQ==} - cpu: [arm64] - os: [darwin] - - '@libsql/darwin-arm64@0.4.1': - resolution: {integrity: sha512-XICT9/OyU8Aa9Iv1xZIHgvM09n/1OQUk3VC+s5uavzdiGHrDMkOWzN47JN7/FiMa/NWrcgoEiDMk3+e7mE53Ig==} - cpu: [arm64] - os: [darwin] - '@libsql/darwin-arm64@0.4.6': resolution: {integrity: sha512-45i604CJ2Lubbg7NqtDodjarF6VgST8rS5R8xB++MoRqixtDns9PZ6tocT9pRJDWuTWEiy2sjthPOFWMKwYAsg==} cpu: [arm64] os: [darwin] - '@libsql/darwin-x64@0.3.19': - resolution: {integrity: sha512-q9O55B646zU+644SMmOQL3FIfpmEvdWpRpzubwFc2trsa+zoBlSkHuzU9v/C+UNoPHQVRMP7KQctJ455I/h/xw==} - cpu: [x64] - os: [darwin] - - '@libsql/darwin-x64@0.4.1': - resolution: {integrity: sha512-pSKxhRrhu4SsTD+IBRZXcs1SkwMdeAG1tv6Z/Ctp/sOEYrgkU8MDKLqkOr9NsmwpK4S0+JdwjkLMyhTkct/5TQ==} - cpu: [x64] - os: [darwin] - '@libsql/darwin-x64@0.4.6': resolution: {integrity: sha512-dRKliflhfr5zOPSNgNJ6C2nZDd4YA8bTXF3MUNqNkcxQ8BffaH9uUwL9kMq89LkFIZQHcyP75bBgZctxfJ/H5Q==} cpu: [x64] os: [darwin] - '@libsql/hrana-client@0.6.2': - resolution: {integrity: sha512-MWxgD7mXLNf9FXXiM0bc90wCjZSpErWKr5mGza7ERy2FJNNMXd7JIOv+DepBA1FQTIfI8TFO4/QDYgaQC0goNw==} - '@libsql/hrana-client@0.7.0': resolution: {integrity: sha512-OF8fFQSkbL7vJY9rfuegK1R7sPgQ6kFMkDamiEccNUvieQ+3urzfDFI616oPl8V7T9zRmnTkSjMOImYCAVRVuw==} - '@libsql/isomorphic-fetch@0.2.1': - resolution: {integrity: sha512-Sv07QP1Aw8A5OOrmKgRUBKe2fFhF2hpGJhtHe3d1aRnTESZCGkn//0zDycMKTGamVWb3oLYRroOsCV8Ukes9GA==} - '@libsql/isomorphic-fetch@0.3.1': resolution: {integrity: sha512-6kK3SUK5Uu56zPq/Las620n5aS9xJq+jMBcNSOmjhNf/MUvdyji4vrMTqD7ptY7/4/CAVEAYDeotUz60LNQHtw==} engines: {node: '>=18.0.0'} @@ -2145,76 +2210,26 @@ packages: '@libsql/isomorphic-ws@0.1.5': resolution: {integrity: sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg==} - '@libsql/linux-arm64-gnu@0.3.19': - resolution: {integrity: sha512-mgeAUU1oqqh57k7I3cQyU6Trpdsdt607eFyEmH5QO7dv303ti+LjUvh1pp21QWV6WX7wZyjeJV1/VzEImB+jRg==} - cpu: [arm64] - os: [linux] - - '@libsql/linux-arm64-gnu@0.4.1': - resolution: {integrity: sha512-9lpvb24tO2qZd9nq5dlq3ESA3hSKYWBIK7lJjfiCM6f7a70AUwBY9QoPJV9q4gILIyVnR1YBGrlm50nnb+dYgw==} - cpu: [arm64] - os: [linux] - '@libsql/linux-arm64-gnu@0.4.6': resolution: {integrity: sha512-DMPavVyY6vYPAYcQR1iOotHszg+5xSjHSg6F9kNecPX0KKdGq84zuPJmORfKOPtaWvzPewNFdML/e+s1fu09XQ==} cpu: [arm64] os: [linux] - '@libsql/linux-arm64-musl@0.3.19': - resolution: {integrity: sha512-VEZtxghyK6zwGzU9PHohvNxthruSxBEnRrX7BSL5jQ62tN4n2JNepJ6SdzXp70pdzTfwroOj/eMwiPt94gkVRg==} - cpu: [arm64] - os: [linux] - - '@libsql/linux-arm64-musl@0.4.1': - resolution: {integrity: sha512-lyxi+lFxE+NcBRDMQCxCtDg3c4WcKAbc9u63d5+B23Vm+UgphD9XY4seu+tGrBy1MU2tuNVix7r9S7ECpAaVrA==} - cpu: [arm64] - os: [linux] - '@libsql/linux-arm64-musl@0.4.6': resolution: {integrity: sha512-whuHSYAZyclGjM3L0mKGXyWqdAy7qYvPPn+J1ve7FtGkFlM0DiIPjA5K30aWSGJSRh72sD9DBZfnu8CpfSjT6w==} cpu: [arm64] os: [linux] - '@libsql/linux-x64-gnu@0.3.19': - resolution: {integrity: sha512-2t/J7LD5w2f63wGihEO+0GxfTyYIyLGEvTFEsMO16XI5o7IS9vcSHrxsvAJs4w2Pf907uDjmc7fUfMg6L82BrQ==} - cpu: [x64] - os: [linux] - - '@libsql/linux-x64-gnu@0.4.1': - resolution: {integrity: sha512-psvuQ3UFBEmDFV8ZHG+WkUHIJiWv+elZ+zIPvOVedlIKdxG1O+8WthWUAhFHOGnbiyzc4sAZ4c3de1oCvyHxyQ==} - cpu: [x64] - os: [linux] - '@libsql/linux-x64-gnu@0.4.6': resolution: {integrity: sha512-0ggx+5RwEbYabIlDBBAvavdfIJCZ757u6nDZtBeQIhzW99EKbWG3lvkXHM3qudFb/pDWSUY4RFBm6vVtF1cJGA==} cpu: [x64] os: [linux] - '@libsql/linux-x64-musl@0.3.19': - resolution: {integrity: sha512-BLsXyJaL8gZD8+3W2LU08lDEd9MIgGds0yPy5iNPp8tfhXx3pV/Fge2GErN0FC+nzt4DYQtjL+A9GUMglQefXQ==} - cpu: [x64] - os: [linux] - - '@libsql/linux-x64-musl@0.4.1': - resolution: {integrity: sha512-PDidJ3AhGDqosGg3OAZzGxMFIbnuOALya4BoezJKl667AFv3x7BBQ30H81Mngsq3Fh8RkJkXSdWfL91+Txb1iA==} - cpu: [x64] - os: [linux] - '@libsql/linux-x64-musl@0.4.6': resolution: {integrity: sha512-SWNrv7Hz72QWlbM/ZsbL35MPopZavqCUmQz2HNDZ55t0F+kt8pXuP+bbI2KvmaQ7wdsoqAA4qBmjol0+bh4ndw==} cpu: [x64] os: [linux] - '@libsql/win32-x64-msvc@0.3.19': - resolution: {integrity: sha512-ay1X9AobE4BpzG0XPw1gplyLZPGHIgJOovvW23gUrukRegiUP62uzhpRbKNogLlUOynyXeq//prHgPXiebUfWg==} - cpu: [x64] - os: [win32] - - '@libsql/win32-x64-msvc@0.4.1': - resolution: {integrity: sha512-IdODVqV/PrdOnHA/004uWyorZQuRsB7U7bCRCE3vXgABj3eJLJGc6cv2C6ksEaEoVxJbD8k53H4VVAGrtYwXzQ==} - cpu: [x64] - os: [win32] - '@libsql/win32-x64-msvc@0.4.6': resolution: {integrity: sha512-Q0axn110zDNELfkEog3Nl8p9BU4eI/UvgaHevGyOiSDN7s0KPfj0j6jwVHk4oz3o/d/Gg3DRIxomZ4ftfTOy/g==} cpu: [x64] @@ -2231,6 +2246,12 @@ packages: '@lit/reactive-element@2.0.4': resolution: {integrity: sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==} + '@lorenzo_lewis/starlight-utils@0.2.0': + resolution: {integrity: sha512-RAOhqhA5axe9+MXb6r/QwY6mulbTU1hCmtu2lImU3OyFqyV6ClPhAxqqEY7wMHHEHds8UaXGVPUPMST2FZcyZQ==} + peerDependencies: + '@astrojs/starlight': '>=0.28.0' + astro: '>=4.14.0' + '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -2273,6 +2294,9 @@ packages: '@mdx-js/mdx@3.0.1': resolution: {integrity: sha512-eIQ4QTrOWyL3LWEe/bu6Taqzq2HQvHcyTMaOrI95P2/LmJE7AsfPfgJGuFLPVqBUE1BC1rik3VIhU+s9u72arA==} + '@mixmark-io/domino@2.2.0': + resolution: {integrity: sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==} + '@moonrepo/cli@1.28.3': resolution: {integrity: sha512-/zBs8RPOsGddZ5KmzQsoE9DPWN67+nVcF6nPFipNNe7ufC876SoVR7n4kkyMOzcgfoF+c/NEv+5fFPweKsmAsA==} hasBin: true @@ -2523,9 +2547,6 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oslojs/encoding@0.4.1': - resolution: {integrity: sha512-hkjo6MuIK/kQR5CrGNdAPZhS01ZCXuWDRJ187zh6qqF2+yMHZpD9fAYpX8q2bOO6Ryhl3XpCT6kUX76N8hhm4Q==} - '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} @@ -2768,12 +2789,15 @@ packages: '@shikijs/transformers@1.14.1': resolution: {integrity: sha512-JJqL8QBVCJh3L61jqqEXgFq1cTycwjcGj7aSmqOEsbxnETM9hRlaB74QuXvY/fVJNjbNt8nvWo0VwAXKvMSLRg==} + '@shikijs/transformers@1.22.0': + resolution: {integrity: sha512-k7iMOYuGQA62KwAuJOQBgH2IQb5vP8uiB3lMvAMGUgAMMurePOx3Z7oNqJdcpxqZP6I9cc7nc4DNqSKduCxmdg==} + + '@shikijs/twoslash@1.22.0': + resolution: {integrity: sha512-r5F/x4GTh18XzhAREehgT9lCDFZlISBSIsOFZQQaqjiOLG81PIqJN1I1D6XY58UN9OJt+3mffuKq19K4FOJKJA==} + '@shikijs/types@1.22.0': resolution: {integrity: sha512-Fw/Nr7FGFhlQqHfxzZY8Cwtwk5E9nKDUgeLjZgt3UuhcM3yJR9xj3ZGNravZZok8XmEZMiYkSMTPlPkULB8nww==} - '@shikijs/vscode-textmate@9.2.0': - resolution: {integrity: sha512-5FinaOp6Vdh/dl4/yaOTh0ZeKch+rYS8DUb38V3GMKYVkdqzxw53lViRKUYkVILRiVQT7dcPC7VvAKOR73zVtQ==} - '@shikijs/vscode-textmate@9.3.0': resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} @@ -2822,6 +2846,9 @@ packages: '@types/braces@3.0.4': resolution: {integrity: sha512-0WR3b8eaISjEW7RpZnclONaLFDf7buaowRHdqLp4vLj54AsSAYWfh3DRbfiYJY9XDxMgx1B4sE1Afw2PGpuHOA==} + '@types/cheerio@0.22.35': + resolution: {integrity: sha512-yD57BchKRvTV+JD53UZ6PD8KWY5g5rvvMLRnZR3EQBCZXiDT/HR+pKpMzFGlWNhFrXlo7VPZXtKvIEwZkAWOIA==} + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -2837,6 +2864,9 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/html-escaper@3.0.2': + resolution: {integrity: sha512-A8vk09eyYzk8J/lFO4OUMKCmRN0rRzfZf4n3Olwapgox/PtTiU8zPYlL1UEkJ/WeHvV6v9Xnj3o/705PKz9r4Q==} + '@types/linkify-it@5.0.0': resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} @@ -2885,6 +2915,9 @@ packages: '@types/react@18.3.5': resolution: {integrity: sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==} + '@types/retry@0.12.2': + resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} + '@types/sax@1.2.7': resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} @@ -2897,6 +2930,9 @@ packages: '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + '@types/turndown@5.0.5': + resolution: {integrity: sha512-TL2IgGgc7B5j78rIccBtlYAnkuv8nUQqhQc+DSYV5j9Be9XOcm/SKOVRuA47xAVI3680Tk9B1d8flK2GWT2+4w==} + '@types/unist@2.0.10': resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} @@ -2909,6 +2945,11 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + '@typescript/vfs@1.6.0': + resolution: {integrity: sha512-hvJUjNVeBMp77qPINuUvYXj4FyWeeMMKZkxEATEU3hqBAQ7qdTBCUFT7Sp0Zu0faeEtFf+ldXxMEDr/bk73ISg==} + peerDependencies: + typescript: '*' + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -3103,9 +3144,6 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - aria-query@5.3.0: - resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} - aria-query@5.3.2: resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} engines: {node: '>= 0.4'} @@ -3177,13 +3215,13 @@ packages: '@astrojs/db': optional: true - astro@4.15.1: - resolution: {integrity: sha512-XvKZ2GaDbCsMfcJess4o+4D4cCKja45GJ/9o6EJ6n96xaen8HZMRoJn3YKL9TOjIrL2NuU4mBFMG2JivPJ0foA==} + astro@4.16.2: + resolution: {integrity: sha512-Dfkpyt6sA+nv6LnOJr+7bt+gQF5Qh02yqVgyes4c4SvcPScteq1bLX22/z/XW+VU0vlciJOMiM8GWtcDiF6gUQ==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true - astro@4.15.12: - resolution: {integrity: sha512-PojmALAzwafLUD//hqKD4/+1Fj03Aa2VQY/rztCg6DUMgHLpo3TFV3ob1++kay91z/MdNWR+IGITcXhxAXhiTg==} + astro@4.16.3: + resolution: {integrity: sha512-0IrnbCUprAyfeZ8Au/d/d0ssrYGMAZOZ1K3fX7GxI0OwUhkA9bSex0+ywiyVNiVZE5uRlTKRSkvLNKYQWdtHqw==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true @@ -3241,14 +3279,13 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - 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'} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} @@ -3291,10 +3328,6 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - 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'} @@ -3403,6 +3436,9 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + colorjs.io@0.5.2: + resolution: {integrity: sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==} + combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -3424,6 +3460,9 @@ packages: composed-offset-position@0.0.4: resolution: {integrity: sha512-vMlvu1RuNegVE0YsCDSV/X4X10j56mq7PCIyOKK74FxkXzGLwhOUmdkJLSdOBOMwWycobGUMgft2lp+YgTe8hw==} + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + confbox@0.1.7: resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} @@ -3437,10 +3476,6 @@ packages: convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} - engines: {node: '>= 0.6'} - cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} @@ -3600,9 +3635,6 @@ packages: resolution: {integrity: sha512-KxektNH63SrbfUyDiwXqRb1rLwKt33AmMv+5Nhsw1kqZ13SJBRTgZHtGbE+hH3a1mVW1cz+4pqSWVPAtLVXTzQ==} engines: {node: '>=18'} - 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==} @@ -3733,10 +3765,6 @@ packages: sqlite3: optional: true - dset@3.1.3: - resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==} - engines: {node: '>=4'} - dset@3.1.4: resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} engines: {node: '>=4'} @@ -3844,6 +3872,9 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} + eventemitter3@4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} @@ -3889,9 +3920,6 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - fault@2.0.1: - resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} - fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} @@ -3925,6 +3953,13 @@ packages: find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flattie@1.1.1: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} engines: {node: '>=8'} @@ -3946,10 +3981,6 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} - format@0.2.2: - resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} - engines: {node: '>=0.4.x'} - formdata-polyfill@4.0.10: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} @@ -3976,6 +4007,9 @@ packages: fs-monkey@1.0.6: resolution: {integrity: sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==} + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -4018,6 +4052,10 @@ packages: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -4054,12 +4092,18 @@ packages: hast-util-from-html@2.0.1: resolution: {integrity: sha512-RXQBLMl9kjKVNkJTIO6bZyb2n+cUH8LFaSSzo82jiLT6Tfc+Pt7VQCS+/h3YwG4jaNE2TA2sdJisGWR+aJrp0g==} + hast-util-from-html@2.0.3: + resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==} + hast-util-from-parse5@8.0.1: resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} hast-util-has-property@3.0.0: resolution: {integrity: sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==} + hast-util-heading-rank@3.0.0: + resolution: {integrity: sha512-EJKb8oMUXVHcWZTDepnr+WNbfnXKFNf9duMesmr4S8SXTJBJ9M4Yok08pu9vxdJwdlGRhVumk9mEhkEvKGifwA==} + hast-util-is-body-ok-link@3.0.0: resolution: {integrity: sha512-VFHY5bo2nY8HiV6nir2ynmEB1XkxzuUffhEGeVx7orbu/B1KaGyeGgMZldvMVx5xWrDlLLG/kQ6YkJAMkBEx0w==} @@ -4093,8 +4137,8 @@ packages: hast-util-to-parse5@8.0.0: resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} - hast-util-to-string@3.0.0: - resolution: {integrity: sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==} + hast-util-to-string@3.0.1: + resolution: {integrity: sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==} hast-util-to-text@4.0.2: resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==} @@ -4172,6 +4216,10 @@ packages: importx@0.4.3: resolution: {integrity: sha512-x6E6OxmWq/SUaj7wDeDeSjyHP+rMUbEaqJ5fw0uEtC/FTX9ocxNMFJ+ONnpJIsRpFz3ya6qJAK4orwSKqw0BSQ==} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -4184,6 +4232,10 @@ packages: inline-style-parser@0.2.3: resolution: {integrity: sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g==} + is-absolute-url@4.0.1: + resolution: {integrity: sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} @@ -4237,6 +4289,10 @@ packages: resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} engines: {node: '>=12'} + is-network-error@1.1.0: + resolution: {integrity: sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==} + engines: {node: '>=16'} + is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -4309,6 +4365,9 @@ packages: engines: {node: '>=6'} hasBin: true + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} @@ -4326,6 +4385,9 @@ packages: jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -4345,14 +4407,6 @@ packages: resolution: {integrity: sha512-bkQo+UqryW6Zmo/DsixYZE4Z9t2mzvNMhceyIhuMuInb3knm5Q+GNGMKveydJAj+Z6piN1SwI6eR/V0G+Z0BtA==} engines: {node: '>=18'} - libsql@0.3.19: - resolution: {integrity: sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA==} - os: [darwin, linux, win32] - - libsql@0.4.1: - resolution: {integrity: sha512-qZlR9Yu1zMBeLChzkE/cKfoKV3Esp9cn9Vx5Zirn4AVhDWPcjYhKwbtJcMuHehgk3mH+fJr9qW+3vesBWbQpBg==} - os: [darwin, linux, win32] - libsql@0.4.6: resolution: {integrity: sha512-F5M+ltteK6dCcpjMahrkgT96uFJvVI8aQ4r9f2AzHQjC7BkAYtvfMSTWGvRBezRgMUIU2h1Sy0pF9nOGOD5iyA==} os: [darwin, linux, win32] @@ -4509,9 +4563,6 @@ packages: mdast-util-from-markdown@2.0.1: resolution: {integrity: sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==} - mdast-util-frontmatter@2.0.1: - resolution: {integrity: sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==} - mdast-util-gfm-autolink-literal@2.0.0: resolution: {integrity: sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==} @@ -4580,9 +4631,6 @@ packages: micromark-extension-directive@3.0.1: resolution: {integrity: sha512-VGV2uxUzhEZmaP7NSFo2vtq7M2nUD+WfmYQD+d8i/1nHbzE+rMy9uzTvUybBbNiVbrhOZibg3gbyoARGqgDWyg==} - micromark-extension-frontmatter@2.0.0: - resolution: {integrity: sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==} - micromark-extension-gfm-autolink-literal@2.1.0: resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} @@ -4710,6 +4758,9 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -4872,6 +4923,10 @@ packages: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} + p-finally@1.0.0: + resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} + engines: {node: '>=4'} + p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -4888,10 +4943,22 @@ packages: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} + p-queue@6.6.2: + resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==} + engines: {node: '>=8'} + p-queue@8.0.1: resolution: {integrity: sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA==} engines: {node: '>=18'} + p-retry@6.2.0: + resolution: {integrity: sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA==} + engines: {node: '>=16.17'} + + p-timeout@3.2.0: + resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} + engines: {node: '>=8'} + p-timeout@6.1.2: resolution: {integrity: sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==} engines: {node: '>=14.16'} @@ -4948,6 +5015,10 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -4959,9 +5030,6 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} - path-to-regexp@6.2.2: - resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -5160,9 +5228,15 @@ packages: resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} engines: {node: '>=12'} + rehype-autolink-headings@7.1.0: + resolution: {integrity: sha512-rItO/pSdvnvsP4QRB1pmPiNHUskikqtPojZKJPPPAVx9Hj8i8TwMBhofrrAYRhYOOBZH9tgmG5lPqDLuIWPWmw==} + rehype-expressive-code@0.35.6: resolution: {integrity: sha512-pPdE+pRcRw01kxMOwHQjuRxgwlblZt5+wAc3w2aPGgmcnn57wYjn07iKO7zaznDxYVxMYVvYlnL+R3vWFQS4Gw==} + rehype-external-links@3.0.0: + resolution: {integrity: sha512-yp+e5N9V3C6bwBeAC4n796kc86M4gJCdlVhiMTxIrJG5UHDMh+PJANf9heqORJbt1nrCbDwIlAZKjANIaVBbvw==} + rehype-format@5.0.0: resolution: {integrity: sha512-kM4II8krCHmUhxrlvzFSptvaWh280Fr7UGNJU5DCMuvmAwGCNmGfi9CvFAQK6JDjsNoRMWQStglK3zKJH685Wg==} @@ -5178,9 +5252,15 @@ packages: rehype-raw@7.0.0: resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} + rehype-slug@6.0.0: + resolution: {integrity: sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==} + rehype-stringify@10.0.0: resolution: {integrity: sha512-1TX1i048LooI9QoecrXy7nGFFbFSufxVRAfc6Y9YMRAi56l+oB0zP51mLSV312uRuvVLPV1opSlJmslozR1XHQ==} + rehype-stringify@10.0.1: + resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} + rehype@13.0.1: resolution: {integrity: sha512-AcSLS2mItY+0fYu9xKxOu1LhUZeBZZBx8//5HKzF+0XP+eP8+6a5MXn2+DW2kfXR6Dtp1FEXMVrjyKAcvcU8vg==} @@ -5190,9 +5270,6 @@ packages: remark-directive@3.0.0: resolution: {integrity: sha512-l1UyWJ6Eg1VPU7Hm/9tt0zKtReJQNOA4+iDMAxTyZNWnJnFlbS/7zhiel/rogTLQ2vMYwDzSJa4BiVNqGlqIMA==} - remark-frontmatter@5.0.0: - resolution: {integrity: sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==} - remark-gfm@4.0.0: resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==} @@ -5205,6 +5282,9 @@ packages: 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==} + remark-smartypants@3.0.2: resolution: {integrity: sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==} engines: {node: '>=16.0.0'} @@ -5212,9 +5292,6 @@ packages: remark-stringify@11.0.0: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} - remark@15.0.1: - resolution: {integrity: sha512-Eht5w30ruCXgFmxVUSlNWQ9iiimq07URKeFS3hNc8cUWy1llX4KDWfyEDZRycMc+znsN9Ux5/tJ/BFdgdOwA3A==} - request-light@0.5.8: resolution: {integrity: sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==} @@ -5256,10 +5333,19 @@ packages: retext@9.0.0: resolution: {integrity: sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==} + retry@0.13.1: + resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} + engines: {node: '>= 4'} + reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + rollup@4.21.0: resolution: {integrity: sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -5335,6 +5421,9 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shiki-transformer-color-highlight@0.2.0: + resolution: {integrity: sha512-KvQYFqhf7gdZCr1GcwWHqPS/sYl0RgwhCET95Sf3N8UX2yHUBqJbis9CbkR+KcnGxR6PWO4I/jB3Q64+yquNrQ==} + shiki@1.14.1: resolution: {integrity: sha512-FujAN40NEejeXdzPt+3sZ3F2dx1U24BY2XTY01+MG8mbxCiA2XukXdcbyMyLAHJ/1AUUnQd1tZlvIjefWWEJeA==} @@ -5395,12 +5484,11 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - starlight-package-managers@0.7.0: - resolution: {integrity: sha512-7T0Wd4OhtyTxr7yxplO1gt1B0Ped4dxRQ0T3uOp7qM+5UmQiyQE6PMxwmN+4hVuaVQ1zpDdZR6nQrptewS+m9g==} - engines: {node: '>=18.14.1'} + starlight-image-zoom@0.8.0: + resolution: {integrity: sha512-+YDqCyihQescGs9hJoyTQt+KHEq9s6zIv8ksBMjPjwOrVicXtY0pM4hHj8yO1r2znud4gTytyGt25kAOmRyP9A==} + engines: {node: '>=18'} peerDependencies: '@astrojs/starlight': '>=0.22.0' - astro: '>=4.2.7' starlight-typedoc@0.16.0: resolution: {integrity: sha512-9B2kmX8S2J3cHenlf+TqVV+ogIrOolf8UxMu0f/lWDX/XVQDAjr44j0/y8k7Nfc+V6TmndsJbRIOpAmPAIvxAg==} @@ -5411,12 +5499,6 @@ packages: typedoc: '>=0.26.5' typedoc-plugin-markdown: '>=4.1.1' - starlight-versions@0.3.0: - resolution: {integrity: sha512-6PIAYYpb9w5ioCBLNRR+S6bQ0W9MRkZrAiCXLf8TlZE+RWB2vcInHv+00Fu8u3ZYK6kkHQO2IurHv0Zq5vKUlQ==} - engines: {node: '>=18'} - peerDependencies: - '@astrojs/starlight': '>=0.28.0' - statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} @@ -5588,9 +5670,16 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - type-fest@2.19.0: - resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} - engines: {node: '>=12.20'} + turndown@7.2.0: + resolution: {integrity: sha512-eCZGBN4nNNqM9Owkv9HAtWRYfLA4h909E/WGAWWBpmB275ehNhZyk87/Tpvjbp0jjNl9XwCsbe6bm6CqFsgD+A==} + + twoslash-protocol@0.2.12: + resolution: {integrity: sha512-5qZLXVYfZ9ABdjqbvPc4RWMr7PrpPaaDSeaYY55vl/w1j6H6kzsWK/urAEIXlzYlyrFmyz1UbwIt+AA0ck+wbg==} + + twoslash@0.2.12: + resolution: {integrity: sha512-tEHPASMqi7kqwfJbkk7hc/4EhlrKCSLcur+TcvYki3vhIfaRMXnXjaYFgXpoZRbT6GdprD4tGuVBEmTpUgLBsw==} + peerDependencies: + typescript: '*' type-fest@4.26.1: resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} @@ -5752,14 +5841,6 @@ packages: terser: optional: true - vitefu@0.2.5: - resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - peerDependenciesMeta: - vite: - optional: true - vitefu@1.0.2: resolution: {integrity: sha512-0/iAvbXyM3RiPPJ4lyD4w6Mjgtf4ejTK6TPvTNG3H32PLwuT0N/ZjJLiXug7ETE/LWtTeHw9WRv7uX/tIKYyKg==} peerDependencies: @@ -5918,10 +5999,6 @@ packages: engines: {node: '>= 8'} hasBin: true - 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'} @@ -6005,11 +6082,6 @@ packages: yoga-wasm-web@0.3.3: resolution: {integrity: sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==} - zod-to-json-schema@3.23.2: - resolution: {integrity: sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw==} - peerDependencies: - zod: ^3.23.3 - zod-to-json-schema@3.23.3: resolution: {integrity: sha512-TYWChTxKQbRJp5ST22o/Irt9KC5nj7CdBKYB/AosCRdj/wxEMvv4NNaj9XVUHDOIp53ZxArGhnw5HMZziPFjog==} peerDependencies: @@ -6029,6 +6101,16 @@ packages: snapshots: + '@11ty/eleventy-fetch@4.0.1': + dependencies: + debug: 4.3.7 + flat-cache: 3.2.0 + node-fetch: 2.7.0 + p-queue: 6.6.2 + transitivePeerDependencies: + - encoding + - supports-color + '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.3.0': @@ -6043,38 +6125,38 @@ snapshots: '@antfu/utils@0.7.10': {} - '@astro-community/astro-embed-integration@0.7.1(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@astro-community/astro-embed-integration@0.7.1(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: '@astro-community/astro-embed-link-preview': 0.2.1 - '@astro-community/astro-embed-twitter': 0.5.4(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - '@astro-community/astro-embed-vimeo': 0.3.7(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - '@astro-community/astro-embed-youtube': 0.5.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astro-community/astro-embed-twitter': 0.5.4(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astro-community/astro-embed-vimeo': 0.3.7(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astro-community/astro-embed-youtube': 0.5.2(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@types/unist': 2.0.10 - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-auto-import: 0.4.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro-auto-import: 0.4.2(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) unist-util-select: 4.0.3 '@astro-community/astro-embed-link-preview@0.2.1': dependencies: '@astro-community/astro-embed-utils': 0.1.3 - '@astro-community/astro-embed-twitter@0.5.4(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@astro-community/astro-embed-twitter@0.5.4(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: '@astro-community/astro-embed-utils': 0.1.3 - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) '@astro-community/astro-embed-utils@0.1.3': dependencies: linkedom: 0.14.26 - '@astro-community/astro-embed-vimeo@0.3.7(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@astro-community/astro-embed-vimeo@0.3.7(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: '@astro-community/astro-embed-utils': 0.1.3 - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - '@astro-community/astro-embed-youtube@0.5.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@astro-community/astro-embed-youtube@0.5.2(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) lite-youtube-embed: 0.3.2 '@astrojs/check@0.9.3(typescript@5.6.3)': @@ -6091,20 +6173,19 @@ snapshots: '@astrojs/compiler@2.10.3': {} - '@astrojs/db@0.14.0(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1)': + '@astrojs/db@0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1)': dependencies: '@astrojs/studio': 0.1.1 - '@libsql/client': 0.10.0 + '@libsql/client': 0.14.0 async-listen: 3.0.1 deep-diff: 1.0.2 - drizzle-orm: 0.31.4(@cloudflare/workers-types@4.20240725.0)(@libsql/client@0.10.0)(@types/react@18.3.5)(react@18.3.1) + drizzle-orm: 0.31.4(@cloudflare/workers-types@4.20240725.0)(@libsql/client@0.14.0)(@types/react@18.3.5)(react@18.3.1) github-slugger: 2.0.0 kleur: 4.1.5 nanoid: 5.0.7 open: 10.1.0 ora: 8.1.0 prompts: 2.4.2 - strip-ansi: 7.1.0 yargs-parser: 21.1.1 zod: 3.23.8 transitivePeerDependencies: @@ -6138,55 +6219,9 @@ snapshots: - sqlite3 - utf-8-validate - '@astrojs/db@0.14.2(@cloudflare/workers-types@4.20240725.0)(@types/react@18.3.5)(react@18.3.1)': - dependencies: - '@astrojs/studio': 0.1.1 - '@libsql/client': 0.14.0 - async-listen: 3.0.1 - deep-diff: 1.0.2 - drizzle-orm: 0.31.4(@cloudflare/workers-types@4.20240725.0)(@libsql/client@0.14.0)(@types/react@18.3.5)(react@18.3.1) - github-slugger: 2.0.0 - kleur: 4.1.5 - nanoid: 5.0.7 - open: 10.1.0 - ora: 8.1.0 - prompts: 2.4.2 - yargs-parser: 21.1.1 - zod: 3.23.8 - transitivePeerDependencies: - - '@aws-sdk/client-rds-data' - - '@cloudflare/workers-types' - - '@electric-sql/pglite' - - '@neondatabase/serverless' - - '@op-engineering/op-sqlite' - - '@opentelemetry/api' - - '@planetscale/database' - - '@prisma/client' - - '@tidbcloud/serverless' - - '@types/better-sqlite3' - - '@types/pg' - - '@types/react' - - '@types/sql.js' - - '@vercel/postgres' - - '@xata.io/client' - - better-sqlite3 - - bufferutil - - bun-types - - expo-sqlite - - knex - - kysely - - mysql2 - - pg - - postgres - - prisma - - react - - sql.js - - sqlite3 - - utf-8-validate - - '@astrojs/internal-helpers@0.4.1': {} - - '@astrojs/language-server@2.14.1(typescript@5.6.3)': + '@astrojs/internal-helpers@0.4.1': {} + + '@astrojs/language-server@2.14.1(typescript@5.6.3)': dependencies: '@astrojs/compiler': 2.10.3 '@astrojs/yaml2ts': 0.2.1 @@ -6233,17 +6268,40 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@3.1.3(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@astrojs/markdown-remark@5.3.0': + dependencies: + '@astrojs/prism': 3.1.0 + github-slugger: 2.0.0 + 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.1 + remark-gfm: 4.0.0 + remark-parse: 11.0.0 + remark-rehype: 11.1.1 + remark-smartypants: 3.0.2 + shiki: 1.22.0 + unified: 11.0.5 + unist-util-remove-position: 5.0.0 + unist-util-visit: 5.0.0 + unist-util-visit-parents: 6.0.1 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@astrojs/mdx@3.1.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: '@astrojs/markdown-remark': 5.2.0 '@mdx-js/mdx': 3.0.1 acorn: 8.12.1 - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) es-module-lexer: 1.5.4 estree-util-visit: 2.0.0 github-slugger: 2.0.0 gray-matter: 4.0.3 - hast-util-to-html: 9.0.1 + hast-util-to-html: 9.0.3 kleur: 4.1.5 rehype-raw: 7.0.0 remark-gfm: 4.0.0 @@ -6254,9 +6312,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/node@8.3.3(astro@4.15.12(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3))': + '@astrojs/node@8.3.3(astro@4.16.3(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3))': + dependencies: + astro: 4.16.3(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + send: 0.18.0 + server-destroy: 1.0.1 + transitivePeerDependencies: + - supports-color + + '@astrojs/node@8.3.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: - astro: 4.15.12(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) send: 0.18.0 server-destroy: 1.0.1 transitivePeerDependencies: @@ -6289,26 +6355,26 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.23.8 - '@astrojs/starlight@0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@astrojs/starlight@0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: - '@astrojs/mdx': 3.1.3(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astrojs/mdx': 3.1.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@astrojs/sitemap': 3.1.6 '@pagefind/default-ui': 1.1.0 '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-expressive-code: 0.35.6(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro-expressive-code: 0.35.6(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) bcp-47: 2.1.0 - hast-util-from-html: 2.0.1 + hast-util-from-html: 2.0.3 hast-util-select: 6.0.2 - hast-util-to-string: 3.0.0 + hast-util-to-string: 3.0.1 hastscript: 9.0.0 i18next: 23.15.1 mdast-util-directive: 3.0.0 mdast-util-to-markdown: 2.1.0 mdast-util-to-string: 4.0.0 pagefind: 1.1.0 - rehype: 13.0.1 + rehype: 13.0.2 rehype-format: 5.0.0 remark-directive: 3.0.0 unified: 11.0.5 @@ -6323,9 +6389,9 @@ snapshots: kleur: 4.1.5 ora: 8.1.0 - '@astrojs/tailwind@5.1.0(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(tailwindcss@3.4.7)': + '@astrojs/tailwind@5.1.0(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(tailwindcss@3.4.7)': dependencies: - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) autoprefixer: 10.4.19(postcss@8.4.47) postcss: 8.4.47 postcss-load-config: 4.0.2(postcss@8.4.47) @@ -6338,7 +6404,7 @@ snapshots: 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 @@ -6606,26 +6672,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.25.2)': + '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.25.7)': 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 - transitivePeerDependencies: - - supports-color + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.7)': dependencies: @@ -7100,7 +7155,7 @@ snapshots: dependencies: '@ctrl/tinycolor': 4.1.0 hast-util-select: 6.0.2 - hast-util-to-html: 9.0.1 + hast-util-to-html: 9.0.3 hast-util-to-text: 4.0.2 hastscript: 9.0.0 postcss: 8.4.47 @@ -7319,18 +7374,18 @@ snapshots: '@img/sharp-win32-x64@0.33.5': optional: true - '@inox-tools/modular-station@0.3.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@inox-tools/modular-station@0.3.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: '@inox-tools/utils': 0.1.3 - astro: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-integration-kit: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro-integration-kit: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - '@inox-tools/runtime-logger@0.3.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@inox-tools/runtime-logger@0.3.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: - '@inox-tools/modular-station': 0.3.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@inox-tools/modular-station': 0.3.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@inox-tools/utils': 0.1.3 - astro: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-integration-kit: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro-integration-kit: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@inox-tools/utils@0.1.3': {} @@ -7360,17 +7415,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@libsql/client@0.10.0': - dependencies: - '@libsql/core': 0.10.0 - '@libsql/hrana-client': 0.6.2 - js-base64: 3.7.7 - libsql: 0.4.1 - promise-limit: 2.7.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - '@libsql/client@0.14.0': dependencies: '@libsql/core': 0.14.0 @@ -7382,42 +7426,16 @@ snapshots: - bufferutil - utf-8-validate - '@libsql/core@0.10.0': - dependencies: - js-base64: 3.7.7 - '@libsql/core@0.14.0': dependencies: js-base64: 3.7.7 - '@libsql/darwin-arm64@0.3.19': - optional: true - - '@libsql/darwin-arm64@0.4.1': - optional: true - '@libsql/darwin-arm64@0.4.6': optional: true - '@libsql/darwin-x64@0.3.19': - optional: true - - '@libsql/darwin-x64@0.4.1': - optional: true - '@libsql/darwin-x64@0.4.6': optional: true - '@libsql/hrana-client@0.6.2': - dependencies: - '@libsql/isomorphic-fetch': 0.2.1 - '@libsql/isomorphic-ws': 0.1.5 - js-base64: 3.7.7 - node-fetch: 3.3.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - '@libsql/hrana-client@0.7.0': dependencies: '@libsql/isomorphic-fetch': 0.3.1 @@ -7428,8 +7446,6 @@ snapshots: - bufferutil - utf-8-validate - '@libsql/isomorphic-fetch@0.2.1': {} - '@libsql/isomorphic-fetch@0.3.1': {} '@libsql/isomorphic-ws@0.1.5': @@ -7440,48 +7456,18 @@ snapshots: - bufferutil - utf-8-validate - '@libsql/linux-arm64-gnu@0.3.19': - optional: true - - '@libsql/linux-arm64-gnu@0.4.1': - optional: true - '@libsql/linux-arm64-gnu@0.4.6': optional: true - '@libsql/linux-arm64-musl@0.3.19': - optional: true - - '@libsql/linux-arm64-musl@0.4.1': - optional: true - '@libsql/linux-arm64-musl@0.4.6': optional: true - '@libsql/linux-x64-gnu@0.3.19': - optional: true - - '@libsql/linux-x64-gnu@0.4.1': - optional: true - '@libsql/linux-x64-gnu@0.4.6': optional: true - '@libsql/linux-x64-musl@0.3.19': - optional: true - - '@libsql/linux-x64-musl@0.4.1': - optional: true - '@libsql/linux-x64-musl@0.4.6': optional: true - '@libsql/win32-x64-msvc@0.3.19': - optional: true - - '@libsql/win32-x64-msvc@0.4.1': - optional: true - '@libsql/win32-x64-msvc@0.4.6': optional: true @@ -7495,6 +7481,12 @@ snapshots: dependencies: '@lit-labs/ssr-dom-shim': 1.2.0 + '@lorenzo_lewis/starlight-utils@0.2.0(@astrojs/starlight@0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + dependencies: + '@astrojs/starlight': 0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro-integration-kit: 0.16.1(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.25.0 @@ -7517,24 +7509,24 @@ snapshots: '@types/react': 18.3.5 react: 18.3.1 - '@matthiesenxyz/astrodtsbuilder@0.1.2(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@matthiesenxyz/astrodtsbuilder@0.1.2(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: - astro: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - '@matthiesenxyz/astrolace@0.3.2(@types/react@18.3.5)(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@matthiesenxyz/astrolace@0.3.2(@types/react@18.3.5)(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: '@shoelace-style/shoelace': 2.16.0(@types/react@18.3.5) - astro: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-integration-kit: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro-integration-kit: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) lit: 3.1.4 zod: 3.23.8 transitivePeerDependencies: - '@types/react' - '@matthiesenxyz/integration-utils@0.2.0(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@matthiesenxyz/integration-utils@0.2.0(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: - astro: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-integration-kit: 0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro-integration-kit: 0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) package-json: 10.0.1 semver: 7.6.3 @@ -7576,6 +7568,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@mixmark-io/domino@2.2.0': {} + '@moonrepo/cli@1.28.3': dependencies: detect-libc: 2.0.3 @@ -7788,8 +7782,6 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@oslojs/encoding@0.4.1': {} - '@oslojs/encoding@1.1.0': {} '@pagefind/darwin-arm64@1.1.0': @@ -7947,7 +7939,7 @@ snapshots: '@shikijs/core@1.16.2': dependencies: - '@shikijs/vscode-textmate': 9.2.0 + '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 '@shikijs/core@1.22.0': @@ -7974,13 +7966,24 @@ snapshots: dependencies: shiki: 1.14.1 + '@shikijs/transformers@1.22.0': + dependencies: + shiki: 1.22.0 + + '@shikijs/twoslash@1.22.0(typescript@5.6.3)': + dependencies: + '@shikijs/core': 1.22.0 + '@shikijs/types': 1.22.0 + twoslash: 0.2.12(typescript@5.6.3) + transitivePeerDependencies: + - supports-color + - typescript + '@shikijs/types@1.22.0': dependencies: '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 - '@shikijs/vscode-textmate@9.2.0': {} - '@shikijs/vscode-textmate@9.3.0': {} '@shoelace-style/animations@1.1.0': {} @@ -8027,26 +8030,30 @@ snapshots: '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.25.4 - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 '@types/babel__template@7.4.4': dependencies: '@babel/parser': 7.25.4 - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 '@types/braces@3.0.4': {} + '@types/cheerio@0.22.35': + dependencies: + '@types/node': 22.0.0 + '@types/cookie@0.6.0': {} '@types/debug@4.1.12': @@ -8063,6 +8070,8 @@ snapshots: dependencies: '@types/unist': 3.0.2 + '@types/html-escaper@3.0.2': {} + '@types/linkify-it@5.0.0': optional: true @@ -8118,6 +8127,8 @@ snapshots: '@types/prop-types': 15.7.12 csstype: 3.1.3 + '@types/retry@0.12.2': {} + '@types/sax@1.2.7': dependencies: '@types/node': 22.0.0 @@ -8131,6 +8142,8 @@ snapshots: '@types/trusted-types@2.0.7': {} + '@types/turndown@5.0.5': {} + '@types/unist@2.0.10': {} '@types/unist@3.0.2': {} @@ -8144,6 +8157,13 @@ snapshots: '@types/node': 22.0.0 optional: true + '@typescript/vfs@1.6.0(typescript@5.6.3)': + dependencies: + debug: 4.3.7 + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@ungap/structured-clone@1.2.0': {} '@unocss/astro@0.62.3(rollup@4.21.0)(vite@5.4.8(@types/node@22.0.0))': @@ -8306,12 +8326,12 @@ snapshots: - rollup - supports-color - '@unpic/astro@0.0.46(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': + '@unpic/astro@0.0.46(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))': dependencies: '@unpic/core': 0.0.49 '@unpic/pixels': 1.2.2 '@unpic/placeholder': 0.1.2 - astro: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) blurhash: 2.0.5 '@unpic/core@0.0.49': @@ -8330,9 +8350,9 @@ snapshots: '@vitejs/plugin-react@4.3.1(vite@5.4.8(@types/node@22.0.0))': dependencies: - '@babel/core': 7.25.2 - '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.7) + '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.7) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 vite: 5.4.8(@types/node@22.0.0) @@ -8441,10 +8461,6 @@ snapshots: argparse@2.0.1: {} - aria-query@5.3.0: - dependencies: - dequal: 2.0.3 - aria-query@5.3.2: {} array-iterate@2.0.1: {} @@ -8457,24 +8473,24 @@ snapshots: astring@1.8.6: {} - astro-auto-import@0.4.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): + astro-auto-import@0.4.2(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): dependencies: '@types/node': 18.19.42 acorn: 8.12.1 - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-embed@0.7.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): + astro-embed@0.7.2(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): dependencies: - '@astro-community/astro-embed-integration': 0.7.1(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astro-community/astro-embed-integration': 0.7.1(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) '@astro-community/astro-embed-link-preview': 0.2.1 - '@astro-community/astro-embed-twitter': 0.5.4(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - '@astro-community/astro-embed-vimeo': 0.3.7(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - '@astro-community/astro-embed-youtube': 0.5.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + '@astro-community/astro-embed-twitter': 0.5.4(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astro-community/astro-embed-vimeo': 0.3.7(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + '@astro-community/astro-embed-youtube': 0.5.2(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) - astro-expressive-code@0.35.6(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): + astro-expressive-code@0.35.6(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): dependencies: - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) rehype-expressive-code: 0.35.6 astro-icon@1.1.1: @@ -8486,69 +8502,74 @@ snapshots: - debug - supports-color - astro-integration-kit@0.14.0(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): + astro-integration-kit@0.14.0(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): dependencies: - astro: 4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) pathe: 1.1.2 recast: 0.23.9 - astro-integration-kit@0.16.1(astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): + astro-integration-kit@0.16.1(astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): dependencies: - astro: 4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) pathe: 1.1.2 recast: 0.23.9 - astro-pages@0.3.0(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): + astro-integration-kit@0.16.1(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): dependencies: - astro: 4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + pathe: 1.1.2 + recast: 0.23.9 + + astro-pages@0.3.0(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): + dependencies: + astro: 4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) fast-glob: 3.3.2 - astro-public@0.1.0(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): + astro-public@0.1.0(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): dependencies: - astro: 4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + astro: 4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) - astro-theme-provider@0.6.1(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): + astro-theme-provider@0.6.1(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)): dependencies: - astro: 4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) - astro-integration-kit: 0.14.0(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) - astro-pages: 0.3.0(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) - astro-public: 0.1.0(astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3) + astro-integration-kit: 0.14.0(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) + astro-pages: 0.3.0(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) + astro-public: 0.1.0(astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3)) callsites: 4.2.0 fast-glob: 3.3.2 - astro@4.15.1(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3): + astro@4.16.2(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3): 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(rollup@4.21.0) + '@babel/core': 7.25.7 + '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.7) + '@babel/types': 7.25.7 + '@oslojs/encoding': 1.1.0 + '@rollup/pluginutils': 5.1.2(rollup@4.21.0) '@types/babel__core': 7.20.5 '@types/cookie': 0.6.0 acorn: 8.12.1 - aria-query: 5.3.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 @@ -8564,25 +8585,22 @@ snapshots: ora: 8.1.0 p-limit: 6.1.0 p-queue: 8.0.1 - path-to-regexp: 6.2.2 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 + shiki: 1.22.0 tinyexec: 0.3.0 tsconfck: 3.1.3(typescript@5.6.3) unist-util-visit: 5.0.0 vfile: 6.0.3 vite: 5.4.8(@types/node@20.14.13) - vitefu: 0.2.5(vite@5.4.8(@types/node@20.14.13)) + vitefu: 1.0.2(vite@5.4.8(@types/node@20.14.13)) 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-json-schema: 3.23.3(zod@3.23.8) zod-to-ts: 1.2.0(typescript@5.6.3)(zod@3.23.8) optionalDependencies: sharp: 0.33.5 @@ -8599,39 +8617,38 @@ snapshots: - terser - typescript - astro@4.15.1(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3): + astro@4.16.2(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3): 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(rollup@4.21.0) + '@babel/core': 7.25.7 + '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.7) + '@babel/types': 7.25.7 + '@oslojs/encoding': 1.1.0 + '@rollup/pluginutils': 5.1.2(rollup@4.21.0) '@types/babel__core': 7.20.5 '@types/cookie': 0.6.0 acorn: 8.12.1 - aria-query: 5.3.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 @@ -8647,25 +8664,22 @@ snapshots: ora: 8.1.0 p-limit: 6.1.0 p-queue: 8.0.1 - path-to-regexp: 6.2.2 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 + shiki: 1.22.0 tinyexec: 0.3.0 tsconfck: 3.1.3(typescript@5.6.3) unist-util-visit: 5.0.0 vfile: 6.0.3 vite: 5.4.8(@types/node@22.0.0) - vitefu: 0.2.5(vite@5.4.8(@types/node@22.0.0)) + vitefu: 1.0.2(vite@5.4.8(@types/node@22.0.0)) 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-json-schema: 3.23.3(zod@3.23.8) zod-to-ts: 1.2.0(typescript@5.6.3)(zod@3.23.8) optionalDependencies: sharp: 0.33.5 @@ -8682,11 +8696,11 @@ snapshots: - terser - typescript - astro@4.15.12(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3): + astro@4.16.3(@types/node@20.14.13)(rollup@4.21.0)(typescript@5.6.3): 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.7 '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.7) @@ -8714,7 +8728,6 @@ snapshots: 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 @@ -8735,7 +8748,6 @@ snapshots: rehype: 13.0.2 semver: 7.6.3 shiki: 1.22.0 - string-width: 7.2.0 tinyexec: 0.3.0 tsconfck: 3.1.3(typescript@5.6.3) unist-util-visit: 5.0.0 @@ -8763,11 +8775,11 @@ snapshots: - terser - typescript - astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3): + astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3): 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.7 '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.7) @@ -8795,7 +8807,6 @@ snapshots: 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 @@ -8816,7 +8827,6 @@ snapshots: rehype: 13.0.2 semver: 7.6.3 shiki: 1.22.0 - string-width: 7.2.0 tinyexec: 0.3.0 tsconfck: 3.1.3(typescript@5.6.3) unist-util-visit: 5.0.0 @@ -8894,17 +8904,6 @@ snapshots: boolbase@1.0.0: {} - boxen@7.1.1: - dependencies: - ansi-align: 3.0.1 - camelcase: 7.0.1 - 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 - boxen@8.0.1: dependencies: ansi-align: 3.0.1 @@ -8916,6 +8915,11 @@ snapshots: widest-line: 5.0.0 wrap-ansi: 9.0.0 + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 @@ -8955,8 +8959,6 @@ snapshots: camelcase-css@2.0.1: {} - camelcase@7.0.1: {} - camelcase@8.0.0: {} camelize@1.0.1: {} @@ -9068,6 +9070,8 @@ snapshots: colorette@2.0.20: {} + colorjs.io@0.5.2: {} + combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 @@ -9082,6 +9086,8 @@ snapshots: composed-offset-position@0.0.4: {} + concat-map@0.0.1: {} + confbox@0.1.7: {} config-chain@1.1.13: @@ -9093,8 +9099,6 @@ snapshots: convert-source-map@2.0.0: {} - cookie@0.6.0: {} - cookie@0.7.2: {} cross-spawn@5.1.0: @@ -9224,8 +9228,6 @@ snapshots: dependencies: base-64: 1.0.0 - devalue@5.0.0: {} - devalue@5.1.1: {} devlop@1.1.0: @@ -9264,13 +9266,6 @@ snapshots: dotenv@8.6.0: {} - drizzle-orm@0.31.4(@cloudflare/workers-types@4.20240725.0)(@libsql/client@0.10.0)(@types/react@18.3.5)(react@18.3.1): - optionalDependencies: - '@cloudflare/workers-types': 4.20240725.0 - '@libsql/client': 0.10.0 - '@types/react': 18.3.5 - react: 18.3.1 - drizzle-orm@0.31.4(@cloudflare/workers-types@4.20240725.0)(@libsql/client@0.14.0)(@types/react@18.3.5)(react@18.3.1): optionalDependencies: '@cloudflare/workers-types': 4.20240725.0 @@ -9278,8 +9273,6 @@ snapshots: '@types/react': 18.3.5 react: 18.3.1 - dset@3.1.3: {} - dset@3.1.4: {} duplexer@0.1.2: {} @@ -9418,6 +9411,8 @@ snapshots: etag@1.8.1: {} + eventemitter3@4.0.7: {} + eventemitter3@5.0.1: {} expressive-code@0.35.6: @@ -9473,10 +9468,6 @@ snapshots: dependencies: reusify: 1.0.4 - fault@2.0.1: - dependencies: - format: 0.2.2 - fd-slicer@1.1.0: dependencies: pend: 1.2.0 @@ -9508,6 +9499,14 @@ snapshots: micromatch: 4.0.8 pkg-dir: 4.2.0 + flat-cache@3.2.0: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + + flatted@3.3.1: {} + flattie@1.1.1: {} follow-redirects@1.15.6: {} @@ -9523,8 +9522,6 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - format@0.2.2: {} - formdata-polyfill@4.0.10: dependencies: fetch-blob: 3.2.0 @@ -9552,6 +9549,8 @@ snapshots: fs-monkey@1.0.6: optional: true + fs.realpath@1.0.0: {} + fsevents@2.3.3: optional: true @@ -9590,6 +9589,15 @@ snapshots: package-json-from-dist: 1.0.0 path-scurry: 1.11.1 + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + globals@11.12.0: {} globby@11.1.0: @@ -9636,6 +9644,15 @@ snapshots: vfile: 6.0.3 vfile-message: 4.0.2 + hast-util-from-html@2.0.3: + dependencies: + '@types/hast': 3.0.4 + devlop: 1.1.0 + hast-util-from-parse5: 8.0.1 + parse5: 7.1.2 + vfile: 6.0.3 + vfile-message: 4.0.2 + hast-util-from-parse5@8.0.1: dependencies: '@types/hast': 3.0.4 @@ -9651,6 +9668,10 @@ snapshots: dependencies: '@types/hast': 3.0.4 + hast-util-heading-rank@3.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-is-body-ok-link@3.0.0: dependencies: '@types/hast': 3.0.4 @@ -9697,7 +9718,7 @@ snapshots: devlop: 1.1.0 direction: 2.0.1 hast-util-has-property: 3.0.0 - hast-util-to-string: 3.0.0 + hast-util-to-string: 3.0.1 hast-util-whitespace: 3.0.0 not: 0.1.0 nth-check: 2.1.1 @@ -9786,7 +9807,7 @@ snapshots: web-namespaces: 2.0.1 zwitch: 2.0.4 - hast-util-to-string@3.0.0: + hast-util-to-string@3.0.1: dependencies: '@types/hast': 3.0.4 @@ -9888,6 +9909,11 @@ snapshots: transitivePeerDependencies: - supports-color + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + inherits@2.0.4: {} ini@1.3.8: {} @@ -9896,6 +9922,8 @@ snapshots: inline-style-parser@0.2.3: {} + is-absolute-url@4.0.1: {} + is-alphabetical@2.0.1: {} is-alphanumerical@2.0.1: @@ -9935,6 +9963,8 @@ snapshots: is-interactive@2.0.0: {} + is-network-error@1.1.0: {} + is-number@7.0.0: {} is-plain-obj@4.1.0: {} @@ -9988,6 +10018,8 @@ snapshots: jsesc@3.0.2: {} + json-buffer@3.0.1: {} + json-schema-traverse@1.0.0: {} json5@2.2.3: {} @@ -10000,6 +10032,10 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + kind-of@6.0.3: {} kleur@3.0.3: {} @@ -10010,33 +10046,6 @@ snapshots: ky@1.5.0: {} - libsql@0.3.19: - dependencies: - '@neon-rs/load': 0.0.4 - detect-libc: 2.0.2 - optionalDependencies: - '@libsql/darwin-arm64': 0.3.19 - '@libsql/darwin-x64': 0.3.19 - '@libsql/linux-arm64-gnu': 0.3.19 - '@libsql/linux-arm64-musl': 0.3.19 - '@libsql/linux-x64-gnu': 0.3.19 - '@libsql/linux-x64-musl': 0.3.19 - '@libsql/win32-x64-msvc': 0.3.19 - - libsql@0.4.1: - dependencies: - '@neon-rs/load': 0.0.4 - detect-libc: 2.0.2 - libsql: 0.3.19 - optionalDependencies: - '@libsql/darwin-arm64': 0.4.1 - '@libsql/darwin-x64': 0.4.1 - '@libsql/linux-arm64-gnu': 0.4.1 - '@libsql/linux-arm64-musl': 0.4.1 - '@libsql/linux-x64-gnu': 0.4.1 - '@libsql/linux-x64-musl': 0.4.1 - '@libsql/win32-x64-msvc': 0.4.1 - libsql@0.4.6: dependencies: '@neon-rs/load': 0.0.4 @@ -10159,8 +10168,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.25.4 - '@babel/types': 7.25.6 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 source-map-js: 1.2.1 markdown-extensions@2.0.0: {} @@ -10243,17 +10252,6 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-frontmatter@2.0.1: - dependencies: - '@types/mdast': 4.0.4 - devlop: 1.1.0 - escape-string-regexp: 5.0.0 - mdast-util-from-markdown: 2.0.1 - mdast-util-to-markdown: 2.1.0 - micromark-extension-frontmatter: 2.0.0 - transitivePeerDependencies: - - supports-color - mdast-util-gfm-autolink-literal@2.0.0: dependencies: '@types/mdast': 4.0.4 @@ -10440,13 +10438,6 @@ snapshots: micromark-util-types: 2.0.0 parse-entities: 4.0.1 - micromark-extension-frontmatter@2.0.0: - dependencies: - fault: 2.0.1 - micromark-util-character: 2.1.0 - micromark-util-symbol: 2.0.0 - micromark-util-types: 2.0.0 - micromark-extension-gfm-autolink-literal@2.1.0: dependencies: micromark-util-character: 2.1.0 @@ -10712,6 +10703,10 @@ snapshots: mimic-function@5.0.1: {} + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -10865,6 +10860,8 @@ snapshots: dependencies: p-map: 2.1.0 + p-finally@1.0.0: {} + p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -10879,11 +10876,26 @@ snapshots: p-map@2.1.0: {} + p-queue@6.6.2: + dependencies: + eventemitter3: 4.0.7 + p-timeout: 3.2.0 + p-queue@8.0.1: dependencies: eventemitter3: 5.0.1 p-timeout: 6.1.2 + p-retry@6.2.0: + dependencies: + '@types/retry': 0.12.2 + is-network-error: 1.1.0 + retry: 0.13.1 + + p-timeout@3.2.0: + dependencies: + p-finally: 1.0.0 + p-timeout@6.1.2: {} p-try@2.2.0: {} @@ -10955,6 +10967,8 @@ snapshots: path-exists@4.0.0: {} + path-is-absolute@1.0.1: {} + path-key@3.1.1: {} path-parse@1.0.7: {} @@ -10964,8 +10978,6 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 - path-to-regexp@6.2.2: {} - path-type@4.0.0: {} pathe@1.1.2: {} @@ -11143,10 +11155,28 @@ snapshots: dependencies: rc: 1.2.8 + rehype-autolink-headings@7.1.0: + dependencies: + '@types/hast': 3.0.4 + '@ungap/structured-clone': 1.2.0 + hast-util-heading-rank: 3.0.0 + hast-util-is-element: 3.0.0 + unified: 11.0.5 + unist-util-visit: 5.0.0 + rehype-expressive-code@0.35.6: dependencies: expressive-code: 0.35.6 + rehype-external-links@3.0.0: + dependencies: + '@types/hast': 3.0.4 + '@ungap/structured-clone': 1.2.0 + hast-util-is-element: 3.0.0 + is-absolute-url: 4.0.1 + space-separated-tokens: 2.0.2 + unist-util-visit: 5.0.0 + rehype-format@5.0.0: dependencies: '@types/hast': 3.0.4 @@ -11177,7 +11207,7 @@ snapshots: rehype-parse@9.0.0: dependencies: '@types/hast': 3.0.4 - hast-util-from-html: 2.0.1 + hast-util-from-html: 2.0.3 unified: 11.0.5 rehype-raw@7.0.0: @@ -11186,12 +11216,26 @@ snapshots: hast-util-raw: 9.0.4 vfile: 6.0.3 + rehype-slug@6.0.0: + dependencies: + '@types/hast': 3.0.4 + github-slugger: 2.0.0 + hast-util-heading-rank: 3.0.0 + hast-util-to-string: 3.0.1 + unist-util-visit: 5.0.0 + rehype-stringify@10.0.0: dependencies: '@types/hast': 3.0.4 hast-util-to-html: 9.0.1 unified: 11.0.5 + rehype-stringify@10.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.3 + unified: 11.0.5 + rehype@13.0.1: dependencies: '@types/hast': 3.0.4 @@ -11215,15 +11259,6 @@ snapshots: transitivePeerDependencies: - supports-color - remark-frontmatter@5.0.0: - dependencies: - '@types/mdast': 4.0.4 - mdast-util-frontmatter: 2.0.1 - micromark-extension-frontmatter: 2.0.0 - unified: 11.0.5 - transitivePeerDependencies: - - supports-color - remark-gfm@4.0.0: dependencies: '@types/mdast': 4.0.4 @@ -11259,6 +11294,14 @@ snapshots: unified: 11.0.5 vfile: 6.0.3 + remark-rehype@11.1.1: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + mdast-util-to-hast: 13.2.0 + unified: 11.0.5 + vfile: 6.0.3 + remark-smartypants@3.0.2: dependencies: retext: 9.0.0 @@ -11272,15 +11315,6 @@ snapshots: mdast-util-to-markdown: 2.1.0 unified: 11.0.5 - remark@15.0.1: - dependencies: - '@types/mdast': 4.0.4 - remark-parse: 11.0.0 - remark-stringify: 11.0.0 - unified: 11.0.5 - transitivePeerDependencies: - - supports-color - request-light@0.5.8: {} request-light@0.7.0: {} @@ -11329,8 +11363,14 @@ snapshots: retext-stringify: 4.0.0 unified: 11.0.5 + retry@0.13.1: {} + reusify@1.0.4: {} + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + rollup@4.21.0: dependencies: '@types/estree': 1.0.5 @@ -11481,6 +11521,12 @@ snapshots: shebang-regex@3.0.0: {} + shiki-transformer-color-highlight@0.2.0: + dependencies: + '@shikijs/core': 1.22.0 + '@shikijs/types': 1.22.0 + colorjs.io: 0.5.2 + shiki@1.14.1: dependencies: '@shikijs/core': 1.14.1 @@ -11489,7 +11535,7 @@ snapshots: shiki@1.16.2: dependencies: '@shikijs/core': 1.16.2 - '@shikijs/vscode-textmate': 9.2.0 + '@shikijs/vscode-textmate': 9.3.0 '@types/hast': 3.0.4 shiki@1.22.0: @@ -11543,35 +11589,21 @@ snapshots: sprintf-js@1.0.3: {} - starlight-package-managers@0.7.0(@astrojs/starlight@0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)): + starlight-image-zoom@0.8.0(@astrojs/starlight@0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))): dependencies: - '@astrojs/starlight': 0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + '@astrojs/starlight': 0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + rehype-raw: 7.0.0 + unist-util-visit: 5.0.0 + unist-util-visit-parents: 6.0.1 - starlight-typedoc@0.16.0(@astrojs/starlight@0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(typedoc-plugin-markdown@4.2.9(typedoc@0.26.8(typescript@5.6.3)))(typedoc@0.26.8(typescript@5.6.3)): + starlight-typedoc@0.16.0(@astrojs/starlight@0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)))(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))(typedoc-plugin-markdown@4.2.9(typedoc@0.26.8(typescript@5.6.3)))(typedoc@0.26.8(typescript@5.6.3)): dependencies: - '@astrojs/starlight': 0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - astro: 4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) + '@astrojs/starlight': 0.28.3(astro@4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) + astro: 4.16.3(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3) github-slugger: 2.0.0 typedoc: 0.26.8(typescript@5.6.3) typedoc-plugin-markdown: 4.2.9(typedoc@0.26.8(typescript@5.6.3)) - starlight-versions@0.3.0(@astrojs/starlight@0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3))): - dependencies: - '@astrojs/starlight': 0.28.2(astro@4.15.12(@types/node@22.0.0)(rollup@4.21.0)(typescript@5.6.3)) - '@pagefind/default-ui': 1.1.0 - github-slugger: 2.0.0 - mdast-util-mdx-jsx: 3.1.2 - mdast-util-mdxjs-esm: 2.0.1 - remark: 15.0.1 - remark-frontmatter: 5.0.0 - remark-mdx: 3.0.1 - unist-util-visit: 5.0.0 - vfile: 6.0.3 - yaml: 2.5.0 - transitivePeerDependencies: - - supports-color - statuses@2.0.1: {} stdin-discarder@0.2.2: {} @@ -11753,7 +11785,19 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - type-fest@2.19.0: {} + turndown@7.2.0: + dependencies: + '@mixmark-io/domino': 2.2.0 + + twoslash-protocol@0.2.12: {} + + twoslash@0.2.12(typescript@5.6.3): + dependencies: + '@typescript/vfs': 1.6.0(typescript@5.6.3) + twoslash-protocol: 0.2.12 + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color type-fest@4.26.1: {} @@ -11948,14 +11992,6 @@ snapshots: '@types/node': 22.0.0 fsevents: 2.3.3 - vitefu@0.2.5(vite@5.4.8(@types/node@20.14.13)): - optionalDependencies: - vite: 5.4.8(@types/node@20.14.13) - - vitefu@0.2.5(vite@5.4.8(@types/node@22.0.0)): - optionalDependencies: - vite: 5.4.8(@types/node@22.0.0) - vitefu@1.0.2(vite@5.4.8(@types/node@20.14.13)): optionalDependencies: vite: 5.4.8(@types/node@20.14.13) @@ -12108,10 +12144,6 @@ snapshots: dependencies: isexe: 2.0.0 - widest-line@4.0.1: - dependencies: - string-width: 5.1.2 - widest-line@5.0.0: dependencies: string-width: 7.2.0 @@ -12190,10 +12222,6 @@ snapshots: yoga-wasm-web@0.3.3: {} - zod-to-json-schema@3.23.2(zod@3.23.8): - dependencies: - zod: 3.23.8 - zod-to-json-schema@3.23.3(zod@3.23.8): dependencies: zod: 3.23.8 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index cde0bd364..826ca3c2b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -4,11 +4,11 @@ catalog: '@astrojs/rss': ^4.0.7 '@astrojs/check': ^0.9.3 '@astrojs/tailwind': ^5.1.0 - '@astrojs/starlight': ^0.28.2 + '@astrojs/starlight': ^0.28.3 '@astrojs/web-vitals': ^3.0.0 '@astrojs/node': ^8.3.3 '@types/node': ^20.14.11 - astro: ^4.15.12 + astro: ^4.16.3 astro-integration-kit: ^0.16.1 astro-theme-provider: ^0.6.1 sharp: ^0.33.4 @@ -17,8 +17,8 @@ catalog: catalogs: min: - astro: ">=4.15" - '@astrojs/db': ">=0.14" + astro: ">=4.16" + '@astrojs/db': ">=0.14.2" astro-integration-kit: ">=0.16" vite: ^4 || ^5 landing: @@ -28,15 +28,16 @@ catalogs: tailwind-merge: ^2.5.2 tailwind-scrollbar: ^3.1.0 '@tailwindcss/typography': ^0.5.15 - '@fontsource-variable/onest': 5.1.0 astro-icon: ^1.1.1 '@iconify-json/heroicons': ^1.2.0 docs: - '@shoelace-style/shoelace': ^2.16.0 + "@11ty/eleventy-fetch": ^4.0.1 + "@lorenzo_lewis/starlight-utils": ^0.2.0 "@types/hast": ^3.0.4 astro-embed: ^0.7.2 hast: ^1.0.0 hast-util-select: ^6.0.2 + p-retry: ^6.2.0 rehype: ^13.0.1 starlight-versions: ^0.3.0 starlight-package-managers: ^0.7.0 @@ -51,6 +52,7 @@ catalogs: remark-rehype: ^11.1.0 mdast-util-to-hast: ^13.2.0 studiocms-shared: + '@fontsource-variable/onest': 5.1.0 '@inox-tools/runtime-logger': ^0.3.1 '@iconify-json/heroicons': ^1.2.0 "@matthiesenxyz/astrolace": ^0.3.2 @@ -94,4 +96,4 @@ catalogs: packages: - "packages/*" - "playgrounds/*" - - "www/*" \ No newline at end of file + - "www/*" diff --git a/www/docs/.gitignore b/www/docs/.gitignore index 33b1ce3e7..f5cffbc61 100644 --- a/www/docs/.gitignore +++ b/www/docs/.gitignore @@ -1,5 +1,6 @@ # build output dist/ + # generated types .astro/ @@ -21,4 +22,7 @@ pnpm-debug.log* .DS_Store # TypeDoc documentation -src/content/docs/typedoc/* \ No newline at end of file +src/content/docs/typedoc/* + +# Eleventy cache +.cache/ \ No newline at end of file diff --git a/www/docs/astro.config.mts b/www/docs/astro.config.mts index e0b2056e9..35e674ea4 100644 --- a/www/docs/astro.config.mts +++ b/www/docs/astro.config.mts @@ -1,53 +1,52 @@ import starlight from '@astrojs/starlight'; +import starlightUtils from '@lorenzo_lewis/starlight-utils'; import { defineConfig } from 'astro/config'; -import { createStarlightTypeDocPlugin } from 'starlight-typedoc'; -import starlightVersions from 'starlight-versions'; -import { getCoolifyURL } from '../hostUtils'; - -// Create Starlight TypeDoc Plugins for different parts of the Astro StudioCMS Project -// studiocms TypeDoc Plugin -const [tdStudioCMS, tdStudioCMSSideBar] = createStarlightTypeDocPlugin(); -// @studiocms/core -const [tdCore, tdCoreSideBar] = createStarlightTypeDocPlugin(); -// @studiocms/dashboard -const [tdDashboard, tdDashboardSideBar] = createStarlightTypeDocPlugin(); -// @studiocms/auth -const [tdAuth, tdAuthSideBar] = createStarlightTypeDocPlugin(); -// @studiocms/frontend -const [tdFrontend, tdFrontendSideBar] = createStarlightTypeDocPlugin(); -// @studiocms/imagehandler -const [tdImageHandler, tdImageHandlerSideBar] = createStarlightTypeDocPlugin(); -// @studiocms/renderers -const [tdRenderers, tdRenderersSideBar] = createStarlightTypeDocPlugin(); -// @studiocms/robotstxt -const [tdRobotsTxt, tdRobotsTxtSideBar] = createStarlightTypeDocPlugin(); +import JS from 'shiki/langs/javascript.mjs'; +import TSX from 'shiki/langs/tsx.mjs'; +import starlightImageZoom from 'starlight-image-zoom'; +import getCoolifyURL from '../hostUtils'; +import rehypePluginKit from './src/plugins/rehypePluginKit'; +import { transformerKit } from './src/shiki'; +import { typeDocPlugins, typeDocSideBarEntry } from './typedoc.config'; // Define the Site URL const site = getCoolifyURL(true) || 'https://docs.studiocms.xyz/'; -// Utility function to create TypeDoc related paths -function getFilePathToPackage(name: string, path: string) { - return `../../packages/${name}/${path}`; -} - export default defineConfig({ site, + experimental: { + directRenderScript: true, + }, + image: { + remotePatterns: [{ protocol: 'https' }], + }, + markdown: { + rehypePlugins: rehypePluginKit, + syntaxHighlight: 'shiki', + shikiConfig: { + wrap: true, + langs: [...JS, ...TSX], + themes: { + light: 'light-plus', + dark: 'dark-plus', + }, + transformers: transformerKit, + }, + }, integrations: [ starlight({ title: 'StudioCMS', description: 'A dedicated CMS for Astro DB. Built from the ground up by the Astro community.', - favicon: '/logo-dark.svg', + favicon: '/logo-light.svg', lastUpdated: true, credits: true, tagline: 'A dedicated CMS for Astro DB. Built from the ground up by the Astro community.', - expressiveCode: { - themes: ['houston', 'starlight-light'], - defaultProps: { - wrap: true, - }, - }, + expressiveCode: false, components: { SiteTitle: './src/starlightOverrides/SiteTitle.astro', + PageTitle: './src/starlightOverrides/PageTitle.astro', + Sidebar: './src/starlightOverrides/Sidebar.astro', + Head: './src/starlightOverrides/Head.astro', }, logo: { dark: '../assets/logo-light.svg', @@ -55,10 +54,18 @@ export default defineConfig({ }, social: { github: 'https://github.com/astrolicious/studiocms', - discord: 'https://chat.astrolicious.dev', - youtube: 'https://www.youtube.com/@AstroStudioCMS', + discord: 'https://chat.studiocms.xyz', + youtube: 'https://www.youtube.com/@StudioCMS', + 'x.com': 'https://x.com/_studiocms', }, - customCss: ['./src/styles/custom.css'], + customCss: [ + '@shikijs/twoslash/style-rich.css', + '@studiocms/ui/css/global.css', + './src/styles/shiki.css', + './src/styles/sponsorcolors.css', + './src/styles/starlight.css', + './src/styles/twoslash.css', + ], editLink: { baseUrl: 'https://github.com/astrolicious/studiocms/tree/main/www/docs', }, @@ -75,325 +82,96 @@ export default defineConfig({ tag: 'meta', attrs: { property: 'og:image', - content: `${site}og.png?v=1`, + content: `${site}og.jpg?v=1`, }, }, { tag: 'meta', attrs: { property: 'twitter:image', - content: `${site}og.png?v=1`, + content: `${site}og.jpg?v=1`, }, }, ], - plugins: [ - starlightVersions({ - versions: [ - { slug: '0.1.0-beta.4', label: 'Beta.4' }, - { slug: '0.1.0-beta.5', label: 'Beta.5' }, - { slug: '0.1.0-beta.6', label: 'Beta.6' }, - ], - current: { label: 'Latest' }, - }), - tdStudioCMS({ - tsconfig: getFilePathToPackage('studiocms', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms', 'src/index.ts'), - getFilePathToPackage('studiocms', 'src/integration.ts'), - getFilePathToPackage('studiocms', 'src/updateCheck.ts'), - ], - output: 'typedoc/studiocms', - sidebar: { - label: 'studiocms', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - tdAuth({ - tsconfig: getFilePathToPackage('studiocms_auth', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms_auth', 'src/index.ts'), - getFilePathToPackage('studiocms_auth', 'src/integration.ts'), - getFilePathToPackage('studiocms_auth', 'src/middleware/index.ts'), - getFilePathToPackage('studiocms_auth', 'src/middleware/router.ts'), - getFilePathToPackage('studiocms_auth', 'src/auth/index.ts'), - getFilePathToPackage('studiocms_auth', 'src/auth/lucia-astrodb-adapter.ts'), - getFilePathToPackage('studiocms_auth', 'src/helpers/authHelper.ts'), - getFilePathToPackage('studiocms_auth', 'src/astroenv/env.ts'), - getFilePathToPackage('studiocms_auth', 'src/utils/authEnvCheck.ts'), - getFilePathToPackage('studiocms_auth', 'src/utils/checkENV.ts'), - ], - output: 'typedoc/studiocms-auth', - sidebar: { - label: '@studiocms/auth', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - tdCore({ - tsconfig: getFilePathToPackage('studiocms_core', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms_core', 'src/index.ts'), - getFilePathToPackage('studiocms_core', 'src/integration.ts'), - getFilePathToPackage('studiocms_core', 'src/consts.ts'), - getFilePathToPackage('studiocms_core', 'src/strings.ts'), - getFilePathToPackage('studiocms_core', 'src/types/index.ts'), - getFilePathToPackage('studiocms_core', 'src/types/auth-types.ts'), - getFilePathToPackage('studiocms_core', 'src/types/dbtypehelpers.ts'), - getFilePathToPackage('studiocms_core', 'src/types/locals.ts'), - getFilePathToPackage('studiocms_core', 'src/types/pluginOptions.ts'), - getFilePathToPackage('studiocms_core', 'src/types/sideBarLinkType.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/index.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/auth.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/componentoverrides.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/dashboard.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/defaultFrontend.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/developer.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/imageService.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/index.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/integrations.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/markdoc.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/marked.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/rendererConfig.ts'), - getFilePathToPackage('studiocms_core', 'src/schemas/config/unocss.ts'), - getFilePathToPackage('studiocms_core', 'src/lib/index.ts'), - getFilePathToPackage('studiocms_core', 'src/lib/configManager.ts'), - getFilePathToPackage('studiocms_core', 'src/lib/convertDashboardLinksType.ts'), - getFilePathToPackage('studiocms_core', 'src/lib/defineStudioCMSConfig.ts'), - getFilePathToPackage('studiocms_core', 'src/lib/head.ts'), - getFilePathToPackage('studiocms_core', 'src/lib/jsonUtils.ts'), - getFilePathToPackage('studiocms_core', 'src/lib/pluginSystem.ts'), - getFilePathToPackage('studiocms_core', 'src/helpers/index.ts'), - getFilePathToPackage('studiocms_core', 'src/helpers/authHelper.ts'), - getFilePathToPackage('studiocms_core', 'src/helpers/contentHelper.ts'), - getFilePathToPackage('studiocms_core', 'src/helpers/headDefaults.ts'), - getFilePathToPackage('studiocms_core', 'src/helpers/pathGenerators.ts'), - getFilePathToPackage('studiocms_core', 'src/helpers/routemap.ts'), - getFilePathToPackage('studiocms_core', 'src/helpers/urlGen.ts'), - getFilePathToPackage('studiocms_core', 'src/db/config.ts'), - getFilePathToPackage('studiocms_core', 'src/db/tables.ts'), - getFilePathToPackage('studiocms_core', 'src/db/tsTables.ts'), - getFilePathToPackage('studiocms_core', 'src/components/index.ts'), - ], - output: 'typedoc/studiocms_core', - sidebar: { - label: '@studiocms/core', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - tdDashboard({ - tsconfig: getFilePathToPackage('studiocms_dashboard', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms_dashboard', 'src/index.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/integration.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/utils/webVital.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/utils/simpleResponse.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/utils/pageListPackageLabel.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/utils/makePageTitle.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/utils/isDashboardRoute.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/utils/astroDb.ts'), - getFilePathToPackage('studiocms_dashboard', 'src/components/index.ts'), - ], - output: 'typedoc/studiocms-dashboard', - sidebar: { - label: '@studiocms/dashboard', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - tdFrontend({ - tsconfig: getFilePathToPackage('studiocms_frontend', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms_frontend', 'src/index.ts'), - getFilePathToPackage('studiocms_frontend', 'src/integration.ts'), - getFilePathToPackage('studiocms_frontend', 'src/components/index.ts'), - ], - output: 'typedoc/studiocms-frontend', - sidebar: { - label: '@studiocms/frontend', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - tdImageHandler({ - tsconfig: getFilePathToPackage('studiocms_imagehandler', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms_imagehandler', 'src/index.ts'), - getFilePathToPackage('studiocms_imagehandler', 'src/integration.ts'), - getFilePathToPackage('studiocms_imagehandler', 'src/supportedAdapters.ts'), - getFilePathToPackage('studiocms_imagehandler', 'src/components/index.ts'), - getFilePathToPackage('studiocms_imagehandler', 'src/adapters/cloudflare.ts'), - getFilePathToPackage('studiocms_imagehandler', 'src/adapters/netlify.ts'), - getFilePathToPackage('studiocms_imagehandler', 'src/adapters/node.ts'), - getFilePathToPackage('studiocms_imagehandler', 'src/adapters/vercel.ts'), - ], - output: 'typedoc/studiocms-imagehandler', - sidebar: { - label: '@studiocms/imagehandler', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - tdRenderers({ - tsconfig: getFilePathToPackage('studiocms_renderers', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms_renderers', 'src/index.ts'), - getFilePathToPackage('studiocms_renderers', 'src/integration.ts'), - getFilePathToPackage('studiocms_renderers', 'src/components/index.ts'), - getFilePathToPackage('studiocms_renderers', 'src/exports/index.ts'), - getFilePathToPackage( - 'studiocms_renderers', - 'src/exports/markdocRenderers/markdocReact.ts' - ), - getFilePathToPackage('studiocms_renderers', 'src/lib/contentRenderer.ts'), - getFilePathToPackage('studiocms_renderers', 'src/lib/astro-remark/index.ts'), - getFilePathToPackage('studiocms_renderers', 'src/lib/markdoc/index.ts'), - getFilePathToPackage('studiocms_renderers', 'src/lib/markdoc/markdocHTML.ts'), - getFilePathToPackage('studiocms_renderers', 'src/lib/markdoc/markdocReactStatic.ts'), - getFilePathToPackage('studiocms_renderers', 'src/lib/marked/index.ts'), - getFilePathToPackage('studiocms_renderers', 'src/lib/mdx/index.ts'), - ], - output: 'typedoc/studiocms-renderers', - sidebar: { - label: '@studiocms/renderers', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - tdRobotsTxt({ - tsconfig: getFilePathToPackage('studiocms_robotstxt', 'tsconfig.json'), - entryPoints: [ - getFilePathToPackage('studiocms_robotstxt', 'src/index.ts'), - getFilePathToPackage('studiocms_robotstxt', 'src/core.ts'), - getFilePathToPackage('studiocms_robotstxt', 'src/consts.ts'), - getFilePathToPackage('studiocms_robotstxt', 'src/utils/measureExecutionTime.ts'), - ], - output: 'typedoc/studiocms-robotstxt', - sidebar: { - label: '@studiocms/robotstxt', - collapsed: true, - }, - pagination: true, - typeDoc: { - skipErrorChecking: true, - gitRemote: 'https://github.com/astrolicious/studiocms/blob', - gitRevision: 'main', - includeVersion: true, - sourceLinkExternal: true, - sourceLinkTemplate: - 'https://github.com/astrolicious/studiocms/blob/{gitRevision}/{path}#L{line}', - }, - }), - ], sidebar: [ { - label: 'Start Here', - autogenerate: { directory: 'start-here' }, - }, - { - label: 'Plugins', - autogenerate: { directory: 'plugins' }, - }, - { - label: 'Customizing StudioCMS', + label: 'Learn', items: [ { - label: '@studiocms/renderers', - autogenerate: { directory: 'customizing/studiocms-renderers' }, + label: 'Start Here', + autogenerate: { directory: 'start-here' }, + }, + { + label: 'Understanding StudioCMS', + autogenerate: { directory: 'how-it-works' }, + }, + { + label: 'Package Catalog', + items: [ + { + label: 'Package List', + link: '/package-catalog', + badge: { text: 'New', variant: 'success' }, + }, + { + label: 'StudioCMS Integrations', + autogenerate: { directory: 'package-catalog/studiocms-integrations' }, + collapsed: true, + }, + { + label: 'Community Integrations', + autogenerate: { directory: 'package-catalog/community-integrations' }, + collapsed: true, + }, + ], + }, + { + label: 'Customizing StudioCMS', + items: [ + { + label: '@studiocms/renderers', + autogenerate: { directory: 'customizing/studiocms-renderers' }, + collapsed: true, + }, + { + label: '@studiocms/ui', + badge: { text: 'New', variant: 'success' }, + items: [ + { label: 'Getting Started', link: 'customizing/studiocms-ui/' }, + { + label: 'Components', + autogenerate: { + directory: 'customizing/studiocms-ui/components', + collapsed: true, + }, + }, + ], + collapsed: true, + }, + ], }, ], }, { - label: 'Understanding StudioCMS', - autogenerate: { directory: 'how-it-works' }, - }, - { - label: 'Configuration Reference', - autogenerate: { directory: 'config-reference' }, - collapsed: true, - }, - { - label: 'TypeDoc', - badge: { - text: 'Auto Generated', - variant: 'tip', - }, + label: 'References', items: [ - tdStudioCMSSideBar, - tdCoreSideBar, - tdDashboardSideBar, - tdAuthSideBar, - tdFrontendSideBar, - tdImageHandlerSideBar, - tdRenderersSideBar, - tdRobotsTxtSideBar, + { + label: 'Configuration Reference', + autogenerate: { directory: 'config-reference' }, + collapsed: false, + }, + // @ts-expect-error - This is not a publicly available type + typeDocSideBarEntry, ], }, ], + plugins: [ + starlightUtils({ + multiSidebar: { switcherStyle: 'horizontalList' }, + }), + ...typeDocPlugins, + starlightImageZoom(), + ], }), ], }); diff --git a/www/docs/package.json b/www/docs/package.json index 49755e4f1..717a359ac 100644 --- a/www/docs/package.json +++ b/www/docs/package.json @@ -10,21 +10,47 @@ "astro": "astro" }, "dependencies": { + "@11ty/eleventy-fetch": "catalog:docs", + "p-retry": "catalog:docs", "@astrojs/check": "catalog:", "@astrojs/starlight": "catalog:", - "@shoelace-style/shoelace": "catalog:docs", + "@fontsource-variable/onest": "catalog:studiocms-shared", + "@lorenzo_lewis/starlight-utils": "catalog:docs", + "@shikijs/twoslash": "1.22.0", + "@shikijs/transformers": "1.22.0", "@types/hast": "catalog:docs", "astro": "catalog:", "astro-embed": "catalog:docs", "hast": "catalog:docs", - "hast-util-select": "^6.0.2", + "hastscript": "^9.0.0", + "hast-util-select": "catalog:docs", + "hast-util-to-string": "^3.0.1", + "html-escaper": "^3.0.3", "rehype": "catalog:docs", "sharp": "catalog:", - "starlight-package-managers": "catalog:docs", "starlight-typedoc": "catalog:docs", - "starlight-versions": "catalog:docs", "typedoc": "catalog:docs", "typedoc-plugin-markdown": "catalog:docs", - "typescript": "catalog:" + "typescript": "catalog:", + "@studiocms/ui": "workspace:*", + "mdast-util-from-markdown": "^2.0.1", + "mdast-util-gfm": "^3.0.0", + "mdast-util-to-hast": "^13.2.0", + "shiki": "1.22.0", + "@astrojs/db": "catalog:", + "@astrojs/node": "catalog:", + "@astrojs/web-vitals": "catalog:", + "studiocms": "workspace:*", + "@astrojs/react": "catalog:studiocms-shared", + "@studiocms/renderers": "workspace:*", + "@studiocms/blog": "workspace:*", + "@studiocms/devapps": "workspace:*", + "starlight-image-zoom": "^0.8.0", + "rehype-slug": "^6.0.0", + "rehype-autolink-headings": "^7.1.0", + "rehype-external-links": "^3.0.0", + "@types/html-escaper": "^3.0.2", + "shiki-transformer-color-highlight": "^0.2.0", + "unified": "^11.0.5" } } diff --git a/www/docs/public/logo-dark.svg b/www/docs/public/logo-dark.svg deleted file mode 100644 index 279afedc3..000000000 --- a/www/docs/public/logo-dark.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - diff --git a/www/docs/public/logo-light.svg b/www/docs/public/logo-light.svg new file mode 100644 index 000000000..cdd9a4d91 --- /dev/null +++ b/www/docs/public/logo-light.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/www/docs/public/og.jpg b/www/docs/public/og.jpg new file mode 100644 index 000000000..9b9f4041c Binary files /dev/null and b/www/docs/public/og.jpg differ diff --git a/www/docs/public/og.png b/www/docs/public/og.png deleted file mode 100644 index 0eea14842..000000000 Binary files a/www/docs/public/og.png and /dev/null differ diff --git a/www/docs/src/assets/avatar.png b/www/docs/src/assets/avatar.png new file mode 100644 index 000000000..9db62ee70 Binary files /dev/null and b/www/docs/src/assets/avatar.png differ diff --git a/www/docs/src/components/Code.astro b/www/docs/src/components/Code.astro new file mode 100644 index 000000000..3bee0d638 --- /dev/null +++ b/www/docs/src/components/Code.astro @@ -0,0 +1,20 @@ +--- +import { Code as AstroCode } from 'astro:components'; +import type { BundledLanguage, LanguageRegistration, SpecialLanguage } from 'shiki'; +import { addCopyButton } from '~/shiki/transformers/copyButton'; + +interface Props { + code: string; + title?: string; + lang?: BundledLanguage | SpecialLanguage | LanguageRegistration | undefined; +} + +const { code, title, lang = 'bash' } = Astro.props; +--- + \ No newline at end of file diff --git a/www/docs/src/components/ContributorList.astro b/www/docs/src/components/ContributorList.astro new file mode 100644 index 000000000..2ae790a7e --- /dev/null +++ b/www/docs/src/components/ContributorList.astro @@ -0,0 +1,56 @@ +--- +import { getContributorBreakdown } from '../util/getContributors'; +import FacePile from './FacePile.astro'; + +const breakdown = await getContributorBreakdown(); +--- + +
+
+ + { + breakdown.map(({ name, contributors }) => { + if (contributors.length === 0) return null; + return ( +
+
{name}
+ +
+ ) + }) + } + +
+
+ + \ No newline at end of file diff --git a/www/docs/src/components/DropdownScript.astro b/www/docs/src/components/DropdownScript.astro new file mode 100644 index 000000000..b3a1cb53c --- /dev/null +++ b/www/docs/src/components/DropdownScript.astro @@ -0,0 +1,10 @@ + diff --git a/www/docs/src/components/FacePile.astro b/www/docs/src/components/FacePile.astro new file mode 100644 index 000000000..77a3a6872 --- /dev/null +++ b/www/docs/src/components/FacePile.astro @@ -0,0 +1,90 @@ +--- +import { Image } from 'astro:assets'; +import type { Contributor } from '~/util/getContributors'; + +export interface Props { + contributors: Contributor[]; +} + +const { contributors } = Astro.props; +--- + + +
+ + \ No newline at end of file diff --git a/www/docs/src/components/Gallery.astro b/www/docs/src/components/Gallery.astro index abdb4d869..0847dc9bf 100644 --- a/www/docs/src/components/Gallery.astro +++ b/www/docs/src/components/Gallery.astro @@ -9,116 +9,45 @@ export interface Props { } const { galleryImages } = Astro.props; - -const galleryImagesMinusFirst = galleryImages.slice(1); --- - - - { - galleryImages.map((image, index) => ( - - {image.alt} - - )) - } - - -
-
- {galleryImages[0].alt - { - galleryImagesMinusFirst.map((image) => ( - {image.alt - )) - } -
+
+ {galleryImages.map((image) => ( + + {image.alt} + + ))}
- - + diff --git a/www/docs/src/components/Integration.astro b/www/docs/src/components/Integration.astro new file mode 100644 index 000000000..9fa3e130e --- /dev/null +++ b/www/docs/src/components/Integration.astro @@ -0,0 +1,128 @@ +--- +import { Badge, Icon } from '@astrojs/starlight/components'; +import Version from './Version.astro'; + +interface Props { + title: string; + githubURL: string; + released?: boolean; + isPlugin?: boolean; + publiclyUsable?: boolean; +} + +const { title, githubURL, released = true, isPlugin = false, publiclyUsable = false } = Astro.props; + +function parsePackageName(packageName: string): { + scoped: boolean; + scope: string | null; + name: string; +} { + // Check if the package is scoped + if (packageName.startsWith('@')) { + const parts = packageName.split('/'); + return { + scoped: true, + scope: parts[0], // the scope (e.g., '@scope') + name: parts[1] || '', // the package name after the slash (e.g., 'packagename') + }; + } + return { + scoped: false, + scope: null, // no scope for unscoped packages + name: packageName, // just the package name + }; +} + +const { scoped, scope, name } = parsePackageName(title); + +const generateBadgeMeta = ( + isPlugin: boolean, + publiclyUsable: boolean +): { + text: string; + variant: 'tip' | 'success' | 'note' | 'danger' | 'caution' | 'default' | undefined; +} | null => { + if (isPlugin) { + return { + text: 'Plugin', + variant: 'tip', + }; + } + if (publiclyUsable) { + return { + text: 'Publicly Usable', + variant: 'caution', + }; + } + return null; +}; + +const badgeMeta = generateBadgeMeta(isPlugin, publiclyUsable); + +const showBadge = badgeMeta !== null; +--- + +
+ + \ No newline at end of file diff --git a/www/docs/src/components/ModalScript.astro b/www/docs/src/components/ModalScript.astro new file mode 100644 index 000000000..d5f77f7d3 --- /dev/null +++ b/www/docs/src/components/ModalScript.astro @@ -0,0 +1,10 @@ + diff --git a/www/docs/src/components/PackageCatalog.astro b/www/docs/src/components/PackageCatalog.astro new file mode 100644 index 000000000..09dafdd46 --- /dev/null +++ b/www/docs/src/components/PackageCatalog.astro @@ -0,0 +1,51 @@ +--- +import { getCollection } from 'astro:content'; +import type { CollectionEntry } from 'astro:content'; +import Integration from './Integration.astro'; +import ReadMore from './ReadMore.astro'; + +interface Props { + catalog: CollectionEntry<'package-catalog'>['data']['catalog']; +} + +const { catalog } = Astro.props; + +const packages = (await getCollection('package-catalog')) + .filter(({ data }) => data.catalog === catalog) + .sort(({ data: { name: a } }, { data: { name: b } }) => { + const isScopedA = a.startsWith('@'); + const isScopedB = b.startsWith('@'); + + // Non-scoped packages come first + if (!isScopedA && isScopedB) return -1; + if (isScopedA && !isScopedB) return 1; + + // If both are scoped or non-scoped, sort alphabetically + return a.localeCompare(b); + }) + .map(({ data }) => data); +--- + +
+ + { + packages.map(({ + name: title, + githubURL, + released, + isPlugin, + description, + docsLink: href, + publiclyUsable + }, index) => ( + + +

{description}

+ + For more information checkout the documentation page + + <>{ index < packages.length - 1 &&
} + )) + } + +
\ No newline at end of file diff --git a/www/docs/src/components/PackageManagers.astro b/www/docs/src/components/PackageManagers.astro new file mode 100644 index 000000000..83d35dcd8 --- /dev/null +++ b/www/docs/src/components/PackageManagers.astro @@ -0,0 +1,62 @@ +--- +import { Aside, TabItem, Tabs } from '@astrojs/starlight/components'; +import type { ComponentProps } from 'astro/types'; +import Code from './Code.astro'; + +import { + type CommandOptions, + type CommandType, + type PackageManager, + getCommand, + getIcon, + getSupportedPkgManagers, +} from './pkg'; + +export type PackageManagersProps = Props; + +interface Props extends CommandOptions { + frame?: 'none' | 'terminal'; + icons?: boolean; + pkg?: string | undefined; + pkgManagers?: PackageManager[]; + title?: string | undefined; + type?: CommandType; +} + +const { + frame = 'terminal', + icons = true, + pkg, + pkgManagers, + title = 'Terminal', + type = 'add', + ...options +} = Astro.props; +const singlePkgManager = pkgManagers?.length === 1 ? pkgManagers[0] : undefined; + +function getTabItemProps(pkgManager: PackageManager) { + const props: ComponentProps = { label: pkgManager }; + const icon = getIcon(pkgManager) as ComponentProps['icon']; + if (icons && icon) props.icon = icon; + return props; +} +--- + +{ + singlePkgManager ? ( + + ) : ( + + {getSupportedPkgManagers(type, pkgManagers).map((pkgManager) => ( + + + { pkgManager === 'bun' && } + + ))} + + ) +} diff --git a/www/docs/src/components/PreviewCard.astro b/www/docs/src/components/PreviewCard.astro new file mode 100644 index 000000000..0396b6b81 --- /dev/null +++ b/www/docs/src/components/PreviewCard.astro @@ -0,0 +1,34 @@ +--- +type Props = { + vertical?: boolean; + gapSize?: 'sm' | 'md' | 'lg'; +}; + +const { vertical = false, gapSize = 'md' } = Astro.props; +--- +
+ +
+ diff --git a/www/docs/src/components/Sponsors.astro b/www/docs/src/components/Sponsors.astro new file mode 100644 index 000000000..1c2b52832 --- /dev/null +++ b/www/docs/src/components/Sponsors.astro @@ -0,0 +1,60 @@ +--- +import s from '~/share-link'; +--- + + + + diff --git a/www/docs/src/components/StudioHeading.astro b/www/docs/src/components/StudioHeading.astro deleted file mode 100644 index c3a543164..000000000 --- a/www/docs/src/components/StudioHeading.astro +++ /dev/null @@ -1,120 +0,0 @@ ---- -import { AstroError } from 'astro/errors'; -import type { Element, Root } from 'hast'; -import { select } from 'hast-util-select'; -import { rehype } from 'rehype'; - -let hLevel = 'h1'; -rehype() - .data('settings', { fragment: true }) - .use(() => (tree: Root) => { - const rootElements = tree.children.filter((item): item is Element => item.type === 'element'); - const [rootElement] = rootElements; - const headingElement = select('h1, h2, h3, h4, h5, h6', tree); - if (!rootElement) { - throw new AstroError( - 'No content passed to `` component, expected a Markdown heading.' - ); - } - if (rootElements.length > 1) { - throw new AstroError( - `\`\` component must contain a single Markdown heading. Found: ${rootElements.map((el) => `<${el.tagName}>`).join(', ')}` - ); - } - if (!headingElement) { - throw new AstroError( - '`` component must contain a heading, but could not find one.' - ); - } - hLevel = headingElement.tagName; - }) - .processSync({ value: await Astro.slots.render('default') }); ---- - -
- - - - - Astro Studio Account Required - -
- - \ No newline at end of file diff --git a/www/docs/src/components/StudioSunset.astro b/www/docs/src/components/StudioSunset.astro deleted file mode 100644 index 15acb6fac..000000000 --- a/www/docs/src/components/StudioSunset.astro +++ /dev/null @@ -1,8 +0,0 @@ ---- -import { Aside } from '@astrojs/starlight/components'; -import ReadMore from './ReadMore.astro'; ---- - \ No newline at end of file diff --git a/www/docs/src/components/ToasterScript.astro b/www/docs/src/components/ToasterScript.astro new file mode 100644 index 000000000..5aa2eec7b --- /dev/null +++ b/www/docs/src/components/ToasterScript.astro @@ -0,0 +1,11 @@ + diff --git a/www/docs/src/components/TursoCLI.astro b/www/docs/src/components/TursoCLI.astro new file mode 100644 index 000000000..9774eead1 --- /dev/null +++ b/www/docs/src/components/TursoCLI.astro @@ -0,0 +1,101 @@ +--- +import Code from './Code.astro'; + +const tursoCliCommands = ['db', 'auth'] as const; + +const tursoAuthCommands = [ + 'login', + 'logout', + 'signup', + 'token', + 'whoami', + 'api-tokens.mint', + 'api-tokens.list', + 'api-tokens.revoke', +] as const; + +const tursoDBCommands = [ + 'list', + 'create', + 'show', + 'destroy', + 'inspect', + 'shell', + 'locations', + 'tokens.create', + 'tokens.invalidate', + 'config.attach.allow', + 'config.attach.disallow', + 'config.attach.show', +] as const; + +const allCommands = [...tursoAuthCommands, ...tursoDBCommands] as const; + +type TursoCLICommands = (typeof tursoCliCommands)[number]; + +type AuthCommands = (typeof tursoAuthCommands)[number]; + +type DBCommands = (typeof tursoDBCommands)[number]; + +type AllCommands = (typeof allCommands)[number]; + +type Commands = { + auth: Record; + db: Record; +}; + +const tursoCLICommands: Commands = { + auth: { + login: 'turso auth login', + logout: 'turso auth logout', + signup: 'turso auth signup', + token: 'turso auth token', + whoami: 'turso auth whoami', + 'api-tokens.mint': 'turso auth api-tokens mint', + 'api-tokens.list': 'turso auth api-tokens list', + 'api-tokens.revoke': 'turso auth api-tokens revoke', + }, + db: { + list: 'turso db list', + create: 'turso db create', + show: 'turso db show', + destroy: 'turso db destroy', + inspect: 'turso db inspect', + shell: 'turso db shell', + locations: 'turso db locations', + 'tokens.create': 'turso db tokens create', + 'tokens.invalidate': 'turso db tokens invalidate', + 'config.attach.allow': 'turso db config attach allow', + 'config.attach.disallow': 'turso db config attach disallow', + 'config.attach.show': 'turso db config attach show', + }, +}; + +const commandBuilder = (tursoCli: TursoCLICommands, type: AllCommands, arg: string) => { + let command: string; + + switch (tursoCli) { + case 'auth': + command = tursoCLICommands.auth[type as AuthCommands]; + break; + case 'db': + command = tursoCLICommands.db[type as DBCommands]; + break; + default: + throw new Error(`Invalid Turso CLI command: ${tursoCli} ${type}`); + } + + return `${command} ${arg}`; +}; + +interface Props { + tursoCli: TursoCLICommands; + type: AllCommands; + arg: string; +} + +const { tursoCli, type, arg } = Astro.props; + +const code = commandBuilder(tursoCli, type, arg); +--- + \ No newline at end of file diff --git a/www/docs/src/components/Version.astro b/www/docs/src/components/Version.astro new file mode 100644 index 000000000..2ce50739f --- /dev/null +++ b/www/docs/src/components/Version.astro @@ -0,0 +1,22 @@ +--- +import { cachedFetch } from '../util-server'; + +export interface Props { + pkgName: string; +} + +const { pkgName } = Astro.props as Props; + +const url = `https://registry.npmjs.org/${pkgName}/latest`; + +const response = await cachedFetch(url); +const json = await response.json(); + +if (!response.ok) { + throw new Error( + `npm API call failed: GET "${url}" returned status ${response.status}: ${JSON.stringify(json)}` + ); +} +--- + +v{json.version} \ No newline at end of file diff --git a/www/docs/src/components/Youtube.astro b/www/docs/src/components/Youtube.astro index ba57ee6af..ea35f9614 100644 --- a/www/docs/src/components/Youtube.astro +++ b/www/docs/src/components/Youtube.astro @@ -1,20 +1,114 @@ ---- -import { YouTube } from 'astro-embed'; - -interface Props { - id: string; - title: string; -} - -const { id, title } = Astro.props; ---- -
- -
- - +--- +import { YouTube } from 'astro-embed'; + +interface Props { + id: string; + title?: string; +} + +const { id, title } = Astro.props; +--- + + + diff --git a/www/docs/src/components/landing/Card.astro b/www/docs/src/components/landing/Card.astro new file mode 100644 index 000000000..a06f41626 --- /dev/null +++ b/www/docs/src/components/landing/Card.astro @@ -0,0 +1,52 @@ +--- +import { Card as StarlightCard } from '@astrojs/starlight/components'; +export type Props = Parameters[0]; +--- + +
+ +
+ + \ No newline at end of file diff --git a/www/docs/src/components/landing/ListCard.astro b/www/docs/src/components/landing/ListCard.astro new file mode 100644 index 000000000..8536137e9 --- /dev/null +++ b/www/docs/src/components/landing/ListCard.astro @@ -0,0 +1,51 @@ +--- +import Card from './Card.astro'; +export type Props = Parameters[0]; +--- + + + + + + \ No newline at end of file diff --git a/www/docs/src/components/landing/SplitCard.astro b/www/docs/src/components/landing/SplitCard.astro new file mode 100644 index 000000000..5b357c870 --- /dev/null +++ b/www/docs/src/components/landing/SplitCard.astro @@ -0,0 +1,46 @@ +--- +import Card from './Card.astro'; + +export type Props = Parameters[0]; +--- + +
+ +
+ +
+
+
+ + \ No newline at end of file diff --git a/www/docs/src/components/pkg.ts b/www/docs/src/components/pkg.ts new file mode 100644 index 000000000..c59515d50 --- /dev/null +++ b/www/docs/src/components/pkg.ts @@ -0,0 +1,113 @@ +const pkgManagers = ['npm', 'yarn', 'pnpm', 'bun'] as const; + +const defaultPkgManagers: PackageManager[] = ['npm', 'yarn', 'pnpm', 'bun']; + +const commands: Commands = { + npm: { + add: 'npm i', + create: 'npm create', + devOption: '-D', + exec: 'npx', + run: 'npm run', + remove: 'npm uninstall', + }, + yarn: { + add: 'yarn add', + create: 'yarn create', + devOption: '-D', + exec: 'yarn', + run: 'yarn run', + remove: 'yarn remove', + }, + pnpm: { + add: 'pnpm add', + create: 'pnpm create', + devOption: '-D', + exec: 'pnpm', + run: 'pnpm run', + remove: 'pnpm remove', + }, + bun: { + add: 'bun add', + create: 'bun create', + devOption: '-D', + exec: 'bunx', + run: 'bun', + remove: 'bun remove', + }, +}; + +const icons: Record = { + npm: 'seti:npm', + yarn: 'seti:yarn', + pnpm: 'pnpm', + bun: 'bun', +}; + +export function getSupportedPkgManagers( + type: CommandType, + userPkgManagers: PackageManager[] | undefined +) { + return (userPkgManagers ?? defaultPkgManagers).filter( + (pkgManager) => commands[pkgManager][type] !== undefined + ); +} + +export function getIcon(pkgManager: PackageManager) { + return icons[pkgManager]; +} + +export function getCommand( + pkgManager: PackageManager, + type: CommandType, + pkg: string | undefined, + options: CommandOptions +) { + let command = commands[pkgManager][type]; + + if (!command) { + throw new Error(`Command type '${type}' is not supported for package manager '${pkgManager}'.`); + } + + if (options.prefix) { + command = `${options.prefix} ${command}`; + } + + if (options.comment) { + command = `# ${options.comment.replaceAll('{PKG}', pkgManager)}\n${command}`; + } + + if (type === 'add' && options.dev) { + command += ` ${commands[pkgManager].devOption}`; + } + + if (pkg) { + command += ` ${pkg}`; + } + + if (options.args && options.args.length > 0) { + if (pkgManager === 'npm' && type !== 'exec' && type !== 'run') { + command += ' --'; + } + + command += ` ${options.args}`; + } + + return command; +} + +export type CommandType = 'add' | 'create' | 'exec' | 'run' | 'remove'; + +export interface CommandOptions { + args?: string; + comment?: string; + dev?: boolean; + prefix?: string; +} + +type Commands = Record< + PackageManager, + Record | 'devOption', string> & { create?: string } +>; + +export type PackageManager = (typeof pkgManagers)[number]; diff --git a/www/docs/src/content/config.ts b/www/docs/src/content/config.ts index 956785594..4f3d9261e 100644 --- a/www/docs/src/content/config.ts +++ b/www/docs/src/content/config.ts @@ -1,8 +1,43 @@ -import { defineCollection } from 'astro:content'; +import { defineCollection, reference } from 'astro:content'; import { docsSchema } from '@astrojs/starlight/schema'; -import { docsVersionsSchema } from 'starlight-versions/schema'; +import { z } from 'astro/zod'; + +const packageCatalogSchema = z.object({ + name: z.string(), + description: z.string(), + docsLink: z.string(), + githubURL: z.string(), + catalog: z + .union([z.literal('studiocms'), z.literal('community')]) + .optional() + .default('studiocms'), + isPlugin: z.boolean().optional().default(false), + publiclyUsable: z.boolean().optional().default(false), + released: z.boolean().optional().default(true), +}); + +const baseSchema = z.object({ + type: z.literal('base').optional().default('base'), +}); + +const integrationSchema = baseSchema.extend({ + type: z.literal('integration'), + catalogEntry: reference('package-catalog'), +}); + +const redirectSchema = baseSchema.extend({ + type: z.literal('redirect'), + redirect: z.string(), +}); + +const docsCollectionSchema = z.union([baseSchema, integrationSchema, redirectSchema]); export const collections = { - docs: defineCollection({ schema: docsSchema() }), - versions: defineCollection({ type: 'data', schema: docsVersionsSchema() }), + docs: defineCollection({ + schema: docsSchema({ extend: docsCollectionSchema }), + }), + 'package-catalog': defineCollection({ + type: 'data', + schema: packageCatalogSchema, + }), }; diff --git a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/dashboard.md b/www/docs/src/content/docs/0.1.0-beta.4/config-reference/dashboard.md deleted file mode 100644 index 3ce14e286..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/dashboard.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: dashboardConfig -description: A reference page for dashboard -sidebar: - order: 4 -slug: 0.1.0-beta.4/config-reference/dashboard ---- - -`dashboardConfig` option let's customize the dashboard for the `astroStudioCMS`. This is used to setup your dashboard data. - -## Usage - -```js title="astro.config.mjs" {2-24} -astroStudioCMS({ - dashboardConfig: { - dashboardEnabled: true, - faviconURL: "/favicon.ico", - dashboardRouteOverride: "/components/dashboard", - AuthConfig: { - providers: { - github: true, - usernameAndPassword: true - }, - enabled: true - }, - UnoCSSConfigOverride: { - injectReset: true, - injectEntry: true, - presetsConfig: { - presetDaisyUI: { - themes: ['dark', 'light'], - lightTheme: ['light'], - darkTheme: ['dark'], - } - } - } - }, // DEFAULT - This injects a dashboard to setup your dashboard data. -}) -``` - -### `dashboardEnabled` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable or disable the Astro StudioCMS dashboard but still provide all the helper's and utilities to those who are customizing their setup, doing so will disable the dashboard and you will need to manage your content via the Astro Studio Dashboard at [Astro Studio](http://studio.astro.build). - -### `faviconURL` - -* **Type:** `string | undefined` -* **Default:** `'/favicon.ico'` - -Allows the user to override the default Favicon URL to a custom URL. - -### `dashboardRouteOverride` - -* **Type:** `string | undefined` - -Allows the user to override the default dashboard route to a custom route. - -### `AuthConfig` - -* **Type:** `AuthConfigSchema{} | undefined{}` -* **Default:** `undefined{}` - -Allows customization of the Authentication Configuration. - -#### `providers` - -* **Type:** `authProviderSchema{} | undefined{}` - -Allows enabling or disabling of the Authentication Providers. - -##### `github` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows enabling or disabling of the Github Authentication Provider. - -##### `usernameAndPassword` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows enabling or disabling of the Username and Password Authentication Provider. - -#### `enabled` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows enabling or disabling of the Authentication Configuration. - -### `UnoCSSConfigOverride` - -* **Type:** `unocssConfigSchema{} | undefined{}` - -Allows customization of the UnoCSS Configuration. - -#### `injectReset` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable or disable the UnoCSS Default Reset import. - -#### `injectEntry` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable or disable the UnoCSS Default Entry import. - -#### `presetsConfig` - -* **Type:** `unocssPresetsSchema{} | undefined{}` - -Allows the user to modify the included UnoCSS Presets. - -##### `presetDaisyUI` - -* **Type:** `unocssDaisyUISchema{} | undefined{}` - -Allows the user to enable or disable the UnoCSS DaisyUI Preset. - -###### `themes` - -* **Type:** `Array | undefined` -* **Default:** `['dark', 'light']` - -Allows the user to use any of the available DaisyUI themes. - -###### `lightTheme` - -* **Type:** `string | undefined` -* **Default:** `'light'` - -Allows the user to set the default light theme. - -###### `darkTheme` - -* **Type:** `string | undefined` -* **Default:** `'dark'` - -Allows the user to set the default dark theme. - -### `developerConfig` - -* **Type:** `developerConfigSchema{} | undefined{}` - -Developer Options/Configuration. - -#### `viewTransitionsAPI` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable Astro's ZeroJS View Transition API for the Astro Studio CMS Dashboard. - -#### `testingAndDemoMode` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Enables Testing and Demo Mode diff --git a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/default-frontend-config.md b/www/docs/src/content/docs/0.1.0-beta.4/config-reference/default-frontend-config.md deleted file mode 100644 index fbc609009..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/default-frontend-config.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: defaultFrontEndConfig -description: A reference page for defaultFrontEndConfig -sidebar: - order: 3 -slug: 0.1.0-beta.4/config-reference/default-frontend-config ---- - -`defaultFrontEndConfig` is an object that is used to determine how the default dashboard routes should be rendered in `astroStudioCMS`. This is used to setup your user-facing front-end. - -## Usage - -```js title="astro.config.mjs" {2-9} -astroStudioCMS({ - defaultFrontEndConfig: { - injectDefaultFrontEndRoutes: true, - inject404Route: true, - htmlDefaultLanguage: 'en', - htmlDefaultHead: [], - layoutOverride: './src/layouts/customLayout.astro', - favicon: '/favicon.svg', - }, -}) -``` - -## `injectDefaultFrontEndRoutes` - -Inject Default Routes - Injects the default routes for the StudioCMS front-end - -* **Type:** `boolean` -* **Default:** `true` - -`injectDefaultFrontEndRoutes` Should the user facing frontend routes be injected into the `astroStudioCMS`. This is used to setup your front-end routes. - -## `inject404Route` - -Inject 404 Route - Injects a 404 route for handling unknown routes - -* **Type:** `boolean` -* **Default:** `true` - -`inject404Route` Should the `404` route be injected into the `astroStudioCMS`. This is used to setup your frontend `404` route. - -## `htmlDefaultLanguage` - -HTML Default Language - The default language for the HTML tag - -* **Type:** `string` -* **Default:** `'en'` - -`htmlDefaultLanguage` Used to set the `lang` attribute of your `` of the `astroStudioCMS` webpage. - -## `htmlDefaultHead` - -* **Type:** `Array` -* **Default:** `optional` - -HTML Default Header - The default head configuration for the Frontend - -### Usage - -```js title="astro.config.mjs" {2-4} -astroStudioCMS({ - htmlDefaultHead: [ - { tag: 'title', content: 'My Awesome Site' }, - { - tag: 'script', - attrs: { - defer: true, - src: 'https://umami.mydomain.dev/script.js', - 'data-website-id': 'my-umami-website-id', - } - } - ], -}) -``` - -## `layoutOverride` - -Layout Override - Allows override of the default layout file - -* **Type:** `string` -* **Default:** `optional` - -## `favicon` - -* **Type:** `string` -* **Default:** `/favicon.svg` - -Favicon is relative to the project public folder diff --git a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/image-service.md b/www/docs/src/content/docs/0.1.0-beta.4/config-reference/image-service.md deleted file mode 100644 index 8656df15d..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/image-service.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: imageService -description: A reference page for Image Service -sidebar: - order: 3 -slug: 0.1.0-beta.4/config-reference/image-service ---- - -`imageService` is an object value that is used to determine how images should be rendered in the `astroStudioCMS`. This is used to setup your image data. - -## Usage - -```js title="astro.config.mjs" {2-11} -astroStudioCMS({ - imageService: { - useUnpic: false, - unpicConfig { - fallbackService: "unsplash", - placeholder: 'blurhash', - layout: 'constrained', - }, - astroImageServiceConfig: "squoosh", - cdnPlugin: "cloudinary", - }, -}), -``` - -### `useUnpic` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the `@unpic/astro` image optimization service for external images. - -### `unpicConfig` - -* **Type:** `unpicConfigSchema{} | undefined{}` -* **Default:** `undefined{}` - -Allows the user to customize the `@unpic/astro` image optimization service. - -#### `fallbackService` - -* **Type:** `'sharp' | 'squoosh' | undefined` -* **Default:** `undefined` - -Falls back to the value of `astroImageServiceConfig` if not set here. - -#### `placeholder` - -* **Type:** `'blurhash' | 'dominantColor' | 'lqlip' | undefined` -* **Default:** `'blurhash'` - -The default placeholder background to use for images. - -#### `layout` - -* **Type:** `'constrained' | 'fixed' | 'fullWidth' | undefined` -* **Default:** `'constrained'` - -The default layout to use for images. - -#### `cdnOptions` - -* **Type:** `cdnOptionsSchema{} | undefined{}` -* **Default:** `undefined{}` - -CDN-specific options for the `@unpic/astro` image optimization service. - -### `astroImageServiceConfig` - -* **Type:** `'sharp' | 'squoosh' | undefined` -* **Default:** `'squoosh'` - -If the `useUnpic` option is enabled, this option allows the user to choose between the `sharp` and `squoosh` image optimization services. - -### `cdnPlugin` - -* **Type:** `'cloudinary-js'| undefined` -* **Default:** `'cloudinary-js'` - -Allows the user to use a custom Supported CDN Plugin, so it can be specified here. diff --git a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/included-integrations.md b/www/docs/src/content/docs/0.1.0-beta.4/config-reference/included-integrations.md deleted file mode 100644 index b83af1c1e..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/included-integrations.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: includedIntegrations -description: A reference page for includedIntegrations -sidebar: - order: 5 -slug: 0.1.0-beta.4/config-reference/included-integrations ---- - -`includedIntegrations` is an object that is used to determine which Astro Integrations should be included in the `astroStudioCMS`. Currently there are three Integrations that can be included: `useAstroRobots`, `astroRobotsConfig`, and `useInoxSitemap`. - -## Usage - -```js title="astro.config.mjs" {2-6} -astroStudioCMS({ - includedIntegrations: { - useAstroRobots: true, - astroRobotsConfig: {}, - useInoxSitemap: true, - }, -}), -``` - -### `useAstroRobots` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the StudioCMS Custom `astro-robots-txt` Integration. - -### `astroRobotsConfig` - -* **Type:** `RobotsConfig{} | undefined{}` - -Allows you to modify the default behaviour of the this Integration. For more information on this Integration please visit the [Astro Robots Integration](https://www.npmjs.com/package/astro-robots). - -### `useInoxSitemap` - -#### TEMPORARILY DISABLED - -If you would like to still use the Inox-tools Sitemap Plugin, you can manually add it to your project's Integrations. - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the Inox-tools Sitemap Plugin. For more information on this Integration please visit the [Inox-tools Sitemap Integration](https://inox-tools.vercel.app/sitemap-ext). diff --git a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/marked-config.md b/www/docs/src/content/docs/0.1.0-beta.4/config-reference/marked-config.md deleted file mode 100644 index f9e5ba3f0..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/marked-config.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: markedConfig -description: A reference page for markedConfig -sidebar: - order: 2 -slug: 0.1.0-beta.4/config-reference/marked-config ---- - -`markedConfig` is an object that is used to determine how content should be rendered in the `astroStudioCMS`. This is used to setup your content data. - -## Usage - -```js title="astro.config.mjs" {2-6} -astroStudioCMS({ - markedConfig: { - highlighterConfig: { - highlighter: "disabled", - }, - }, -}), -``` - -This property has the following options: - -### `includeExtensions` - -* **Type:** `markedExtensionsSchema{} | undefined{}` - -Allows you to enable or disable the included Marked Extensions, such as `marked-alert`, `marked-footnote`, `marked-smartypants`, and `marked-emoji`. - -#### `markedAlert` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-alert` extension. - -#### `markedFootnote` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-footnote` extension. - -#### `markedSmartyPants` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-smartypants` extension. - -#### `markedEmoji` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-emoji` extension. - -### `highlighterConfig` - -* **Type:** `markedHighlighterConfigSchema{} | undefined{}` - -This option allows you to choose the highlighter to use for code blocks in your content. - -#### `highlighter` - -* **Type:** `Enum<'shiki' | 'disabled'> | undefined` -* **Default:** `'disabled'` - -:::note -For the time being, the only available option is `shiki`. -::: - -#### `shikiConfig` - -* **Type:** `shikiConfigSchema{} | undefined{}` - -This option allows you to configure the a `shiki` highlighter. - -##### `theme` - -* **Type:** : `string | undefined` -* **Default:** `'houston'` - -Alows you to choose the theme for the `shiki` highlighter. - -The only available themes are the ones listed below: - -* `houston` -* `github-dark` -* `github-light` -* `night-owl` - -##### `loadThemes` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -Allows you to load additional Shiki Themes. This option is only used if you want to load *additional* Shiki Themes. - -For example if you want to load the `material-theme-palenight` theme, you would set the `loadTheme` option to `['material-theme-palenight']`. - -```ts -loadThemes: [ - import("shiki/themes/material-theme-palenight"), - ...asManyOtherThemesAsYouWant, -]; -``` - -##### `loadLang` - -* **Type:** `string[] | undefined` -* **Default:** `undefined` - -Allows you to load additional Shiki Languages. This option is only used if you want to load *additional* Shiki Languages. - -For example if you want to load `rust` and `toml` languages, you would set the `loadLang` option to `['rust', 'toml']`. - -```ts -loadLang: [import('shiki/languages/rust'), import('shiki/languages/toml') ...asManyOtherLanguagesAsYouWant] -``` - -### `loadMarkedExtensions` - -* **Type:** `string[] | undefined` -* **Default:** `undefined` - -Allows you to load additional Marked Extensions. This is only used if the user wants to load *additional* [Marked Extensions](https://marked.js.org/using_advanced#extensions). - -For example if you want to load Admonitions, you would need to install the `npm package`, import it in your config and then declare it. - -```ts -import markedAlert from "marked-alert"; - -loadMarkedExtensions: [markedAlert()]; -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/options-schema.md b/www/docs/src/content/docs/0.1.0-beta.4/config-reference/options-schema.md deleted file mode 100644 index 4bf46f629..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/options-schema.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: StudioCMSOptionsSchema -description: Reference page for StudioCMSOptionsSchema -sidebar: - order: 1 -slug: 0.1.0-beta.4/config-reference/options-schema ---- - -StudioCMS Integration config options schema Reference - -## `dbStartPage` - -Project Initialization Page - Used during First time setup to create your database configuration. - -* **Type:** `boolean` -* **Default:** `true` - -`dbStartPage` Should the Start page be injected into the `astroStudioCMS`. This is used to setup your DB data. - -### Usage - -```js title="astro.config.mjs" {2} -studioCMS({ - dbStartPage: true, // DEFAULT - This injects a start page to setup your DB data. -}) -``` - -## `contentRenderer` - -The Markdown Content Renderer to use for rendering pages within StudioCMS - -* **Type:** `'marked'` | `'markdoc'` | `'astro'` -* **Default:** `'marked'` - -`contentRenderer` determines how Markdown content should be rendered in `astroStudioCMS`. This is used to setup your content data. The default value is `marked` but you can also use `markdoc` or `astro` which uses Astro's built-in Remark processor. - -### Usage - -```js title="astro.config.mjs" {2} - astroStudioCMS({ - contentRenderer: 'marked', - }) -``` - -## `markedConfig` - -`markedConfig` is an object that is used to determine how content should be rendered in the `astroStudioCMS`. This is used to setup your content data. - -### Usage - -[see `markedConfig` for full options](/0.1.0-beta.4/config-reference/marked-config) - -## `imageService` - -`imageService` lets you configure your which service you're using for Images. - -### Usage - -[see `imageService` for full options](/0.1.0-beta.4/config-reference/image-service) - -## `defaultFrontEndConfig` - -`defaultFrontEndConfig` Determines how the default Dashboard routes should be rendered in `astroStudioCMS`. This is used to setup your user facing front-end. - -### Usage - -[see `defaultFrontEndConfig` for full options](/0.1.0-beta.4/config-reference/default-frontend-config) - -## `dashboardConfig` - -`dashboardConfig` option lets you customize the dashboard for `astroStudioCMS`. This is used to setup your dashboard data. - -### Usage - -[see `dashboardConfig` for full options](/0.1.0-beta.4/config-reference/dashboard) - -## `includedIntegrations` - -`includedIntegrations` defines which Astro Integrations should be included in `astroStudioCMS`. Currently there are three Integrations that can be included: `useAstroRobots`, `astroRobotsConfig`, and `useInoxSitemap`. - -### Usage - -[see `includedIntegrations` for full options](/0.1.0-beta.4/config-reference/included-integrations) - -## `dateLocale` - -Date locale used for formatting dates - -* **Type:** `string` -* **Default:** `en-us` - -`dateLocale` specifies how dates should be formatted in `astroStudioCMS`. - -### Usage - -```js title="astro.config.mjs" {2} -astroStudioCMS({ - dateLocale: 'en-us', -}) -``` - -## `overrides` - -`overrides` Used to override the default configuration of the `astroStudioCMS`. - -### Usage - -[see `overrides` for full options](/0.1.0-beta.4/config-reference/overrides) - -## `verbose` - -* **Type:** `boolean| undefined` -* **Default:** `true` - -`verbose` enables verbose logging. - -### Usage - -```js title="astro.config.mjs" {2} -astroStudioCMS({ - verbose: true, // DEFAULT - This enables verbose logging in AstroStudioCMS. -}), -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/overrides.md b/www/docs/src/content/docs/0.1.0-beta.4/config-reference/overrides.md deleted file mode 100644 index c44413450..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/config-reference/overrides.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: overrides -description: A reference page for overrides -sidebar: - order: 6 -slug: 0.1.0-beta.4/config-reference/overrides ---- - -`overrides` is an object that is used to override the default configuration of the `astroStudioCMS`. - -## Usage - -```js title="astro.config.mjs" {2-6} -astroStudioCMS({ - overrides: { - CustomImageOverride: "./src/components/MyCustomImage.astro", - FormattedDateOverride: "./src/components/MyCustomFormattedDate.astro", - }, -}), -``` - -### `CustomImageOverride` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -The path to a custom image component that will be used to render images in the `Astro-Studio-CMS`. - -### `FormattedDateOverride` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -The path to a custom formatted date component that will be used to render dates in the `Astro-Studio-CMS`. diff --git a/www/docs/src/content/docs/0.1.0-beta.4/how-it-works/index.mdx b/www/docs/src/content/docs/0.1.0-beta.4/how-it-works/index.mdx deleted file mode 100644 index 7d8ae5c4e..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/how-it-works/index.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: How does it work!? -description: Learn how Astro StudioCMS helps you manage and deliver your content - by exploring a comprehensive breakdown of it's fundamental components. -slug: 0.1.0-beta.4/how-it-works ---- - -# Introduction - -StudioCMS is a powerful CMS built for Astro that allows you to manage and serve your content using [Astro Studio](https://studio.astro.build/). It's designed to be easy-to-use and flexible enough to handle any type of content. - -Extending StudioCMS is easy too! You can create your own plugins to add new features to StudioCMS. - -## How does it work? - -StudioCMS is divided into multiple parts: - -* **StudioCMS Core**: The primary integration that hooks into your Astro project and provides the ability to interact with Astro Studio (through the `@astrojs/db` integration) with a prebuilt front-end. -* **StudioCMS: Dashboard**: The primary web interface for managing your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content. -* **StudioCMS: ImageHandler**: An integration that provides a `` component to handle remote images and optimize them for your project in an SSR environment. -* **StudioCMS: Robots-TXT**: An integration that automates the creation of a `robots.txt` file for your StudioCMS project. - -## Breakdown - -### StudioCMS Core - -StudioCMS Core is an Astro Integration which provides a comprehensive CMS solution out-of-the-box. This integration registers StudioCMS as the first plugin, sets up database configurations, watches for configuration changes, and adds various features including virtual imports, logging, and default frontend routes. - -#### Features - -* **@astrojs/db**: StudioCMS Core uses the `@astrojs/db` integration to connect to Astro Studio. -* **Virtual Imports**: StudioCMS Core adds several [virtual modules](https://vitejs.dev/guide/api-plugin#virtual-modules-convention) packed with features that give you full control over your dynamic content. -* **Logging**: StudioCMS Core logs all changes to Astro Studio. This can be enabled in your config file. -* **Default Frontend Routes**: The StudioCMS Core integration adds default frontend routes to your Astro project to allow for easy access to the StudioCMS dashboard. -* **Plugin System**: You can extend StudioCMS using plugins to add additional functionality. - -#### Core Virtual Modules - -:::tip -Modules prefixed with `virtual:` are virtual modules that are primarily used internally by StudioCMS, but can be used by developers to access StudioCMS data. To access these modules with proper typings, see the [project development `.d.ts` file](https://github.com/astrolicious/studiocms/blob/main/packages/studioCMS/virt-dev.d.ts) for an example of how to configure your project to sense these types. - -Modules without the `virtual:` prefix have full typings defined and injected into your project's `.astro/` directory automatically, and can be accessed directly without any extra configuration. -::: - -* **`virtual:studiocms/config`**: Provides the resolved configuration for the StudioCMS integration ecosystem. -* **`virtual:studiocms/version`**: Provides the current version of the StudioCMS integration ecosystem. -* **`virtual:studiocms/_nav`**: Provides the navigation mappings for the user-facing front-end. -* **`virtual:studiocms/_pluginDashboardLinks`**: Provides the plugin dashboard links for the StudioCMS Dashboard. -* **`virtual:studiocms/astromdremarkConfig`**: Provides the configuration for Astro Markdown support. -* **`studiocms:components`**: Provides the front-end exported components for StudioCMS. -* **`studiocms:helpers`**: Provides the front-end exported helper functions for StudioCMS. - -### StudioCMS: Dashboard - -The StudioCMS Dashboard is a web interface that allows you to manage your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content for your project. The StudioCMS Dashboard is built with [Astro](https://astro.build) and [DaisyUI](https://daisyui.com/) with [UnoCSS](https://unocss.dev). - -#### Tech Stack - -* **Dashboard**: The StudioCMS Dashboard provides a user-friendly interface for managing your AstroStudioCMS project. -* **UnoCSS**: The StudioCMS Dashboard uses UnoCSS for styling and theming. -* **DaisyUI**: The StudioCMS Dashboard uses DaisyUI for styling and theming. -* **AuthConfig**: The StudioCMS Dashboard provides authentication configuration options. -* **Astrolace**: The StudioCMS Dashboard is built using [Astrolace](https://github.com/matthiesenxyz/astrolace) a [Shoelace.style](https://shoelace.style) Astro Integration. -* **DashboardRouteOverride**: The StudioCMS Dashboard provides a dashboard route override configuration option. Allowing you to change the default route for the StudioCMS Dashboard and API. - -#### Dashboard Virtual Modules - -* **`studiocms-dashboard:auth`**: Provides the authentication configuration for the dashboard. -* **`studiocms-dashboard:components`**: Provides the exported dashboard components. -* **`studiocms-dashboard:contentHelpers`**: Provides the exported content helper functions for the dashboard. -* **`studiocms-dashboard:routeMap`**: Provides the exported routes for the dashboard. - -### StudioCMS: ImageHandler - -The StudioCMS ImageHandler is an integration that provides a custom image component for your Astro project. This component is used to handle remote images and optimize them in a SSR environment using [@unpic/astro](https://unpic.pics/img/astro/). - -#### Features - -* **``**: The StudioCMS ImageHandler provides a custom image component for your Astro project. - -#### ImageHandler Virtual Modules - -* **`studiocms:imageHandler/components`**: The Virtual module that provides the exported image components for the StudioCMS ImageHandler. diff --git a/www/docs/src/content/docs/0.1.0-beta.4/index.mdx b/www/docs/src/content/docs/0.1.0-beta.4/index.mdx deleted file mode 100644 index 841f82f91..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Welcome to Astro StudioCMS -description: Get started building with Astro StudioCMS. -template: splash -hero: - tagline: A dedicated CMS for Astro Studio. Built from the ground up by the Astro - community. - image: - alt: Astro StudioCMS Logo - dark: ./studioCMS.png - light: ./studioCMS-dark.png - actions: - - text: Get started - link: /0.1.0-beta.4/start-here/getting-started - icon: right-arrow - variant: primary - - text: GitHub repository - link: https://github.com/astrolicious/studiocms - icon: github -slug: 0.1.0-beta.4 ---- - -import Youtube from '~/components/Youtube.astro' - - diff --git a/www/docs/src/content/docs/0.1.0-beta.4/plugins/studiocms-blog.mdx b/www/docs/src/content/docs/0.1.0-beta.4/plugins/studiocms-blog.mdx deleted file mode 100644 index 5fdafc8c4..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/plugins/studiocms-blog.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: "@astrolicious/studiocms-blog" -description: StudioCMS Blog Integration -slug: 0.1.0-beta.4/plugins/studiocms-blog ---- - -import { PackageManagers } from 'starlight-package-managers'; -import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; - -# Introduction - -#### Powered by [`astro-theme-provider`](https://github.com/astrolicious/astro-theme-provider) by [Bryce Russell](https://github.com/BryceRussell) - -This Astro integration enables the StudioCMS Blog feature in your Astro project. This integration will allow you to create, edit, and delete blog posts in the StudioCMS dashboard. - -## Installation - - - {/* - - 1. Install the package and add to your astro config using the following command: - - - - 2. Update your config file as shown under [Example Config](#example-config) below. - - */} - - - - 1. Install the package using the following command: - - - - 2. Add `@astrolicious/studiocms-blog` to your astro config file: - - ```js title="astro.config.mjs" ins={3, 15-20} - import node from '@astrojs/node'; - import studioCMS from '@astrolicious/studiocms'; - import studioCMSBlog from '@astrolicious/studiocms-blog'; - import { defineConfig } from 'astro/config'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - studioCMSBlog({ - config: { - title: "My StudioCMS Blog", - description: "A Simple Blog build with Astro, AstroDB, and StudioCMS.". - }, - }), - ], - }); - ``` - - - - -## Usage - -### What does this integration do? - -This integration will add the following new routes to your StudioCMS Controlled front-end: - -* `/blog` - The main blog page that lists all blog posts. -* `/blog/[slug]` - The individual blog post page. -* `/rss.xml` - The RSS feed for your blog posts. - -### Example config - -```js title="astro.config.mjs" -import { defineConfig } from 'astro/config'; -import db from '@astrojs/db'; -import studioCMS from '@astrolicious/studiocms'; -import studioCMSBlog from '@astrolicious/studiocms-blog'; - -// https://astro.build/config -export default defineConfig({ - site: "https://example.com", - output: "server", - adapter: ... - integrations: [ - db(), // REQUIRED - `@astrojs/db` must be included in the integrations list - studioCMS(), // REQUIRED - StudioCMS must be included in the integrations list - studioCMSBlog({ - config: { - title: "My StudioCMS Blog", - description: "A Simple Blog build with Astro, Astrojs/DB, and StudioCMS.". - }, - }), - ], -}); -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.4/plugins/web-vitals.mdx b/www/docs/src/content/docs/0.1.0-beta.4/plugins/web-vitals.mdx deleted file mode 100644 index a085cdb7c..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/plugins/web-vitals.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "@astrojs/web-vitals" -description: Web Vitals Integration with the StudioCMS Dashboard -slug: 0.1.0-beta.4/plugins/web-vitals ---- - -import { PackageManagers } from 'starlight-package-managers'; -import Gallery from '~/components/Gallery.astro'; -import { webVitalsImages } from "../../../../assets/index.ts"; -import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; - -# Introduction - -This Astro integration enables tracking real-world website performance and storing the data in Astro DB. That data will be used in the StudioCMS dashboard to show the performance metrics of your website from the real world over time. - -## Installation - - - - - 1. Install the package and add to your astro config using the following command: - - - - 2. Push the new configuration to your remote database: - - - - - - - - 1. Install the package using the following command: - - - - 2. Add `@astrojs/web-vitals` to your astro config file: - - ```js title="astro.config.mjs" ins={3, 12} - import node from '@astrojs/node'; - import studioCMS from '@astrolicious/studiocms'; - import webVitals from '@astrojs/web-vitals'; - import { defineConfig } from 'astro/config'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - webVitals(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - ], - }); - ``` - - - - 3. Push the new configuration to your remote database: - - - - - - -## Gallery Demo - - diff --git a/www/docs/src/content/docs/0.1.0-beta.4/start-here/configuration.md b/www/docs/src/content/docs/0.1.0-beta.4/start-here/configuration.md deleted file mode 100644 index e99ddef20..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/start-here/configuration.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: StudioCMS Config -description: Options for how to define the StudioCMS Config -slug: 0.1.0-beta.4/start-here/configuration ---- - -# Available Options - -There are two ways to configure the StudioCMS Integration, below are examples of how to configure based on if you choose to use the `astro.config.mjs` or the dedicated `studiocms.config.mjs` file. - -## Using the `astro.config.mjs` file: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from '@astrolicious/studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: false, - ...OtherConfigOptions - }), - ], -}); -``` - -## Using the `studiocms.config.mjs` file: - -This file will be automatically picked up and will overwrite any options passed in your astro.config, if you choose to use this option, Please ensure to move all StudioCMS Config options into this file instead like below: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from '@astrolicious/studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ db(), studioCMS() ], -}); -``` - -```js title="studiocms.config.mjs" -import { defineStudioCMSConfig } from "@astrolicious/studiocms"; - -export default defineStudioCMSConfig({ - dbStartPage: false, - ...OtherConfigoptions -}) -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.4/start-here/environment-variables.md b/www/docs/src/content/docs/0.1.0-beta.4/start-here/environment-variables.md deleted file mode 100644 index ad0042cc9..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/start-here/environment-variables.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Environment Variables -description: A brief overview of the environment variables used in Astro StudioCMS. -slug: 0.1.0-beta.4/start-here/environment-variables ---- - -For Astro StudioCMS to work correctly, you must set up the correct environment variables. These variables are essential for establishing a secure connection to Astro DB and authenticating with the Astro StudioCMS API. Without correctly configuring these environment variables, the application will not function as intended. - -You can create a `.env` file in the root directory of your project and add the required environment variables. The `.env` file is a text file that contains key-value pairs of environment variables. The environment variables are read by the application at runtime. - -For future reference on how to work with environment variables within Astro you can checkout [Environment Variables](https://docs.astro.build/guides/environment-variables) from the Astro documentation. - -:::note -StudioCMS makes use of Astro's new Experimental [`astro:env`](https://docs.astro.build/en/reference/configuration-reference/#experimentalenv) for handling all of its Environment Variables. If you face any issues with environment variables please submit an [issue on Github](https://github.com/astrolicious/studiocms/issues/new/choose) -::: - -## Required Environment Variables - -`ASTRO_STUDIO_APP_TOKEN` is required to connect to the database. - -```bash title=".env" -ASTRO_STUDIO_APP_TOKEN=your_app_token -``` - -## Authentication Environment Variables - -Currently there are 5 ways to authenticate with Astro StudioCMS: - -:::tip -Use `http://localhost:4321` for local development and testing callback urls, and `https://your-domain.tld` for your callback urls in production! -::: - -### GitHub - -To authenticate with GitHub, you need to add the following environment variables to your `.env` file: - -```bash title=".env" -# credentials for GitHub OAuth -# Callback URL for github (NOT AN ENV VARIABLE): 'http://localhost:4321/dashboard/login/github/callback' -CMS_GITHUB_CLIENT_ID=your_client_id -CMS_GITHUB_CLIENT_SECRET=your_client_secret -``` - -### Discord - -```bash title=".env" -# credentials for Discord OAuth -CMS_DISCORD_CLIENT_ID= -CMS_DISCORD_CLIENT_SECRET= -CMS_DISCORD_REDIRECT_URI=http://localhost:4321/dashboard/login/discord/callback -``` - -### Google - -```bash title=".env" -# credentials for Google OAuth -CMS_GOOGLE_CLIENT_ID= -CMS_GOOGLE_CLIENT_SECRET= -CMS_GOOGLE_REDIRECT_URI=http://localhost:4321/dashboard/login/google/callback -``` - -### Auth0 - -```bash title=".env" -# credentials for auth0 OAuth -CMS_AUTH0_CLIENT_ID= -CMS_AUTH0_CLIENT_SECRET= -CMS_AUTH0_DOMAIN= -CMS_AUTH0_REDIRECT_URI=http://localhost:4321/dashboard/login/auth0/callback -``` - -### Username and Password - -Alternatively, you can authenticate with Astro StudioCMS using your username and password which doesn't require any additional environment variables. - -:::note -When Username and Password authentication is enabled you can modify its configuration and level of security using the generated `studiocms-auth.config.json` file. -::: - -## Image Handler Environment Variables - -### Cloudinary (Optional) - -If you choose to use the built-in Cloudinary plugin, you will need to define the following: - -```bash title=".env" -## Cloudinary Javascript SDK -CMS_CLOUDINARY_CLOUDNAME="demo" -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.4/start-here/gallery.mdx b/www/docs/src/content/docs/0.1.0-beta.4/start-here/gallery.mdx deleted file mode 100644 index b3c01abdf..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/start-here/gallery.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Gallery -description: A small gallery of images to show off the Astro-Studio-CMS -tableOfContents: false -slug: 0.1.0-beta.4/start-here/gallery ---- - -import Gallery from '~/components/Gallery.astro' -import { mainDemoGalleryImages } from "../../../../assets/index.ts" - -This is a small gallery of images to show off the `Astro StudioCMS` integration. - - diff --git a/www/docs/src/content/docs/0.1.0-beta.4/start-here/getting-started.mdx b/www/docs/src/content/docs/0.1.0-beta.4/start-here/getting-started.mdx deleted file mode 100644 index 6a1de9af4..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/start-here/getting-started.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: Getting Started with Astro StudioCMS -description: Get started building with Astro StudioCMS. -slug: 0.1.0-beta.4/start-here/getting-started ---- - -import { PackageManagers } from 'starlight-package-managers'; - -## Let's get started - -To start using Astro StudioCMS, you'll need: - -* An Astro project -* An Astro Studio account -* An Astro Studio project -* The Astro StudioCMS integration - -## Creating an Astro Studio account - -:::note -Astro Studio is currently in closed beta. You'll need an invite to create an account. - -We're following Astro Studio's News and Updates for the latest information on when the platform will be available to the public again and will be informing everyone through our [Discord channel](https://chat.astro-studiocms.xyz) when signups for Astro Studio are open again. There is also an open [PR for `@astrojs/db`](https://github.com/withastro/astro/pull/11385) that would allow you to use the Astro StudioCMS integration without the need for Astro Studio by using another LibSQL database service or even self-hosted. -::: - -You can create an Astro Studio account by visiting [Astro Studio](https://studio.astro.build/). - -Once created, you'll be able to access the Astro Studio dashboard and manage your projects. - -## Creating a new Studio project - -There are two ways to create a project in Astro Studio: - -To get started go to your personal dashboard within Studio and click the "Start a Project" button and follow the instructions. Astro Studio will connect to your GitHub repository and create a new hosted database for your project. - -**Use the Astro Studio CLI** to create from any local Astro project. You can run the following commands to get started: - - - - - - - -Once you are logged in and linked successfully, you can run all Astro DB commands to manage your remote database. - -:::note -See [the Astro DB CLI reference](https://docs.astro.build/en/guides/integrations-guide/db/#astro-db-cli-reference) for all available commands. -::: - -## Creating a new Astro project - -To create a new Astro project, simply run the following command in your terminal: - - - -After running the command, you'll be prompted to answer a few questions about your project. Once completed, the CLI will create a new Astro project in the specified directory. - -If all goes well, you should see a “Liftoff confirmed. Explore your project!” message followed by some recommended next steps. - -`cd` into your new project directory to begin using Astro. `cd my-project` - -If you skipped the npm install step during the CLI wizard, then be sure to install your dependencies before continuing. - -## Adding the Astro StudioCMS integration - -To add the Astro StudioCMS integration to your project, you'll need to install the Astro StudioCMS package and it's dependencies: - - - -Then install StudioCMS - - - -After installing the package, make sure that your `astro.config.mjs` file is correctly importing and calling the integration: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from '@astrolicious/studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - ], -}); -``` - -:::note -Astro StudioCMS requires SSR mode to work correctly. Make sure to set `output: 'server'` and an adapter that supports SSR in your `astro.config.mjs` file. -::: - -## Configure your `package.json` scripts - -Setup your `package.json` scripts to include the `--remote` flag for build, and optionally for dev. (You can also run the dev command as shown in the ["Running your StudioCMS Project"](#running-your-studiocms-project) section) - -```json title="package.json" -{ - "name": "my-studiocms-project", - "scripts": { - "dev": "astro dev --remote", - "build": "astro check & astro build --remote", - "astro": "astro" - } -} -``` - -## Running your StudioCMS project - -Thanks to the power of Astro running StudioCMS is as easy as running the dev command for local preview, or building and deploying to your server, for the basics of how to use it locally without building here is what you need to do. - -### First time Setup (or during updates if the tables schema is updated) - -To start your Astro project, run the following commands in your terminal: - - - - - - - -After running the commands, you should see a message indicating that your project is running at `localhost:4321`. When first setting up StudioCMS, you will prompted to finish configuring StudioCMS at http://localhost:4321/start - -### Running in Astro Development mode locally - -To start your Astro project, run the following command in your terminal: - - - -After running the command, you should see a message indicating that your project is running at `localhost:4321`. Open your browser and navigate to `http://localhost:4321` to see your Astro project in action. - -**Congratulations!** 🥳 You now have Astro StudioCMS installed in your Astro project. - -## Next steps - -Now that you have Astro StudioCMS installed, you can start building your project with Astro StudioCMS. - -Check out how to set environment variables in Astro StudioCMS by heading to [Environment Variables](/0.1.0-beta.4/start-here/environment-variables). - -To learn more about the API and how to use Astro StudioCMS, check out the [Astro StudioCMS Reference](/0.1.0-beta.4/typedoc/studiocms-core/index/functions/studiocmscoreintegration/). - -You can also learn more about themes and how to author them by using [Astro Theme Provider](https://astro-theme-provider.netlify.app/). diff --git a/www/docs/src/content/docs/0.1.0-beta.4/start-here/why-studioCMS.mdx b/www/docs/src/content/docs/0.1.0-beta.4/start-here/why-studioCMS.mdx deleted file mode 100644 index a0277a63d..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.4/start-here/why-studioCMS.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Why Astro StudioCMS? -description: Astro StudioCMS is an alternative to traditional CMS platforms. It - is a headless CMS that relies on Astro Studio and Astro Framework to deliver a - seamless content management experience. -slug: 0.1.0-beta.4/start-here/why-studiocms ---- - -We're so excited to introduce AstroStudio CMS - a dedicated content management system (CMS) built on top of Astro's latest product: [Astro Studio](https://studio.astro.build). This project was developed by [Adam](https://github.com/Adammatthiesen), [Dreyfus](https://github.com/dreyfus92), and [Jumper](https://github.com/jdtjenkins), three passionate members of the Astro community. - -## Why another CMS? - -While Astro's content capabilities are powerful, we recognized a need for a more streamlined and user-friendly CMS solution within the Astro ecosystem. Many Astro users, especially those coming from more traditional CMS backgrounds, have expressed a desire for a dedicated CMS that can seamlessly integrate with Astro projects. - -AstroStudio CMS was born out of this need, providing a content management platform that is tailor-made for Astro. By building on top of Astro Studio, we're able to offer a CMS experience that feels native to the Astro workflow, making it easier for both developers and content creators to collaborate on Astro-powered projects. - -## An Experimental Endeavor - -It's important to note that AstroStudio CMS is an experimental project that heavily relies on the [@astrojs/db package](https://github.com/withastro/astro/tree/main/packages/db), which is currently in active development and not yet considered stable. As a result, you should expect a significant number of breaking changes as the project continues to evolve. - -We believe that by building on the cutting-edge features of Astro Studio, we can create a powerful and innovative CMS solution. However, this also means that AstroStudio CMS may not be suitable for mission-critical or production-ready projects at this stage. We encourage you to use caution and thoroughly test the CMS in your own projects before deploying it to a live environment. - -## Key Features - -* **Part of Astrolicious:** Astrolicious leverages Astro's robust and efficient framework, providing a solid base for building and scaling applications. - -* **Realtime Markdown Editor:** Astro StudioCMS has a real-time Markdown editor so you can create your content using powerful Markdown syntax and see changes reflected in real-time! - -* **Enhanced Markdown:** We've incorporated 'Marked' with support for extensions, enriching the markdown experience with greater flexibility and functionality. - -* **Shiki Syntax Highlighting:** Astrolicious offers Shiki-powered syntax highlighting, ensuring your code is both visually appealing and easy to read. This is especially useful in non-Cloudflare environments due to bundle size considerations. - -* **Markdoc Integration:** In addition to 'Marked', Astro StudioCMS provides an alternative with Markdoc, offering users a choice for their markdown processing needs. - -* **Secure Studio Database:** All data is securely housed within the Astro Studio database, ensuring access only to authorized users with `studio.astro.build` login credentials. - -* **Built-in Authentication:** Astro StudioCMS features built-in authentication with support for multiple platforms, including Local and Github, enhancing security and user management (currently in development). - -* **Unpic Image Service:** Astro StudioCMS includes a free and efficient image service, Unpic, which makes managing external URLs straightforward, with support for major CDNs. diff --git a/www/docs/src/content/docs/0.1.0-beta.4/studioCMS-dark.png b/www/docs/src/content/docs/0.1.0-beta.4/studioCMS-dark.png deleted file mode 100644 index 7c78e0310..000000000 Binary files a/www/docs/src/content/docs/0.1.0-beta.4/studioCMS-dark.png and /dev/null differ diff --git a/www/docs/src/content/docs/0.1.0-beta.4/studioCMS.png b/www/docs/src/content/docs/0.1.0-beta.4/studioCMS.png deleted file mode 100644 index 4a7eb8b42..000000000 Binary files a/www/docs/src/content/docs/0.1.0-beta.4/studioCMS.png and /dev/null differ diff --git a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/dashboard.md b/www/docs/src/content/docs/0.1.0-beta.5/config-reference/dashboard.md deleted file mode 100644 index 7b790f3a8..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/dashboard.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: dashboardConfig -description: A reference page for dashboard -sidebar: - order: 4 -slug: 0.1.0-beta.5/config-reference/dashboard ---- - -`dashboardConfig` option let's customize the dashboard for the `astroStudioCMS`. This is used to setup your dashboard data. - -## Usage - -```js title="astro.config.mjs" {2-24} -astroStudioCMS({ - dashboardConfig: { - dashboardEnabled: true, - faviconURL: "/favicon.ico", - dashboardRouteOverride: "/components/dashboard", - AuthConfig: { - providers: { - github: true, - usernameAndPassword: true - }, - enabled: true - }, - UnoCSSConfigOverride: { - injectReset: true, - injectEntry: true, - presetsConfig: { - presetDaisyUI: { - themes: ['dark', 'light'], - lightTheme: ['light'], - darkTheme: ['dark'], - } - } - } - }, // DEFAULT - This injects a dashboard to setup your dashboard data. -}) -``` - -### `dashboardEnabled` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable or disable the Astro StudioCMS dashboard but still provide all the helper's and utilities to those who are customizing their setup, doing so will disable the dashboard and you will need to manage your content via the Astro Studio Dashboard at [Astro Studio](http://studio.astro.build). - -### `faviconURL` - -* **Type:** `string | undefined` -* **Default:** `'/favicon.ico'` - -Allows the user to override the default Favicon URL to a custom URL. - -### `dashboardRouteOverride` - -* **Type:** `string | undefined` - -Allows the user to override the default dashboard route to a custom route. - -### `AuthConfig` - -* **Type:** `AuthConfigSchema{} | undefined{}` -* **Default:** `undefined{}` - -Allows customization of the Authentication Configuration. - -#### `providers` - -* **Type:** `authProviderSchema{} | undefined{}` - -Allows enabling or disabling of the Authentication Providers. - -##### `github` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows enabling or disabling of the Github Authentication Provider. - -##### `usernameAndPassword` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows enabling or disabling of the Username and Password Authentication Provider. - -#### `enabled` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows enabling or disabling of the Authentication Configuration. - -### `UnoCSSConfigOverride` - -* **Type:** `unocssConfigSchema{} | undefined{}` - -Allows customization of the UnoCSS Configuration. - -#### `injectReset` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable or disable the UnoCSS Default Reset import. - -#### `injectEntry` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable or disable the UnoCSS Default Entry import. - -#### `presetsConfig` - -* **Type:** `unocssPresetsSchema{} | undefined{}` - -Allows the user to modify the included UnoCSS Presets. - -##### `presetDaisyUI` - -* **Type:** `unocssDaisyUISchema{} | undefined{}` - -Allows the user to enable or disable the UnoCSS DaisyUI Preset. - -###### `themes` - -* **Type:** `Array | undefined` -* **Default:** `['dark', 'light']` - -Allows the user to use any of the available DaisyUI themes. - -###### `lightTheme` - -* **Type:** `string | undefined` -* **Default:** `'light'` - -Allows the user to set the default light theme. - -###### `darkTheme` - -* **Type:** `string | undefined` -* **Default:** `'dark'` - -Allows the user to set the default dark theme. - -### `developerConfig` - -* **Type:** `developerConfigSchema{} | undefined{}` - -Developer Options/Configuration. - -#### `viewTransitionsAPI` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable Astro's ZeroJS View Transition API for the Astro Studio CMS Dashboard. - -#### `testingAndDemoMode` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Enables Testing and Demo Mode diff --git a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/default-frontend-config.md b/www/docs/src/content/docs/0.1.0-beta.5/config-reference/default-frontend-config.md deleted file mode 100644 index b62f38179..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/default-frontend-config.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: defaultFrontEndConfig -description: A reference page for defaultFrontEndConfig -sidebar: - order: 3 -slug: 0.1.0-beta.5/config-reference/default-frontend-config ---- - -`defaultFrontEndConfig` is an object that is used to determine how the default dashboard routes should be rendered in `astroStudioCMS`. This is used to setup your user-facing front-end. - -## Usage - -```js title="astro.config.mjs" {2-9} -astroStudioCMS({ - defaultFrontEndConfig: { - injectDefaultFrontEndRoutes: true, - inject404Route: true, - htmlDefaultLanguage: 'en', - htmlDefaultHead: [], - layoutOverride: './src/layouts/customLayout.astro', - favicon: '/favicon.svg', - }, -}) -``` - -## `injectDefaultFrontEndRoutes` - -Inject Default Routes - Injects the default routes for the StudioCMS front-end - -* **Type:** `boolean` -* **Default:** `true` - -`injectDefaultFrontEndRoutes` Should the user facing frontend routes be injected into the `astroStudioCMS`. This is used to setup your front-end routes. - -## `inject404Route` - -Inject 404 Route - Injects a 404 route for handling unknown routes - -* **Type:** `boolean` -* **Default:** `true` - -`inject404Route` Should the `404` route be injected into the `astroStudioCMS`. This is used to setup your frontend `404` route. - -## `htmlDefaultLanguage` - -HTML Default Language - The default language for the HTML tag - -* **Type:** `string` -* **Default:** `'en'` - -`htmlDefaultLanguage` Used to set the `lang` attribute of your `` of the `astroStudioCMS` webpage. - -## `htmlDefaultHead` - -* **Type:** `Array` -* **Default:** `optional` - -HTML Default Header - The default head configuration for the Frontend - -### Usage - -```js title="astro.config.mjs" {2-4} -astroStudioCMS({ - htmlDefaultHead: [ - { tag: 'title', content: 'My Awesome Site' }, - { - tag: 'script', - attrs: { - defer: true, - src: 'https://umami.mydomain.dev/script.js', - 'data-website-id': 'my-umami-website-id', - } - } - ], -}) -``` - -## `layoutOverride` - -Layout Override - Allows override of the default layout file - -* **Type:** `string` -* **Default:** `optional` - -## `favicon` - -* **Type:** `string` -* **Default:** `/favicon.svg` - -Favicon is relative to the project public folder diff --git a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/image-service.md b/www/docs/src/content/docs/0.1.0-beta.5/config-reference/image-service.md deleted file mode 100644 index 48095295c..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/image-service.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: imageService -description: A reference page for Image Service -sidebar: - order: 3 -slug: 0.1.0-beta.5/config-reference/image-service ---- - -`imageService` is an object value that is used to determine how images should be rendered in the `astroStudioCMS`. This is used to setup your image data. - -## Usage - -```js title="astro.config.mjs" {2-11} -astroStudioCMS({ - imageService: { - useUnpic: false, - unpicConfig { - fallbackService: "unsplash", - placeholder: 'blurhash', - layout: 'constrained', - }, - astroImageServiceConfig: "squoosh", - cdnPlugin: "cloudinary", - }, -}), -``` - -### `useUnpic` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the `@unpic/astro` image optimization service for external images. - -### `unpicConfig` - -* **Type:** `unpicConfigSchema{} | undefined{}` -* **Default:** `undefined{}` - -Allows the user to customize the `@unpic/astro` image optimization service. - -#### `fallbackService` - -* **Type:** `'sharp' | 'squoosh' | undefined` -* **Default:** `undefined` - -Falls back to the value of `astroImageServiceConfig` if not set here. - -#### `placeholder` - -* **Type:** `'blurhash' | 'dominantColor' | 'lqlip' | undefined` -* **Default:** `'blurhash'` - -The default placeholder background to use for images. - -#### `layout` - -* **Type:** `'constrained' | 'fixed' | 'fullWidth' | undefined` -* **Default:** `'constrained'` - -The default layout to use for images. - -#### `cdnOptions` - -* **Type:** `cdnOptionsSchema{} | undefined{}` -* **Default:** `undefined{}` - -CDN-specific options for the `@unpic/astro` image optimization service. - -### `astroImageServiceConfig` - -* **Type:** `'sharp' | 'squoosh' | undefined` -* **Default:** `'squoosh'` - -If the `useUnpic` option is enabled, this option allows the user to choose between the `sharp` and `squoosh` image optimization services. - -### `cdnPlugin` - -* **Type:** `'cloudinary-js'| undefined` -* **Default:** `'cloudinary-js'` - -Allows the user to use a custom Supported CDN Plugin, so it can be specified here. diff --git a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/included-integrations.md b/www/docs/src/content/docs/0.1.0-beta.5/config-reference/included-integrations.md deleted file mode 100644 index 9538a7528..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/included-integrations.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: includedIntegrations -description: A reference page for includedIntegrations -sidebar: - order: 5 -slug: 0.1.0-beta.5/config-reference/included-integrations ---- - -`includedIntegrations` is an object that is used to determine which Astro Integrations should be included in the `astroStudioCMS`. Currently there are three Integrations that can be included: `useAstroRobots`, `astroRobotsConfig`, and `useInoxSitemap`. - -## Usage - -```js title="astro.config.mjs" {2-6} -astroStudioCMS({ - includedIntegrations: { - useAstroRobots: true, - astroRobotsConfig: {}, - useInoxSitemap: true, - }, -}), -``` - -### `useAstroRobots` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the StudioCMS Custom `astro-robots-txt` Integration. - -### `astroRobotsConfig` - -* **Type:** `RobotsConfig{} | undefined{}` - -Allows you to modify the default behaviour of the this Integration. For more information on this Integration please visit the [Astro Robots Integration](https://www.npmjs.com/package/astro-robots). - -### `useInoxSitemap` - -#### TEMPORARILY DISABLED - -If you would like to still use the Inox-tools Sitemap Plugin, you can manually add it to your project's Integrations. - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the Inox-tools Sitemap Plugin. For more information on this Integration please visit the [Inox-tools Sitemap Integration](https://inox-tools.vercel.app/sitemap-ext). diff --git a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/marked-config.md b/www/docs/src/content/docs/0.1.0-beta.5/config-reference/marked-config.md deleted file mode 100644 index cc438355c..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/marked-config.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: markedConfig -description: A reference page for markedConfig -sidebar: - order: 2 -slug: 0.1.0-beta.5/config-reference/marked-config ---- - -`markedConfig` is an object that is used to determine how content should be rendered in the `astroStudioCMS`. This is used to setup your content data. - -## Usage - -```js title="astro.config.mjs" {2-6} -astroStudioCMS({ - markedConfig: { - highlighterConfig: { - highlighter: "disabled", - }, - }, -}), -``` - -This property has the following options: - -### `includeExtensions` - -* **Type:** `markedExtensionsSchema{} | undefined{}` - -Allows you to enable or disable the included Marked Extensions, such as `marked-alert`, `marked-footnote`, `marked-smartypants`, and `marked-emoji`. - -#### `markedAlert` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-alert` extension. - -#### `markedFootnote` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-footnote` extension. - -#### `markedSmartyPants` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-smartypants` extension. - -#### `markedEmoji` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-emoji` extension. - -### `highlighterConfig` - -* **Type:** `markedHighlighterConfigSchema{} | undefined{}` - -This option allows you to choose the highlighter to use for code blocks in your content. - -#### `highlighter` - -* **Type:** `Enum<'shiki' | 'disabled'> | undefined` -* **Default:** `'disabled'` - -:::note -For the time being, the only available option is `shiki`. -::: - -#### `shikiConfig` - -* **Type:** `shikiConfigSchema{} | undefined{}` - -This option allows you to configure the a `shiki` highlighter. - -##### `theme` - -* **Type:** : `string | undefined` -* **Default:** `'houston'` - -Alows you to choose the theme for the `shiki` highlighter. - -The only available themes are the ones listed below: - -* `houston` -* `github-dark` -* `github-light` -* `night-owl` - -##### `loadThemes` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -Allows you to load additional Shiki Themes. This option is only used if you want to load *additional* Shiki Themes. - -For example if you want to load the `material-theme-palenight` theme, you would set the `loadTheme` option to `['material-theme-palenight']`. - -```ts -loadThemes: [ - import("shiki/themes/material-theme-palenight"), - ...asManyOtherThemesAsYouWant, -]; -``` - -##### `loadLang` - -* **Type:** `string[] | undefined` -* **Default:** `undefined` - -Allows you to load additional Shiki Languages. This option is only used if you want to load *additional* Shiki Languages. - -For example if you want to load `rust` and `toml` languages, you would set the `loadLang` option to `['rust', 'toml']`. - -```ts -loadLang: [import('shiki/languages/rust'), import('shiki/languages/toml') ...asManyOtherLanguagesAsYouWant] -``` - -### `loadMarkedExtensions` - -* **Type:** `string[] | undefined` -* **Default:** `undefined` - -Allows you to load additional Marked Extensions. This is only used if the user wants to load *additional* [Marked Extensions](https://marked.js.org/using_advanced#extensions). - -For example if you want to load Admonitions, you would need to install the `npm package`, import it in your config and then declare it. - -```ts -import markedAlert from "marked-alert"; - -loadMarkedExtensions: [markedAlert()]; -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/options-schema.md b/www/docs/src/content/docs/0.1.0-beta.5/config-reference/options-schema.md deleted file mode 100644 index 08659db8e..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/options-schema.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: StudioCMSOptionsSchema -description: Reference page for StudioCMSOptionsSchema -sidebar: - order: 1 -slug: 0.1.0-beta.5/config-reference/options-schema ---- - -StudioCMS Integration config options schema Reference - -## `dbStartPage` - -Project Initialization Page - Used during First time setup to create your database configuration. - -* **Type:** `boolean` -* **Default:** `true` - -`dbStartPage` Should the Start page be injected into the `astroStudioCMS`. This is used to setup your DB data. - -### Usage - -```js title="astro.config.mjs" {2} -studioCMS({ - dbStartPage: true, // DEFAULT - This injects a start page to setup your DB data. -}) -``` - -## `contentRenderer` - -The Markdown Content Renderer to use for rendering pages within StudioCMS - -* **Type:** `'marked'` | `'markdoc'` | `'astro'` -* **Default:** `'marked'` - -`contentRenderer` determines how Markdown content should be rendered in `astroStudioCMS`. This is used to setup your content data. The default value is `marked` but you can also use `markdoc` or `astro` which uses Astro's built-in Remark processor. - -### Usage - -```js title="astro.config.mjs" {2} - astroStudioCMS({ - contentRenderer: 'marked', - }) -``` - -## `markedConfig` - -`markedConfig` is an object that is used to determine how content should be rendered in the `astroStudioCMS`. This is used to setup your content data. - -### Usage - -[see `markedConfig` for full options](/0.1.0-beta.5/config-reference/marked-config) - -## `imageService` - -`imageService` lets you configure your which service you're using for Images. - -### Usage - -[see `imageService` for full options](/0.1.0-beta.5/config-reference/image-service) - -## `defaultFrontEndConfig` - -`defaultFrontEndConfig` Determines how the default Dashboard routes should be rendered in `astroStudioCMS`. This is used to setup your user facing front-end. - -### Usage - -[see `defaultFrontEndConfig` for full options](/0.1.0-beta.5/config-reference/default-frontend-config) - -## `dashboardConfig` - -`dashboardConfig` option lets you customize the dashboard for `astroStudioCMS`. This is used to setup your dashboard data. - -### Usage - -[see `dashboardConfig` for full options](/0.1.0-beta.5/config-reference/dashboard) - -## `includedIntegrations` - -`includedIntegrations` defines which Astro Integrations should be included in `astroStudioCMS`. Currently there are three Integrations that can be included: `useAstroRobots`, `astroRobotsConfig`, and `useInoxSitemap`. - -### Usage - -[see `includedIntegrations` for full options](/0.1.0-beta.5/config-reference/included-integrations) - -## `dateLocale` - -Date locale used for formatting dates - -* **Type:** `string` -* **Default:** `en-us` - -`dateLocale` specifies how dates should be formatted in `astroStudioCMS`. - -### Usage - -```js title="astro.config.mjs" {2} -astroStudioCMS({ - dateLocale: 'en-us', -}) -``` - -## `overrides` - -`overrides` Used to override the default configuration of the `astroStudioCMS`. - -### Usage - -[see `overrides` for full options](/0.1.0-beta.5/config-reference/overrides) - -## `verbose` - -* **Type:** `boolean| undefined` -* **Default:** `true` - -`verbose` enables verbose logging. - -### Usage - -```js title="astro.config.mjs" {2} -astroStudioCMS({ - verbose: true, // DEFAULT - This enables verbose logging in AstroStudioCMS. -}), -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/overrides.md b/www/docs/src/content/docs/0.1.0-beta.5/config-reference/overrides.md deleted file mode 100644 index 37d1aaa9f..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/config-reference/overrides.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: overrides -description: A reference page for overrides -sidebar: - order: 6 -slug: 0.1.0-beta.5/config-reference/overrides ---- - -`overrides` is an object that is used to override the default configuration of the `astroStudioCMS`. - -## Usage - -```js title="astro.config.mjs" {2-6} -astroStudioCMS({ - overrides: { - CustomImageOverride: "./src/components/MyCustomImage.astro", - FormattedDateOverride: "./src/components/MyCustomFormattedDate.astro", - }, -}), -``` - -### `CustomImageOverride` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -The path to a custom image component that will be used to render images in the `Astro-Studio-CMS`. - -### `FormattedDateOverride` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -The path to a custom formatted date component that will be used to render dates in the `Astro-Studio-CMS`. diff --git a/www/docs/src/content/docs/0.1.0-beta.5/how-it-works/index.mdx b/www/docs/src/content/docs/0.1.0-beta.5/how-it-works/index.mdx deleted file mode 100644 index 10a6c7299..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/how-it-works/index.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: How does it work!? -description: Learn how Astro StudioCMS helps you manage and deliver your content - by exploring a comprehensive breakdown of it's fundamental components. -slug: 0.1.0-beta.5/how-it-works ---- - -# Introduction - -StudioCMS is a powerful CMS built for Astro that allows you to manage and serve your content using [Astro Studio](https://studio.astro.build/). It's designed to be easy-to-use and flexible enough to handle any type of content. - -Extending StudioCMS is easy too! You can create your own plugins to add new features to StudioCMS. - -## How does it work? - -StudioCMS is divided into multiple parts: - -* **studiocms**: The primary integration that hooks into your Astro project and provides the ability to interact with Astro Studio (through the `@astrojs/db` integration). -* **@studiocms/core**: The core integration that provides the foundation for StudioCMS. It provides the database configurations, and adds various features including virtual imports, logging, etc. -* **@studiocms/auth**: An integration that provides authentication configuration options for the StudioCMS Dashboard. -* **@studiocms/assets**: An integration that provides the assets for the StudioCMS Dashboard. -* **@studiocms/frontend**: An integration that provides the frontend layouts and components for the StudioCMS ecosystem. -* **@studiocms/renderers**: An integration that provides the renderers for the StudioCMS ecosystem. -* **@studiocms/dashboard**: The primary web interface for managing your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content. -* **@studiocms/imagehandler**: An integration that provides a `` component to handle remote images and optimize them for your project in an SSR environment. -* **@studiocms/robotstxt**: An integration that automates the creation of a `robots.txt` file for your StudioCMS project. -* **@studiocms/betaresources**: An integration that provides resources for the StudioCMS beta. - -## Breakdown - -### StudioCMS Core - -StudioCMS Core is an Astro Integration which provides a comprehensive CMS solution out-of-the-box. This integration registers StudioCMS as the first plugin, sets up database configurations, watches for configuration changes, and adds various features including virtual imports, logging, and default frontend routes. - -#### Features - -* **@astrojs/db**: StudioCMS Core uses the `@astrojs/db` integration to connect to Astro Studio. -* **Virtual Imports**: StudioCMS Core adds several [virtual modules](https://vitejs.dev/guide/api-plugin#virtual-modules-convention) packed with features that give you full control over your dynamic content. -* **Logging**: StudioCMS Core logs all changes to Astro Studio. This can be enabled in your config file. -* **Default Frontend Routes**: The StudioCMS Core integration adds default frontend routes to your Astro project to allow for easy access to the StudioCMS dashboard. -* **Plugin System**: You can extend StudioCMS using plugins to add additional functionality. - -#### Core Virtual Modules - -:::tip -Modules prefixed with `virtual:` are virtual modules that are primarily used internally by StudioCMS, but can be used by developers to access StudioCMS data. To access these modules with proper typings, see the [project development `.d.ts` file](https://github.com/astrolicious/studiocms/blob/main/packages/studiocms_core/virtuals.d.ts) for an example of how to configure your project to sense these types. - -Modules without the `virtual:` prefix have full typings defined and injected into your project's `.astro/` directory automatically, and can be accessed directly without any extra configuration. -::: - -* **`virtual:studiocms/config`**: Provides the resolved configuration for the StudioCMS integration ecosystem. -* **`virtual:studiocms/version`**: Provides the current version of the StudioCMS integration ecosystem. -* **`virtual:studiocms/pluginSystem`**: Provides the plugin system interfaces during runtime for StudioCMS. -* **`virtual:studiocms/astromdremarkConfig`**: Provides the configuration for Astro Markdown support. -* **`studiocms:components`**: Provides the front-end exported components for StudioCMS. -* **`studiocms:helpers`**: Provides the front-end exported helper functions for StudioCMS. -* **`studiocms:helpers/contentHelper`**: Provides the exported content helper functions for StudioCMS. -* **`studiocms:helpers/headDefaults`**: Provides the exported head defaults for StudioCMS. -* **`studiocms:helpers/routemap`**: Provides the exported route map for StudioCMS. - -### StudioCMS: Dashboard - -The StudioCMS Dashboard is a web interface that allows you to manage your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content for your project. The StudioCMS Dashboard is built with [Astro](https://astro.build) and [DaisyUI](https://daisyui.com/) with [UnoCSS](https://unocss.dev). - -#### Tech Stack - -* **Dashboard**: The StudioCMS Dashboard provides a user-friendly interface for managing your AstroStudioCMS project. -* **UnoCSS**: The StudioCMS Dashboard uses UnoCSS for styling and theming. -* **DaisyUI**: The StudioCMS Dashboard uses DaisyUI for styling and theming. -* **AuthConfig**: The StudioCMS Dashboard provides authentication configuration options. -* **Astrolace**: The StudioCMS Dashboard is built using [Astrolace](https://github.com/matthiesenxyz/astrolace) a [Shoelace.style](https://shoelace.style) Astro Integration. -* **DashboardRouteOverride**: The StudioCMS Dashboard provides a dashboard route override configuration option. Allowing you to change the default route for the StudioCMS Dashboard and API. - -#### Dashboard Virtual Modules - -* **`studiocms:auth/config`**: Provides the authentication configuration for the dashboard. - -### StudioCMS: ImageHandler - -The StudioCMS ImageHandler is an integration that provides a custom image component for your Astro project. This component is used to handle remote images and optimize them in a SSR environment using [@unpic/astro](https://unpic.pics/img/astro/). - -#### Features - -* **``**: The StudioCMS ImageHandler provides a custom image component for your Astro project. - -#### ImageHandler Virtual Modules - -* **`studiocms:imageHandler/components`**: The Virtual module that provides the exported image components for the StudioCMS ImageHandler. diff --git a/www/docs/src/content/docs/0.1.0-beta.5/index.mdx b/www/docs/src/content/docs/0.1.0-beta.5/index.mdx deleted file mode 100644 index 6daa706d2..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/index.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Welcome to Astro StudioCMS -description: Get started building with Astro StudioCMS. -template: splash -banner: - content: | - We've renamed the package to studiocms 🎉 -hero: - tagline: A dedicated CMS for Astro Studio. Built from the ground up by the Astro - community. - image: - alt: Astro StudioCMS Logo - dark: ./studioCMS.png - light: ./studioCMS-dark.png - actions: - - text: Get started - link: /0.1.0-beta.5/start-here/getting-started - icon: right-arrow - variant: primary - - text: GitHub repository - link: https://github.com/astrolicious/studiocms - icon: github -slug: 0.1.0-beta.5 ---- - -import Youtube from '~/components/Youtube.astro' - - diff --git a/www/docs/src/content/docs/0.1.0-beta.5/plugins/studiocms-blog.mdx b/www/docs/src/content/docs/0.1.0-beta.5/plugins/studiocms-blog.mdx deleted file mode 100644 index 83365c87d..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/plugins/studiocms-blog.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "@studiocms/blog" -description: StudioCMS Blog Integration -slug: 0.1.0-beta.5/plugins/studiocms-blog ---- - -import { PackageManagers } from 'starlight-package-managers'; -import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; - -# Introduction - -#### Powered by [`astro-theme-provider`](https://github.com/astrolicious/astro-theme-provider) by [Bryce Russell](https://github.com/BryceRussell) - -This Astro integration enables the StudioCMS Blog feature in your Astro project. This integration will allow you to create, edit, and delete blog posts in the StudioCMS dashboard. - -## Installation - - - - - 1. Install the package and add to your astro config using the following command: - - - - 2. Update your config file as shown under [Example Config](#example-config) below. - - - - - - 1. Install the package using the following command: - - - - 2. Add `@studiocms/blog` to your astro config file: - - ```js title="astro.config.mjs" ins={3, 15-20} - import { defineConfig } from 'astro/config'; - import node from '@astrojs/node'; - import db from '@astrojs/db'; - import studioCMS from 'studiocms'; - import studioCMSBlog from '@studiocms/blog'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - studioCMSBlog({ - config: { - title: "My StudioCMS Blog", - description: "A Simple Blog build with Astro, AstroDB, and StudioCMS.". - }, - }), - ], - }); - ``` - - - - -## Usage - -### What does this integration do? - -This integration will add the following new routes to your StudioCMS Controlled front-end: - -* `/blog` - The main blog page that lists all blog posts. -* `/blog/[slug]` - The individual blog post page. -* `/rss.xml` - The RSS feed for your blog posts. - -### Example config - -```js title="astro.config.mjs" -import { defineConfig } from 'astro/config'; -import db from '@astrojs/db'; -import studioCMS from 'studiocms'; -import studioCMSBlog from '@studiocms/blog'; - -// https://astro.build/config -export default defineConfig({ - site: "https://example.com", - output: "server", - adapter: ... - integrations: [ - db(), // REQUIRED - `@astrojs/db` must be included in the integrations list - studioCMS(), // REQUIRED - StudioCMS must be included in the integrations list - studioCMSBlog({ - config: { - title: "My StudioCMS Blog", - description: "A Simple Blog build with Astro, Astrojs/DB, and StudioCMS.". - }, - }), - ], -}); -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.5/plugins/web-vitals.mdx b/www/docs/src/content/docs/0.1.0-beta.5/plugins/web-vitals.mdx deleted file mode 100644 index a2a047c98..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/plugins/web-vitals.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "@astrojs/web-vitals" -description: Web Vitals Integration with the StudioCMS Dashboard -slug: 0.1.0-beta.5/plugins/web-vitals ---- - -import { PackageManagers } from 'starlight-package-managers'; -import Gallery from '~/components/Gallery.astro'; -import { webVitalsImages } from "../../../../assets/index.ts"; -import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; - -# Introduction - -This Astro integration enables tracking real-world website performance and storing the data in Astro DB. That data will be used in the StudioCMS dashboard to show the performance metrics of your website from the real world over time. - -## Installation - - - - - 1. Install the package and add to your astro config using the following command: - - - - 2. Push the new configuration to your remote database: - - - - - - - - 1. Install the package using the following command: - - - - 2. Add `@astrojs/web-vitals` to your astro config file: - - ```js title="astro.config.mjs" ins={3, 12} - import node from '@astrojs/node'; - import studioCMS from 'studiocms'; - import webVitals from '@astrojs/web-vitals'; - import { defineConfig } from 'astro/config'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - webVitals(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - ], - }); - ``` - - - - 3. Push the new configuration to your remote database: - - - - - - -## Gallery Demo - - diff --git a/www/docs/src/content/docs/0.1.0-beta.5/start-here/configuration.md b/www/docs/src/content/docs/0.1.0-beta.5/start-here/configuration.md deleted file mode 100644 index 3f4338c54..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/start-here/configuration.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: StudioCMS Config -description: Options for how to define the StudioCMS Config -slug: 0.1.0-beta.5/start-here/configuration ---- - -# Available Options - -There are two ways to configure the StudioCMS Integration, below are examples of how to configure based on if you choose to use the `astro.config.mjs` or the dedicated `studiocms.config.mjs` file. - -## Using the `astro.config.mjs` file: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from 'studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: false, - ...OtherConfigOptions - }), - ], -}); -``` - -## Using the `studiocms.config.mjs` file: - -This file will be automatically picked up and will overwrite any options passed in your astro.config, if you choose to use this option, Please ensure to move all StudioCMS Config options into this file instead like below: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from 'studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ db(), studioCMS() ], -}); -``` - -```js title="studiocms.config.mjs" -import { defineStudioCMSConfig } from "studiocms"; - -export default defineStudioCMSConfig({ - dbStartPage: false, - ...OtherConfigoptions -}) -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.5/start-here/environment-variables.md b/www/docs/src/content/docs/0.1.0-beta.5/start-here/environment-variables.md deleted file mode 100644 index a76cb9d9d..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/start-here/environment-variables.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Environment Variables -description: A brief overview of the environment variables used in Astro StudioCMS. -slug: 0.1.0-beta.5/start-here/environment-variables ---- - -For Astro StudioCMS to work correctly, you must set up the correct environment variables. These variables are essential for establishing a secure connection to Astro DB and authenticating with the Astro StudioCMS API. Without correctly configuring these environment variables, the application will not function as intended. - -You can create a `.env` file in the root directory of your project and add the required environment variables. The `.env` file is a text file that contains key-value pairs of environment variables. The environment variables are read by the application at runtime. - -For future reference on how to work with environment variables within Astro you can checkout [Environment Variables](https://docs.astro.build/guides/environment-variables) from the Astro documentation. - -:::note -StudioCMS makes use of Astro's new Experimental [`astro:env`](https://docs.astro.build/en/reference/configuration-reference/#experimentalenv) for handling all of its Environment Variables. If you face any issues with environment variables please submit an [issue on Github](https://github.com/astrolicious/studiocms/issues/new/choose) -::: - -## Required Environment Variables - -`ASTRO_STUDIO_APP_TOKEN` is required to connect to the database. - -```bash title=".env" -ASTRO_STUDIO_APP_TOKEN=your_app_token -``` - -## Authentication Environment Variables - -Currently there are 5 ways to authenticate with Astro StudioCMS: - -:::tip -Use `http://localhost:4321` for local development and testing callback urls, and `https://your-domain.tld` for your callback urls in production! -::: - -### GitHub - -To authenticate with GitHub, you need to add the following environment variables to your `.env` file: - -```bash title=".env" -# credentials for GitHub OAuth -# Callback URL for github (NOT AN ENV VARIABLE): 'http://localhost:4321/dashboard/login/github/callback' -CMS_GITHUB_CLIENT_ID=your_client_id -CMS_GITHUB_CLIENT_SECRET=your_client_secret -``` - -### Discord - -```bash title=".env" -# credentials for Discord OAuth -CMS_DISCORD_CLIENT_ID= -CMS_DISCORD_CLIENT_SECRET= -CMS_DISCORD_REDIRECT_URI=http://localhost:4321/dashboard/login/discord/callback -``` - -### Google - -```bash title=".env" -# credentials for Google OAuth -CMS_GOOGLE_CLIENT_ID= -CMS_GOOGLE_CLIENT_SECRET= -CMS_GOOGLE_REDIRECT_URI=http://localhost:4321/dashboard/login/google/callback -``` - -### Auth0 - -```bash title=".env" -# credentials for auth0 OAuth -CMS_AUTH0_CLIENT_ID= -CMS_AUTH0_CLIENT_SECRET= -CMS_AUTH0_DOMAIN= -CMS_AUTH0_REDIRECT_URI=http://localhost:4321/dashboard/login/auth0/callback -``` - -### Username and Password - -Alternatively, you can authenticate with Astro StudioCMS using your username and password which doesn't require any additional environment variables. - -:::note -When Username and Password authentication is enabled you can modify its configuration and level of security using the generated `studiocms-auth.config.json` file. -::: - -## Image Handler Environment Variables - -### Cloudinary (Optional) - -If you choose to use the built-in Cloudinary plugin, you will need to define the following: - -```bash title=".env" -## Cloudinary Javascript SDK -CMS_CLOUDINARY_CLOUDNAME="demo" -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.5/start-here/gallery.mdx b/www/docs/src/content/docs/0.1.0-beta.5/start-here/gallery.mdx deleted file mode 100644 index dc9df1e2d..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/start-here/gallery.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Gallery -description: A small gallery of images to show off the Astro-Studio-CMS -tableOfContents: false -slug: 0.1.0-beta.5/start-here/gallery ---- - -import Gallery from '~/components/Gallery.astro' -import { mainDemoGalleryImages } from "~/assets/index.ts" - -This is a small gallery of images to show off the `Astro StudioCMS` integration. - - diff --git a/www/docs/src/content/docs/0.1.0-beta.5/start-here/getting-started.mdx b/www/docs/src/content/docs/0.1.0-beta.5/start-here/getting-started.mdx deleted file mode 100644 index 9150adb79..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/start-here/getting-started.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: Getting Started with Astro StudioCMS -description: Get started building with Astro StudioCMS. -banner: - content: | - We've renamed the package to studiocms 🎉 -slug: 0.1.0-beta.5/start-here/getting-started ---- - -import { PackageManagers } from 'starlight-package-managers'; - -## Let's get started - -To start using Astro StudioCMS, you'll need: - -* An Astro project -* An Astro Studio account -* An Astro Studio project -* The Astro StudioCMS integration - -## Creating an Astro Studio account - -:::note -Astro Studio is currently in closed beta. You'll need an invite to create an account. - -We're following Astro Studio's News and Updates for the latest information on when the platform will be available to the public again and will be informing everyone through our [Discord channel](https://chat.astro-studiocms.xyz) when signups for Astro Studio are open again. There is also an open [PR for `@astrojs/db`](https://github.com/withastro/astro/pull/11385) that would allow you to use the Astro StudioCMS integration without the need for Astro Studio by using another LibSQL database service or even self-hosted. -::: - -You can create an Astro Studio account by visiting [Astro Studio](https://studio.astro.build/). - -Once created, you'll be able to access the Astro Studio dashboard and manage your projects. - -## Creating a new Studio project - -There are two ways to create a project in Astro Studio: - -To get started go to your personal dashboard within Studio and click the "Start a Project" button and follow the instructions. Astro Studio will connect to your GitHub repository and create a new hosted database for your project. - -**Use the Astro Studio CLI** to create from any local Astro project. You can run the following commands to get started: - - - - - - - -Once you are logged in and linked successfully, you can run all Astro DB commands to manage your remote database. - -:::note -See [the Astro DB CLI reference](https://docs.astro.build/en/guides/integrations-guide/db/#astro-db-cli-reference) for all available commands. -::: - -## Creating a new Astro project - -To create a new Astro project, simply run the following command in your terminal: - - - -After running the command, you'll be prompted to answer a few questions about your project. Once completed, the CLI will create a new Astro project in the specified directory. - -If all goes well, you should see a “Liftoff confirmed. Explore your project!” message followed by some recommended next steps. - -`cd` into your new project directory to begin using Astro. `cd my-project` - -If you skipped the npm install step during the CLI wizard, then be sure to install your dependencies before continuing. - -## Adding the Astro StudioCMS integration - -To add the Astro StudioCMS integration to your project, you'll need to install the Astro StudioCMS package and it's dependencies: - - - -After installing the package, make sure that your `astro.config.mjs` file is correctly importing and calling the integration: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from 'studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - ], -}); -``` - -:::note -Astro StudioCMS requires SSR mode to work correctly. Make sure to set `output: 'server'` and an adapter that supports SSR in your `astro.config.mjs` file. -::: - -## Configure your `package.json` scripts - -Setup your `package.json` scripts to include the `--remote` flag for build, and optionally for dev. (You can also run the dev command as shown in the ["Running your StudioCMS Project"](#running-your-studiocms-project) section) - -```json title="package.json" -{ - "name": "my-studiocms-project", - "scripts": { - "dev": "astro dev --remote", - "build": "astro check & astro build --remote", - "astro": "astro" - } -} -``` - -## Running your StudioCMS project - -Thanks to the power of Astro running StudioCMS is as easy as running the dev command for local preview, or building and deploying to your server, for the basics of how to use it locally without building here is what you need to do. - -### First time Setup (or during updates if the tables schema is updated) - -To start your Astro project, run the following commands in your terminal: - - - - - - - -After running the commands, you should see a message indicating that your project is running at `localhost:4321`. When first setting up StudioCMS, you will prompted to finish configuring StudioCMS at http://localhost:4321/start - -### Running in Astro Development mode locally - -To start your Astro project, run the following command in your terminal: - - - -After running the command, you should see a message indicating that your project is running at `localhost:4321`. Open your browser and navigate to `http://localhost:4321` to see your Astro project in action. - -**Congratulations!** 🥳 You now have Astro StudioCMS installed in your Astro project. - -## Next steps - -Now that you have Astro StudioCMS installed, you can start building your project with Astro StudioCMS. - -Check out how to set environment variables in Astro StudioCMS by heading to [Environment Variables](/0.1.0-beta.5/start-here/environment-variables). - -To learn more about the API and how to use Astro StudioCMS, check out the [Astro StudioCMS Reference](/0.1.0-beta.5/typedoc/studiocms-core/index/functions/studiocmscoreintegration/). - -You can also learn more about themes and how to author them by using [Astro Theme Provider](https://astro-theme-provider.netlify.app/). diff --git a/www/docs/src/content/docs/0.1.0-beta.5/start-here/why-studioCMS.mdx b/www/docs/src/content/docs/0.1.0-beta.5/start-here/why-studioCMS.mdx deleted file mode 100644 index 5cbeed025..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.5/start-here/why-studioCMS.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Why Astro StudioCMS? -description: Astro StudioCMS is an alternative to traditional CMS platforms. It - is a headless CMS that relies on Astro Studio and Astro Framework to deliver a - seamless content management experience. -slug: 0.1.0-beta.5/start-here/why-studiocms ---- - -We're so excited to introduce AstroStudio CMS - a dedicated content management system (CMS) built on top of Astro's latest product: [Astro Studio](https://studio.astro.build). This project was developed by [Adam](https://github.com/Adammatthiesen), [Dreyfus](https://github.com/dreyfus92), and [Jumper](https://github.com/jdtjenkins), three passionate members of the Astro community. - -## Why another CMS? - -While Astro's content capabilities are powerful, we recognized a need for a more streamlined and user-friendly CMS solution within the Astro ecosystem. Many Astro users, especially those coming from more traditional CMS backgrounds, have expressed a desire for a dedicated CMS that can seamlessly integrate with Astro projects. - -AstroStudio CMS was born out of this need, providing a content management platform that is tailor-made for Astro. By building on top of Astro Studio, we're able to offer a CMS experience that feels native to the Astro workflow, making it easier for both developers and content creators to collaborate on Astro-powered projects. - -## An Experimental Endeavor - -It's important to note that AstroStudio CMS is an experimental project that heavily relies on the [@astrojs/db package](https://github.com/withastro/astro/tree/main/packages/db), which is currently in active development and not yet considered stable. As a result, you should expect a significant number of breaking changes as the project continues to evolve. - -We believe that by building on the cutting-edge features of Astro Studio, we can create a powerful and innovative CMS solution. However, this also means that AstroStudio CMS may not be suitable for mission-critical or production-ready projects at this stage. We encourage you to use caution and thoroughly test the CMS in your own projects before deploying it to a live environment. - -## Key Features - -* **Part of Astrolicious:** Astrolicious leverages Astro's robust and efficient framework, providing a solid base for building and scaling applications. - -* **Realtime Markdown Editor:** Astro StudioCMS has a real-time Markdown editor so you can create your content using powerful Markdown syntax and see changes reflected in real-time! - -* **Enhanced Markdown:** We've incorporated 'Marked' with support for extensions, enriching the markdown experience with greater flexibility and functionality. - -* **Shiki Syntax Highlighting:** Astrolicious offers Shiki-powered syntax highlighting, ensuring your code is both visually appealing and easy to read. This is especially useful in non-Cloudflare environments due to bundle size considerations. - -* **Markdoc Integration:** In addition to 'Marked', Astro StudioCMS provides an alternative with Markdoc, offering users a choice for their markdown processing needs. - -* **Secure Studio Database:** All data is securely housed within the Astro Studio database, ensuring access only to authorized users with `studio.astro.build` login credentials. - -* **Built-in Authentication:** Astro StudioCMS features built-in authentication with support for multiple platforms, including Local and Github, enhancing security and user management (currently in development). - -* **Unpic Image Service:** Astro StudioCMS includes a free and efficient image service, Unpic, which makes managing external URLs straightforward, with support for major CDNs. diff --git a/www/docs/src/content/docs/0.1.0-beta.5/studioCMS-dark.png b/www/docs/src/content/docs/0.1.0-beta.5/studioCMS-dark.png deleted file mode 100644 index 7c78e0310..000000000 Binary files a/www/docs/src/content/docs/0.1.0-beta.5/studioCMS-dark.png and /dev/null differ diff --git a/www/docs/src/content/docs/0.1.0-beta.5/studioCMS.png b/www/docs/src/content/docs/0.1.0-beta.5/studioCMS.png deleted file mode 100644 index 4a7eb8b42..000000000 Binary files a/www/docs/src/content/docs/0.1.0-beta.5/studioCMS.png and /dev/null differ diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/dashboard.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/dashboard.mdx deleted file mode 100644 index 24cc3dc73..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/dashboard.mdx +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: dashboardConfig -description: A reference page for dashboard -sidebar: - order: 5 -slug: 0.1.0-beta.6/config-reference/dashboard ---- - -`dashboardConfig` option aloows you to customize the dashboard for the `studioCMS`. This is used to setup your dashboard data. - -## Usage - -```js title="astro.config.mjs" {2-24} -studioCMS({ - dashboardConfig: { - dashboardEnabled: true, - faviconURL: "/favicon.ico", - dashboardRouteOverride: "/components/dashboard", - AuthConfig: { - providers: { - github: true, - usernameAndPassword: true - }, - enabled: true - }, - UnoCSSConfigOverride: { - injectReset: true, - injectEntry: true, - presetsConfig: { - presetDaisyUI: { - themes: ['dark', 'light'], - lightTheme: ['light'], - darkTheme: ['dark'], - } - } - } - }, // DEFAULT - This injects a dashboard to setup your dashboard data. -}) -``` - -### `dashboardEnabled` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows enabling or disabling of the Astro StudioCMS dashboard but still provide all the helpers and utilities to those who are customizing their setup. By disabling it will disable the dashboard and you will need to manage your content via the Astro Studio Dashboard at [Astro Studio](http://studio.astro.build) or with whatever access your libSQL server provides. - -### `faviconURL` - -* **Type:** `string | undefined` -* **Default:** `'/favicon.ico'` - -Allows the user to override the default Favicon URL to a custom URL. - -### `dashboardRouteOverride` - -* **Type:** `string | undefined` - -Allows the user to override the default dashboard route to a custom route. - -### `AuthConfig` - -* **Type:** `AuthConfigSchema{} | undefined{}` -* **Default:** `undefined{}` - -Allows customization of the Authentication Configuration. - -#### `providers` - -* **Type:** `authProviderSchema{} | undefined{}` - -Allows enabling or disabling of the Authentication Providers. - -##### `github` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows enabling or disabling of the Github Authentication Provider. - -##### `usernameAndPassword` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows enabling or disabling of the Username and Password Authentication Provider. - -#### `enabled` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows enabling or disabling of the Authentication Configuration. - -### `UnoCSSConfigOverride` - -* **Type:** `unocssConfigSchema{} | undefined{}` - -Allows customization of the UnoCSS Configuration. - -#### `injectReset` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable or disable the UnoCSS Default Reset import. - -#### `injectEntry` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable or disable the UnoCSS Default Entry import. - -#### `presetsConfig` - -* **Type:** `unocssPresetsSchema{} | undefined{}` - -Allows the user to modify the included UnoCSS Presets. - -##### `presetDaisyUI` - -* **Type:** `unocssDaisyUISchema{} | undefined{}` - -Allows the user to enable or disable the UnoCSS DaisyUI Preset. - -###### `themes` - -* **Type:** `Array | undefined` -* **Default:** `['dark', 'light']` - -Allows the user to use any of the available DaisyUI themes. - -###### `lightTheme` - -* **Type:** `string | undefined` -* **Default:** `'light'` - -Allows the user to set the default light theme. - -###### `darkTheme` - -* **Type:** `string | undefined` -* **Default:** `'dark'` - -Allows the user to set the default dark theme. - -### `developerConfig` - -* **Type:** `developerConfigSchema{} | undefined{}` - -Developer Options/Configuration. - -#### `viewTransitionsAPI` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Allows the user to enable Astro's ZeroJS View Transition API for the Studio CMS Dashboard. - -#### `testingAndDemoMode` - -* **Type:** `boolean | undefined` -* **Default:** `false` - -Enables Testing and Demo Mode diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/default-frontend-config.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/default-frontend-config.mdx deleted file mode 100644 index 44cb72020..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/default-frontend-config.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: defaultFrontEndConfig -description: A reference page for defaultFrontEndConfig -sidebar: - order: 4 -slug: 0.1.0-beta.6/config-reference/default-frontend-config ---- - -`defaultFrontEndConfig` is an object that is used to determine how the default dashboard routes should be rendered in `studioCMS`. This is used to setup your user-facing front-end. - -## Usage - -```js title="astro.config.mjs" {2-9} -studioCMS({ - defaultFrontEndConfig: { - injectDefaultFrontEndRoutes: true, - inject404Route: true, - htmlDefaultLanguage: 'en', - htmlDefaultHead: [], - layoutOverride: './src/layouts/customLayout.astro', - favicon: '/favicon.svg', - }, -}) -``` - -## `injectDefaultFrontEndRoutes` - -Inject Default Routes - Injects the default routes for the StudioCMS front-end - -* **Type:** `boolean` -* **Default:** `true` - -`injectDefaultFrontEndRoutes` Should the user facing frontend routes be injected into the `studioCMS`. This is used to setup your front-end routes. - -## `inject404Route` - -Inject 404 Route - Injects a 404 route for handling unknown routes - -* **Type:** `boolean` -* **Default:** `true` - -`inject404Route` Should the `404` route be injected into the `studioCMS`. This is used to setup your frontend `404` route. - -## `htmlDefaultLanguage` - -HTML Default Language - The default language for the HTML tag - -* **Type:** `string` -* **Default:** `'en'` - -`htmlDefaultLanguage` Used to set the `lang` attribute of your `` of the `studioCMS` webpage. - -## `htmlDefaultHead` - -* **Type:** `Array` -* **Default:** `optional` - -HTML Default Header - The default head configuration for the Frontend - -### Usage - -```js title="astro.config.mjs" {2-4} -studioCMS({ - htmlDefaultHead: [ - { tag: 'title', content: 'My Awesome Site' }, - { - tag: 'script', - attrs: { - defer: true, - src: 'https://umami.mydomain.dev/script.js', - 'data-website-id': 'my-umami-website-id', - } - } - ], -}) -``` - -## `layoutOverride` - -Layout Override - Allows override of the default layout file - -* **Type:** `string` -* **Default:** `optional` - -## `favicon` - -* **Type:** `string` -* **Default:** `/favicon.svg` - -Favicon is relative to the project public folder diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/image-service.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/image-service.mdx deleted file mode 100644 index 732aa7881..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/image-service.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: imageService -description: A reference page for Image Service -sidebar: - order: 3 -slug: 0.1.0-beta.6/config-reference/image-service ---- - -`imageService` is an object value that is used to determine how images should be rendered in the `studioCMS`. This is used to setup your image data. - -## Usage - -```js title="astro.config.mjs" {2-11} -studioCMS({ - imageService: { - useUnpic: false, - unpicConfig { - fallbackService: "unsplash", - placeholder: 'blurhash', - layout: 'constrained', - }, - astroImageServiceConfig: "squoosh", - cdnPlugin: "cloudinary", - }, -}), -``` - -### `useUnpic` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the `@unpic/astro` image optimization service for external images. - -### `unpicConfig` - -* **Type:** `unpicConfigSchema{} | undefined{}` -* **Default:** `undefined{}` - -Allows the user to customize the `@unpic/astro` image optimization service. - -#### `fallbackService` - -* **Type:** `'sharp' | undefined` -* **Default:** `undefined` - -Falls back to the value of `astroImageServiceConfig` if not set here. - -#### `placeholder` - -* **Type:** `'blurhash' | 'dominantColor' | 'lqlip' | undefined` -* **Default:** `'blurhash'` - -The default placeholder background to use for images. - -#### `layout` - -* **Type:** `'constrained' | 'fixed' | 'fullWidth' | undefined` -* **Default:** `'constrained'` - -The default layout to use for images. - -#### `cdnOptions` - -* **Type:** `cdnOptionsSchema{} | undefined{}` -* **Default:** `undefined{}` - -CDN-specific options for the `@unpic/astro` image optimization service. - -### `astroImageServiceConfig` - -* **Type:** `'sharp' | undefined` -* **Default:** `'sharp'` - -If the `useUnpic` option is enabled, this option allows the user to choose between the `sharp` image optimization services. - -### `cdnPlugin` - -* **Type:** `'cloudinary-js'| undefined` -* **Default:** `'cloudinary-js'` - -Allows the user to use a custom Supported CDN Plugin, so it can be specified here. diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/included-integrations.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/included-integrations.mdx deleted file mode 100644 index 6d58fe774..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/included-integrations.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: includedIntegrations -description: A reference page for includedIntegrations -sidebar: - order: 6 -slug: 0.1.0-beta.6/config-reference/included-integrations ---- - -`includedIntegrations` is an object that is used to determine which Astro Integrations should be included in the `studioCMS`. Currently there are three Integrations that can be included: `useAstroRobots`, `astroRobotsConfig`, and `useInoxSitemap`. - -## Usage - -```js title="astro.config.mjs" {2-6} -studioCMS({ - includedIntegrations: { - useAstroRobots: true, - astroRobotsConfig: {}, - useInoxSitemap: true, - }, -}), -``` - -### `useAstroRobots` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the StudioCMS Custom `astro-robots-txt` Integration. - -### `astroRobotsConfig` - -* **Type:** `RobotsConfig{} | undefined{}` - -Allows you to modify the default behaviour of the this Integration. For more information on this Integration please visit the [Astro Robots Integration](https://www.npmjs.com/package/astro-robots). - -### `useInoxSitemap` - -#### TEMPORARILY DISABLED - -If you would like to still use the Inox-tools Sitemap Plugin, you can manually add it to your project's Integrations. - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows the user to enable/disable the use of the Inox-tools Sitemap Plugin. For more information on this Integration please visit the [Inox-tools Sitemap Integration](https://inox-tools.vercel.app/sitemap-ext). diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/markdoc-config.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/markdoc-config.mdx deleted file mode 100644 index 285d4544a..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/markdoc-config.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: markdocConfig -description: A reference page for markdocConfig -sidebar: - order: 2.2 -slug: 0.1.0-beta.6/config-reference/markdoc-config ---- - -import ReadMore from '~/components/ReadMore.astro'; - -`markdocConfig` is an object that is used to determine how content should be rendered in `studiocms` while using the MarkDoc renderer. - -## Usage - -```js title="astro.config.mjs" {3-7} -studioCMS({ - rendererConfig: { - markdocConfig: { - renderType: 'html', - argParse: {}, - transformConfig: {} - }, - } -}), -``` - -This property has the following options: - -### `renderType` - -* **Type:** `'html' | 'react-static' | markdocRenderer` - -The MarkDoc content renderer type to use for rendering pages and posts can be `html`, `react-static` or a custom markdocRenderer. - -### `argParse` - -* **Type:** `markdocParserArgs | undefined` - -The MarkDoc arguments to be used when parsing MarkDoc content - -### `transformConfig` - -* **Type:** `markdocTransformConfig | undefined` - -The MarkDoc Transform configuration to use when parsing and transforming MarkDoc content - -See the [MarkDoc Documentation](https://markdoc.dev/docs/config) for more information diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/marked-config.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/marked-config.mdx deleted file mode 100644 index 069e4e6c3..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/marked-config.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: markedConfig -description: A reference page for markedConfig -sidebar: - order: 2.1 -slug: 0.1.0-beta.6/config-reference/marked-config ---- - -`markedConfig` is an object that is used to determine how content should be rendered in the `studioCMS`. This is used to setup your content data. - -## Usage - -```js title="astro.config.mjs" {3-7} -studioCMS({ - rendererConfig: { - markedConfig: { - highlighterConfig: { - highlighter: "disabled", - }, - }, - } -}), -``` - -This property has the following options: - -### `includeExtensions` - -* **Type:** `markedExtensionsSchema{} | undefined{}` - -Allows you to enable or disable the included Marked Extensions, such as `marked-alert`, `marked-footnote`, `marked-smartypants`, and `marked-emoji`. - -#### `markedAlert` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-alert` extension. - -#### `markedFootnote` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-footnote` extension. - -#### `markedSmartyPants` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-smartypants` extension. - -#### `markedEmoji` - -* **Type:** `boolean | undefined` -* **Default:** `true` - -Allows you to enable/disable the use of the `marked-emoji` extension. - -### `highlighterConfig` - -* **Type:** `markedHighlighterConfigSchema{} | undefined{}` - -This option allows you to choose the highlighter to use for code blocks in your content. - -#### `highlighter` - -* **Type:** `Enum<'shiki' | 'disabled'> | undefined` -* **Default:** `'disabled'` - -:::note -For the time being, the only available option is `shiki`. -::: - -#### `shikiConfig` - -* **Type:** `shikiConfigSchema{} | undefined{}` - -This option allows you to configure the a `shiki` highlighter. - -##### `theme` - -* **Type:** : `string | undefined` -* **Default:** `'houston'` - -Alows you to choose the theme for the `shiki` highlighter. - -The only available themes are the ones listed below: - -* `houston` -* `github-dark` -* `github-light` -* `night-owl` - -##### `loadThemes` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -Allows you to load additional Shiki Themes. This option is only used if you want to load *additional* Shiki Themes. - -For example if you want to load the `material-theme-palenight` theme, you would set the `loadTheme` option to `['material-theme-palenight']`. - -```ts -loadThemes: [ - import("shiki/themes/material-theme-palenight"), - ...asManyOtherThemesAsYouWant, -]; -``` - -##### `loadLang` - -* **Type:** `string[] | undefined` -* **Default:** `undefined` - -Allows you to load additional Shiki Languages. This option is only used if you want to load *additional* Shiki Languages. - -For example if you want to load `rust` and `toml` languages, you would set the `loadLang` option to `['rust', 'toml']`. - -```ts -loadLang: [import('shiki/languages/rust'), import('shiki/languages/toml') ...asManyOtherLanguagesAsYouWant] -``` - -### `loadMarkedExtensions` - -* **Type:** `string[] | undefined` -* **Default:** `undefined` - -Allows you to load additional Marked Extensions. This is only used if the user wants to load *additional* [Marked Extensions](https://marked.js.org/using_advanced#extensions). - -For example if you want to load Admonitions, you would need to install the `npm package`, import it in your config and then declare it. - -```ts -import markedAlert from "marked-alert"; - -loadMarkedExtensions: [markedAlert()]; -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/mdx-config.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/mdx-config.mdx deleted file mode 100644 index 8030350e7..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/mdx-config.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: mdxConfig -description: A reference page for mdxConfig -sidebar: - order: 2.3 -slug: 0.1.0-beta.6/config-reference/mdx-config ---- - -import ReadMore from '~/components/ReadMore.astro'; - -`mdxConfig` is an object that is used to determine how content should be rendered in `studiocms` while using the MDX renderer. - -## Usage - -```js title="astro.config.mjs" {3-8} -studioCMS({ - rendererConfig: { - mdxConfig: { - remarkPlugins: [], - rehypePlugins: [], - recmaPlugins: [], - remarkRehypeOptions: {}, - }, - } -}), -``` - -This property has the following options: - -### `remarkPlugins` - -* **Type:** `PluggableList | undefined` - -Allows the user to add compatible MDX remarkPlugins - -### `rehypePlugins` - -* **Type:** `PluggableList | undefined` - -Allows the user to add compatible MDX rehypePlugins - -### `recmaPlugins` - -* **Type:** `PluggableList | undefined` - -Allows the user to add recma plugins. This is a new ecosystem, currently in beta, to transform esast trees (JavaScript) - -### `remarkRehypeOptions` - -* **Type:** `RemarkRehypeOptions | undefined` - -Options to pass through to remark-rehype (optional); the option `allowDangerousHtml` will always be set to `true` and the MDX nodes are passed through; In particular, you might want to pass configuration for footnotes if your content is not in English. - -For more information about configuring MDX see the [MDX Docs](https://mdxjs.com/docs/) diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/options-schema.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/options-schema.mdx deleted file mode 100644 index 615534819..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/options-schema.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: StudioCMSOptionsSchema -description: Reference page for StudioCMSOptionsSchema -sidebar: - order: 1 -slug: 0.1.0-beta.6/config-reference/options-schema ---- - -import ReadMore from '~/components/ReadMore.astro'; - -StudioCMS Integration config options schema Reference - -## `dbStartPage` - -Project Initialization Page - Used during First time setup to create your database configuration. - -* **Type:** `boolean` -* **Default:** `true` - -`dbStartPage` Should the Start page be injected into the `studioCMS`. This is used to setup your DB data. - -### Usage - -```js title="astro.config.mjs" {2} -studioCMS({ - dbStartPage: true, // DEFAULT - This injects a start page to setup your DB data. -}) -``` - -## `rendererConfig` - -`rendererConfig` is an object that is used to determine how content should be rendered in `studiocms`. - -### Usage - -[See `rendererConfig` for full options](/0.1.0-beta.6/config-reference/renderer-config) - -## `imageService` - -`imageService` lets you configure your which service you're using for Images. - -### Usage - -[See `imageService` for full options](/0.1.0-beta.6/config-reference/image-service) - -## `defaultFrontEndConfig` - -`defaultFrontEndConfig` Determines how the default Dashboard routes should be rendered in `studioCMS`. This is used to setup your user facing front-end. - -### Usage - -[See `defaultFrontEndConfig` for full options](/0.1.0-beta.6/config-reference/default-frontend-config) - -## `dashboardConfig` - -`dashboardConfig` option lets you customize the dashboard for `studioCMS`. This is used to setup your dashboard data. - -### Usage - -[See `dashboardConfig` for full options](/0.1.0-beta.6/config-reference/dashboard) - -## `includedIntegrations` - -`includedIntegrations` defines which Astro Integrations should be included in `studioCMS`. Currently there are three Integrations that can be included: `useAstroRobots`, `astroRobotsConfig`, and `useInoxSitemap`. - -### Usage - -[See `includedIntegrations` for full options](/0.1.0-beta.6/config-reference/included-integrations) - -## `dateLocale` - -Date locale used for formatting dates - -* **Type:** `string` -* **Default:** `en-us` - -`dateLocale` specifies how dates should be formatted in `studioCMS`. - -### Usage - -```js title="astro.config.mjs" {2} -studioCMS({ - dateLocale: 'en-us', -}) -``` - -## `overrides` - -`overrides` Used to override the default configuration of the `studioCMS`. - -### Usage - -[See `overrides` for full options](/0.1.0-beta.6/config-reference/overrides) - -## `verbose` - -* **Type:** `boolean| undefined` -* **Default:** `true` - -`verbose` enables verbose logging. - -### Usage - -```js title="astro.config.mjs" {2} -studioCMS({ - verbose: true, // DEFAULT - This enables verbose logging in studioCMS. -}), -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/overrides.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/overrides.mdx deleted file mode 100644 index 2fd30f9bc..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/overrides.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: overrides -description: A reference page for overrides -sidebar: - order: 7 -slug: 0.1.0-beta.6/config-reference/overrides ---- - -`overrides` is an object that is used to override the default configuration of the `studioCMS`. - -## Usage - -```js title="astro.config.mjs" {2-6} -studioCMS({ - overrides: { - CustomImageOverride: "./src/components/MyCustomImage.astro", - FormattedDateOverride: "./src/components/MyCustomFormattedDate.astro", - }, -}), -``` - -### `CustomImageOverride` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -The path to a custom image component that will be used to render images in the `studioCMS`. - -### `FormattedDateOverride` - -* **Type:** `string | undefined` -* **Default:** `undefined` - -The path to a custom formatted date component that will be used to render dates in the `studioCMS`. diff --git a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/renderer-config.mdx b/www/docs/src/content/docs/0.1.0-beta.6/config-reference/renderer-config.mdx deleted file mode 100644 index 0b73fd2ff..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/config-reference/renderer-config.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: rendererConfig -description: A reference page for rendererConfig -sidebar: - order: 2 -slug: 0.1.0-beta.6/config-reference/renderer-config ---- - -import ReadMore from '~/components/ReadMore.astro'; - -## `renderer` - -The Markdown Content Renderer to use for rendering pages within StudioCMS - -* **Type:** `'marked'` | `'markdoc'` | `'astro'` | `'mdx'` | `CustomRenderer` -* **Default:** `'marked'` - -`renderer` determines how Markdown content should be rendered in `studioCMS`. This is used to setup your content data. The default value is `marked` but you can also use `markdoc` or `astro` which uses Astro's built-in Remark processor. - -### Usage - -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'marked' - }, - }) -``` - -## `markedConfig` - -`markedConfig` is an object that is used to determine how content should be rendered in the `studioCMS`. This is used to setup your content data. - -### Usage - -[See `markedConfig` for full options](/0.1.0-beta.6/config-reference/marked-config) - -## `markdocConfig` - -`markdocConfig` is an object that is used to determine how content should be rendered in `studiocms` while using the MarkDoc renderer. - -### Usage - -[See `markdocConfig` for full options](/0.1.0-beta.6/config-reference/markdoc-config) - -## `mdxConfig` - -`mdxConfig` is an object that is used to determine how content should be rendered in `studiocms` while using the MDX renderer. - -### Usage - -[See `mdxConfig` for full options](/0.1.0-beta.6/config-reference/mdx-config) diff --git a/www/docs/src/content/docs/0.1.0-beta.6/customizing/studiocms-renderers/index.mdx b/www/docs/src/content/docs/0.1.0-beta.6/customizing/studiocms-renderers/index.mdx deleted file mode 100644 index 073e6f634..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/customizing/studiocms-renderers/index.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Available Renderers -description: Currently available renderers for StudioCMS -slug: 0.1.0-beta.6/customizing/studiocms-renderers ---- - -import ReadMore from '~/components/ReadMore.astro' - -StudioCMS comes with a few built-in renderers that you can use to render your content. These renderers are built to be extendable and customizable to fit your needs. - -## Marked Renderer - -The default renderer for StudioCMS is the `marked` renderer. This renderer is used to render markdown content into HTML. This renderer is used by default when no other renderer is specified. - -### Usage - -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'marked' - }, - }) -``` - -### Configuration - -see [Marked Configuration](/0.1.0-beta.6/config-reference/marked-config/) for more information on how to configure the Marked renderer. - -## MDX Renderer - -Custom MDX renderer that allows the end user to provide a highly customizable MDX experience - -### Usage - -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'mdx' - }, - }) -``` - -### Configuration - -See [MDX Configuration](/0.1.0-beta.6/config-reference/mdx-config/) for more information on how to configure the MDX renderer. - -## MarkDoc Renderer - -In addition to `Marked`, StudioCMS provides an alternative with Markdoc, offering users a choice for their markdown processing needs. - -### Usage - -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'markdoc' - }, - }) -``` - -### Configuration - -see [MarkDoc Configuration](/0.1.0-beta.6/config-reference/markdoc-config/) for more information on how to configure the MarkDoc renderer. - -### Custom Renderers - -StudioCMS's MarkDoc renderer allows you to define custom renderers for your content. This allows you to define custom rendering logic for your content. - -see [MarkDoc Renderers](/0.1.0-beta.6/customizing/studiocms-renderers/markdoc/) for more information on how to define custom renderers for MarkDoc. - -## Astro Remark Renderer - -The default Astro renderer for their markdown content. This renderer adapts the markdown configuration from your `astro.config.mjs` file. - -### Usage - -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'astro' - }, - }) -``` - -### Configuration - -See [Astro's Markdown Configuration](https://docs.astro.build/en/reference/configuration-reference/#markdown-options) for more information on how to configure the Astro Remark renderer. diff --git a/www/docs/src/content/docs/0.1.0-beta.6/customizing/studiocms-renderers/markdoc.mdx b/www/docs/src/content/docs/0.1.0-beta.6/customizing/studiocms-renderers/markdoc.mdx deleted file mode 100644 index 64c46e117..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/customizing/studiocms-renderers/markdoc.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: MarkDoc Renderers -description: Customizing the MarkDoc renderer for StudioCMS -sidebar: - badge: - text: Advanced - variant: tip -slug: 0.1.0-beta.6/customizing/studiocms-renderers/markdoc ---- - -import ReadMore from '~/components/ReadMore.astro' -import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; -import { PackageManagers } from 'starlight-package-managers'; - -StudioCMS's MarkDoc renderer allows you to define custom renderers for your content. This allows you to define custom rendering logic for your content. - -## MarkDoc React Renderer - -A custom renderer for StudioCMS's MarkDoc renderer that allows the user to use MarkDoc with React and custom React components. - -### Usage - -Normally, users will not need to install the `@studiocms/renderers` package directly, as it is included as a dependency in the `studiocms` package. However, defining a custom renderer provided by `@studiocms/renderers` is possible. - - - 1. Install `@astrojs/react` using the following command: - - - - 2. Install the `@studiocms/renderers` package as a dependency using the following command: - - - - 3. Add the MarkDoc React renderer to your configuration: - - - - When using only the `astro.config.mjs` file, you can add the MarkDoc React renderer to your configuration like so: - - ```js title="astro.config.mjs" ins={5-6, 14, 19-21} mark={17} - import { defineConfig } from 'astro/config'; - import db from '@astrojs/db'; - import node from '@astrojs/node'; - import studioCMS from 'studiocms'; - import react from '@astrojs/react'; - import markDocRenderReact from '@studiocms/renderers/exports/markdoc/react'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - react(), - studioCMS({ - rendererConfig: { - renderer: "markdoc", - markdocConfig: { - renderType: markDocRenderReact({ - // Define your custom React components here - }), - } - }, - }), - ], - }); - ``` - - - - When using the `studiocms.config.mjs` file alongside your `astro.config.mjs`, you can add the MarkDoc React renderer to your configuration like so: - - ```js title="astro.config.mjs" ins={5, 13} - import { defineConfig } from 'astro/config'; - import db from '@astrojs/db'; - import node from '@astrojs/node'; - import studioCMS from 'studiocms'; - import react from '@astrojs/react'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - react(), - studioCMS(), - ], - }); - ``` - - ```js title="studiocms.config.mjs" ins={2, 9-11} mark={7} - import { defineStudioCMSConfig } from "studiocms"; - import markDocRenderReact from '@studiocms/renderers/exports/markdoc/react'; - - export default defineStudioCMSConfig({ - //...Rest of your StudioCMS configuration - rendererConfig: { - renderer: "markdoc", - markdocConfig: { - renderType: markDocRenderReact({ - // Define your custom React components here - }), - } - }, - }); - ``` - - - - -For more information on how to configure the MarkDoc renderer, see the [MarkDoc Configuration](/0.1.0-beta.6/config-reference/markdoc-config/) documentation. diff --git a/www/docs/src/content/docs/0.1.0-beta.6/how-it-works/index.mdx b/www/docs/src/content/docs/0.1.0-beta.6/how-it-works/index.mdx deleted file mode 100644 index b8ed556b5..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/how-it-works/index.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: How does it work!? -description: Learn how StudioCMS helps you manage and deliver your content by - exploring a comprehensive breakdown of it's fundamental components. -sidebar: - order: 1 - badge: - text: Updated - variant: success -slug: 0.1.0-beta.6/how-it-works ---- - -# Introduction - -StudioCMS is a powerful CMS built for Astro that allows you to manage and serve your content using [Astro DB](https://docs.astro.build/en/guides/astro-db/). It's designed to be easy-to-use and flexible enough to handle any type of content. - -Extending StudioCMS is easy too! You can create your own plugins to add new features to StudioCMS. - -## How does it work? - -StudioCMS is divided into multiple parts: - -* **studiocms**: The primary integration that hooks into your Astro project and provides the ability to interact with Astro DB (through the `@astrojs/db` integration). -* **@studiocms/core**: The core integration that provides the foundation for StudioCMS. It provides the database configurations, and adds various features including virtual imports, logging, etc. -* **@studiocms/auth**: An integration that provides authentication configuration options for the StudioCMS Dashboard. -* **@studiocms/assets**: An integration that provides the assets for the StudioCMS Dashboard. -* **@studiocms/frontend**: An integration that provides the frontend layouts and components for the StudioCMS ecosystem. -* **@studiocms/renderers**: An integration that provides the renderers for the StudioCMS ecosystem. -* **@studiocms/dashboard**: The primary web interface for managing your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content. -* **@studiocms/imagehandler**: An integration that provides a `` component to handle remote images and optimize them for your project in an SSR environment. -* **@studiocms/robotstxt**: An integration that automates the creation of a `robots.txt` file for your StudioCMS project. -* **@studiocms/betaresources**: An integration that provides resources for the StudioCMS beta. - -## Breakdown - -### StudioCMS Core - -StudioCMS Core is an Astro Integration which provides a comprehensive CMS solution out-of-the-box. This integration registers StudioCMS as the first plugin, sets up database configurations, watches for configuration changes, and adds various features including virtual imports, logging, and default frontend routes. - -#### Features - -* **@astrojs/db**: StudioCMS Core uses the `@astrojs/db` integration to connect to a libSQL database. -* **Virtual Imports**: StudioCMS Core adds several [virtual modules](https://vitejs.dev/guide/api-plugin#virtual-modules-convention) packed with features that give you full control over your dynamic content. -* **Logging**: StudioCMS Core logs all changes to Astro Studio. This can be enabled in your config file. -* **Default Frontend Routes**: The StudioCMS Core integration adds default frontend routes to your Astro project to allow for easy access to the StudioCMS dashboard. -* **Plugin System**: You can extend StudioCMS using plugins to add additional functionality. - -#### Core Virtual Modules - -:::tip -Modules prefixed with `virtual:` are virtual modules that are primarily used internally by StudioCMS, but can be used by developers to access StudioCMS data. To access these modules with proper typings, see the [project development `.d.ts` file](https://github.com/astrolicious/studiocms/blob/main/packages/studiocms_core/virtuals.d.ts) for an example of how to configure your project to sense these types. - -Modules without the `virtual:` prefix have full typings defined and injected into your project's `.astro/` directory automatically, and can be accessed directly without any extra configuration. -::: - -* **`virtual:studiocms/config`**: Provides the resolved configuration for the StudioCMS integration ecosystem. -* **`virtual:studiocms/version`**: Provides the current version of the StudioCMS integration ecosystem. -* **`virtual:studiocms/pluginSystem`**: Provides the plugin system interfaces during runtime for StudioCMS. -* **`studiocms:components`**: Provides the front-end exported components for StudioCMS. -* **`studiocms:helpers`**: Provides the front-end exported helper functions for StudioCMS. -* **`studiocms:helpers/contentHelper`**: Provides the exported content helper functions for StudioCMS. -* **`studiocms:helpers/headDefaults`**: Provides the exported head defaults for StudioCMS. -* **`studiocms:helpers/routemap`**: Provides the exported route map for StudioCMS. - -### StudioCMS: Dashboard - -The StudioCMS Dashboard is a web interface that allows you to manage your StudioCMS project. It provides a user-friendly interface for creating, editing, and deleting content for your project. The StudioCMS Dashboard is built with [Astro](https://astro.build) and [DaisyUI](https://daisyui.com/) with [UnoCSS](https://unocss.dev). - -#### Tech Stack - -* **Dashboard**: The StudioCMS Dashboard provides a user-friendly interface for managing your StudioCMS project. -* **UnoCSS**: The StudioCMS Dashboard uses UnoCSS for styling and theming. -* **DaisyUI**: The StudioCMS Dashboard uses DaisyUI for styling and theming. -* **AuthConfig**: The StudioCMS Dashboard provides authentication configuration options. -* **Astrolace**: The StudioCMS Dashboard is built using [Astrolace](https://github.com/matthiesenxyz/astrolace) a [Shoelace.style](https://shoelace.style) Astro Integration. -* **DashboardRouteOverride**: The StudioCMS Dashboard provides a dashboard route override configuration option. Allowing you to change the default route for the StudioCMS Dashboard and API. - -#### Dashboard Virtual Modules - -* **`studiocms:auth/config`**: Provides the authentication configuration for the dashboard. - -### StudioCMS: ImageHandler - -The StudioCMS ImageHandler is an integration that provides a custom image component for your Astro project. This component is used to handle remote images and optimize them in a SSR environment using [@unpic/astro](https://unpic.pics/img/astro/). - -#### Features - -* **``**: The StudioCMS ImageHandler provides a custom image component for your Astro project. - -#### ImageHandler Virtual Modules - -* **`studiocms:imageHandler/components`**: The Virtual module that provides the exported image components for the StudioCMS ImageHandler. - -### StudioCMS: Renderers - -The StudioCMS Renderers integration provides the renderers for the StudioCMS ecosystem. This integration is used to determine how content should be rendered in StudioCMS. - -#### Renderers Virtual Modules - -* **`studiocms:renderer`**: Provides the main renderer component for the StudioCMS ecosystem. -* **`studiocms:renderer/config`**: Provides the configuration for the StudioCMS renderer. -* **`studiocms:renderer/astroMarkdownConfig`**: Provides the configuration for Astro Markdown support. diff --git a/www/docs/src/content/docs/0.1.0-beta.6/index.mdx b/www/docs/src/content/docs/0.1.0-beta.6/index.mdx deleted file mode 100644 index 2f6f61f89..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/index.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Welcome to StudioCMS -description: Get started building with StudioCMS. -template: splash -banner: - content: | - We've renamed the package to studiocms 🎉 -hero: - tagline: A dedicated CMS for Studio. Built from the ground up by the Astro community. - image: - alt: StudioCMS Logo - dark: ./studioCMS.png - light: ./studioCMS-dark.png - actions: - - text: Get started - link: /0.1.0-beta.6/start-here/getting-started - icon: right-arrow - variant: primary - - text: GitHub repository - link: https://github.com/astrolicious/studiocms - icon: github -slug: 0.1.0-beta.6 ---- - -import { CardGrid, Card } from '@astrojs/starlight/components'; -import Youtube from '~/components/Youtube.astro' - - - - - - Leverages [Astro's](https://astro.build) robust and efficient framework, providing a solid base for building and scaling applications. - - - - Incorporates [`MarkedJS`](https://marked.js.org/) with support for extensions, enriching the markdown experience with greater flexibility and functionality. Also supports MarkDoc and native Astro Markdown. Allowing for a seamless transition between markdown formats, and see your changes in realtime as your writing. - - - - All data is securely housed within the Astro Studio's libSQL database. Or you can bring your own libSQL server through another provider such as [`Turso`](https://turso.tech/). Or self-host your own libSQL server. - - - - Features built-in authentication with support for multiple platforms including Local and Github, enhancing security and user management capabilities. Built using the [`Lucia Auth`](https://lucia-auth.com/) library. - - - - A free and efficient image service, Unpic makes managing external URLs straightforward, with support for major CDNs. - - * See [Unpic's Website](https://unpic.pics/about/) for more information about Unpic's options. - - - - Integration with [`@astrojs/web-vitals`](/0.1.0-beta.6/plugins/web-vitals/) for monitoring and providing insights into web performance metrics, ensuring optimal user experiences. Directly integrated into the StudioCMS dashboard. - - diff --git a/www/docs/src/content/docs/0.1.0-beta.6/plugins/studiocms-blog.mdx b/www/docs/src/content/docs/0.1.0-beta.6/plugins/studiocms-blog.mdx deleted file mode 100644 index 7bcf14d78..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/plugins/studiocms-blog.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "@studiocms/blog" -description: StudioCMS Blog Integration -sidebar: - order: 1 - label: Blog Integration - badge: - text: StudioCMS - variant: tip -slug: 0.1.0-beta.6/plugins/studiocms-blog ---- - -import { PackageManagers } from 'starlight-package-managers'; -import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; - -# Introduction - -#### Powered by [`astro-theme-provider`](https://github.com/astrolicious/astro-theme-provider) by [Bryce Russell](https://github.com/BryceRussell) - -This Astro integration enables the StudioCMS Blog feature in your Astro project. This integration will allow you to create, edit, and delete blog posts in the StudioCMS dashboard. - -## Installation - - - - - 1. Install the package and add to your astro config using the following command: - - - - 2. Update your config file as shown under [Example Config](#example-config) below. - - - - - - 1. Install the package using the following command: - - - - 2. Add `@studiocms/blog` to your astro config file: - - ```js title="astro.config.mjs" ins={3, 15-20} - import { defineConfig } from 'astro/config'; - import node from '@astrojs/node'; - import db from '@astrojs/db'; - import studioCMS from 'studiocms'; - import studioCMSBlog from '@studiocms/blog'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - studioCMSBlog({ - config: { - title: "My StudioCMS Blog", - description: "A Simple Blog build with Astro, AstroDB, and StudioCMS.". - }, - }), - ], - }); - ``` - - - - -## Usage - -### What does this integration do? - -This integration will add the following new routes to your StudioCMS Controlled front-end: - -* `/blog` - The main blog page that lists all blog posts. -* `/blog/[slug]` - The individual blog post page. -* `/rss.xml` - The RSS feed for your blog posts. - -### Example config - -```js title="astro.config.mjs" -import { defineConfig } from 'astro/config'; -import db from '@astrojs/db'; -import studioCMS from 'studiocms'; -import studioCMSBlog from '@studiocms/blog'; - -// https://astro.build/config -export default defineConfig({ - site: "https://example.com", - output: "server", - adapter: ... - integrations: [ - db(), // REQUIRED - `@astrojs/db` must be included in the integrations list - studioCMS(), // REQUIRED - StudioCMS must be included in the integrations list - studioCMSBlog({ - config: { - title: "My StudioCMS Blog", - description: "A Simple Blog build with Astro, Astrojs/DB, and StudioCMS.". - }, - }), - ], -}); -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.6/plugins/web-vitals.mdx b/www/docs/src/content/docs/0.1.0-beta.6/plugins/web-vitals.mdx deleted file mode 100644 index d5d7427e9..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/plugins/web-vitals.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: "@astrojs/web-vitals" -description: Web Vitals Integration with the StudioCMS Dashboard -sidebar: - order: 99 - label: Web Vitals - badge: - text: AstroJS - variant: success -slug: 0.1.0-beta.6/plugins/web-vitals ---- - -import { PackageManagers } from 'starlight-package-managers'; -import Gallery from '~/components/Gallery.astro'; -import { webVitalsImages } from "../../../../assets/index.ts"; -import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; - -# Introduction - -This Astro integration enables tracking real-world website performance and storing the data in Astro DB. That data will be used in the StudioCMS dashboard to show the performance metrics of your website from the real world over time. - -## Installation - - - - - 1. Install the package and add to your astro config using the following command: - - - - 2. Push the new configuration to your remote database: - - - - - - - - 1. Install the package using the following command: - - - - 2. Add `@astrojs/web-vitals` to your astro config file: - - ```js title="astro.config.mjs" ins={3, 12} - import node from '@astrojs/node'; - import studioCMS from 'studiocms'; - import webVitals from '@astrojs/web-vitals'; - import { defineConfig } from 'astro/config'; - - export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - webVitals(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - ], - }); - ``` - - - - 3. Push the new configuration to your remote database: - - - - - - -## Gallery Demo - - diff --git a/www/docs/src/content/docs/0.1.0-beta.6/start-here/configuration.mdx b/www/docs/src/content/docs/0.1.0-beta.6/start-here/configuration.mdx deleted file mode 100644 index e077d4347..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/start-here/configuration.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: StudioCMS Config -description: Options for how to define the StudioCMS Config -sidebar: - order: 3 -slug: 0.1.0-beta.6/start-here/configuration ---- - -import { FileTree } from '@astrojs/starlight/components'; - -# Available Options - -There are two ways to configure the StudioCMS Integration, below are examples of how to configure based on if you choose to use the `astro.config.mjs` or the dedicated `studiocms.config.mjs` file. - -## Using the `astro.config.mjs` file: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from 'studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: false, - ...OtherConfigOptions - }), - ], -}); -``` - -## Using the `studiocms.config.mjs` file: - -This file will be automatically picked up and will overwrite any options passed in your astro.config, if you choose to use this option, Please ensure to move all StudioCMS Config options into this file instead like below: - -### Example File Structure - - - * .env - * astro.config.mjs - * **studiocms.config.mjs** - * studiocms-auth.config.json Auto Generated - * package.json - * src - * env.d.ts - * ... - - -### Example Config - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from 'studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ db(), studioCMS() ], -}); -``` - -```js title="studiocms.config.mjs" -import { defineStudioCMSConfig } from "studiocms"; - -export default defineStudioCMSConfig({ - dbStartPage: false, - ...OtherConfigoptions -}) -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.6/start-here/environment-variables.mdx b/www/docs/src/content/docs/0.1.0-beta.6/start-here/environment-variables.mdx deleted file mode 100644 index f152ddb02..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/start-here/environment-variables.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: Environment Variables -description: A brief overview of the environment variables used in StudioCMS. -sidebar: - order: 2 - badge: - text: Updated - variant: success -slug: 0.1.0-beta.6/start-here/environment-variables ---- - -import StudioHeading from '~/components/StudioHeading.astro'; -import StudioSunset from '~/components/StudioSunset.astro'; -import { Aside } from '@astrojs/starlight/components'; - -For StudioCMS to work correctly, you must set up the correct environment variables. These variables are essential for establishing a secure connection to Astro DB and authenticating with the StudioCMS API. Without correctly configuring these environment variables, the application will not function as intended. - -You can create a `.env` file in the root directory of your project and add the required environment variables. The `.env` file is a text file that contains key-value pairs of environment variables. The environment variables are read by the application at runtime. - -For future reference on how to work with environment variables within Astro you can checkout [Environment Variables](https://docs.astro.build/guides/environment-variables) from the Astro documentation. - - - -## Required Environment Variables - - - ### If using Astro's `Studio` with `@astrojs/db` - - - - -`ASTRO_STUDIO_APP_TOKEN` - Token provided from the [Astro Studio Dashboard](https://studio.astro.build) - -```bash title=".env" -ASTRO_STUDIO_APP_TOKEN=your_app_token -``` - -### If using `libSQL` with `@astrojs/db` - -`ASTRO_DB_REMOTE_URL` - The connection URL to your libSQL server -`ASTRO_DB_APP_TOKEN` - The app token for your libSQL server - -```bash title=".env" -ASTRO_DB_REMOTE_URL=file://local-copy.db?encryptionKey=your-encryption-key&syncInterval=60&syncUrl=libsql%3A%2F%2Fyour.server.io -ASTRO_DB_APP_TOKEN=token-to-your-remote-url -``` - -## Authentication Environment Variables - -Currently there are 5 ways to authenticate with StudioCMS: - - - -### GitHub - -To authenticate with GitHub, you need to add the following environment variables to your `.env` file: - -```bash title=".env" -# credentials for GitHub OAuth -# Callback URL for github (NOT AN ENV VARIABLE): 'http://localhost:4321/dashboard/login/github/callback' -CMS_GITHUB_CLIENT_ID=your_client_id -CMS_GITHUB_CLIENT_SECRET=your_client_secret -``` - -### Discord - -```bash title=".env" -# credentials for Discord OAuth -CMS_DISCORD_CLIENT_ID= -CMS_DISCORD_CLIENT_SECRET= -CMS_DISCORD_REDIRECT_URI=http://localhost:4321/dashboard/login/discord/callback -``` - -### Google - -```bash title=".env" -# credentials for Google OAuth -CMS_GOOGLE_CLIENT_ID= -CMS_GOOGLE_CLIENT_SECRET= -CMS_GOOGLE_REDIRECT_URI=http://localhost:4321/dashboard/login/google/callback -``` - -### Auth0 - -```bash title=".env" -# credentials for auth0 OAuth -CMS_AUTH0_CLIENT_ID= -CMS_AUTH0_CLIENT_SECRET= -CMS_AUTH0_DOMAIN= -CMS_AUTH0_REDIRECT_URI=http://localhost:4321/dashboard/login/auth0/callback -``` - -### Username and Password - -Alternatively, you can authenticate with StudioCMS using your username and password which doesn't require any additional environment variables. - - - -## Image Handler Environment Variables - -### Cloudinary (Optional) - -If you choose to use the built-in Cloudinary plugin, you will need to define the following: - -```bash title=".env" -## Cloudinary Javascript SDK -CMS_CLOUDINARY_CLOUDNAME="demo" -``` diff --git a/www/docs/src/content/docs/0.1.0-beta.6/start-here/gallery.mdx b/www/docs/src/content/docs/0.1.0-beta.6/start-here/gallery.mdx deleted file mode 100644 index 3c9ebdae1..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/start-here/gallery.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Gallery -description: A small gallery of images to show off the StudioCMS -tableOfContents: false -sidebar: - order: 5 -slug: 0.1.0-beta.6/start-here/gallery ---- - -import Gallery from '~/components/Gallery.astro' -import { mainDemoGalleryImages } from "~/assets/index.ts" - -This is a small gallery of images to show off the `StudioCMS` integration. - - diff --git a/www/docs/src/content/docs/0.1.0-beta.6/start-here/getting-started.mdx b/www/docs/src/content/docs/0.1.0-beta.6/start-here/getting-started.mdx deleted file mode 100644 index 29a2612a7..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/start-here/getting-started.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: Getting Started with StudioCMS -description: Get started building with StudioCMS. -sidebar: - order: 1 - badge: - text: Updated - variant: success -banner: - content: | - We've renamed the package to studiocms 🎉 -slug: 0.1.0-beta.6/start-here/getting-started ---- - -import { PackageManagers } from 'starlight-package-managers'; -import { Aside } from '@astrojs/starlight/components'; -import ReadMore from '~/components/ReadMore.astro'; -import StudioHeading from '~/components/StudioHeading.astro'; -import StudioSunset from '~/components/StudioSunset.astro'; - -## Let's get started - -To start using StudioCMS, you'll need: - -* An Astro project -* A libSQL provider or self-hosted libSQL server -* The StudioCMS integration - -## Understanding Options for `@astrojs/db` - -### Using libSQL - -With the latest version of `@astrojs/db` (`v0.14.0`), you can now link to any libSQL server from any platform that exposes the libSQL remote protocol of the server, or can be self-hosted. - -To use libSQL with Astro Db, you will need to set the following environment variables: - -* **`ASTRO_DB_REMOTE_URL`** - The connection URL to your libSQL server -* **`ASTRO_DB_APP_TOKEN`** - The app token for your libSQL server - -For more information about these environment varibales, see [Using libSQL with @astrojs/db](/0.1.0-beta.6/start-here/environment-variables/#if-using-libsql-with-astrojsdb) - -The [commands for deploying and pushing changes](https://docs.astro.build/en/guides/astro-db/#libsql) to your database are the same when using libSQL as when connecting to an Astro Studio hosted database. However, both of your environment variables need to be set locally when running commands with the `--remote` option like `astro build` and `astro db push`. - -See Astro's [Astro DB LibSQL Docs](https://docs.astro.build/en/guides/astro-db/#libsql) for more information - - - ### Using Astro Studio - - - - -## Creating a new Astro project - -To create a new Astro project, simply run the following command in your terminal: - - - -After running the command, you'll be prompted to answer a few questions about your project. Once completed, the CLI will create a new Astro project in the specified directory. - -If all goes well, you should see a “Liftoff confirmed. Explore your project!” message followed by some recommended next steps. - -`cd` into your new project directory to begin using Astro. `cd my-project` - -If you skipped the npm install step during the CLI wizard, then be sure to install your dependencies before continuing. - -## Adding the StudioCMS integration - -To add the StudioCMS integration to your project, you'll need to install the Astro StudioCMS package and it's dependencies: - - - -After installing the package, make sure that your `astro.config.mjs` file is correctly importing and calling the integration: - -```js title="astro.config.mjs" -import db from '@astrojs/db'; -import node from '@astrojs/node'; -import studioCMS from 'studiocms'; -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', - output: 'server', - adapter: node({ mode: "standalone" }), - integrations: [ - db(), - studioCMS({ - dbStartPage: true, // After the first time running the dev server and following the instructions at http://localhost:4321/start this will be set to false. - }), - ], -}); -``` - - - -## Configure your `package.json` scripts - -Setup your `package.json` scripts to include the `--remote` flag for build, and optionally for dev. (You can also run the dev command as shown in the ["Running your StudioCMS Project"](#running-your-studiocms-project) section) - -```json title="package.json" -{ - "name": "my-studiocms-project", - "scripts": { - "dev": "astro dev --remote", - "build": "astro check & astro build --remote", - "astro": "astro" - } -} -``` - -## Running your StudioCMS project - -Thanks to the power of Astro running StudioCMS is as easy as running the dev command for local preview, or building and deploying to your server, for the basics of how to use it locally without building here is what you need to do. - -### First time Setup (or during updates if the tables schema is updated) - -To start your Astro project, run the following commands in your terminal: - - - - - -After running the commands, you should see a message indicating that your project is running at `localhost:4321`. When first setting up StudioCMS, you will prompted to finish configuring StudioCMS at http://localhost:4321/start - -### Running in Astro Development mode locally - -To start your Astro project, run the following command in your terminal: - - - -After running the command, you should see a message indicating that your project is running at `localhost:4321`. Open your browser and navigate to `http://localhost:4321` to see your Astro project in action. - -**Congratulations!** 🥳 You now have StudioCMS installed in your Astro project. - -## Next steps - -Now that you have StudioCMS installed, you can start building your project with StudioCMS. - -Check out how to set environment variables in StudioCMS by heading to [Environment Variables](/0.1.0-beta.6/start-here/environment-variables). - -To learn more about the API and how to use StudioCMS, check out the [StudioCMS Reference](/0.1.0-beta.6/typedoc/studiocms-core/index/functions/studiocmscoreintegration/). - -You can also learn more about themes and how to author them by using [Astro Theme Provider](https://astro-theme-provider.netlify.app/). diff --git a/www/docs/src/content/docs/0.1.0-beta.6/start-here/why-studioCMS.mdx b/www/docs/src/content/docs/0.1.0-beta.6/start-here/why-studioCMS.mdx deleted file mode 100644 index 1bdafe418..000000000 --- a/www/docs/src/content/docs/0.1.0-beta.6/start-here/why-studioCMS.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Why StudioCMS? -description: StudioCMS is an alternative to traditional CMS platforms. It is a - headless CMS that relies on Astro Studio and Astro Framework to deliver a - seamless content management experience. -sidebar: - order: 4 -slug: 0.1.0-beta.6/start-here/why-studiocms ---- - -We're so excited to introduce StudioCMS - a dedicated content management system (CMS) built on top of Astro's latest product: [Astro DB](https://docs.astro.build/en/guides/astro-db/). This project was developed by [Adam](https://github.com/Adammatthiesen), [Dreyfus](https://github.com/dreyfus92), and [Jumper](https://github.com/jdtjenkins), three passionate members of the Astro community. - -## Why another CMS? - -While Astro's content capabilities are powerful, we recognized a need for a more streamlined and user-friendly CMS solution within the Astro ecosystem. Many Astro users, especially those coming from more traditional CMS backgrounds, have expressed a desire for a dedicated CMS that can seamlessly integrate with Astro projects. - -StudioCMS was born out of this need, providing a content management platform that is tailor-made for Astro. By building on top of Astro Studio, we're able to offer a CMS experience that feels native to the Astro workflow, making it easier for both developers and content creators to collaborate on Astro-powered projects. - -## An Experimental Endeavor - -It's important to note that StudioCMS is an experimental project that heavily relies on the [@astrojs/db package](https://github.com/withastro/astro/tree/main/packages/db), which is currently in active development and not yet considered stable. As a result, you should expect a significant number of breaking changes as the project continues to evolve. - -We believe that by building on the cutting-edge features of Astro Db, we can create a powerful and innovative CMS solution. However, this also means that StudioCMS may not be suitable for mission-critical or production-ready projects at this stage. We encourage you to use caution and thoroughly test the CMS in your own projects before deploying it to a live environment. - -## Key Features - -* **Part of Astrolicious:** Astrolicious leverages Astro's robust and efficient framework, providing a solid base for building and scaling applications. - -* **Realtime Markdown Editor:** StudioCMS has a real-time Markdown editor so you can create your content using powerful Markdown syntax and see changes reflected in real-time! - -* **Enhanced Markdown:** We've incorporated 'Marked' with support for extensions, enriching the markdown experience with greater flexibility and functionality. - -* **Shiki Syntax Highlighting:** StudioCMS offers Shiki-powered syntax highlighting, ensuring your code is both visually appealing and easy to read. This is especially useful in non-Cloudflare environments due to bundle size considerations. - -* **Markdoc Integration:** In addition to 'Marked', StudioCMS provides an alternative with Markdoc, offering users a choice for their markdown processing needs. - -* **Secure libSQL Database:** All data is securely housed within the Astro Studio database, ensuring access only to authorized users with `studio.astro.build` login credentials. Or you can use your own libSQL server. - -* **Built-in Authentication:** StudioCMS features built-in authentication with support for multiple platforms, including Local and Github, enhancing security and user management (currently in development). - -* **Unpic Image Service:** StudioCMS includes a free and efficient image service, Unpic, which makes managing external URLs straightforward, with support for major CDNs. diff --git a/www/docs/src/content/docs/0.1.0-beta.6/studioCMS-dark.png b/www/docs/src/content/docs/0.1.0-beta.6/studioCMS-dark.png deleted file mode 100644 index 7c78e0310..000000000 Binary files a/www/docs/src/content/docs/0.1.0-beta.6/studioCMS-dark.png and /dev/null differ diff --git a/www/docs/src/content/docs/0.1.0-beta.6/studioCMS.png b/www/docs/src/content/docs/0.1.0-beta.6/studioCMS.png deleted file mode 100644 index 4a7eb8b42..000000000 Binary files a/www/docs/src/content/docs/0.1.0-beta.6/studioCMS.png and /dev/null differ diff --git a/www/docs/src/content/docs/config-reference/dashboard.mdx b/www/docs/src/content/docs/config-reference/dashboard.mdx index a09a39f27..cd815fc98 100644 --- a/www/docs/src/content/docs/config-reference/dashboard.mdx +++ b/www/docs/src/content/docs/config-reference/dashboard.mdx @@ -9,18 +9,20 @@ sidebar: ## Usage -```js title="astro.config.mjs" {2-24} -studioCMS({ +```ts twoslash {2-24} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ dashboardConfig: { dashboardEnabled: true, faviconURL: "/favicon.ico", - dashboardRouteOverride: "/components/dashboard", + dashboardRouteOverride: "/dashboard", AuthConfig: { providers: { github: true, - usernameAndPassword: true + usernameAndPassword: true, }, - enabled: true + enabled: true, }, UnoCSSConfigOverride: { injectReset: true, @@ -28,12 +30,12 @@ studioCMS({ presetsConfig: { presetDaisyUI: { themes: ['dark', 'light'], - lightTheme: ['light'], - darkTheme: ['dark'], - } - } - } - }, // DEFAULT - This injects a dashboard to setup your dashboard data. + lightTheme: 'light', + darkTheme: 'dark', + }, + }, + }, + }, }) ``` @@ -42,7 +44,7 @@ studioCMS({ - **Type:** `boolean | undefined` - **Default:** `true` -Allows enabling or disabling of the Astro StudioCMS dashboard but still provide all the helpers and utilities to those who are customizing their setup. By disabling it will disable the dashboard and you will need to manage your content via the Astro Studio Dashboard at [Astro Studio](http://studio.astro.build) or with whatever access your libSQL server provides. +Allows enabling or disabling of the StudioCMS dashboard but still provide all the helpers and utilities to those who are customizing their setup. By disabling it will disable the dashboard and you will need to manage your content via your database's dashboard with whatever access your libSQL server provides. ### `faviconURL` @@ -156,7 +158,7 @@ Developer Options/Configuration. - **Type:** `boolean | undefined` - **Default:** `false` -Allows the user to enable Astro's ZeroJS View Transition API for the Studio CMS Dashboard. +Allows the user to enable Astro's ZeroJS View Transition API for the StudioCMS Dashboard. #### `testingAndDemoMode` diff --git a/www/docs/src/content/docs/config-reference/default-frontend-config.mdx b/www/docs/src/content/docs/config-reference/default-frontend-config.mdx index 3b329cb4c..5f7232392 100644 --- a/www/docs/src/content/docs/config-reference/default-frontend-config.mdx +++ b/www/docs/src/content/docs/config-reference/default-frontend-config.mdx @@ -9,8 +9,10 @@ sidebar: ## Usage -```js title="astro.config.mjs" {2-9} -studioCMS({ +```ts twoslash {2-9} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ defaultFrontEndConfig: { injectDefaultFrontEndRoutes: true, inject404Route: true, @@ -59,8 +61,11 @@ HTML Default Header - The default head configuration for the Frontend ### Usage -```js title="astro.config.mjs" {2-4} -studioCMS({ +```ts twoslash {3-13} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + defaultFrontEndConfig: { htmlDefaultHead: [ { tag: 'title', content: 'My Awesome Site' }, { @@ -72,6 +77,7 @@ studioCMS({ } } ], + }, }) ``` diff --git a/www/docs/src/content/docs/config-reference/image-service.mdx b/www/docs/src/content/docs/config-reference/image-service.mdx index bd9c32a95..60ab62d6d 100644 --- a/www/docs/src/content/docs/config-reference/image-service.mdx +++ b/www/docs/src/content/docs/config-reference/image-service.mdx @@ -9,19 +9,21 @@ sidebar: ## Usage -```js title="astro.config.mjs" {2-11} -studioCMS({ +```ts twoslash {2-11} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ imageService: { useUnpic: false, - unpicConfig { - fallbackService: "unsplash", + unpicConfig: { + fallbackService: "sharp", placeholder: 'blurhash', layout: 'constrained', }, - astroImageServiceConfig: "squoosh", - cdnPlugin: "cloudinary", + astroImageServiceConfig: "sharp", + cdnPlugin: "cloudinary-js", }, -}), +}) ``` ### `useUnpic` diff --git a/www/docs/src/content/docs/config-reference/included-integrations.mdx b/www/docs/src/content/docs/config-reference/included-integrations.mdx index bc6580b59..2ba1643bd 100644 --- a/www/docs/src/content/docs/config-reference/included-integrations.mdx +++ b/www/docs/src/content/docs/config-reference/included-integrations.mdx @@ -9,14 +9,16 @@ sidebar: ## Usage -```js title="astro.config.mjs" {2-6} -studioCMS({ +```ts twoslash {2-6} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ includedIntegrations: { useAstroRobots: true, astroRobotsConfig: {}, useInoxSitemap: true, }, -}), +}) ``` ### `useAstroRobots` diff --git a/www/docs/src/content/docs/config-reference/markdoc-config.mdx b/www/docs/src/content/docs/config-reference/markdoc-config.mdx index ba4d4abad..86f0c3a62 100644 --- a/www/docs/src/content/docs/config-reference/markdoc-config.mdx +++ b/www/docs/src/content/docs/config-reference/markdoc-config.mdx @@ -11,8 +11,10 @@ import ReadMore from '~/components/ReadMore.astro'; ## Usage -```js title="astro.config.mjs" {3-7} -studioCMS({ +```ts twoslash {3-7} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ rendererConfig: { markdocConfig: { renderType: 'html', @@ -20,7 +22,7 @@ studioCMS({ transformConfig: {} }, } -}), +}) ``` This property has the following options: diff --git a/www/docs/src/content/docs/config-reference/marked-config.mdx b/www/docs/src/content/docs/config-reference/marked-config.mdx index 41e821dce..f9b114b60 100644 --- a/www/docs/src/content/docs/config-reference/marked-config.mdx +++ b/www/docs/src/content/docs/config-reference/marked-config.mdx @@ -9,16 +9,30 @@ sidebar: ## Usage -```js title="astro.config.mjs" {3-7} -studioCMS({ +```ts twoslash {3-19} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ rendererConfig: { markedConfig: { highlighterConfig: { highlighter: "disabled", + shikiConfig: { + theme: "houston", + loadThemes: [], + loadLangs: [], + }, }, + includedExtensions: { + markedAlert: true, + markedFootnote: true, + markedSmartypants: true, + markedEmoji: true, + }, + loadmarkedExtensions: [], }, } -}), +}) ``` This property has the following options: diff --git a/www/docs/src/content/docs/config-reference/mdx-config.mdx b/www/docs/src/content/docs/config-reference/mdx-config.mdx index 847045112..13338407d 100644 --- a/www/docs/src/content/docs/config-reference/mdx-config.mdx +++ b/www/docs/src/content/docs/config-reference/mdx-config.mdx @@ -11,8 +11,10 @@ import ReadMore from '~/components/ReadMore.astro'; ## Usage -```js title="astro.config.mjs" {3-8} -studioCMS({ +```ts twoslash {3-8} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ rendererConfig: { mdxConfig: { remarkPlugins: [], @@ -20,8 +22,8 @@ studioCMS({ recmaPlugins: [], remarkRehypeOptions: {}, }, - } -}), + }, +}) ``` This property has the following options: diff --git a/www/docs/src/content/docs/config-reference/options-schema.mdx b/www/docs/src/content/docs/config-reference/options-schema.mdx index 9055669de..d552b5050 100644 --- a/www/docs/src/content/docs/config-reference/options-schema.mdx +++ b/www/docs/src/content/docs/config-reference/options-schema.mdx @@ -9,6 +9,22 @@ import ReadMore from '~/components/ReadMore.astro'; StudioCMS Integration config options schema Reference +```ts twoslash title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +// Default Values shown +export default defineStudioCMSConfig({ + dbStartPage: true, + rendererConfig: {}, + imageService: {}, + defaultFrontEndConfig: {}, + dashboardConfig: {}, + includedIntegrations: {}, + dateLocale: 'en-us', + verbose: false, +}); +``` + ## `dbStartPage` Project Initialization Page - Used during First time setup to create your database configuration. @@ -20,8 +36,10 @@ Project Initialization Page - Used during First time setup to create your databa ### Usage -```js title="astro.config.mjs" {2} -studioCMS({ +```ts twoslash {2} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ dbStartPage: true, // DEFAULT - This injects a start page to setup your DB data. }) ``` @@ -77,8 +95,10 @@ Date locale used for formatting dates ### Usage -```js title="astro.config.mjs" {2} -studioCMS({ +```ts twoslash {2} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ dateLocale: 'en-us', }) ``` @@ -93,15 +113,17 @@ studioCMS({ ## `verbose` -- **Type:** `boolean| undefined` -- **Default:** `true` +- **Type:** `boolean | undefined` +- **Default:** `false` `verbose` enables verbose logging. ### Usage -```js title="astro.config.mjs" {2} -studioCMS({ - verbose: true, // DEFAULT - This enables verbose logging in studioCMS. -}), +```ts twoslash {2} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + verbose: true, +}) ``` \ No newline at end of file diff --git a/www/docs/src/content/docs/config-reference/overrides.mdx b/www/docs/src/content/docs/config-reference/overrides.mdx index f96f7b6c0..2cb071da0 100644 --- a/www/docs/src/content/docs/config-reference/overrides.mdx +++ b/www/docs/src/content/docs/config-reference/overrides.mdx @@ -9,13 +9,15 @@ sidebar: ## Usage -```js title="astro.config.mjs" {2-6} -studioCMS({ +```ts twoslash {2-5} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ overrides: { CustomImageOverride: "./src/components/MyCustomImage.astro", FormattedDateOverride: "./src/components/MyCustomFormattedDate.astro", }, -}), +}) ``` ### `CustomImageOverride` diff --git a/www/docs/src/content/docs/config-reference/renderer-config.mdx b/www/docs/src/content/docs/config-reference/renderer-config.mdx index 32184d708..23c4d1a4b 100644 --- a/www/docs/src/content/docs/config-reference/renderer-config.mdx +++ b/www/docs/src/content/docs/config-reference/renderer-config.mdx @@ -18,12 +18,17 @@ The Markdown Content Renderer to use for rendering pages within StudioCMS ### Usage -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'marked' - }, - }) +```ts twoslash {3} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + rendererConfig: { + renderer: 'marked', + markedConfig: {}, + markdocConfig: {}, + mdxConfig: {}, + }, +}) ``` ## `markedConfig` diff --git a/www/docs/src/content/docs/customizing/studiocms-renderers/index.mdx b/www/docs/src/content/docs/customizing/studiocms-renderers/index.mdx index b0cbd168f..8b98fdc2b 100644 --- a/www/docs/src/content/docs/customizing/studiocms-renderers/index.mdx +++ b/www/docs/src/content/docs/customizing/studiocms-renderers/index.mdx @@ -7,18 +7,33 @@ import ReadMore from '~/components/ReadMore.astro' StudioCMS comes with a few built-in renderers that you can use to render your content. These renderers are built to be extendable and customizable to fit your needs. +```ts twoslash title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + rendererConfig: { + renderer: 'marked', + markedConfig: {}, + markdocConfig: {}, + mdxConfig: {}, + }, +}) +``` + ## Marked Renderer The default renderer for StudioCMS is the `marked` renderer. This renderer is used to render markdown content into HTML. This renderer is used by default when no other renderer is specified. ### Usage -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'marked' - }, - }) +```ts twoslash {3} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + rendererConfig: { + renderer: 'marked' + }, +}) ``` ### Configuration @@ -31,12 +46,14 @@ Custom MDX renderer that allows the end user to provide a highly customizable MD ### Usage -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'mdx' - }, - }) +```ts twoslash {3} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + rendererConfig: { + renderer: 'mdx' + }, +}) ``` ### Configuration @@ -49,12 +66,14 @@ In addition to `Marked`, StudioCMS provides an alternative with Markdoc, offerin ### Usage -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'markdoc' - }, - }) +```ts twoslash {3} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + rendererConfig: { + renderer: 'markdoc' + }, +}) ``` ### Configuration @@ -73,14 +92,40 @@ The default Astro renderer for their markdown content. This renderer adapts the ### Usage -```js title="astro.config.mjs" {3} - studioCMS({ - rendererConfig: { - renderer: 'astro' - }, - }) +```ts twoslash {3} title="studiocms.config.mjs" +import { defineStudioCMSConfig } from 'studiocms'; +// ---cut--- +export default defineStudioCMSConfig({ + rendererConfig: { + renderer: 'astro' + }, +}) ``` ### Configuration See [Astro's Markdown Configuration](https://docs.astro.build/en/reference/configuration-reference/#markdown-options) for more information on how to configure the Astro Remark renderer. + +## Define a Custom Renderer + +StudioCMS allows you to define custom renderers for your content. This allows you to define custom rendering logic for your content. Custom renderers can be used to render content in a way that is not supported by the built-in renderers, such as raw HTML, or another custom format. + +### Usage + +```ts twoslash {11} title="studiocms.config.mjs" +import { defineStudioCMSConfig, type CustomRenderer } from 'studiocms'; +// ---cut--- +const customRenderer: CustomRenderer = { + name: 'CustomRenderer', + renderer: async (content: string) => { + // Custom rendering logic here + return content; + }, +}; + +export default defineStudioCMSConfig({ + rendererConfig: { + renderer: customRenderer + }, +}) +``` diff --git a/www/docs/src/content/docs/customizing/studiocms-renderers/markdoc.mdx b/www/docs/src/content/docs/customizing/studiocms-renderers/markdoc.mdx index 01cd3066d..801063abf 100644 --- a/www/docs/src/content/docs/customizing/studiocms-renderers/markdoc.mdx +++ b/www/docs/src/content/docs/customizing/studiocms-renderers/markdoc.mdx @@ -9,7 +9,7 @@ sidebar: import ReadMore from '~/components/ReadMore.astro' import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'; -import { PackageManagers } from 'starlight-package-managers'; +import PackageManagers from '~/components/PackageManagers.astro'; StudioCMS's MarkDoc renderer allows you to define custom renderers for your content. This allows you to define custom rendering logic for your content. @@ -25,7 +25,7 @@ Normally, users will not need to install the `@studiocms/renderers` package dire 1. Install `@astrojs/react` using the following command: - + 2. Install the `@studiocms/renderers` package as a dependency using the following command: @@ -38,28 +38,26 @@ Normally, users will not need to install the `@studiocms/renderers` package dire When using only the `astro.config.mjs` file, you can add the MarkDoc React renderer to your configuration like so: - ```js title="astro.config.mjs" ins={5-6, 14, 19-21} mark={17} + ```ts twoslash title="astro.config.mjs" import { defineConfig } from 'astro/config'; import db from '@astrojs/db'; import node from '@astrojs/node'; import studioCMS from 'studiocms'; - import react from '@astrojs/react'; - import markDocRenderReact from '@studiocms/renderers/exports/markdoc/react'; + import react from '@astrojs/react'; // [!code ++] + import markDocRenderReact from '@studiocms/renderers/exports/markdoc/react'; // [!code ++] export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', + site: 'https://demo.studiocms.xyz/', output: 'server', adapter: node({ mode: "standalone" }), integrations: [ db(), - react(), + react(), // [!code ++] studioCMS({ rendererConfig: { - renderer: "markdoc", + renderer: "markdoc", // [!code highlight] markdocConfig: { - renderType: markDocRenderReact({ - // Define your custom React components here - }), + renderType: markDocRenderReact(), // [!code ++] } }, }), @@ -72,37 +70,35 @@ Normally, users will not need to install the `@studiocms/renderers` package dire When using the `studiocms.config.mjs` file alongside your `astro.config.mjs`, you can add the MarkDoc React renderer to your configuration like so: - ```js title="astro.config.mjs" ins={5, 13} + ```ts twoslash title="astro.config.mjs" import { defineConfig } from 'astro/config'; import db from '@astrojs/db'; import node from '@astrojs/node'; import studioCMS from 'studiocms'; - import react from '@astrojs/react'; + import react from '@astrojs/react'; // [!code ++] export default defineConfig({ - site: 'https://demo.astro-studiocms.xyz/', + site: 'https://demo.studiocms.xyz/', output: 'server', adapter: node({ mode: "standalone" }), integrations: [ db(), - react(), + react(), // [!code ++] studioCMS(), ], }); ``` - ```js title="studiocms.config.mjs" ins={2, 9-11} mark={7} + ```ts twoslash title="studiocms.config.mjs" import { defineStudioCMSConfig } from "studiocms"; - import markDocRenderReact from '@studiocms/renderers/exports/markdoc/react'; + import markDocRenderReact from '@studiocms/renderers/exports/markdoc/react'; // [!code ++] export default defineStudioCMSConfig({ //...Rest of your StudioCMS configuration rendererConfig: { - renderer: "markdoc", + renderer: "markdoc", // [!code highlight] markdocConfig: { - renderType: markDocRenderReact({ - // Define your custom React components here - }), + renderType: markDocRenderReact(), // [!code ++] } }, }); @@ -111,4 +107,4 @@ Normally, users will not need to install the `@studiocms/renderers` package dire -For more information on how to configure the MarkDoc renderer, see the [MarkDoc Configuration](/config-reference/markdoc-config/) documentation. \ No newline at end of file +For more information on how to configure the MarkDoc renderer, see the [MarkDoc Configuration](/config-reference/markdoc-config/) documentation. diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/button.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/button.mdx new file mode 100644 index 000000000..bbdef99e0 --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/button.mdx @@ -0,0 +1,261 @@ +--- +title: Button +--- + +import { Button } from '@studiocms/ui/components'; +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; + +A button component with support for different colors, sizes and states out of the box. You can also customize it to your needs! + +## Usage + +Using the button component is easy. Check out the example below: + + + + + + + + + ```astro + --- + import { Button } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Disabled + +You can disable the button component via the `disabled` attribute: + + + + + + + + + ```astro "disabled" + --- + import { Button } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Sizes + +The button component supports three different sizes out of the box: + + + + + + + + + + + ```astro /size='(?:sm|lg)'/ + --- + import { Button } from '@studiocms/ui/components'; + --- + + + + + ``` + + + +### Colors + +There is five default colorways that can be used right away: +- Default +- Primary +- Success +- Warning +- Danger + + + + + + + + + + + + + ```astro /color='[a-z]+'/ + --- + import { Button } from '@studiocms/ui/components'; + --- + + + + + + + ``` + + + +### Variants + +In addition to colors, the button component can be displayed in three different variants: + + + + + + + + + + + ```astro /variant=\"[a-z]+\"/ + --- + import { Button } from '@studiocms/ui/components'; + --- + + + + + ``` + + + +### Polymorphic (rendered as anchor tag) + +Thanks to Astro's `Polymorphic` type, you can change the button's parent component into whatever HTML tag you need it to be! +Here's an example where the button is an `` tag instead of a ` + + + + ```astro "as='a'" + --- + import { Button } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Custom Styles + +As mentioned earlier, you can apply your custom styles to the button component! Here's a gradient button to show you how it's done: + +:::danger[Custom styles in production] +Due to Astro bundling CSS in an honestly, weird way, your custom styles will get overwritten in production **unless you use `!important` or make +them inline-styles!** +::: + + + + + + + + + ```astro /style="(?:[^"]*)"/ + --- + import { Button } from '@studiocms/ui/components'; + --- + + + ``` + + + ```astro ins={9-13} + --- + import { Button } from '@studiocms/ui/components'; + --- + + + + ``` + + diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/card.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/card.mdx new file mode 100644 index 000000000..a2b85b85a --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/card.mdx @@ -0,0 +1,83 @@ +--- +title: Card +--- + +import { Card } from '@studiocms/ui/components'; +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; + +A simple card component to wrap other stuff in! + +## Usage + + + + + + Content + + + + + ```astro + --- + import { Card } from '@studiocms/ui/components'; + --- + + + Content + + ``` + + + +### Full Width + +You can set the card to fill it's parent container using the `fullWidth` param: + + + + + + Content + + + + + ```astro "fullWidth" + --- + import { Card } from '@studiocms/ui/components'; + --- + + + Content + + ``` + + + +### Polymorphic + +A card can be anything you want it to be, literally! Cards support Astro's `Polymorphic` type, meaning you can render the card +as whatever you want by passing the `as` attribute. Here's a card that renders as an `` tag instead of a `
`: + + + + + + studiocms.xyz + + + + + ```astro "as=\"a\"" + --- + import { Card } from '@studiocms/ui/components'; + --- + + + studiocms.xyz + + ``` + + diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/center.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/center.mdx new file mode 100644 index 000000000..ece621549 --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/center.mdx @@ -0,0 +1,34 @@ +--- +title: Center +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import { Center } from '@studiocms/ui/components'; + + +This is only here to annoy Jumper. Hi Jumper! + + +Jokes aside. This is a wrapper that saves you some time by abstracting the `flex` or `grid` shenanigans into a component. You can use it like this: + + + + +
+ Hi Jumper! +
+
+
+ + ```astro + --- + import { Center } from '@studiocms/ui/components'; + --- + +
+ Hi Jumper! +
+ ``` +
+
diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/checkbox.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/checkbox.mdx new file mode 100644 index 000000000..5e1b71f32 --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/checkbox.mdx @@ -0,0 +1,119 @@ +--- +title: Checkbox +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import { Checkbox, Row } from '@studiocms/ui/components'; + +A custom checkbox component with support for sizes and colors. Form compatible. + +## Usage + + + + + + + + + ```astro + --- + import { Checkbox } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Sizes + +There's three different sizes for checkboxes: + + + + + + + + + + + + + ```astro /size="[a-z]+"/ + --- + import { Checkbox } from '@studiocms/ui/components'; + --- + + + + + ``` + + + +### Colors + +The checkbox component supports all default colorways. + + + + + + + + + + + + + + + ```astro /color="[a-z]+"/ + --- + import { Checkbox } from '@studiocms/ui/components'; + --- + + + + + + + ``` + + + +### Form Support + +If you want to use this component in a form, you're in luck! There's two props you can pass: `isRequired` and `name`. + +The first one does what it says it does, while the latter sets the `name` attribute so you can access the checkbox in, for example, +the `FormData` returned by a submission. Here's an example showing how to set both of them: + + + + + + + + + ```astro ins={8-9} + --- + import { Checkbox } from '@studiocms/ui/components'; + --- + + + ``` + + + +:::note +If no name is set, a random one is generated for the component. +::: diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/divider.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/divider.mdx new file mode 100644 index 000000000..6e5b084dc --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/divider.mdx @@ -0,0 +1,30 @@ +--- +title: Divider +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import { Divider } from '@studiocms/ui/components'; + +A simple divider. Allows for showing a label in the center, which is helpful for seperating sidebars or other structured content. + + + + + + Divider + + + + + ```astro + --- + import { Divider } from '@studiocms/ui/components'; + --- + + + Divider + + ``` + + diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/dropdown.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/dropdown.mdx new file mode 100644 index 000000000..993fb840a --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/dropdown.mdx @@ -0,0 +1,244 @@ +--- +title: Dropdown +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import DropdownScript from '~/components/DropdownScript.astro'; +import { Dropdown, Button, Row } from '@studiocms/ui/components'; + +:::caution[Helper required] +This component requires a **helper**. Make sure to read the documentation carefully so you know how to use it. +::: + +A dropdown component that takes care of all the annoying bits for you, with added support for programmatic triggers on top. + +## Usage + + + + + + + + + + + ```astro + --- + import { Dropdown, Button } from '@studiocms/ui/components'; + --- + + + + + ``` + ```ts twoslash + import { DropdownHelper } from '@studiocms/ui/components'; + + const dropdown = new DropdownHelper('dropdown'); + ``` + + + +### Dropdown Position + +You can change the dropdowns position by supplying the `align` prop. + + + + + + + + + + + + + + + + + + + ```astro "align='start'" + --- + import { Dropdown, Button } from '@studiocms/ui/components'; + --- + + + + + + + ``` + ```ts twoslash + import { DropdownHelper } from '@studiocms/ui/components'; + + const dropdown = new DropdownHelper('dropdown'); + ``` + + + +### Right-Click Triggering + +You can tell the dropdown wrapper to only show the dropdown when it's children are right-clicked: + + + + + + + + + + + ```astro "triggerOn='right'" + --- + import { Dropdown, Button } from '@studiocms/ui/components'; + --- + + + + + ``` + ```ts twoslash + import { DropdownHelper } from '@studiocms/ui/components'; + + const dropdown = new DropdownHelper('dropdown'); + ``` + + + +:::note +You can also tell the dropdown to trigger on both left- & right-click by using the `triggerOn='both'` prop. +::: + +### Disabled + +You can disable a dropdown by passing the `disabled` prop. + +```astro "disabled" + + + +``` + +### Option Options + +No, you read that right. You can customize the options too. You can individually disable them and also change their color to any of the default colors: + + + + + + + + + + + ```astro ins={7-14} + --- + import { Dropdown, Button } from '@studiocms/ui/components'; + --- + + + + + ``` + ```ts twoslash + import { DropdownHelper } from '@studiocms/ui/components'; + + const dropdown = new DropdownHelper('dropdown'); + ``` + + + +### Controlling Dropdowns Programatically + +You know how, this entire page, we've been assigning our `DropdownHelper` to a variable? There's a reason for that. The DropdownHelper allows +you to acces some built-in functions for programatically toggling, showing and hiding the dropdown. You can even register a callback for when one of the +dropdowns options has been clicked! + +```ts twoslash +import { DropdownHelper } from '@studiocms/ui/components'; + +const dropdown = new DropdownHelper('dropdown'); + +dropdown.registerClickCallback((value) => { + // `value` will be the value you gave your option in the dropdown wrapper. + console.log(value); +}); + +// You can toggle the dropdown like this: +dropdown.toggle(); + +// Instead of toggling, you can simply show or hide the dropdown: +dropdown.show(); +dropdown.hide(); +``` + +{/* All the helpers are in here 🥲 */} + diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/input.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/input.mdx new file mode 100644 index 000000000..1a0f267f1 --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/input.mdx @@ -0,0 +1,100 @@ +--- +title: Input +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import { Input } from '@studiocms/ui/components'; + +A simple input component with support for easy labels and placeholders. + +## Usage + + + + + + + + + ```astro + --- + import { Input } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Password Inputs + +You can set the input's type to `password` using the `type` prop. + + + + + + + + + ```astro "type='password'" + --- + import { Input } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Disabled + +You can disable the input altogether by using the `disabled` prop. + + + + + + + + + ```astro "disabled" + --- + import { Input } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Form Support + +Inputs have full form support. You can use the `isRequired` and `name` attributes as needed. + +The first one does what it says it does, while the latter sets the `name` attribute so you can access the input in, for example, +the `FormData` returned by a submission. Here's an example showing how to set both of them: + + + + + + + + + ```astro "isRequired" "name=\"example-input\"" + --- + import { Input } from '@studiocms/ui/components'; + --- + + + ``` + + + +:::note +If no name is set, a random one is generated for the component. +::: + +{/* Disabled, isRequired, type, name, class */} diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/modal.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/modal.mdx new file mode 100644 index 000000000..e7236101d --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/modal.mdx @@ -0,0 +1,274 @@ +--- +title: Modal +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import ModalScript from '~/components/ModalScript.astro'; +import { Modal, Button, Row } from '@studiocms/ui/components'; + + +A dropdown component that takes care of all the annoying bits for you, with added support for programmatic triggers on top. + +## Usage + + + + + +

Header Content

+
Modal Content
+
+ +
+
+ + ```astro + --- + import { Modal, Button } from '@studiocms/ui/components'; + --- + + +

Header Content

+
Modal Content
+
+ + ``` + ```ts twoslash + import { ModalHelper } from '@studiocms/ui/components'; + + const modal = new ModalHelper('modal', 'modal-trigger'); + ``` +
+
+ +### Size + +You can change the modal's size to one of three presets. + + + + + +

Small Modal

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ +

Medium Content

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ +

Large Content

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ + + + + + +
+
+ + ```astro /size="[a-z]+"/ + --- + import { Modal, Button } from '@studiocms/ui/components'; + --- + + +

Small Modal

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ + + + ``` + ```ts twoslash + import { ModalHelper } from '@studiocms/ui/components'; + + const modal = new ModalHelper('modal', 'modal-trigger'); + ``` +
+
+ +### Dismissable + +You can change whether a modal can be dismissed by clicking outside of it via the `dismissable` prop. + + + + + +

Non-dismissable

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ + +
+
+ + ```astro "dismissable={false}" + --- + import { Modal, Button } from '@studiocms/ui/components'; + --- + + +

Non-dismissable

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ + ``` + ```ts twoslash + import { ModalHelper } from '@studiocms/ui/components'; + + const modal = new ModalHelper('modal', 'modal-trigger'); + ``` +
+
+ +If a modal has buttons (see below), the `x` button in the top right corner will disappear as well. + +### Buttons + +Modals support both a `Cancel` and a `Confirm` button. You can use both at the same time, or one of them on it's own. + + + + + +

Buttons

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ + +
+
+ + ```astro "buttons={['cancel','confirm']}" + --- + import { Modal, Button } from '@studiocms/ui/components'; + --- + + +

Buttons

+
+ Lorem ipsum dolor sit amet. Est corporis rerum est reprehenderit nesciunt qui quibusdam quam non totam quia. + Et porro unde et rerum aliquam nam consectetur dolorum et unde optio At delectus alias. +
+
+ + ``` + ```ts twoslash + import { ModalHelper } from '@studiocms/ui/components'; + + const modal = new ModalHelper('modal', 'modal-trigger'); + ``` +
+
+ +:::note +The order of the `button` prop array does not influence the order of the buttons on the form. +::: + +### Registering Callbacks + +If you want to implement functionality based on which of the buttons is clicked, you can register a callback on each of them. + +```ts twoslash ins={5-7,9-11} +import { ModalHelper } from '@studiocms/ui/components'; + +const modal = new ModalHelper('modal', 'modal-trigger'); + +modal.registerCancelCallback(() => { + // Your logic here +}); + +modal.registerConfirmCallback(() => { + // Your logic here +}); +``` + +### Form Support + +You can turn your modals into forms by supplying the `isForm` prop! This turns the `Cancel` button into a reset button and the `Confirm` button into a submission button. +This only changes their types, not their text. + +By using the `registerConfirmCallback` function, you can retrieve the `FormData` after the `Confirm` button is clicked. Any inputs in the modal will be included. + +```ts twoslash "formData" +import { ModalHelper } from '@studiocms/ui/components'; + +const modal = new ModalHelper('modal', 'modal-trigger'); + +modal.registerConfirmCallback((formData) => { + // Your logic here +}); +``` + +### Binding Triggers + +You can add multiple triggers to your modal by using the `bindTrigger` function in combination with an element's ID. + +```ts twoslash ins={4-5} +import { ModalHelper } from '@studiocms/ui/components'; + +const modal = new ModalHelper('modal', 'modal-trigger'); +modal.bindTrigger('modal-trigger-two'); +modal.bindTrigger('modal-trigger-three'); +``` + +### Controlling Modals Programatically + +Similar to [dropdowns](/customizing/studiocms-ui/components/dropdown), modals can be shown and hidden programatically: + +```ts twoslash ins={5-6} +import { ModalHelper } from '@studiocms/ui/components'; + +const modal = new ModalHelper('modal', 'modal-trigger'); + +modal.show(); +modal.hide(); +``` + + diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/radio-group.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/radio-group.mdx new file mode 100644 index 000000000..d339166f7 --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/radio-group.mdx @@ -0,0 +1,182 @@ +--- +title: Radio Group +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import { RadioGroup, Row } from '@studiocms/ui/components'; + +A custom radio group component with support for sizes and colors. Form compatible. + +## Usage + + + + + + + + + ```astro + --- + import { RadioGroup } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Direction + +You can change a radio group to be displayed horizontally by using the `horizontal` prop: + + + + + + + + + ```astro "horizontal" + --- + import { RadioGroup } from '@studiocms/ui/components'; + --- + + + ``` + + + +### Default Value + +You can set a default selected option via the `defaultValue` prop. + + + + + + + + + ```astro "defaultValue='opt-1'" + --- + import { RadioGroup } from '@studiocms/ui/components'; + --- + + + + ``` + + + +### Colors + +The radio group component supports all default colorways. + + + + + + + + + + + + + + + ```astro "color=\"primary\"" + --- + import { RadioGroup } from '@studiocms/ui/components'; + --- + + + + ``` + + + +### Disabling + +You can disable either the entire radio group (by passing the `disabled` prop) or a single option via the options. The example +below shows how to do the latter: + + + + + + + + + ```astro "disabled: true" + --- + import { RadioGroup } from '@studiocms/ui/components'; + --- + + + + ``` + + + +### Form Support + +Inputs have full form support. You can use the `isRequired` and `name` attributes as needed. + +The first one does what it says it does, while the latter sets the `name` attribute so you can access the input in, for example, +the `FormData` returned by a submission. Here's an example showing how to set both of them: + +```astro "isRequired" "name='required-radio'" +--- +import { RadioGroup } from '@studiocms/ui/components'; +--- + + +``` + +:::note +If no name is set, a random one is generated for the component. +::: diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/row.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/row.mdx new file mode 100644 index 000000000..f07931988 --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/row.mdx @@ -0,0 +1,90 @@ +--- +title: Row +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import { Row } from '@studiocms/ui/components'; + +A small `flex: row` wrapper. Abstracts all the flex weirdness away into a component. + +## Usage + + + + + + Row Item 1 + Row Item 2 + Row Item 3 + + + + + ```astro + --- + import { Row } from '@studiocms/ui/components'; + --- + + + Row Item 1 + Row Item 2 + Row Item 3 + + ``` + + + +### `align-items: center` + +You can pass the `alignCenter` prop to add the `align-items: center` CSS property to the row. + +```astro "alignCenter" +--- +import { Row } from '@studiocms/ui/components'; +--- + + + + +``` + +### Gap Size + +You can change the gap size of the row via the `gapSize` prop, which can be set to one of `sm`, `md` or `lg`. + + + + + + Small Row + Small Row + Small Row + + + Medium Row + Medium Row + Medium Row + + + Large Row + Large Row + Large Row + + + + + ```astro "gapSize=\"sm\"" + --- + import { Row } from '@studiocms/ui/components'; + --- + + + Small Row + Small Row + Small Row + + + ``` + + diff --git a/www/docs/src/content/docs/customizing/studiocms-ui/components/textarea.mdx b/www/docs/src/content/docs/customizing/studiocms-ui/components/textarea.mdx new file mode 100644 index 000000000..e92249d1d --- /dev/null +++ b/www/docs/src/content/docs/customizing/studiocms-ui/components/textarea.mdx @@ -0,0 +1,79 @@ +--- +title: Textarea +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PreviewCard from '~/components/PreviewCard.astro'; +import { Textarea } from '@studiocms/ui/components'; + +A simple textarea component with support for easy labels and placeholders. + +## Usage + + + + +