diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17e5847..b2d6e1f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ Currently, it is made up of [NPM workspaces](https://docs.npmjs.com/cli/v7/using Packages: 1. [demo](https://github.com/ayoayco/astro-reactive-library/tree/main/demo#readme) - found in the directory `demo` - the demo Astro app that we use to test and demonstrate the library features -2. [astro-reactive-form](https://github.com/ayoayco/astro-reactive-library/tree/main/packages/astro-reactive-form#readme) - found in the directory `packages/astro-reactive-form` +2. [form](https://github.com/ayoayco/astro-reactive-library/tree/main/packages/form#readme) - found in the directory `packages/form` - allows developers to programatically build a Form for Astro 3. [astro-reactive-validator](https://github.com/ayoayco/astro-reactive-library/tree/main/packages/astro-reactive-validator) - found in the directory `packages/astro-reactive-validator` @@ -98,7 +98,7 @@ npm run lint:fix As mentioned above, this project involves packages that are intened to be used in Astro applications. The demo app is our way to test and play with the packages. -If you plan to add features or fix bugs that are found in the packages, such as `astro-reactive-form`, you can find the source code for this inside the `packages` directory. +If you plan to add features or fix bugs that are found in the packages, such as `@astro-reactive/form`, you can find the source code for this inside the `packages` directory. Thank you again for your interest in contributing! diff --git a/README.md b/README.md index 0e367d6..2d6d3fc 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ | Packages | Version | Docs | Description | | --- | --- | --- | --- | -| [astro-reactive-form](https://github.com/ayoayco/astro-reactive-library/blob/main/packages/astro-reactive-form/README.md) | [![npm](https://img.shields.io/npm/v/astro-reactive-form)](https://github.com/ayoayco/astro-reactive-library/blob/main/packages/astro-reactive-form/RELEASE.md) | 🛠 | generate a dynamic form which can be modified programatically | -| astro-reactive-validator | 🛠 | 🛠 | set of utilities for validating inputs | +| [@astro-reactive/form](https://github.com/ayoayco/astro-reactive-library/blob/main/packages/form/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](https://www.npmjs.com/package/@astro-reactive/form) | 🛠 | generate a dynamic form which can be modified programatically | +| [@astro-reactive/validator](https://github.com/ayoayco/astro-reactive-library/blob/main/packages/validator/README.md)| ![npm](https://img.shields.io/npm/v/@astro-reactive/validator) | 🛠 | set up validators for your form easily | | astro-reactive-datagrid | 🛠 | 🛠 | generate a dynamic datagrid or table of values | # HACKTOBERFEST 2022 diff --git a/demo/README.md b/apps/demo/README.md similarity index 100% rename from demo/README.md rename to apps/demo/README.md diff --git a/demo/astro.config.mjs b/apps/demo/astro.config.mjs similarity index 100% rename from demo/astro.config.mjs rename to apps/demo/astro.config.mjs diff --git a/demo/package.json b/apps/demo/package.json similarity index 77% rename from demo/package.json rename to apps/demo/package.json index 0bf63fc..1ba901c 100644 --- a/demo/package.json +++ b/apps/demo/package.json @@ -3,11 +3,7 @@ "description": "Demo App for Astro Reactive Library", "type": "module", "version": "0.0.1", - "author": { - "name": "Ayo Ayco", - "email": "ayo@ayco.io", - "url": "https://ayco.io" - }, + "author": "Ayo Ayco (https://ayco.io)", "private": true, "scripts": { "dev": "astro dev", @@ -17,8 +13,9 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.4", - "astro-reactive-form": "file:packages/astro-reactive-form" + "@astro-reactive/form": "file:packages/form", + "@astro-reactive/validator": "file:packages/validator", + "astro": "^1.5.0" }, "main": "index.js", "repository": { diff --git a/demo/public/favicon.svg b/apps/demo/public/favicon.svg similarity index 100% rename from demo/public/favicon.svg rename to apps/demo/public/favicon.svg diff --git a/apps/demo/public/validator.js b/apps/demo/public/validator.js new file mode 100644 index 0000000..13d45ac --- /dev/null +++ b/apps/demo/public/validator.js @@ -0,0 +1,10 @@ + + + const form = document.querySelector('form'); + form.addEventListener('submit', (e) => { + e.preventDefault(); + console.log('build script'); + }); + + + \ No newline at end of file diff --git a/demo/src/env.d.ts b/apps/demo/src/env.d.ts similarity index 100% rename from demo/src/env.d.ts rename to apps/demo/src/env.d.ts diff --git a/demo/src/pages/index.astro b/apps/demo/src/pages/index.astro similarity index 54% rename from demo/src/pages/index.astro rename to apps/demo/src/pages/index.astro index 136844d..93572ae 100644 --- a/demo/src/pages/index.astro +++ b/apps/demo/src/pages/index.astro @@ -1,21 +1,27 @@ --- -import { +import Form, { ControlConfig, - FormControl, FormGroup, -} from "astro-reactive-form/core"; -import Form from "astro-reactive-form"; + FormControl, +} from "@astro-reactive/form"; +import { Validators } from "@astro-reactive/validator"; const form = new FormGroup([ { name: "username", label: "Username", - placeholder: "astroIscool", + validators: [Validators.required], + }, + { + name: "email", + label: "Email", + validators: [Validators.email, Validators.required], }, { name: "password", label: "Password", type: "password", + validators: [Validators.required, Validators.minLength(8)], }, ]); @@ -49,28 +55,6 @@ form.get("is-awesome")?.setValue("checked");

Astro Reactive Form

-
- + diff --git a/demo/tsconfig.json b/apps/demo/tsconfig.json similarity index 100% rename from demo/tsconfig.json rename to apps/demo/tsconfig.json diff --git a/docs/.gitignore b/apps/docs/.gitignore similarity index 100% rename from docs/.gitignore rename to apps/docs/.gitignore diff --git a/docs/README.md b/apps/docs/README.md similarity index 100% rename from docs/README.md rename to apps/docs/README.md diff --git a/docs/astro.config.mjs b/apps/docs/astro.config.mjs similarity index 100% rename from docs/astro.config.mjs rename to apps/docs/astro.config.mjs diff --git a/docs/package-lock.json b/apps/docs/package-lock.json similarity index 100% rename from docs/package-lock.json rename to apps/docs/package-lock.json diff --git a/docs/package.json b/apps/docs/package.json similarity index 96% rename from docs/package.json rename to apps/docs/package.json index fb518aa..6cca086 100644 --- a/docs/package.json +++ b/apps/docs/package.json @@ -36,5 +36,6 @@ "bugs": { "url": "https://github.com/Rishav-12/astro-reactive-library/issues" }, - "homepage": "https://github.com/Rishav-12/astro-reactive-library#readme" + "homepage": "https://github.com/Rishav-12/astro-reactive-library#readme", + "devDependencies": {} } diff --git a/docs/public/default-og-image.png b/apps/docs/public/default-og-image.png similarity index 100% rename from docs/public/default-og-image.png rename to apps/docs/public/default-og-image.png diff --git a/docs/public/favicon.svg b/apps/docs/public/favicon.svg similarity index 100% rename from docs/public/favicon.svg rename to apps/docs/public/favicon.svg diff --git a/docs/public/make-scrollable-code-focusable.js b/apps/docs/public/make-scrollable-code-focusable.js similarity index 100% rename from docs/public/make-scrollable-code-focusable.js rename to apps/docs/public/make-scrollable-code-focusable.js diff --git a/docs/src/components/Footer/AvatarList.astro b/apps/docs/src/components/Footer/AvatarList.astro similarity index 100% rename from docs/src/components/Footer/AvatarList.astro rename to apps/docs/src/components/Footer/AvatarList.astro diff --git a/docs/src/components/Footer/Footer.astro b/apps/docs/src/components/Footer/Footer.astro similarity index 100% rename from docs/src/components/Footer/Footer.astro rename to apps/docs/src/components/Footer/Footer.astro diff --git a/docs/src/components/HeadCommon.astro b/apps/docs/src/components/HeadCommon.astro similarity index 100% rename from docs/src/components/HeadCommon.astro rename to apps/docs/src/components/HeadCommon.astro diff --git a/docs/src/components/HeadSEO.astro b/apps/docs/src/components/HeadSEO.astro similarity index 100% rename from docs/src/components/HeadSEO.astro rename to apps/docs/src/components/HeadSEO.astro diff --git a/docs/src/components/Header/AstroLogo.astro b/apps/docs/src/components/Header/AstroLogo.astro similarity index 100% rename from docs/src/components/Header/AstroLogo.astro rename to apps/docs/src/components/Header/AstroLogo.astro diff --git a/docs/src/components/Header/Header.astro b/apps/docs/src/components/Header/Header.astro similarity index 100% rename from docs/src/components/Header/Header.astro rename to apps/docs/src/components/Header/Header.astro diff --git a/docs/src/components/Header/LanguageSelect.css b/apps/docs/src/components/Header/LanguageSelect.css similarity index 100% rename from docs/src/components/Header/LanguageSelect.css rename to apps/docs/src/components/Header/LanguageSelect.css diff --git a/docs/src/components/Header/LanguageSelect.tsx b/apps/docs/src/components/Header/LanguageSelect.tsx similarity index 100% rename from docs/src/components/Header/LanguageSelect.tsx rename to apps/docs/src/components/Header/LanguageSelect.tsx diff --git a/docs/src/components/Header/Search.css b/apps/docs/src/components/Header/Search.css similarity index 100% rename from docs/src/components/Header/Search.css rename to apps/docs/src/components/Header/Search.css diff --git a/docs/src/components/Header/Search.tsx b/apps/docs/src/components/Header/Search.tsx similarity index 100% rename from docs/src/components/Header/Search.tsx rename to apps/docs/src/components/Header/Search.tsx diff --git a/docs/src/components/Header/SidebarToggle.tsx b/apps/docs/src/components/Header/SidebarToggle.tsx similarity index 100% rename from docs/src/components/Header/SidebarToggle.tsx rename to apps/docs/src/components/Header/SidebarToggle.tsx diff --git a/docs/src/components/Header/SkipToContent.astro b/apps/docs/src/components/Header/SkipToContent.astro similarity index 100% rename from docs/src/components/Header/SkipToContent.astro rename to apps/docs/src/components/Header/SkipToContent.astro diff --git a/docs/src/components/LeftSidebar/LeftSidebar.astro b/apps/docs/src/components/LeftSidebar/LeftSidebar.astro similarity index 100% rename from docs/src/components/LeftSidebar/LeftSidebar.astro rename to apps/docs/src/components/LeftSidebar/LeftSidebar.astro diff --git a/docs/src/components/PageContent/PageContent.astro b/apps/docs/src/components/PageContent/PageContent.astro similarity index 100% rename from docs/src/components/PageContent/PageContent.astro rename to apps/docs/src/components/PageContent/PageContent.astro diff --git a/docs/src/components/RightSidebar/MoreMenu.astro b/apps/docs/src/components/RightSidebar/MoreMenu.astro similarity index 100% rename from docs/src/components/RightSidebar/MoreMenu.astro rename to apps/docs/src/components/RightSidebar/MoreMenu.astro diff --git a/docs/src/components/RightSidebar/RightSidebar.astro b/apps/docs/src/components/RightSidebar/RightSidebar.astro similarity index 100% rename from docs/src/components/RightSidebar/RightSidebar.astro rename to apps/docs/src/components/RightSidebar/RightSidebar.astro diff --git a/docs/src/components/RightSidebar/TableOfContents.tsx b/apps/docs/src/components/RightSidebar/TableOfContents.tsx similarity index 100% rename from docs/src/components/RightSidebar/TableOfContents.tsx rename to apps/docs/src/components/RightSidebar/TableOfContents.tsx diff --git a/docs/src/components/RightSidebar/ThemeToggleButton.css b/apps/docs/src/components/RightSidebar/ThemeToggleButton.css similarity index 100% rename from docs/src/components/RightSidebar/ThemeToggleButton.css rename to apps/docs/src/components/RightSidebar/ThemeToggleButton.css diff --git a/docs/src/components/RightSidebar/ThemeToggleButton.tsx b/apps/docs/src/components/RightSidebar/ThemeToggleButton.tsx similarity index 100% rename from docs/src/components/RightSidebar/ThemeToggleButton.tsx rename to apps/docs/src/components/RightSidebar/ThemeToggleButton.tsx diff --git a/docs/src/config.ts b/apps/docs/src/config.ts similarity index 100% rename from docs/src/config.ts rename to apps/docs/src/config.ts diff --git a/docs/src/env.d.ts b/apps/docs/src/env.d.ts similarity index 100% rename from docs/src/env.d.ts rename to apps/docs/src/env.d.ts diff --git a/docs/src/languages.ts b/apps/docs/src/languages.ts similarity index 100% rename from docs/src/languages.ts rename to apps/docs/src/languages.ts diff --git a/docs/src/layouts/MainLayout.astro b/apps/docs/src/layouts/MainLayout.astro similarity index 100% rename from docs/src/layouts/MainLayout.astro rename to apps/docs/src/layouts/MainLayout.astro diff --git a/docs/src/pages/en/introduction.md b/apps/docs/src/pages/en/introduction.md similarity index 78% rename from docs/src/pages/en/introduction.md rename to apps/docs/src/pages/en/introduction.md index 0a83c50..c55cef6 100644 --- a/docs/src/pages/en/introduction.md +++ b/apps/docs/src/pages/en/introduction.md @@ -15,8 +15,8 @@ Let your data build your UI. Blazing-fast, reactive user interfaces with native | Packages | Version | Docs | Description | | --- | --- | --- | --- | -| [astro-reactive-form](https://github.com/ayoayco/astro-reactive-library/blob/main/packages/astro-reactive-form/README.md) | [![npm](https://img.shields.io/npm/v/astro-reactive-form)](https://www.npmjs.com/package/astro-reactive-form) | 🛠 | generate a dynamic form which can be modified programatically | -| astro-reactive-validator | 🛠 | 🛠 | set of utilities for validating inputs | +| [@astro-reactive/form](https://github.com/ayoayco/astro-reactive-library/blob/main/packages/form/README.md) | [![npm](https://img.shields.io/npm/v/@astro-reactive/form)](https://www.npmjs.com/package/@astro-reactive/form) | 🛠 | generate a dynamic form which can be modified programatically | +| [@astro-reactive/validator](https://github.com/ayoayco/astro-reactive-library/blob/main/packages/validator/README.md)| ![npm](https://img.shields.io/npm/v/@astro-reactive/validator) | 🛠 | set up validators for your form easily | | astro-reactive-datagrid | 🛠 | 🛠 | generate a dynamic datagrid or table of values | # Running locally diff --git a/docs/src/pages/en/page-2.md b/apps/docs/src/pages/en/page-2.md similarity index 82% rename from docs/src/pages/en/page-2.md rename to apps/docs/src/pages/en/page-2.md index 1e504f4..89e2cb5 100644 --- a/docs/src/pages/en/page-2.md +++ b/apps/docs/src/pages/en/page-2.md @@ -6,10 +6,10 @@ layout: ../../layouts/MainLayout.astro ![package-form-cover](https://user-images.githubusercontent.com/4262489/193812095-1cffa287-e2ac-4671-b604-1e2ff2e6f19e.png) -[![version](https://img.shields.io/npm/v/astro-reactive-form)](https://www.npmjs.com/package/astro-reactive-form) -[![license](https://img.shields.io/npm/l/astro-reactive-form)](https://www.npmjs.com/package/astro-reactive-form) -[![downloads](https://img.shields.io/npm/dt/astro-reactive-form)](https://www.npmjs.com/package/astro-reactive-form) -[![dependencies](https://img.shields.io/librariesio/release/npm/astro-reactive-form)](https://www.npmjs.com/package/astro-reactive-form) +[![version](https://img.shields.io/npm/v/@astro-reactive/form)](https://www.npmjs.com/package/@astro-reactive/form) +[![license](https://img.shields.io/npm/l/@astro-reactive/form)](https://www.npmjs.com/package/@astro-reactive/form) +[![downloads](https://img.shields.io/npm/dt/@astro-reactive/form)](https://www.npmjs.com/package/@astro-reactive/form) +[![dependencies](https://img.shields.io/librariesio/release/npm/@astro-reactive/form)](https://www.npmjs.com/package/@astro-reactive/form) # Astro Reactive Form 🔥 @@ -23,7 +23,7 @@ _[All contributions are welcome.](https://github.com/ayoayco/astro-reactive-libr In your Astro project: ``` -npm i astro-reactive-form +npm i @astro-reactive/form ``` ## Usage @@ -31,8 +31,8 @@ Use in an Astro page: ```astro --- -import { FormControl, FormGroup } from "astro-reactive-form/core"; -import Form from "astro-reactive-form"; +import { FormControl, FormGroup } from "@astro-reactive/form/core"; +import Form from "@astro-reactive/form"; // create a form group const form = new FormGroup([ diff --git a/docs/src/pages/en/page-3.md b/apps/docs/src/pages/en/page-3.md similarity index 100% rename from docs/src/pages/en/page-3.md rename to apps/docs/src/pages/en/page-3.md diff --git a/docs/src/pages/en/page-4.md b/apps/docs/src/pages/en/page-4.md similarity index 100% rename from docs/src/pages/en/page-4.md rename to apps/docs/src/pages/en/page-4.md diff --git a/docs/src/pages/index.astro b/apps/docs/src/pages/index.astro similarity index 100% rename from docs/src/pages/index.astro rename to apps/docs/src/pages/index.astro diff --git a/docs/src/styles/index.css b/apps/docs/src/styles/index.css similarity index 100% rename from docs/src/styles/index.css rename to apps/docs/src/styles/index.css diff --git a/docs/src/styles/theme.css b/apps/docs/src/styles/theme.css similarity index 100% rename from docs/src/styles/theme.css rename to apps/docs/src/styles/theme.css diff --git a/docs/tsconfig.json b/apps/docs/tsconfig.json similarity index 100% rename from docs/tsconfig.json rename to apps/docs/tsconfig.json diff --git a/demo/.vscode/extensions.json b/demo/.vscode/extensions.json deleted file mode 100644 index 22a1505..0000000 --- a/demo/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] -} diff --git a/demo/.vscode/launch.json b/demo/.vscode/launch.json deleted file mode 100644 index d642209..0000000 --- a/demo/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] -} diff --git a/docs/.vscode/extensions.json b/docs/.vscode/extensions.json deleted file mode 100644 index 22a1505..0000000 --- a/docs/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] -} diff --git a/docs/.vscode/launch.json b/docs/.vscode/launch.json deleted file mode 100644 index d642209..0000000 --- a/docs/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] -} diff --git a/package-lock.json b/package-lock.json index a3ad888..cf08d23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,27 +9,33 @@ "version": "0.0.0", "license": "ISC", "workspaces": [ - "demo", - "packages/astro-reactive-form", - "packages/astro-reactive-validator", - "docs" + "packages/form", + "packages/validator", + "apps/demo", + "apps/docs" ] }, - "demo": { + "apps/demo": { "name": "demo-astro-reactive-library", "version": "0.0.1", "license": "ISC", "dependencies": { - "astro": "^1.4.4", - "astro-reactive-form": "file:packages/astro-reactive-form" + "@astro-reactive/form": "file:packages/form", + "@astro-reactive/validator": "file:packages/validator", + "astro": "^1.5.0" } }, - "demo/node_modules/astro-reactive-form": { - "resolved": "demo/packages/astro-reactive-form", + "apps/demo/node_modules/@astro-reactive/form": { + "resolved": "apps/demo/packages/form", "link": true }, - "demo/packages/astro-reactive-form": {}, - "docs": { + "apps/demo/node_modules/@astro-reactive/validator": { + "resolved": "apps/demo/packages/validator", + "link": true + }, + "apps/demo/packages/form": {}, + "apps/demo/packages/validator": {}, + "apps/docs": { "name": "docs-astro-reactive-library", "version": "0.0.1", "license": "ISC", @@ -46,20 +52,19 @@ "preact": "^10.7.3", "react": "^18.1.0", "react-dom": "^18.1.0" - } + }, + "devDependencies": {} }, "node_modules/@algolia/autocomplete-core": { "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz", - "integrity": "sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg==", + "license": "MIT", "dependencies": { "@algolia/autocomplete-shared": "1.7.1" } }, "node_modules/@algolia/autocomplete-preset-algolia": { "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz", - "integrity": "sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg==", + "license": "MIT", "dependencies": { "@algolia/autocomplete-shared": "1.7.1" }, @@ -70,34 +75,29 @@ }, "node_modules/@algolia/autocomplete-shared": { "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz", - "integrity": "sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg==" + "license": "MIT" }, "node_modules/@algolia/cache-browser-local-storage": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz", - "integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==", + "license": "MIT", "dependencies": { "@algolia/cache-common": "4.14.2" } }, "node_modules/@algolia/cache-common": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz", - "integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg==" + "license": "MIT" }, "node_modules/@algolia/cache-in-memory": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz", - "integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==", + "license": "MIT", "dependencies": { "@algolia/cache-common": "4.14.2" } }, "node_modules/@algolia/client-account": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz", - "integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==", + "license": "MIT", "dependencies": { "@algolia/client-common": "4.14.2", "@algolia/client-search": "4.14.2", @@ -106,8 +106,7 @@ }, "node_modules/@algolia/client-analytics": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz", - "integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==", + "license": "MIT", "dependencies": { "@algolia/client-common": "4.14.2", "@algolia/client-search": "4.14.2", @@ -117,8 +116,7 @@ }, "node_modules/@algolia/client-common": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz", - "integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==", + "license": "MIT", "dependencies": { "@algolia/requester-common": "4.14.2", "@algolia/transporter": "4.14.2" @@ -126,8 +124,7 @@ }, "node_modules/@algolia/client-personalization": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz", - "integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==", + "license": "MIT", "dependencies": { "@algolia/client-common": "4.14.2", "@algolia/requester-common": "4.14.2", @@ -136,8 +133,7 @@ }, "node_modules/@algolia/client-search": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz", - "integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==", + "license": "MIT", "dependencies": { "@algolia/client-common": "4.14.2", "@algolia/requester-common": "4.14.2", @@ -146,42 +142,36 @@ }, "node_modules/@algolia/logger-common": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz", - "integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA==" + "license": "MIT" }, "node_modules/@algolia/logger-console": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz", - "integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==", + "license": "MIT", "dependencies": { "@algolia/logger-common": "4.14.2" } }, "node_modules/@algolia/requester-browser-xhr": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz", - "integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==", + "license": "MIT", "dependencies": { "@algolia/requester-common": "4.14.2" } }, "node_modules/@algolia/requester-common": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz", - "integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg==" + "license": "MIT" }, "node_modules/@algolia/requester-node-http": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz", - "integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==", + "license": "MIT", "dependencies": { "@algolia/requester-common": "4.14.2" } }, "node_modules/@algolia/transporter": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz", - "integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==", + "license": "MIT", "dependencies": { "@algolia/cache-common": "4.14.2", "@algolia/logger-common": "4.14.2", @@ -199,8 +189,16 @@ "node": ">=6.0.0" } }, + "node_modules/@astro-reactive/form": { + "resolved": "packages/form", + "link": true + }, + "node_modules/@astro-reactive/validator": { + "resolved": "packages/validator", + "link": true + }, "node_modules/@astrojs/compiler": { - "version": "0.25.2", + "version": "0.27.1", "license": "MIT" }, "node_modules/@astrojs/language-server": { @@ -270,14 +268,14 @@ } }, "node_modules/@astrojs/preact": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@astrojs/preact/-/preact-1.1.1.tgz", - "integrity": "sha512-33YXVOBSRn0mzx7/Qlnw96CaBLMrwRZ9XLBWEox4738FXzWTyV0JcZ7iwNMCC7vw9pjjnCFouqKlK3xFdBFcxg==", + "version": "1.2.0", + "license": "MIT", "dependencies": { "@babel/core": ">=7.0.0-0 <8.0.0", "@babel/plugin-transform-react-jsx": "^7.17.12", + "@preact/signals": "^1.1.0", "babel-plugin-module-resolver": "^4.1.0", - "preact-render-to-string": "^5.2.0" + "preact-render-to-string": "^5.2.4" }, "engines": { "node": "^14.18.0 || >=16.12.0" @@ -297,9 +295,8 @@ } }, "node_modules/@astrojs/react": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@astrojs/react/-/react-1.1.4.tgz", - "integrity": "sha512-eTIXRjvyrDRkMewL5KrbhkF+zl+KSkCgL7k8/BBMXPTUrtOZZY5N5oZbjFtvjxBSQ/dhMWp9g+SwloDldN5ZDg==", + "version": "1.2.0", + "license": "MIT", "dependencies": { "@babel/core": ">=7.0.0-0 <8.0.0", "@babel/plugin-transform-react-jsx": "^7.17.12" @@ -348,7 +345,7 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.19.3", + "version": "7.19.4", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -382,18 +379,11 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { - "version": "7.19.3", + "version": "7.19.5", "license": "MIT", "dependencies": { - "@babel/types": "^7.19.3", + "@babel/types": "^7.19.4", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -439,13 +429,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.18.9", "license": "MIT", @@ -509,10 +492,10 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", + "version": "7.19.4", "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.19.4" }, "engines": { "node": ">=6.9.0" @@ -529,7 +512,7 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", + "version": "7.19.4", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -550,12 +533,12 @@ } }, "node_modules/@babel/helpers": { - "version": "7.19.0", + "version": "7.19.4", "license": "MIT", "dependencies": { "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/traverse": "^7.19.4", + "@babel/types": "^7.19.4" }, "engines": { "node": ">=6.9.0" @@ -574,7 +557,7 @@ } }, "node_modules/@babel/parser": { - "version": "7.19.3", + "version": "7.19.4", "license": "MIT", "bin": { "parser": "bin/babel-parser.js" @@ -626,17 +609,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.19.3", + "version": "7.19.4", "license": "MIT", "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", + "@babel/generator": "^7.19.4", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", + "@babel/parser": "^7.19.4", + "@babel/types": "^7.19.4", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -645,10 +628,10 @@ } }, "node_modules/@babel/types": { - "version": "7.19.3", + "version": "7.19.4", "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-string-parser": "^7.19.4", "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" }, @@ -658,13 +641,11 @@ }, "node_modules/@docsearch/css": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.2.1.tgz", - "integrity": "sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==" + "license": "MIT" }, "node_modules/@docsearch/react": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.2.1.tgz", - "integrity": "sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==", + "license": "MIT", "dependencies": { "@algolia/autocomplete-core": "1.7.1", "@algolia/autocomplete-preset-algolia": "1.7.1", @@ -707,7 +688,7 @@ "license": "MIT" }, "node_modules/@eslint/eslintrc": { - "version": "1.3.2", + "version": "1.3.3", "dev": true, "license": "MIT", "dependencies": { @@ -728,11 +709,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.17.0", "dev": true, @@ -747,17 +723,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", "dev": true, @@ -782,15 +747,6 @@ "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "dev": true, - "license": "Apache-2.0", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "dev": true, @@ -838,11 +794,11 @@ "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", + "version": "0.3.17", "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, "node_modules/@ljharb/has-package-exports-patterns": { @@ -900,6 +856,28 @@ "version": "1.0.0-next.21", "license": "MIT" }, + "node_modules/@preact/signals": { + "version": "1.1.2", + "license": "MIT", + "dependencies": { + "@preact/signals-core": "^1.2.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + }, + "peerDependencies": { + "preact": "10.x" + } + }, + "node_modules/@preact/signals-core": { + "version": "1.2.2", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, "node_modules/@proload/core": { "version": "0.3.3", "license": "MIT", @@ -1034,7 +1012,7 @@ } }, "node_modules/@types/node": { - "version": "18.8.2", + "version": "18.8.5", "license": "MIT" }, "node_modules/@types/parse5": { @@ -1048,13 +1026,11 @@ }, "node_modules/@types/prop-types": { "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + "license": "MIT" }, "node_modules/@types/react": { "version": "17.0.50", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.50.tgz", - "integrity": "sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==", + "license": "MIT", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1063,8 +1039,7 @@ }, "node_modules/@types/react-dom": { "version": "18.0.6", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.6.tgz", - "integrity": "sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==", + "license": "MIT", "dependencies": { "@types/react": "*" } @@ -1075,8 +1050,7 @@ }, "node_modules/@types/scheduler": { "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + "license": "MIT" }, "node_modules/@types/unist": { "version": "2.0.6", @@ -1087,13 +1061,13 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "5.39.0", - "@typescript-eslint/type-utils": "5.39.0", - "@typescript-eslint/utils": "5.39.0", + "@typescript-eslint/scope-manager": "5.40.0", + "@typescript-eslint/type-utils": "5.40.0", + "@typescript-eslint/utils": "5.40.0", "debug": "^4.3.4", "ignore": "^5.2.0", "regexpp": "^3.2.0", @@ -1117,14 +1091,28 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.3.8", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.39.0", - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/typescript-estree": "5.39.0", + "@typescript-eslint/scope-manager": "5.40.0", + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/typescript-estree": "5.40.0", "debug": "^4.3.4" }, "engines": { @@ -1144,12 +1132,12 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/visitor-keys": "5.39.0" + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/visitor-keys": "5.40.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1160,12 +1148,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "5.39.0", - "@typescript-eslint/utils": "5.39.0", + "@typescript-eslint/typescript-estree": "5.40.0", + "@typescript-eslint/utils": "5.40.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1186,7 +1174,7 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "MIT", "engines": { @@ -1198,12 +1186,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/visitor-keys": "5.39.0", + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/visitor-keys": "5.40.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1223,17 +1211,32 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.3.8", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/utils": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.39.0", - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/typescript-estree": "5.39.0", + "@typescript-eslint/scope-manager": "5.40.0", + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/typescript-estree": "5.40.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1246,12 +1249,26 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.3.8", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.39.0", + "@typescript-eslint/types": "5.40.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1317,8 +1334,7 @@ }, "node_modules/algoliasearch": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz", - "integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==", + "license": "MIT", "dependencies": { "@algolia/cache-browser-local-storage": "4.14.2", "@algolia/cache-common": "4.14.2", @@ -1417,11 +1433,9 @@ } }, "node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" }, "node_modules/array-iterate": { "version": "1.1.4", @@ -1458,10 +1472,10 @@ } }, "node_modules/astro": { - "version": "1.4.4", + "version": "1.5.0", "license": "MIT", "dependencies": { - "@astrojs/compiler": "^0.25.0", + "@astrojs/compiler": "^0.27.1", "@astrojs/language-server": "^0.26.2", "@astrojs/markdown-remark": "^1.1.3", "@astrojs/telemetry": "^1.0.1", @@ -1482,6 +1496,7 @@ "common-ancestor-path": "^1.0.1", "cookie": "^0.5.0", "debug": "^4.3.4", + "deepmerge-ts": "^4.2.2", "diff": "^5.1.0", "eol": "^0.9.1", "es-module-lexer": "^0.10.5", @@ -1492,6 +1507,7 @@ "gray-matter": "^4.0.3", "html-entities": "^2.3.3", "html-escaper": "^3.0.3", + "import-meta-resolve": "^2.1.0", "kleur": "^4.1.4", "magic-string": "^0.25.9", "mime": "^3.0.0", @@ -1537,18 +1553,22 @@ "astro": "^1.0.0-rc.1" } }, - "node_modules/astro-reactive-form": { - "resolved": "packages/astro-reactive-form", - "link": true - }, - "node_modules/astro-reactive-validator": { - "resolved": "packages/astro-reactive-validator", - "link": true + "node_modules/astro/node_modules/semver": { + "version": "7.3.8", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/babel-plugin-module-resolver": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz", - "integrity": "sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA==", + "license": "MIT", "dependencies": { "find-babel-config": "^1.2.0", "glob": "^7.1.6", @@ -1779,7 +1799,7 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001415", + "version": "1.0.30001419", "funding": [ { "type": "opencollective", @@ -1895,8 +1915,19 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/ci-info": { - "version": "3.4.0", + "version": "3.5.0", "license": "MIT" }, "node_modules/cli-boxes": { @@ -2060,11 +2091,8 @@ "license": "MIT" }, "node_modules/convert-source-map": { - "version": "1.8.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.1" - } + "version": "1.9.0", + "license": "MIT" }, "node_modules/cookie": { "version": "0.5.0", @@ -2087,8 +2115,7 @@ }, "node_modules/csstype": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", - "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" + "license": "MIT" }, "node_modules/data-uri-to-buffer": { "version": "4.0.0", @@ -2157,11 +2184,21 @@ "node": ">=0.10.0" } }, + "node_modules/deepmerge-ts": { + "version": "4.2.2", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12.4.0" + } + }, "node_modules/defaults": { - "version": "1.0.3", + "version": "1.0.4", "license": "MIT", "dependencies": { "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/define-lazy-prop": { @@ -2186,7 +2223,7 @@ } }, "node_modules/demo-astro-reactive-library": { - "resolved": "demo", + "resolved": "apps/demo", "link": true }, "node_modules/dequal": { @@ -2223,7 +2260,7 @@ "license": "MIT" }, "node_modules/docs-astro-reactive-library": { - "resolved": "docs", + "resolved": "apps/docs", "link": true }, "node_modules/doctrine": { @@ -2249,7 +2286,7 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.271", + "version": "1.4.282", "license": "ISC" }, "node_modules/emmet": { @@ -2339,13 +2376,12 @@ } }, "node_modules/eslint": { - "version": "8.24.0", + "version": "8.25.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint/eslintrc": "^1.3.2", + "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -2491,11 +2527,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "dev": true, @@ -2558,17 +2589,6 @@ "node": ">=4.0" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/eslint/node_modules/globals": { "version": "13.17.0", "dev": true, @@ -2591,17 +2611,6 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/eslint/node_modules/strip-ansi": { "version": "6.0.1", "dev": true, @@ -2802,6 +2811,16 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "dev": true, @@ -2863,8 +2882,7 @@ }, "node_modules/find-babel-config": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.2.0.tgz", - "integrity": "sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA==", + "license": "MIT", "dependencies": { "json5": "^0.5.1", "path-exists": "^3.0.0" @@ -2875,20 +2893,11 @@ }, "node_modules/find-babel-config/node_modules/json5": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", + "license": "MIT", "bin": { "json5": "lib/cli.js" } }, - "node_modules/find-babel-config/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "engines": { - "node": ">=4" - } - }, "node_modules/find-up": { "version": "5.0.0", "license": "MIT", @@ -2903,6 +2912,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-up/node_modules/path-exists": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/find-yarn-workspace-root2": { "version": "1.2.16", "license": "Apache-2.0", @@ -3015,13 +3031,13 @@ "license": "ISC" }, "node_modules/glob": { - "version": "7.2.0", + "version": "7.2.3", "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -3033,13 +3049,14 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", + "version": "6.0.2", + "dev": true, "license": "ISC", "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/global-agent": { @@ -3057,6 +3074,19 @@ "node": ">=10.0" } }, + "node_modules/global-agent/node_modules/semver": { + "version": "7.3.8", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/globals": { "version": "11.12.0", "license": "MIT", @@ -3134,6 +3164,28 @@ "node": ">=6.0" } }, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.1", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/gray-matter/node_modules/sprintf-js": { + "version": "1.0.3", + "license": "BSD-3-Clause" + }, "node_modules/has": { "version": "1.0.3", "license": "MIT", @@ -3305,7 +3357,7 @@ } }, "node_modules/hastscript": { - "version": "7.0.2", + "version": "7.1.0", "license": "MIT", "dependencies": { "@types/hast": "^2.0.0", @@ -3583,10 +3635,11 @@ } }, "node_modules/is-unicode-supported": { - "version": "1.3.0", + "version": "0.1.0", + "dev": true, "license": "MIT", "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3629,11 +3682,11 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", + "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -3723,6 +3776,28 @@ "node": ">=6" } }, + "node_modules/load-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/load-yaml-file/node_modules/js-yaml": { + "version": "3.14.1", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/load-yaml-file/node_modules/sprintf-js": { + "version": "1.0.3", + "license": "BSD-3-Clause" + }, "node_modules/load-yaml-file/node_modules/strip-bom": { "version": "3.0.0", "license": "MIT", @@ -3749,29 +3824,84 @@ "license": "MIT" }, "node_modules/log-symbols": { - "version": "5.1.0", + "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { - "chalk": "^5.0.0", - "is-unicode-supported": "^1.1.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "5.0.1", + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/longest-streak": { "version": "3.0.1", "license": "MIT", @@ -3782,8 +3912,7 @@ }, "node_modules/loose-envify": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -4080,7 +4209,7 @@ } }, "node_modules/micromark": { - "version": "3.0.10", + "version": "3.1.0", "funding": [ { "type": "GitHub Sponsors", @@ -4750,75 +4879,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/mocha/node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/mocha/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, "node_modules/mocha/node_modules/diff": { "version": "5.0.0", "dev": true, @@ -4838,6 +4898,36 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -4846,43 +4936,6 @@ "node": ">=8" } }, - "node_modules/mocha/node_modules/is-unicode-supported": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/mocha/node_modules/log-symbols": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "dev": true, @@ -4894,22 +4947,19 @@ "node": ">=10" } }, + "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", "dev": true, "license": "MIT" }, - "node_modules/mocha/node_modules/nanoid": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "dev": true, @@ -4951,7 +5001,8 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.4", + "version": "3.3.3", + "dev": true, "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" @@ -5134,7 +5185,7 @@ } }, "node_modules/ora/node_modules/chalk": { - "version": "5.0.1", + "version": "5.1.2", "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -5143,6 +5194,30 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols": { + "version": "5.1.0", + "license": "MIT", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-limit": { "version": "3.1.0", "license": "MIT", @@ -5227,10 +5302,10 @@ "license": "MIT" }, "node_modules/path-exists": { - "version": "4.0.0", + "version": "3.0.0", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/path-is-absolute": { @@ -5346,10 +5421,16 @@ "node": ">=8" } }, + "node_modules/pkg-dir/node_modules/path-exists": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/pkg-up": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "license": "MIT", "dependencies": { "find-up": "^3.0.0" }, @@ -5359,8 +5440,7 @@ }, "node_modules/pkg-up/node_modules/find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "license": "MIT", "dependencies": { "locate-path": "^3.0.0" }, @@ -5370,8 +5450,7 @@ }, "node_modules/pkg-up/node_modules/locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "license": "MIT", "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -5382,8 +5461,7 @@ }, "node_modules/pkg-up/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -5396,8 +5474,7 @@ }, "node_modules/pkg-up/node_modules/p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "license": "MIT", "dependencies": { "p-limit": "^2.0.0" }, @@ -5405,16 +5482,8 @@ "node": ">=6" } }, - "node_modules/pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "engines": { - "node": ">=4" - } - }, "node_modules/postcss": { - "version": "8.4.17", + "version": "8.4.18", "funding": [ { "type": "opencollective", @@ -5462,10 +5531,19 @@ } } }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.4", + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/preact": { "version": "10.11.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.1.tgz", - "integrity": "sha512-1Wz5PCRm6Fg+6BTXWJHhX4wRK9MZbZBHuwBqfZlOdVm2NqPe8/rjYpufvYCwJSGb9layyzB2jTTXfpCTynLqFQ==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -5473,8 +5551,7 @@ }, "node_modules/preact-render-to-string": { "version": "5.2.5", - "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.5.tgz", - "integrity": "sha512-rEBn42C3Wh+AjPxXUbDkb6xw0cTJQgxdYlp6ytUR1uBZF647Wn6ykkopMeQlRl7ggX+qnYYjZ4Hs1abZENl7ww==", + "license": "MIT", "dependencies": { "pretty-format": "^3.8.0" }, @@ -5495,6 +5572,13 @@ "node": ">=10" } }, + "node_modules/preferred-pm/node_modules/path-exists": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "dev": true, @@ -5547,8 +5631,7 @@ }, "node_modules/pretty-format": { "version": "3.8.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", - "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" + "license": "MIT" }, "node_modules/prismjs": { "version": "1.29.0", @@ -5619,8 +5702,7 @@ }, "node_modules/react": { "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" }, @@ -5630,8 +5712,7 @@ }, "node_modules/react-dom": { "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" @@ -5811,8 +5892,7 @@ }, "node_modules/reselect": { "version": "4.1.6", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.6.tgz", - "integrity": "sha512-ZovIuXqto7elwnxyXbBtCPo9YFEr3uJqj2rRbcOOog1bmu2Ag85M4hixSwFWyaBMKXNgvPaJ9OSu9SkBPIeJHQ==" + "license": "MIT" }, "node_modules/resolve": { "version": "1.22.1", @@ -5985,10 +6065,6 @@ "node": ">=8.0" } }, - "node_modules/roarr/node_modules/sprintf-js": { - "version": "1.1.2", - "license": "BSD-3-Clause" - }, "node_modules/rollup": { "version": "2.78.1", "license": "MIT", @@ -6038,7 +6114,21 @@ } }, "node_modules/safe-buffer": { - "version": "5.1.2", + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT" }, "node_modules/sass-formatter": { @@ -6050,8 +6140,7 @@ }, "node_modules/scheduler": { "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" } @@ -6068,16 +6157,10 @@ } }, "node_modules/semver": { - "version": "7.3.7", + "version": "6.3.0", "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/semver-compare": { @@ -6202,7 +6285,7 @@ } }, "node_modules/sprintf-js": { - "version": "1.0.3", + "version": "1.1.2", "license": "BSD-3-Clause" }, "node_modules/string_decoder": { @@ -6212,24 +6295,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/string-width": { "version": "5.1.2", "license": "MIT", @@ -6667,7 +6732,7 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.9", + "version": "1.0.10", "funding": [ { "type": "opencollective", @@ -6757,10 +6822,10 @@ } }, "node_modules/vite": { - "version": "3.1.4", + "version": "3.1.8", "license": "MIT", "dependencies": { - "esbuild": "^0.15.6", + "esbuild": "^0.15.9", "postcss": "^8.4.16", "resolve": "^1.22.1", "rollup": "~2.78.0" @@ -6796,7 +6861,7 @@ } }, "node_modules/vite/node_modules/esbuild": { - "version": "0.15.10", + "version": "0.15.11", "hasInstallScript": true, "license": "MIT", "bin": { @@ -6806,32 +6871,32 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.15.10", - "@esbuild/linux-loong64": "0.15.10", - "esbuild-android-64": "0.15.10", - "esbuild-android-arm64": "0.15.10", - "esbuild-darwin-64": "0.15.10", - "esbuild-darwin-arm64": "0.15.10", - "esbuild-freebsd-64": "0.15.10", - "esbuild-freebsd-arm64": "0.15.10", - "esbuild-linux-32": "0.15.10", - "esbuild-linux-64": "0.15.10", - "esbuild-linux-arm": "0.15.10", - "esbuild-linux-arm64": "0.15.10", - "esbuild-linux-mips64le": "0.15.10", - "esbuild-linux-ppc64le": "0.15.10", - "esbuild-linux-riscv64": "0.15.10", - "esbuild-linux-s390x": "0.15.10", - "esbuild-netbsd-64": "0.15.10", - "esbuild-openbsd-64": "0.15.10", - "esbuild-sunos-64": "0.15.10", - "esbuild-windows-32": "0.15.10", - "esbuild-windows-64": "0.15.10", - "esbuild-windows-arm64": "0.15.10" + "@esbuild/android-arm": "0.15.11", + "@esbuild/linux-loong64": "0.15.11", + "esbuild-android-64": "0.15.11", + "esbuild-android-arm64": "0.15.11", + "esbuild-darwin-64": "0.15.11", + "esbuild-darwin-arm64": "0.15.11", + "esbuild-freebsd-64": "0.15.11", + "esbuild-freebsd-arm64": "0.15.11", + "esbuild-linux-32": "0.15.11", + "esbuild-linux-64": "0.15.11", + "esbuild-linux-arm": "0.15.11", + "esbuild-linux-arm64": "0.15.11", + "esbuild-linux-mips64le": "0.15.11", + "esbuild-linux-ppc64le": "0.15.11", + "esbuild-linux-riscv64": "0.15.11", + "esbuild-linux-s390x": "0.15.11", + "esbuild-netbsd-64": "0.15.11", + "esbuild-openbsd-64": "0.15.11", + "esbuild-sunos-64": "0.15.11", + "esbuild-windows-32": "0.15.11", + "esbuild-windows-64": "0.15.11", + "esbuild-windows-arm64": "0.15.11" } }, "node_modules/vite/node_modules/esbuild-darwin-arm64": { - "version": "0.15.10", + "version": "0.15.11", "cpu": [ "arm64" ], @@ -6966,6 +7031,13 @@ "node": ">=4" } }, + "node_modules/which-pm/node_modules/path-exists": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/widest-line": { "version": "4.0.1", "license": "MIT", @@ -7008,7 +7080,7 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.1.1", + "version": "6.2.1", "license": "MIT", "engines": { "node": ">=12" @@ -7156,8 +7228,9 @@ "url": "https://github.com/sponsors/wooorm" } }, - "packages/astro-reactive-form": { - "version": "0.2.5", + "packages/form": { + "name": "@astro-reactive/form", + "version": "0.4.1", "license": "MIT", "devDependencies": { "@types/chai": "^4.3.3", @@ -7167,7 +7240,7 @@ "@types/prettier": "^2.7.0", "@typescript-eslint/eslint-plugin": "^5.37.0", "@typescript-eslint/parser": "^5.37.0", - "astro": "^1.4.4", + "astro": "^1.5.0", "astro-component-tester": "^0.6.0", "chai": "^4.3.6", "eslint": "^8.23.1", @@ -7179,64 +7252,70 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "astro": "^1.0.0" + "astro": "^1.5.0" } }, - "packages/astro-reactive-validator": { - "version": "0.0.0", - "license": "ISC", - "dependencies": { - "astro": "^1.4.4" + "packages/validator": { + "name": "@astro-reactive/validator", + "version": "0.0.1", + "license": "MIT", + "devDependencies": { + "@types/chai": "^4.3.3", + "@types/eslint": "^8.4.6", + "@types/mocha": "^10.0.0", + "@types/node": "^18.7.18", + "@types/prettier": "^2.7.0", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", + "astro": "^1.5.0", + "astro-component-tester": "^0.6.0", + "chai": "^4.3.6", + "eslint": "^8.23.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "mocha": "^10.0.0", + "prettier": "^2.7.1", + "prettier-plugin-astro": "^0.5.4", + "typescript": "^4.8.3" + }, + "peerDependencies": { + "astro": "^1.5.0" } } }, "dependencies": { "@algolia/autocomplete-core": { "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz", - "integrity": "sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg==", "requires": { "@algolia/autocomplete-shared": "1.7.1" } }, "@algolia/autocomplete-preset-algolia": { "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz", - "integrity": "sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg==", "requires": { "@algolia/autocomplete-shared": "1.7.1" } }, "@algolia/autocomplete-shared": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz", - "integrity": "sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg==" + "version": "1.7.1" }, "@algolia/cache-browser-local-storage": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.14.2.tgz", - "integrity": "sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==", "requires": { "@algolia/cache-common": "4.14.2" } }, "@algolia/cache-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.14.2.tgz", - "integrity": "sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg==" + "version": "4.14.2" }, "@algolia/cache-in-memory": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.14.2.tgz", - "integrity": "sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==", "requires": { "@algolia/cache-common": "4.14.2" } }, "@algolia/client-account": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.14.2.tgz", - "integrity": "sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==", "requires": { "@algolia/client-common": "4.14.2", "@algolia/client-search": "4.14.2", @@ -7245,8 +7324,6 @@ }, "@algolia/client-analytics": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.14.2.tgz", - "integrity": "sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==", "requires": { "@algolia/client-common": "4.14.2", "@algolia/client-search": "4.14.2", @@ -7256,8 +7333,6 @@ }, "@algolia/client-common": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.14.2.tgz", - "integrity": "sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==", "requires": { "@algolia/requester-common": "4.14.2", "@algolia/transporter": "4.14.2" @@ -7265,8 +7340,6 @@ }, "@algolia/client-personalization": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.14.2.tgz", - "integrity": "sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==", "requires": { "@algolia/client-common": "4.14.2", "@algolia/requester-common": "4.14.2", @@ -7275,8 +7348,6 @@ }, "@algolia/client-search": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.14.2.tgz", - "integrity": "sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==", "requires": { "@algolia/client-common": "4.14.2", "@algolia/requester-common": "4.14.2", @@ -7284,43 +7355,31 @@ } }, "@algolia/logger-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.14.2.tgz", - "integrity": "sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA==" + "version": "4.14.2" }, "@algolia/logger-console": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.14.2.tgz", - "integrity": "sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==", "requires": { "@algolia/logger-common": "4.14.2" } }, "@algolia/requester-browser-xhr": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.14.2.tgz", - "integrity": "sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==", "requires": { "@algolia/requester-common": "4.14.2" } }, "@algolia/requester-common": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.14.2.tgz", - "integrity": "sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg==" + "version": "4.14.2" }, "@algolia/requester-node-http": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.14.2.tgz", - "integrity": "sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==", "requires": { "@algolia/requester-common": "4.14.2" } }, "@algolia/transporter": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.14.2.tgz", - "integrity": "sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==", "requires": { "@algolia/cache-common": "4.14.2", "@algolia/logger-common": "4.14.2", @@ -7334,8 +7393,52 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, + "@astro-reactive/form": { + "version": "file:packages/form", + "requires": { + "@types/chai": "^4.3.3", + "@types/eslint": "^8.4.6", + "@types/mocha": "^10.0.0", + "@types/node": "^18.7.18", + "@types/prettier": "^2.7.0", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", + "astro": "^1.5.0", + "astro-component-tester": "^0.6.0", + "chai": "^4.3.6", + "eslint": "^8.23.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "mocha": "^10.0.0", + "prettier": "^2.7.1", + "prettier-plugin-astro": "^0.5.4", + "typescript": "^4.8.3" + } + }, + "@astro-reactive/validator": { + "version": "file:packages/validator", + "requires": { + "@types/chai": "^4.3.3", + "@types/eslint": "^8.4.6", + "@types/mocha": "^10.0.0", + "@types/node": "^18.7.18", + "@types/prettier": "^2.7.0", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", + "astro": "^1.5.0", + "astro-component-tester": "^0.6.0", + "chai": "^4.3.6", + "eslint": "^8.23.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "mocha": "^10.0.0", + "prettier": "^2.7.1", + "prettier-plugin-astro": "^0.5.4", + "typescript": "^4.8.3" + } + }, "@astrojs/compiler": { - "version": "0.25.2" + "version": "0.27.1" }, "@astrojs/language-server": { "version": "0.26.2", @@ -7398,14 +7501,13 @@ } }, "@astrojs/preact": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@astrojs/preact/-/preact-1.1.1.tgz", - "integrity": "sha512-33YXVOBSRn0mzx7/Qlnw96CaBLMrwRZ9XLBWEox4738FXzWTyV0JcZ7iwNMCC7vw9pjjnCFouqKlK3xFdBFcxg==", + "version": "1.2.0", "requires": { "@babel/core": ">=7.0.0-0 <8.0.0", "@babel/plugin-transform-react-jsx": "^7.17.12", + "@preact/signals": "^1.1.0", "babel-plugin-module-resolver": "^4.1.0", - "preact-render-to-string": "^5.2.0" + "preact-render-to-string": "^5.2.4" } }, "@astrojs/prism": { @@ -7415,9 +7517,7 @@ } }, "@astrojs/react": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@astrojs/react/-/react-1.1.4.tgz", - "integrity": "sha512-eTIXRjvyrDRkMewL5KrbhkF+zl+KSkCgL7k8/BBMXPTUrtOZZY5N5oZbjFtvjxBSQ/dhMWp9g+SwloDldN5ZDg==", + "version": "1.2.0", "requires": { "@babel/core": ">=7.0.0-0 <8.0.0", "@babel/plugin-transform-react-jsx": "^7.17.12" @@ -7450,7 +7550,7 @@ } }, "@babel/compat-data": { - "version": "7.19.3" + "version": "7.19.4" }, "@babel/core": { "version": "7.19.3", @@ -7470,17 +7570,12 @@ "gensync": "^1.0.0-beta.2", "json5": "^2.2.1", "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0" - } } }, "@babel/generator": { - "version": "7.19.3", + "version": "7.19.5", "requires": { - "@babel/types": "^7.19.3", + "@babel/types": "^7.19.4", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -7508,11 +7603,6 @@ "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.21.3", "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0" - } } }, "@babel/helper-environment-visitor": { @@ -7554,9 +7644,9 @@ "version": "7.19.0" }, "@babel/helper-simple-access": { - "version": "7.18.6", + "version": "7.19.4", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.19.4" } }, "@babel/helper-split-export-declaration": { @@ -7566,7 +7656,7 @@ } }, "@babel/helper-string-parser": { - "version": "7.18.10" + "version": "7.19.4" }, "@babel/helper-validator-identifier": { "version": "7.19.1" @@ -7575,11 +7665,11 @@ "version": "7.18.6" }, "@babel/helpers": { - "version": "7.19.0", + "version": "7.19.4", "requires": { "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/traverse": "^7.19.4", + "@babel/types": "^7.19.4" } }, "@babel/highlight": { @@ -7591,7 +7681,7 @@ } }, "@babel/parser": { - "version": "7.19.3" + "version": "7.19.4" }, "@babel/plugin-syntax-jsx": { "version": "7.18.6", @@ -7618,37 +7708,33 @@ } }, "@babel/traverse": { - "version": "7.19.3", + "version": "7.19.4", "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", + "@babel/generator": "^7.19.4", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.3", - "@babel/types": "^7.19.3", + "@babel/parser": "^7.19.4", + "@babel/types": "^7.19.4", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.19.3", + "version": "7.19.4", "requires": { - "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-string-parser": "^7.19.4", "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" } }, "@docsearch/css": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.2.1.tgz", - "integrity": "sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==" + "version": "3.2.1" }, "@docsearch/react": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.2.1.tgz", - "integrity": "sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==", "requires": { "@algolia/autocomplete-core": "1.7.1", "@algolia/autocomplete-preset-algolia": "1.7.1", @@ -7672,7 +7758,7 @@ "version": "1.0.0" }, "@eslint/eslintrc": { - "version": "1.3.2", + "version": "1.3.3", "dev": true, "requires": { "ajv": "^6.12.4", @@ -7686,10 +7772,6 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "dev": true - }, "globals": { "version": "13.17.0", "dev": true, @@ -7697,13 +7779,6 @@ "type-fest": "^0.20.2" } }, - "js-yaml": { - "version": "4.1.0", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, "type-fest": { "version": "0.20.2", "dev": true @@ -7719,10 +7794,6 @@ "minimatch": "^3.0.4" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "dev": true - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "dev": true @@ -7748,10 +7819,10 @@ "version": "1.4.14" }, "@jridgewell/trace-mapping": { - "version": "0.3.15", + "version": "0.3.17", "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, "@ljharb/has-package-exports-patterns": { @@ -7788,6 +7859,15 @@ "@polka/url": { "version": "1.0.0-next.21" }, + "@preact/signals": { + "version": "1.1.2", + "requires": { + "@preact/signals-core": "^1.2.2" + } + }, + "@preact/signals-core": { + "version": "1.2.2" + }, "@proload/core": { "version": "0.3.3", "requires": { @@ -7899,7 +7979,7 @@ } }, "@types/node": { - "version": "18.8.2" + "version": "18.8.5" }, "@types/parse5": { "version": "6.0.3" @@ -7909,14 +7989,10 @@ "dev": true }, "@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + "version": "15.7.5" }, "@types/react": { "version": "17.0.50", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.50.tgz", - "integrity": "sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -7925,8 +8001,6 @@ }, "@types/react-dom": { "version": "18.0.6", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.6.tgz", - "integrity": "sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==", "requires": { "@types/react": "*" } @@ -7935,9 +8009,7 @@ "version": "1.20.2" }, "@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + "version": "0.16.2" }, "@types/unist": { "version": "2.0.6" @@ -7946,81 +8018,109 @@ "version": "21.0.0" }, "@typescript-eslint/eslint-plugin": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.39.0", - "@typescript-eslint/type-utils": "5.39.0", - "@typescript-eslint/utils": "5.39.0", + "@typescript-eslint/scope-manager": "5.40.0", + "@typescript-eslint/type-utils": "5.40.0", + "@typescript-eslint/utils": "5.40.0", "debug": "^4.3.4", "ignore": "^5.2.0", "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@typescript-eslint/parser": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.39.0", - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/typescript-estree": "5.39.0", + "@typescript-eslint/scope-manager": "5.40.0", + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/typescript-estree": "5.40.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "requires": { - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/visitor-keys": "5.39.0" + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/visitor-keys": "5.40.0" } }, "@typescript-eslint/type-utils": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.39.0", - "@typescript-eslint/utils": "5.39.0", + "@typescript-eslint/typescript-estree": "5.40.0", + "@typescript-eslint/utils": "5.40.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.39.0", + "version": "5.40.0", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "requires": { - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/visitor-keys": "5.39.0", + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/visitor-keys": "5.40.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", "semver": "^7.3.7", "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@typescript-eslint/utils": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.39.0", - "@typescript-eslint/types": "5.39.0", - "@typescript-eslint/typescript-estree": "5.39.0", + "@typescript-eslint/scope-manager": "5.40.0", + "@typescript-eslint/types": "5.40.0", + "@typescript-eslint/typescript-estree": "5.40.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@typescript-eslint/visitor-keys": { - "version": "5.39.0", + "version": "5.40.0", "dev": true, "requires": { - "@typescript-eslint/types": "5.39.0", + "@typescript-eslint/types": "5.40.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -8063,8 +8163,6 @@ }, "algoliasearch": { "version": "4.14.2", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.14.2.tgz", - "integrity": "sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==", "requires": { "@algolia/cache-browser-local-storage": "4.14.2", "@algolia/cache-common": "4.14.2", @@ -8132,10 +8230,8 @@ } }, "argparse": { - "version": "1.0.10", - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "dev": true }, "array-iterate": { "version": "1.1.4" @@ -8155,9 +8251,9 @@ } }, "astro": { - "version": "1.4.4", + "version": "1.5.0", "requires": { - "@astrojs/compiler": "^0.25.0", + "@astrojs/compiler": "^0.27.1", "@astrojs/language-server": "^0.26.2", "@astrojs/markdown-remark": "^1.1.3", "@astrojs/telemetry": "^1.0.1", @@ -8178,6 +8274,7 @@ "common-ancestor-path": "^1.0.1", "cookie": "^0.5.0", "debug": "^4.3.4", + "deepmerge-ts": "^4.2.2", "diff": "^5.1.0", "eol": "^0.9.1", "es-module-lexer": "^0.10.5", @@ -8188,6 +8285,7 @@ "gray-matter": "^4.0.3", "html-entities": "^2.3.3", "html-escaper": "^3.0.3", + "import-meta-resolve": "^2.1.0", "kleur": "^4.1.4", "magic-string": "^0.25.9", "mime": "^3.0.0", @@ -8216,6 +8314,14 @@ "vite": "~3.1.3", "yargs-parser": "^21.0.1", "zod": "^3.17.3" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "astro-component-tester": { @@ -8223,38 +8329,8 @@ "dev": true, "requires": {} }, - "astro-reactive-form": { - "version": "file:packages/astro-reactive-form", - "requires": { - "@types/chai": "^4.3.3", - "@types/eslint": "^8.4.6", - "@types/mocha": "^10.0.0", - "@types/node": "^18.7.18", - "@types/prettier": "^2.7.0", - "@typescript-eslint/eslint-plugin": "^5.37.0", - "@typescript-eslint/parser": "^5.37.0", - "astro": "^1.4.4", - "astro-component-tester": "^0.6.0", - "chai": "^4.3.6", - "eslint": "^8.23.1", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.2.1", - "mocha": "^10.0.0", - "prettier": "^2.7.1", - "prettier-plugin-astro": "^0.5.4", - "typescript": "^4.8.3" - } - }, - "astro-reactive-validator": { - "version": "file:packages/astro-reactive-validator", - "requires": { - "astro": "^1.4.4" - } - }, "babel-plugin-module-resolver": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz", - "integrity": "sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA==", "requires": { "find-babel-config": "^1.2.0", "glob": "^7.1.6", @@ -8374,7 +8450,7 @@ "version": "6.3.0" }, "caniuse-lite": { - "version": "1.0.30001415" + "version": "1.0.30001419" }, "ccount": { "version": "2.0.1" @@ -8428,10 +8504,19 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } } }, "ci-info": { - "version": "3.4.0" + "version": "3.5.0" }, "cli-boxes": { "version": "3.0.0" @@ -8529,10 +8614,7 @@ "version": "0.0.1" }, "convert-source-map": { - "version": "1.8.0", - "requires": { - "safe-buffer": "~5.1.1" - } + "version": "1.9.0" }, "cookie": { "version": "0.5.0" @@ -8546,9 +8628,7 @@ } }, "csstype": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", - "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" + "version": "3.1.1" }, "data-uri-to-buffer": { "version": "4.0.0" @@ -8583,8 +8663,11 @@ "deepmerge": { "version": "4.2.2" }, + "deepmerge-ts": { + "version": "4.2.2" + }, "defaults": { - "version": "1.0.3", + "version": "1.0.4", "requires": { "clone": "^1.0.2" } @@ -8600,14 +8683,18 @@ } }, "demo-astro-reactive-library": { - "version": "file:demo", + "version": "file:apps/demo", "requires": { - "astro": "^1.4.4", - "astro-reactive-form": "file:packages/astro-reactive-form" + "@astro-reactive/form": "file:packages/form", + "@astro-reactive/validator": "file:packages/validator", + "astro": "^1.5.0" }, "dependencies": { - "astro-reactive-form": { - "version": "file:demo/packages/astro-reactive-form" + "@astro-reactive/form": { + "version": "file:apps/demo/packages/form" + }, + "@astro-reactive/validator": { + "version": "file:apps/demo/packages/validator" } } }, @@ -8631,7 +8718,7 @@ "version": "1.1.3" }, "docs-astro-reactive-library": { - "version": "file:docs", + "version": "file:apps/docs", "requires": { "@algolia/client-search": "^4.13.1", "@astrojs/preact": "^1.1.1", @@ -8661,7 +8748,7 @@ "version": "0.2.0" }, "electron-to-chromium": { - "version": "1.4.271" + "version": "1.4.282" }, "emmet": { "version": "2.3.6", @@ -8719,12 +8806,11 @@ "version": "1.0.5" }, "eslint": { - "version": "8.24.0", + "version": "8.25.0", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.2", + "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -8774,10 +8860,6 @@ "color-convert": "^2.0.1" } }, - "argparse": { - "version": "2.0.1", - "dev": true - }, "chalk": { "version": "4.1.2", "dev": true, @@ -8813,13 +8895,6 @@ "version": "5.3.0", "dev": true }, - "glob-parent": { - "version": "6.0.2", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, "globals": { "version": "13.17.0", "dev": true, @@ -8831,13 +8906,6 @@ "version": "4.0.0", "dev": true }, - "js-yaml": { - "version": "4.1.0", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, "strip-ansi": { "version": "6.0.1", "dev": true, @@ -8993,6 +9061,14 @@ "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "requires": { + "is-glob": "^4.0.1" + } + } } }, "fast-json-stable-stringify": { @@ -9031,22 +9107,13 @@ }, "find-babel-config": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.2.0.tgz", - "integrity": "sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA==", "requires": { "json5": "^0.5.1", "path-exists": "^3.0.0" }, "dependencies": { "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==" + "version": "0.5.1" } } }, @@ -9055,6 +9122,11 @@ "requires": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" + }, + "dependencies": { + "path-exists": { + "version": "4.0.0" + } } }, "find-yarn-workspace-root2": { @@ -9122,20 +9194,21 @@ "version": "1.4.0" }, "glob": { - "version": "7.2.0", + "version": "7.2.3", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "glob-parent": { - "version": "5.1.2", + "version": "6.0.2", + "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" } }, "global-agent": { @@ -9147,6 +9220,14 @@ "roarr": "^2.15.3", "semver": "^7.3.2", "serialize-error": "^7.0.1" + }, + "dependencies": { + "semver": { + "version": "7.3.8", + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "globals": { @@ -9196,6 +9277,24 @@ "kind-of": "^6.0.2", "section-matter": "^1.0.0", "strip-bom-string": "^1.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3" + } } }, "has": { @@ -9306,7 +9405,7 @@ "version": "2.0.0" }, "hastscript": { - "version": "7.0.2", + "version": "7.1.0", "requires": { "@types/hast": "^2.0.0", "comma-separated-tokens": "^2.0.0", @@ -9429,7 +9528,8 @@ "version": "3.0.0" }, "is-unicode-supported": { - "version": "1.3.0" + "version": "0.1.0", + "dev": true }, "is-wsl": { "version": "2.2.0", @@ -9453,10 +9553,10 @@ "version": "4.0.0" }, "js-yaml": { - "version": "3.14.1", + "version": "4.1.0", + "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "jsesc": { @@ -9505,6 +9605,22 @@ "strip-bom": "^3.0.0" }, "dependencies": { + "argparse": { + "version": "1.0.10", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3" + }, "strip-bom": { "version": "3.0.0" } @@ -9521,14 +9637,49 @@ "dev": true }, "log-symbols": { - "version": "5.1.0", + "version": "4.1.0", + "dev": true, "requires": { - "chalk": "^5.0.0", - "is-unicode-supported": "^1.1.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, "chalk": { - "version": "5.0.1" + "version": "4.1.2", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -9537,8 +9688,6 @@ }, "loose-envify": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } @@ -9733,7 +9882,7 @@ "version": "1.4.1" }, "micromark": { - "version": "3.0.10", + "version": "3.1.0", "requires": { "@types/debug": "^4.0.0", "debug": "^4.0.0", @@ -10065,52 +10214,6 @@ "yargs-unparser": "2.0.0" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "dev": true - }, - "brace-expansion": { - "version": "2.0.1", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "chalk": { - "version": "4.1.2", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "color-convert": { - "version": "2.0.1", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "dev": true - }, "diff": { "version": "5.0.0", "dev": true @@ -10119,44 +10222,51 @@ "version": "4.0.0", "dev": true }, + "glob": { + "version": "7.2.0", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, "has-flag": { "version": "4.0.0", "dev": true }, - "is-unicode-supported": { - "version": "0.1.0", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "log-symbols": { - "version": "4.1.0", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, "minimatch": { "version": "5.0.1", "dev": true, "requires": { "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + } } }, "ms": { "version": "2.1.3", "dev": true }, - "nanoid": { - "version": "3.3.3", - "dev": true - }, "supports-color": { "version": "8.1.1", "dev": true, @@ -10180,7 +10290,8 @@ "version": "2.1.2" }, "nanoid": { - "version": "3.3.4" + "version": "3.3.3", + "dev": true }, "natural-compare": { "version": "1.4.0", @@ -10273,7 +10384,17 @@ }, "dependencies": { "chalk": { - "version": "5.0.1" + "version": "5.1.2" + }, + "is-unicode-supported": { + "version": "1.3.0" + }, + "log-symbols": { + "version": "5.1.0", + "requires": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + } } } }, @@ -10327,7 +10448,7 @@ "version": "1.0.1" }, "path-exists": { - "version": "4.0.0" + "version": "3.0.0" }, "path-is-absolute": { "version": "1.0.1" @@ -10388,29 +10509,26 @@ "requires": { "p-limit": "^2.2.0" } + }, + "path-exists": { + "version": "4.0.0" } } }, "pkg-up": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", "requires": { "find-up": "^3.0.0" }, "dependencies": { "find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { "locate-path": "^3.0.0" } }, "locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -10418,33 +10536,29 @@ }, "p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { "p-try": "^2.0.0" } }, "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "requires": { "p-limit": "^2.0.0" } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==" } } }, "postcss": { - "version": "8.4.17", + "version": "8.4.18", "requires": { "nanoid": "^3.3.4", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" + }, + "dependencies": { + "nanoid": { + "version": "3.3.4" + } } }, "postcss-load-config": { @@ -10455,14 +10569,10 @@ } }, "preact": { - "version": "10.11.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.1.tgz", - "integrity": "sha512-1Wz5PCRm6Fg+6BTXWJHhX4wRK9MZbZBHuwBqfZlOdVm2NqPe8/rjYpufvYCwJSGb9layyzB2jTTXfpCTynLqFQ==" + "version": "10.11.1" }, "preact-render-to-string": { "version": "5.2.5", - "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.5.tgz", - "integrity": "sha512-rEBn42C3Wh+AjPxXUbDkb6xw0cTJQgxdYlp6ytUR1uBZF647Wn6ykkopMeQlRl7ggX+qnYYjZ4Hs1abZENl7ww==", "requires": { "pretty-format": "^3.8.0" } @@ -10474,6 +10584,11 @@ "find-yarn-workspace-root2": "1.2.16", "path-exists": "^4.0.0", "which-pm": "2.0.0" + }, + "dependencies": { + "path-exists": { + "version": "4.0.0" + } } }, "prelude-ls": { @@ -10505,9 +10620,7 @@ } }, "pretty-format": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", - "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" + "version": "3.8.0" }, "prismjs": { "version": "1.29.0" @@ -10543,16 +10656,12 @@ }, "react": { "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "requires": { "loose-envify": "^1.1.0" } }, "react-dom": { "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "requires": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" @@ -10664,9 +10773,7 @@ "dev": true }, "reselect": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.6.tgz", - "integrity": "sha512-ZovIuXqto7elwnxyXbBtCPo9YFEr3uJqj2rRbcOOog1bmu2Ag85M4hixSwFWyaBMKXNgvPaJ9OSu9SkBPIeJHQ==" + "version": "4.1.6" }, "resolve": { "version": "1.22.1", @@ -10768,11 +10875,6 @@ "json-stringify-safe": "^5.0.1", "semver-compare": "^1.0.0", "sprintf-js": "^1.1.2" - }, - "dependencies": { - "sprintf-js": { - "version": "1.1.2" - } } }, "rollup": { @@ -10797,7 +10899,7 @@ } }, "safe-buffer": { - "version": "5.1.2" + "version": "5.2.1" }, "sass-formatter": { "version": "0.7.5", @@ -10807,8 +10909,6 @@ }, "scheduler": { "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", "requires": { "loose-envify": "^1.1.0" } @@ -10821,10 +10921,7 @@ } }, "semver": { - "version": "7.3.7", - "requires": { - "lru-cache": "^6.0.0" - } + "version": "6.3.0" }, "semver-compare": { "version": "1.0.0" @@ -10899,17 +10996,12 @@ "version": "2.0.1" }, "sprintf-js": { - "version": "1.0.3" + "version": "1.1.2" }, "string_decoder": { "version": "1.3.0", "requires": { "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1" - } } }, "string-width": { @@ -11147,7 +11239,7 @@ } }, "update-browserslist-db": { - "version": "1.0.9", + "version": "1.0.10", "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -11196,9 +11288,9 @@ } }, "vite": { - "version": "3.1.4", + "version": "3.1.8", "requires": { - "esbuild": "^0.15.6", + "esbuild": "^0.15.9", "fsevents": "~2.3.2", "postcss": "^8.4.16", "resolve": "^1.22.1", @@ -11206,34 +11298,34 @@ }, "dependencies": { "esbuild": { - "version": "0.15.10", + "version": "0.15.11", "requires": { - "@esbuild/android-arm": "0.15.10", - "@esbuild/linux-loong64": "0.15.10", - "esbuild-android-64": "0.15.10", - "esbuild-android-arm64": "0.15.10", - "esbuild-darwin-64": "0.15.10", - "esbuild-darwin-arm64": "0.15.10", - "esbuild-freebsd-64": "0.15.10", - "esbuild-freebsd-arm64": "0.15.10", - "esbuild-linux-32": "0.15.10", - "esbuild-linux-64": "0.15.10", - "esbuild-linux-arm": "0.15.10", - "esbuild-linux-arm64": "0.15.10", - "esbuild-linux-mips64le": "0.15.10", - "esbuild-linux-ppc64le": "0.15.10", - "esbuild-linux-riscv64": "0.15.10", - "esbuild-linux-s390x": "0.15.10", - "esbuild-netbsd-64": "0.15.10", - "esbuild-openbsd-64": "0.15.10", - "esbuild-sunos-64": "0.15.10", - "esbuild-windows-32": "0.15.10", - "esbuild-windows-64": "0.15.10", - "esbuild-windows-arm64": "0.15.10" + "@esbuild/android-arm": "0.15.11", + "@esbuild/linux-loong64": "0.15.11", + "esbuild-android-64": "0.15.11", + "esbuild-android-arm64": "0.15.11", + "esbuild-darwin-64": "0.15.11", + "esbuild-darwin-arm64": "0.15.11", + "esbuild-freebsd-64": "0.15.11", + "esbuild-freebsd-arm64": "0.15.11", + "esbuild-linux-32": "0.15.11", + "esbuild-linux-64": "0.15.11", + "esbuild-linux-arm": "0.15.11", + "esbuild-linux-arm64": "0.15.11", + "esbuild-linux-mips64le": "0.15.11", + "esbuild-linux-ppc64le": "0.15.11", + "esbuild-linux-riscv64": "0.15.11", + "esbuild-linux-s390x": "0.15.11", + "esbuild-netbsd-64": "0.15.11", + "esbuild-openbsd-64": "0.15.11", + "esbuild-sunos-64": "0.15.11", + "esbuild-windows-32": "0.15.11", + "esbuild-windows-64": "0.15.11", + "esbuild-windows-arm64": "0.15.11" } }, "esbuild-darwin-arm64": { - "version": "0.15.10", + "version": "0.15.11", "optional": true } } @@ -11313,6 +11405,11 @@ "requires": { "load-yaml-file": "^0.2.0", "path-exists": "^4.0.0" + }, + "dependencies": { + "path-exists": { + "version": "4.0.0" + } } }, "which-pm-runs": { @@ -11341,7 +11438,7 @@ }, "dependencies": { "ansi-styles": { - "version": "6.1.1" + "version": "6.2.1" } } }, diff --git a/package.json b/package.json index ef6e025..8e949b5 100644 --- a/package.json +++ b/package.json @@ -14,24 +14,24 @@ ".": "./index.ts" }, "scripts": { - "start": "npm run dev -w demo", + "start": "npm run dev -w apps/demo", + "dev": "npm run dev -w apps/demo", + "docs": "npm run dev -w apps/docs", "test": "npm run test --workspaces --if-present", "lint": "npm run lint --workspaces --if-present", "lint:fix": "npm run lint:fix --workspaces --if-present", "build": "npm run build --workspaces --if-present", "test:watch": "npm run test:watch --workspaces --if-present", - "dev": "npm run dev -w demo", - "docs": "npm run dev -w docs", "bump:patch": "npm version patch -w", "bump:minor": "npm version minor -w", "bump:major": "npm version major -w", - "publish": "npm publish --public -w" + "publish": "npm publish --access public -w" }, "license": "ISC", "workspaces": [ - "demo", - "packages/astro-reactive-form", - "packages/astro-reactive-validator", - "docs" + "packages/form", + "packages/validator", + "apps/demo", + "apps/docs" ] } diff --git a/packages/astro-reactive-form/client/controls.ts b/packages/astro-reactive-form/client/controls.ts deleted file mode 100644 index ad238fe..0000000 --- a/packages/astro-reactive-form/client/controls.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { FormControl, FormGroup } from '../core'; -import type { ControlType } from '../core/form-control-types'; - -export const getFormGroup = (formName: string) => { - const fieldSetEl = (document.getElementById(formName) as HTMLFieldSetElement) || null; - if (fieldSetEl === null) { - return undefined; - } - - const formGroup = new FormGroup([], formName); - - fieldSetEl.querySelectorAll('input').forEach((field) => { - const formControl = getFormControl(field.name); - if (!formControl) return; - formGroup.controls.push(formControl); - }); - - return formGroup; -}; - -const getFormControl = (name: string) => { - const inputEl = document.getElementById(name) as HTMLInputElement | null; - if (inputEl === null) { - return undefined; - } - - const formControl = new FormControl({ - name: inputEl.name, - value: inputEl.value, - type: inputEl.type as ControlType, - label: inputEl.dataset.label as string, - labelPosition: inputEl.dataset.labelPosition as 'right' | 'left', - }); - - inputEl.addEventListener('change', (e) => { - if (!(e.target instanceof HTMLInputElement)) return; - let value = e.target.value; - if (formControl.type === 'checkbox') { - value = formControl.value === 'checked' ? '' : 'checked'; - } - formControl.setValue(value); - formControl.isPristine = false; - }); - - const controlProxy = new Proxy(formControl, { - set() { - return true; - }, - }); - - return controlProxy; -}; diff --git a/packages/astro-reactive-form/client/index.ts b/packages/astro-reactive-form/client/index.ts deleted file mode 100644 index 995436d..0000000 --- a/packages/astro-reactive-form/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './controls'; diff --git a/packages/astro-reactive-form/components/Field.astro b/packages/astro-reactive-form/components/Field.astro deleted file mode 100644 index 3f8f899..0000000 --- a/packages/astro-reactive-form/components/Field.astro +++ /dev/null @@ -1,34 +0,0 @@ ---- -import type { FormControl } from '../core/form-control'; - -export interface Props { - control: FormControl; -} - -const { control } = Astro.props; ---- - -
- { - control.label && control.labelPosition === 'left' && ( - - ) - } - - - - { - control.label && control.labelPosition === 'right' && ( - - ) - } -
diff --git a/packages/astro-reactive-validator/package.json b/packages/astro-reactive-validator/package.json deleted file mode 100644 index 850f1bd..0000000 --- a/packages/astro-reactive-validator/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "astro-reactive-validator", - "version": "0.0.0", - "description": "Validation Library for Astro Reactive Form 🔥", - "author": { - "name": "Ayo Ayco", - "email": "ayo@ayco.io", - "url": "https://ayco.io" - }, - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/ayoayco/astro-reactive-library.git" - }, - "keywords": [ - "astro-components", - "ui", - "form", - "validation" - ], - "license": "ISC", - "bugs": { - "url": "https://github.com/ayoayco/astro-reactive-library/issues" - }, - "homepage": "https://github.com/ayoayco/astro-reactive-library#readme", - "dependencies": { - "astro": "^1.4.4" - } -} diff --git a/packages/astro-reactive-form/.editorconfig b/packages/form/.editorconfig similarity index 100% rename from packages/astro-reactive-form/.editorconfig rename to packages/form/.editorconfig diff --git a/packages/astro-reactive-form/.eslintignore b/packages/form/.eslintignore similarity index 100% rename from packages/astro-reactive-form/.eslintignore rename to packages/form/.eslintignore diff --git a/packages/astro-reactive-form/.eslintrc.cjs b/packages/form/.eslintrc.cjs similarity index 100% rename from packages/astro-reactive-form/.eslintrc.cjs rename to packages/form/.eslintrc.cjs diff --git a/packages/astro-reactive-form/.prettierrc.cjs b/packages/form/.prettierrc.cjs similarity index 100% rename from packages/astro-reactive-form/.prettierrc.cjs rename to packages/form/.prettierrc.cjs diff --git a/packages/astro-reactive-form/Form.astro b/packages/form/Form.astro similarity index 58% rename from packages/astro-reactive-form/Form.astro rename to packages/form/Form.astro index 2fdfb60..408e9ae 100644 --- a/packages/astro-reactive-form/Form.astro +++ b/packages/form/Form.astro @@ -7,20 +7,28 @@ export interface Props { formGroups: FormGroup | FormGroup[]; submitControl?: Submit; theme?: 'light' | 'dark'; + showValidationHints?: boolean; } -const { submitControl, formGroups: form, theme } = Astro.props; +const { submitControl, formGroups: form, theme, showValidationHints = false } = Astro.props; const formTheme = theme ?? 'light'; +const formName = Array.isArray(form) ? null : form?.name || null; --- - + { Array.isArray(form) - ? form?.map((group) =>
) - : form?.controls.map((control) => ) + ? form?.map((group) =>
) + : form?.controls.map((control) => ( + + )) + } + { + submitControl && ( + + ) } - {submitControl && } diff --git a/packages/astro-reactive-form/components/FieldSet.astro b/packages/form/components/FieldSet.astro similarity index 54% rename from packages/astro-reactive-form/components/FieldSet.astro rename to packages/form/components/FieldSet.astro index ac62bad..0d7ad5d 100644 --- a/packages/astro-reactive-form/components/FieldSet.astro +++ b/packages/form/components/FieldSet.astro @@ -4,12 +4,17 @@ import Field from './Field.astro'; export interface Props { group: FormGroup; + showValidationHints: boolean; } -const { group } = Astro.props; +const { group, showValidationHints } = Astro.props; ---
{group.name && {group.name}} - {group?.controls?.map((control) => )} + { + group?.controls?.map((control) => ( + + )) + }
diff --git a/packages/astro-reactive-form/core/form-control-types.ts b/packages/form/core/form-control-types.ts similarity index 94% rename from packages/astro-reactive-form/core/form-control-types.ts rename to packages/form/core/form-control-types.ts index 60fd232..275568d 100644 --- a/packages/astro-reactive-form/core/form-control-types.ts +++ b/packages/form/core/form-control-types.ts @@ -34,6 +34,7 @@ export interface ControlBase { label?: string; labelPosition?: 'right' | 'left'; placeholder?: string; + validators?: string[]; // TODO: implement validator type } export interface Checkbox extends ControlBase { diff --git a/packages/astro-reactive-form/core/form-control.ts b/packages/form/core/form-control.ts similarity index 68% rename from packages/astro-reactive-form/core/form-control.ts rename to packages/form/core/form-control.ts index df0f7a9..9bd9f5e 100644 --- a/packages/astro-reactive-form/core/form-control.ts +++ b/packages/form/core/form-control.ts @@ -8,16 +8,18 @@ export class FormControl { private _labelPosition?: 'right' | 'left' = 'left'; private _isValid = true; private _isPristine = true; - private _placeholder?; + private _placeholder?: string; + private _validators?: string[]; constructor(config: ControlConfig) { - const { name, type, value, label, labelPosition, placeholder } = config; + const { name, type, value, label, labelPosition, placeholder, validators } = config; this._name = name; - this._type = type || 'text'; - this._value = value || null; - this._label = label || ''; - this._labelPosition = labelPosition || 'left'; - this._placeholder = placeholder || ''; + this._type = type ?? 'text'; + this._value = value ?? null; + this._label = label ?? ''; + this._labelPosition = labelPosition ?? 'left'; + this._placeholder = placeholder ?? ''; + this._validators = validators ?? []; } get name() { @@ -56,8 +58,13 @@ export class FormControl { return this._isValid; } + get validators() { + return this._validators; + } + setValue(value: string) { this._value = value; + this._isPristine = false; } setIsPristine(value: boolean) { diff --git a/packages/astro-reactive-form/core/form-group.ts b/packages/form/core/form-group.ts similarity index 77% rename from packages/astro-reactive-form/core/form-group.ts rename to packages/form/core/form-group.ts index 49af54d..0f64fdf 100644 --- a/packages/astro-reactive-form/core/form-group.ts +++ b/packages/form/core/form-group.ts @@ -1,11 +1,11 @@ -import type { ControlBase } from './form-control-types'; +import type { ControlConfig } from './form-control-types'; import { FormControl } from './form-control'; export class FormGroup { controls: FormControl[]; name?: string; - constructor(controls: ControlBase[], name = '') { + constructor(controls: ControlConfig[], name = '') { this.name = name; this.controls = controls .filter((control) => control.type !== 'submit') diff --git a/packages/astro-reactive-form/core/index.ts b/packages/form/core/index.ts similarity index 100% rename from packages/astro-reactive-form/core/index.ts rename to packages/form/core/index.ts diff --git a/packages/astro-reactive-form/index.ts b/packages/form/index.ts similarity index 64% rename from packages/astro-reactive-form/index.ts rename to packages/form/index.ts index 080add5..6e465f4 100644 --- a/packages/astro-reactive-form/index.ts +++ b/packages/form/index.ts @@ -1,3 +1,3 @@ import Form from './Form.astro'; export default Form; -export * from './Form.astro'; +export * from './core'; diff --git a/packages/astro-reactive-form/package.json b/packages/form/package.json similarity index 86% rename from packages/astro-reactive-form/package.json rename to packages/form/package.json index f839fc3..b4181e9 100644 --- a/packages/astro-reactive-form/package.json +++ b/packages/form/package.json @@ -1,7 +1,7 @@ { - "name": "astro-reactive-form", + "name": "@astro-reactive/form", "description": "The Reactive Form component for Astro 🔥", - "version": "0.3.0", + "version": "0.4.1", "repository": "https://github.com/ayoayco/astro-reactive-library", "homepage": "https://github.com/ayoayco/astro-reactive-library#readme", "author": { @@ -11,14 +11,11 @@ }, "type": "module", "exports": { - ".": "./index.ts", - "./core": "./core/index.ts", - "./client": "./client/index.ts" + ".": "./index.ts" }, "files": [ "core/", "components/", - "client/", "Form.astro", "index.ts" ], @@ -43,7 +40,7 @@ "@types/prettier": "^2.7.0", "@typescript-eslint/eslint-plugin": "^5.37.0", "@typescript-eslint/parser": "^5.37.0", - "astro": "^1.4.4", + "astro": "^1.5.0", "astro-component-tester": "^0.6.0", "chai": "^4.3.6", "eslint": "^8.23.1", @@ -55,7 +52,7 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "astro": "^1.0.0" + "astro": "^1.5.0" }, "license": "MIT" } diff --git a/packages/astro-reactive-form/test/Form.astro.test.js b/packages/form/test/Form.astro.test.js similarity index 100% rename from packages/astro-reactive-form/test/Form.astro.test.js rename to packages/form/test/Form.astro.test.js diff --git a/packages/astro-reactive-form/tsconfig.json b/packages/form/tsconfig.json similarity index 62% rename from packages/astro-reactive-form/tsconfig.json rename to packages/form/tsconfig.json index 5711d1e..eaa2b52 100644 --- a/packages/astro-reactive-form/tsconfig.json +++ b/packages/form/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "astro/tsconfigs/strictest", - "exclude": ["./index.ts"] + "exclude": ["index.ts"] } diff --git a/packages/validator/.editorconfig b/packages/validator/.editorconfig new file mode 100644 index 0000000..617f686 --- /dev/null +++ b/packages/validator/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = false + +[{.*,*.md,*.json,*.toml,*.yml,}] +indent_style = space diff --git a/packages/validator/.eslintignore b/packages/validator/.eslintignore new file mode 100644 index 0000000..3598db9 --- /dev/null +++ b/packages/validator/.eslintignore @@ -0,0 +1 @@ +test/**/*.js diff --git a/packages/validator/.eslintrc.cjs b/packages/validator/.eslintrc.cjs new file mode 100644 index 0000000..0aa067e --- /dev/null +++ b/packages/validator/.eslintrc.cjs @@ -0,0 +1,17 @@ +/** @type {import("@types/eslint").Linter.Config} */ +module.exports = { + env: { + node: true, + }, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint', 'prettier'], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + ], + rules: { + // We don't want to leak logging into our user's console unless it's an error + 'no-console': ['error', { allow: ['warn', 'error'] }], + }, +}; diff --git a/packages/validator/.gitignore b/packages/validator/.gitignore new file mode 100644 index 0000000..de0d843 --- /dev/null +++ b/packages/validator/.gitignore @@ -0,0 +1,8 @@ +node_modules + +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +.DS_Store diff --git a/packages/validator/.prettierrc.cjs b/packages/validator/.prettierrc.cjs new file mode 100644 index 0000000..0e9c748 --- /dev/null +++ b/packages/validator/.prettierrc.cjs @@ -0,0 +1,24 @@ +/** @type {import("@types/prettier").Options} */ +module.exports = { + printWidth: 100, + semi: true, + singleQuote: true, + tabWidth: 2, + trailingComma: 'es5', + useTabs: true, + plugins: ['../../node_modules/prettier-plugin-astro'], + overrides: [ + { + files: '*.astro', + options: { + parser: 'astro', + }, + }, + { + files: ['.*', '*.json', '*.md', '*.toml', '*.yml'], + options: { + useTabs: false, + }, + }, + ], +}; diff --git a/packages/validator/README.md b/packages/validator/README.md new file mode 100644 index 0000000..bcb0130 --- /dev/null +++ b/packages/validator/README.md @@ -0,0 +1,92 @@ +

+ Astro Reactive Library Logo + Astro Reactive Validator +
+ Set up validators for your forms easily. +
+
+ + + + +
+
+

+ +## Installation +In your [Astro](https://astro.build) project: + +``` +npm i @astro-reactive/validator @astro-reactive/form +``` + +## Usage +Use in an Astro page: + +```astro +--- +import { FormControl, FormGroup } from "@astro-reactive/form/core"; +import Form from "@astro-reactive/form"; +import { Validators } from "@astro-reactive/validator"; + +const form = new FormGroup([ + { + name: "username", + label: "Username", + validators: [Validators.required], + }, + { + name: "email", + label: "Email", + validators: [Validators.email, Validators.required], + }, + { + name: "password", + label: "Password", + type: "password", + validators: [Validators.required, Validators.minLength(8)], + }, +]); + +// set the name optionally +form.name = "Simple Form"; + +// you can insert a control at any point +form.controls.push( + new FormControl({ + type: "checkbox", + name: "is-awesome", + label: "is Awesome?", + labelPosition: "right", + }) +); + +// you can get a FormControl object +const userNameControl = form.get("username"); + +// you can set values dynamically +userNameControl?.setValue("RAMOOOON"); +form.get('is-awesome')?.setValue("checked"); +--- + + +
+``` + +# Screenshots +Result of example above: + +![Screen Shot 2022-10-15 at 1 31 11 PM](https://user-images.githubusercontent.com/4262489/195984173-c19e8cf0-bc55-41d5-8267-e3de44c6bf64.png) + +# Validators available +1. `Validators.min(limit)` - checks if number value is greater than or equal to limit +1. `Validators.max(limit)` - checks if number value is less than or equal to limit +1. `Validators.required` - checks if value is empty +1. `Validators.requiredChecked` - checks if value is "checked" +1. `Validators.email` - checks if value is a valid email +1. `Validators.minLength(limit)` - checks if value length is greater than or equal to limit +1. `Validators.maxLength(limit)` - checks if value length is less than or equal to limit diff --git a/packages/validator/RELEASE.md b/packages/validator/RELEASE.md new file mode 100644 index 0000000..8fd23ff --- /dev/null +++ b/packages/validator/RELEASE.md @@ -0,0 +1,3 @@ +## 0.0.1 +- Validators +- validator functions diff --git a/packages/validator/Validator.astro b/packages/validator/Validator.astro new file mode 100644 index 0000000..e5e569c --- /dev/null +++ b/packages/validator/Validator.astro @@ -0,0 +1,35 @@ +--- +import type { HookType } from './core'; + +export interface Props { + hook?: HookType; + displayErrorMessages?: boolean; +} + +const { hook = 'all', displayErrorMessages = false } = Astro.props; +--- + + + + + diff --git a/packages/validator/core/index.ts b/packages/validator/core/index.ts new file mode 100644 index 0000000..d52a7f0 --- /dev/null +++ b/packages/validator/core/index.ts @@ -0,0 +1,3 @@ +export * from './validator.functions'; +export * from './validator.types'; +export * from './validators'; diff --git a/packages/validator/core/validator.functions.ts b/packages/validator/core/validator.functions.ts new file mode 100644 index 0000000..edf8e4e --- /dev/null +++ b/packages/validator/core/validator.functions.ts @@ -0,0 +1,152 @@ +import type { ValidationResult } from './validator.types'; +import { Validators } from './validators'; + +export function validate(event: FocusEvent) { + // NOTE: event target attribute names are converted to lowercase + const element = event.target as HTMLInputElement; + const attributeNames = element?.getAttributeNames() || []; + const validatorAttirbutes = attributeNames.filter((attribute) => + attribute.includes('data-validator-') + ); + const value = element.value; + + const validityArray: ValidationResult[] = validatorAttirbutes + .map((validator) => validator.replace('data-', '')) + .map((validator): ValidationResult => { + // insert logic for each validator + // TODO: implement a map of functions,validator + + if (validator === Validators.min()) { + const limit = parseInt(element.getAttribute('data-validator-min') || '0', 10); + return validateMin(value, limit); + } + + if (validator === Validators.max()) { + const limit = parseInt(element.getAttribute('data-validator-min') || '0', 10); + return validateMax(value, limit); + } + + if (validator === Validators.required) { + return validateRequired(value); + } + + if (validator === Validators.requiredChecked) { + return validateRequiredChecked(value); + } + + if (validator === Validators.email) { + return validateEmail(value); + } + + if (validator === Validators.minLength()) { + const limit = parseInt(element.getAttribute('data-validator-minlength') || '0', 10); + return validateMinLength(value, limit); + } + + if (validator === Validators.maxLength()) { + const limit = parseInt(element.getAttribute('data-validator-maxlength') || '0', 10); + return validateMaxLength(value, limit); + } + + return true; + }); + + const errors = validityArray.filter((result) => result !== true); + + // set element hasErrors + if (errors.length) { + element.parentElement?.setAttribute('data-validator-haserrors', 'true'); + element.setAttribute('data-validator-haserrors', 'true'); + // TODO: display error messages + } +} + +export function clearErrors(event: Event) { + const element = event.target as HTMLInputElement; + element.parentElement?.setAttribute('data-validator-haserrors', 'false'); + element.setAttribute('data-validator-haserrors', 'false'); +} + +function validateMin(value: string, limit: number): ValidationResult { + const isValid = parseInt(value, 10) >= limit; + + if (!isValid) { + return { + error: 'min', + limit: limit, + }; + } + return true; +} + +function validateMax(value: string, limit: number): ValidationResult { + const isValid = parseInt(value, 10) <= limit; + + if (!isValid) { + return { + error: 'max', + limit: limit, + }; + } + return true; +} + +function validateRequired(value: string): ValidationResult { + const isValid = !!value; + if (!isValid) { + return { + error: 'required', + }; + } + return true; +} + +function validateRequiredChecked(value: string): ValidationResult { + const isValid = value === 'checked'; + if (!isValid) { + return { + error: 'requiredChecked', + }; + } + return true; +} + +// TODO: review regexp vulnerability +function validateEmail(value: string): ValidationResult { + const isValid = String(value) + .toLowerCase() + .match( + /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + ); + + if (!isValid) { + return { + error: 'email', + }; + } + return true; +} + +function validateMinLength(value: string, limit: number): ValidationResult { + const isValid = value.length >= limit; + + if (!isValid) { + return { + error: 'minLength', + limit: limit, + }; + } + return true; +} + +function validateMaxLength(value: string, limit: number): ValidationResult { + const isValid = value.length <= limit; + + if (!isValid) { + return { + error: 'minLength', + limit: limit, + }; + } + return true; +} diff --git a/packages/validator/core/validator.types.ts b/packages/validator/core/validator.types.ts new file mode 100644 index 0000000..443adb4 --- /dev/null +++ b/packages/validator/core/validator.types.ts @@ -0,0 +1,8 @@ +export type HookType = 'onSubmit' | 'onControlBlur' | 'all'; + +export type ValidationResult = true | ValidationError; + +export type ValidationError = { + error: string; + limit?: number; +}; diff --git a/packages/validator/core/validators.ts b/packages/validator/core/validators.ts new file mode 100644 index 0000000..205b41a --- /dev/null +++ b/packages/validator/core/validators.ts @@ -0,0 +1,50 @@ +// improvement: implement min&max inclusive/exclusive +export class Validators { + static min(min?: number): string { + const label = 'validator-min'; + if (min !== undefined) { + return `${label}:${min}`; + } + return label; + } + + static max(max?: number): string { + const label = 'validator-max'; + if (max !== undefined) { + return `${label}:${max}`; + } + return label; + } + + static get required(): string { + return `validator-required`; + } + + static get requiredChecked(): string { + return `validator-required:checked`; + } + + static get email(): string { + return `validator-email`; + } + + static minLength(minLength?: number): string { + const label = 'validator-minlength'; + if (minLength !== undefined) { + return `${label}:${minLength}`; + } + return label; + } + + static maxLength(maxLength?: number): string { + const label = 'validator-maxlength'; + if (maxLength !== undefined) { + return `${label}:${maxLength}`; + } + return label; + } + + // static pattern(pattern: string | RegExp): string { + // return `validator-pattern:${pattern}`; + // } +} diff --git a/packages/validator/index.ts b/packages/validator/index.ts new file mode 100644 index 0000000..12514da --- /dev/null +++ b/packages/validator/index.ts @@ -0,0 +1,3 @@ +import Validator from './Validator.astro'; +export default Validator; +export * from './core'; diff --git a/packages/validator/package.json b/packages/validator/package.json new file mode 100644 index 0000000..dbe7b8b --- /dev/null +++ b/packages/validator/package.json @@ -0,0 +1,62 @@ +{ + "name": "@astro-reactive/validator", + "description": "Form validation library for Astro 🔥", + "version": "0.0.1", + "repository": "https://github.com/ayoayco/astro-reactive-library", + "homepage": "https://github.com/ayoayco/astro-reactive-library#readme", + "author": { + "name": "Ayo Ayco", + "email": "ayo@ayco.io", + "url": "https://ayco.io" + }, + "type": "module", + "exports": { + ".": "./index.ts" + }, + "files": [ + "core/", + "Validator.astro", + "index.ts" + ], + "keywords": [ + "astro-component" + ], + "scripts": { + "test": "mocha --parallel --timeout 15000", + "test:watch": "mocha --watch --parallel --timeout 15000", + "format": "prettier -w .", + "lint": "eslint . --ext .ts,.js", + "lint:fix": "eslint --fix . --ext .ts,.js", + "build": "tsc --noEmit" + }, + "devDependencies": { + "@types/chai": "^4.3.3", + "@types/eslint": "^8.4.6", + "@types/mocha": "^10.0.0", + "@types/node": "^18.7.18", + "@types/prettier": "^2.7.0", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", + "astro": "^1.5.0", + "astro-component-tester": "^0.6.0", + "chai": "^4.3.6", + "eslint": "^8.23.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "mocha": "^10.0.0", + "prettier": "^2.7.1", + "prettier-plugin-astro": "^0.5.4", + "typescript": "^4.8.3" + }, + "peerDependencies": { + "astro": "^1.5.0" + }, + "main": "index.js", + "directories": { + "test": "test" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ayoayco/astro-reactive-library/issues" + } +} diff --git a/packages/validator/test/Validator.astro.test.js b/packages/validator/test/Validator.astro.test.js new file mode 100644 index 0000000..46e8ad8 --- /dev/null +++ b/packages/validator/test/Validator.astro.test.js @@ -0,0 +1,18 @@ +import { expect } from 'chai'; +import { describe, beforeEach, it } from 'mocha'; +import { getComponentOutput } from 'astro-component-tester'; + +describe('Example Tests', () => { + let component; + + beforeEach(() => { + component = undefined; + }); + + describe('Component test', async () => { + it('example component should not be empty', async () => { + component = await getComponentOutput('./Validator.astro'); + expect(component.html).not.to.equal('\n'); + }); + }); +}); diff --git a/packages/validator/tsconfig.json b/packages/validator/tsconfig.json new file mode 100644 index 0000000..eaa2b52 --- /dev/null +++ b/packages/validator/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "astro/tsconfigs/strictest", + "exclude": ["index.ts"] +}