diff --git a/.changeset/drop-fixtures-from-npm.md b/.changeset/drop-fixtures-from-npm.md new file mode 100644 index 0000000..9869e33 --- /dev/null +++ b/.changeset/drop-fixtures-from-npm.md @@ -0,0 +1,7 @@ +--- +"@formhaus/core": patch +--- + +Fixtures are no longer published to npm. They were demo data for the docs/playground, not part of the public API, and the only way to import them (`@formhaus/core/fixtures/*.json`) was already broken under strict ESM resolution because they were never in the `exports` map. + +The Quick Start guide now shows a literal definition object instead of an import. The fixtures themselves stay in the repo for the playground and tests. diff --git a/docs/guide/index.md b/docs/guide/index.md index e82f19a..053fc4c 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -20,11 +20,23 @@ Or use `@formhaus/core` directly with any framework. See the [Svelte example in ## Quick start +```ts +const definition = { + id: 'contact', + title: 'Contact Us', + submit: { label: 'Send' }, + fields: [ + { key: 'name', type: 'text', label: 'Name', validation: { required: true } }, + { key: 'email', type: 'email', label: 'Email', validation: { required: true } }, + ], +}; +``` + ::: code-group ```vue [Vue]