diff --git a/package-lock.json b/package-lock.json index 7ff6a6c..d524824 100644 --- a/package-lock.json +++ b/package-lock.json @@ -288,6 +288,10 @@ "node": ">=6.0.0" } }, + "node_modules/@astro-reactive/common": { + "resolved": "packages/common", + "link": true + }, "node_modules/@astro-reactive/form": { "resolved": "packages/form", "link": true @@ -2853,10 +2857,6 @@ "node": ">= 10" } }, - "node_modules/common": { - "resolved": "packages/common", - "link": true - }, "node_modules/common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", @@ -10472,7 +10472,8 @@ } }, "packages/common": { - "version": "0.0.0", + "name": "@astro-reactive/common", + "version": "0.0.1", "license": "MIT", "devDependencies": {} }, @@ -10481,6 +10482,7 @@ "version": "0.5.1", "license": "MIT", "dependencies": { + "@astro-reactive/common": "^0.0.1", "@astro-reactive/validator": "^0.1.0" }, "devDependencies": { @@ -10518,6 +10520,9 @@ "name": "@astro-reactive/validator", "version": "0.1.0", "license": "MIT", + "dependencies": { + "@astro-reactive/common": "^0.0.1" + }, "devDependencies": { "@types/chai": "^4.3.3", "@types/eslint": "^8.4.6", @@ -10732,9 +10737,13 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, + "@astro-reactive/common": { + "version": "file:packages/common" + }, "@astro-reactive/form": { "version": "file:packages/form", "requires": { + "@astro-reactive/common": "^0.0.1", "@astro-reactive/validator": "^0.1.0", "@types/chai": "^4.3.3", "@types/eslint": "^8.4.6", @@ -10764,6 +10773,7 @@ "@astro-reactive/validator": { "version": "file:packages/validator", "requires": { + "@astro-reactive/common": "^0.0.1", "@types/chai": "^4.3.3", "@types/eslint": "^8.4.6", "@types/mocha": "^10.0.0", @@ -12702,9 +12712,6 @@ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true }, - "common": { - "version": "file:packages/common" - }, "common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", diff --git a/packages/common/index.ts b/packages/common/index.ts new file mode 100644 index 0000000..eea524d --- /dev/null +++ b/packages/common/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/packages/form/components/Errors.astro b/packages/form/components/Errors.astro index 322ed78..27608c9 100644 --- a/packages/form/components/Errors.astro +++ b/packages/form/components/Errors.astro @@ -1,5 +1,5 @@ --- -import type { ValidationError } from 'common/types'; +import type { ValidationError } from '@astro-reactive/common'; export interface Props { errors: ValidationError[]; diff --git a/packages/form/components/Field.astro b/packages/form/components/Field.astro index 6003755..abbc636 100644 --- a/packages/form/components/Field.astro +++ b/packages/form/components/Field.astro @@ -2,7 +2,7 @@ /** * DEFAULT CONTROL COMPONENT */ -import type { Radio } from 'common/types'; +import type { Radio } from '@astro-reactive/common'; import type { FormControl } from '../core/form-control'; import Input from './controls/Input.astro'; import RadioGroup from './controls/RadioGroup.astro'; diff --git a/packages/form/components/Form.astro b/packages/form/components/Form.astro index 8f57b57..a72949e 100644 --- a/packages/form/components/Form.astro +++ b/packages/form/components/Form.astro @@ -1,5 +1,5 @@ --- -import type { Submit } from 'common/types'; +import type { Submit } from '@astro-reactive/common'; import { FormGroup, FormControl } from '../core'; import FieldSet from './FieldSet.astro'; import Field from './Field.astro'; diff --git a/packages/form/components/controls/RadioGroup.astro b/packages/form/components/controls/RadioGroup.astro index 34a7024..de2df29 100644 --- a/packages/form/components/controls/RadioGroup.astro +++ b/packages/form/components/controls/RadioGroup.astro @@ -2,7 +2,7 @@ /** * RADIO GROUP COMPONENT */ -import type { Radio } from 'common/types'; +import type { Radio } from '@astro-reactive/common'; export interface Props { control: Radio; @@ -24,7 +24,12 @@ const options = control.options.map((option) => { { options.map((option) => (
- {' '} + {' '} {option.label}
)) diff --git a/packages/form/package.json b/packages/form/package.json index dd3fc10..d59dfd6 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -56,6 +56,7 @@ }, "license": "MIT", "dependencies": { - "@astro-reactive/validator": "^0.1.0" + "@astro-reactive/validator": "^0.1.0", + "@astro-reactive/common": "^0.0.1" } } diff --git a/packages/validator/Validator.astro b/packages/validator/Validator.astro index 9b8a4bd..24b4c16 100644 --- a/packages/validator/Validator.astro +++ b/packages/validator/Validator.astro @@ -1,5 +1,5 @@ --- -import type { HookType } from 'common/types'; +import type { HookType } from '@astro-reactive/common'; export interface Props { hook?: HookType; diff --git a/packages/validator/core/validator-functions.ts b/packages/validator/core/validator-functions.ts index bc1b798..81687ab 100644 --- a/packages/validator/core/validator-functions.ts +++ b/packages/validator/core/validator-functions.ts @@ -1,4 +1,4 @@ -import type { ValidationError } from 'common/types'; +import type { ValidationError } from '@astro-reactive/common'; import { Validators } from './validator-names'; /** diff --git a/packages/validator/package.json b/packages/validator/package.json index aaabb05..1f9a451 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -52,6 +52,9 @@ "peerDependencies": { "astro": "^1.5.0" }, + "dependencies": { + "@astro-reactive/common": "^0.0.1" + }, "main": "index.js", "directories": { "test": "test"