@10x-media/form-builder 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
1
+ # @10x-media/form-builder
2
+
3
+ ## 0.1.0-beta.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Initial release of `@10x-media/form-builder`, an end-to-end, headless, fully-extensible forms platform for Payload v3: author, validate, render, collect, aggregate, and act on forms, native to Payload and competitive with hosted tools for embedded use.
8
+
9
+ - **Field model.** `defineFormField` defines a field type once and yields its admin authoring, a typed isomorphic `validate`, a localized `format`, and a value kind. Built-in fields: text, textarea, email, number, select, checkbox, date, file, consent, and calculation. Every seam is `false | true | object` overridable.
10
+ - **Validation.** Declarative per-field rules via `defineValidationRule` (min/max length, min/max, pattern, email, url, oneOf, matchesField, notAlreadySubmitted) with custom localized messages and error/warning severity, cross-field and async server-only rules, and a Standard Schema escape hatch, all enforced by one server-authoritative engine.
11
+ - **Conditional logic.** Serializable `Where`-shaped `visibleWhen`/`validateWhen` authored with a native Payload-style builder and enforced server-side; hidden fields never leak into a submission.
12
+ - **Headless renderer.** `@10x-media/form-builder/react`: `<Form>` with progressive client validation, conditional visibility, submission with server-error mapping, and a typed lifecycle event taxonomy; accessible unstyled primitives and built-in renderers; an optional container-query layout grid; a shadcn registry block; and a bring-your-own-renderer contract.
13
+ - **Multi-step flow.** A serializable flow state machine with conditional branching and skipping; non-breaking, since a form with no flow renders as an ordinary single-step form.
14
+ - **Presentations.** Page, modal, drawer, and inline surfaces (plus custom), built from dependency-free, accessible overlay primitives.
15
+ - **Recall, prefill, and calculations.** Pipe earlier answers into later labels and the confirmation screen; prefill from URL parameters; a safe (no-`eval`) expression engine for pricing, quotes, and quiz scoring.
16
+ - **Post-submit pipeline.** Built-in email, confirmation, and signed-webhook actions plus custom actions, run as Payload jobs with a bounded inline fallback, alongside a pluggable lifecycle event sink.
17
+ - **Consent.** A compliant consent field with three sources, published-version capture, and proof by reference.
18
+ - **Polls and aggregation.** A submission-aggregation utility, a headless and shadcn `<FormResults>`, and a `<Poll>` pattern with public results.
19
+ - **File uploads.** A file field backed by a configurable upload collection with server-enforced MIME, size, and required checks, and self-describing references in the submission.
20
+ - **Spam controls.** Honeypot and rate-limiting on by default, a captcha adapter seam, upload-ownership scoping, and privacy-first capture metadata.
21
+ - **Submissions and i18n.** Typed, self-describing, localized submissions with a formatted admin answers view; typed, host-overridable translations that never depend on `@payloadcms/translations`.
22
+
23
+ Published under the `beta` dist-tag.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 10x Media GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.