Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets).

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
9 changes: 9 additions & 0 deletions .changeset/autocomplete-field-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@formhaus/core": minor
"@formhaus/react": minor
"@formhaus/vue": minor
---

Added `'autocomplete'` to `DefaultFieldType` for type-to-filter dropdowns. React and Vue ship an `AutocompleteField` that renders `<input>` + `<datalist>` (native browser filtering, SSR-safe). For richer pickers (MUI `Autocomplete`, Headless UI `Combobox`) plug in your own component via `components`.

Note: native `<datalist>` filters by `value`, not `label`, and does not enforce that the value is in the list. See the field types guide.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [["@formhaus/core", "@formhaus/react", "@formhaus/vue"]],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@formhaus/figma"]
}
9 changes: 9 additions & 0 deletions .changeset/datetime-field-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@formhaus/core": minor
"@formhaus/react": minor
"@formhaus/vue": minor
---

Added `'datetime'` to `DefaultFieldType`. React and Vue ship a `DateTimeField` component that renders `<input type="datetime-local">`.

The native input emits `YYYY-MM-DDTHH:mm` without timezone — see the field types guide for the timezone caveat and how to swap in a richer picker (MUI `DateTimePicker`, react-aria `DateField`).
7 changes: 7 additions & 0 deletions .changeset/ssr-server-snapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@formhaus/react": patch
---

Fixed `FormRenderer` crashing under React SSR (Next.js prerender, `renderToString`) with "Missing getServerSnapshot". `useFormEngine` now provides a server snapshot and stable subscribe/getSnapshot callbacks.

Apps that wrapped `FormRenderer` in `next/dynamic({ ssr: false })` to avoid the crash can drop the wrapper and recover prerendering.
38 changes: 8 additions & 30 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
# Changelog

## Unreleased

### `@formhaus/core`

- New `'autocomplete'` member of `DefaultFieldType` for type-to-filter dropdowns.
- New `'datetime'` member of `DefaultFieldType` for date+time inputs.

### `@formhaus/react`

- Fixed `FormRenderer` crashing under React SSR (Next.js prerender, `renderToString`) with "Missing getServerSnapshot". `useFormEngine` now provides a server snapshot and stable subscribe/getSnapshot callbacks.
- New `AutocompleteField` component for `type: 'autocomplete'`. Renders `<input>` + `<datalist>` (native browser filtering, SSR-safe).
- New `DateTimeField` component for `type: 'datetime'`. Renders `<input type="datetime-local">`.

### `@formhaus/vue`

- New `AutocompleteField` component for `type: 'autocomplete'`. Renders `<input>` + `<datalist>`.
- New `DateTimeField` component for `type: 'datetime'`. Renders `<input type="datetime-local">`.

### Migration notes

- **Drop the `next/dynamic({ ssr: false })` workaround** if you used it to avoid the prior SSR crash. `FormRenderer` now prerenders cleanly and hydrates without a layout shift:

```diff
- import dynamic from 'next/dynamic';
- const FormRenderer = dynamic(
- () => import('@formhaus/react').then((m) => m.FormRenderer),
- { ssr: false }
- );
+ import { FormRenderer } from '@formhaus/react';
```
> Starting with v0.3.2, per-package changelogs live alongside each package and on [GitHub Releases](https://github.com/ignsm/formhaus/releases). Releases are managed with [Changesets](https://github.com/changesets/changesets) — see CONTRIBUTING.md for the workflow.
>
> Per-package changelogs:
> - [`@formhaus/core`](packages/core/CHANGELOG.md)
> - [`@formhaus/react`](packages/react/CHANGELOG.md)
> - [`@formhaus/vue`](packages/vue/CHANGELOG.md)
>
> The historical entries below cover everything through v0.3.1.

## 0.3.1 - 2026-04-10

Expand Down
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,18 @@ Opens at http://localhost:5173.
2. Make your changes
3. Make sure `pnpm build` and `pnpm test` pass
4. Update docs if you changed any public API
5. Add a changelog entry under `## Unreleased`
5. Run `pnpm changeset` and pick the affected packages + bump type. This writes a `.changeset/*.md` file describing your change. Commit it with the rest of your work.
6. Commit using [conventional commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, `chore:`)
7. Open a PR against `main`

### Changesets

Releases are managed with [Changesets](https://github.com/changesets/changesets). Each PR that touches a published package adds a `.changeset/*.md` file. When the maintainer is ready to release, `pnpm version` consumes those files into per-package CHANGELOGs and bumps versions; `pnpm release` builds and publishes to npm.

Don't edit per-package `CHANGELOG.md` files by hand — they're generated.

`@formhaus/core`, `@formhaus/react`, and `@formhaus/vue` are versioned together (the `fixed` group in `.changeset/config.json`). `@formhaus/figma` is private and not published.

## What could use help

- Svelte adapter (`@formhaus/svelte`)
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
"test": "pnpm -r run test",
"clean": "pnpm -r run clean",
"lint:packages": "pnpm --filter @formhaus/core --filter @formhaus/react --filter @formhaus/vue exec publint",
"check:types": "pnpm --filter @formhaus/core --filter @formhaus/react --filter @formhaus/vue exec attw --pack --profile esm-only"
"check:types": "pnpm --filter @formhaus/core --filter @formhaus/react --filter @formhaus/vue exec attw --pack --profile esm-only",
"changeset": "changeset",
"version": "changeset version",
"release": "pnpm build && changeset publish"
},
"engines": {
"node": ">=20"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"@changesets/cli": "^2.31.0",
"publint": "^0.3.18"
}
}
1 change: 1 addition & 0 deletions packages/figma/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@formhaus/figma",
"version": "0.3.1",
"private": true,
"description": "Figma plugin: generates form mockups from @formhaus/core form definitions",
"scripts": {
"build": "esbuild src/code.ts --bundle --outfile=dist/code.js --target=es2017 --format=iife",
Expand Down
Loading
Loading