Skip to content

Releases: paqu-io/form0-core

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 01 Nov 18:36

What's Changed

🚀 New Features

  • Hidden Value Recovery: Added inspectHiddenValue and correctHiddenValue to the record evaluator, so a host can recheck an invalid hidden field, read its current value and prepare a host-approved replacement without persistence or events (570dc9e)
  • Explicit Empty Rows: Retained explicit empty rows in record data, with updates to the record transformer and field value registry (570dc9e)

🐛 Bug Fixes

  • Other Answer Validation: Added clearer validation messages for unfinished Other answers on choice fields (3ae2bbd)

🔧 Maintenance

  • Version Bump: Bumped the package version from 0.10.0 to 0.11.0 (ff9f363)
  • Test Suite: Added hidden-value-correction and explicit-empty-rows tests to the npm test script (570dc9e)
  • Release Merge: Merged the development branch via PR #132 (988df15)

Full Changelog: v0.10.0...v0.11.0

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 19:09

What's Changed

🚀 New Features

  • Runtime Value Validation: Added validation of populated values without implicit conversion. Text requires strings, numeric requires finite numbers, dates require real YYYY-MM-DD dates and times require valid HH:MM or HH:MM:SS. Empty values stay separate from required validation, and invalid loaded values remain available for correction (dc4e249)
  • Hidden Value Retention: Added the visible_preserve_value: false input attribute to clear a value when its field is effectively hidden, including under hidden containers and in closed rows. Omitting it or setting true keeps the existing behavior. View mode preserves stored values (dc4e249)
  • Cleared Field Markers: Evaluation now returns clearedFields markers with instancePath, fieldName and fieldKey, and no old values (dc4e249)
  • Hidden Value Submission Checks: Added the validateHiddenValues option to prepareSubmission() and validateSubmission(). It includes intrinsic errors from retained hidden values, and hidden requirements and custom handlers stay excluded (dc4e249)

📚 Documentation

  • Runtime Values Guide: Added a README section on value validation, hidden-value retention and server-side submission validation (dc4e249)
  • Implementation Notes: Added an analysis document covering the implementation, verification results and Reform adoption limits (dc4e249)

🔧 Maintenance

  • Version Bump: Bumped the package version from 0.9.0 to 0.10.0 (9bfe83b)
  • Development Merge: Merged pull request #129 from development (c906f3c)

Full Changelog: v0.9.0...v0.10.0

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 18:31

What's Changed

🚀 New Features

  • Atomic Value Setters: Added engine.setValue(dataName, value) and engine.setValues(updates); nonempty batches evaluate once, return the current engine state and never dispatch events automatically (5acfbae)
  • Value Normalization: Exported a pure normalizeFieldValue(field, value) helper so adapters can share the engine's normalization before their own evaluation (5acfbae)
  • Choice Input Shapes: Added string-ID input for choice fields (SingleChoice/Boolean accept a string or { choice, other }, MultiChoice accepts an array of strings or { choices, other }), with missing labels filled from the schema (5acfbae)

💥 Breaking Changes

  • Stricter Setter Validation: Malformed calls, unknown or unowned names, calculated/display/container targets and writes in record readonly mode now throw TypeError before any part of a batch is applied; ordinary inputs marked read_only can still be updated programmatically (5acfbae)
  • Input Aliases Removed: Input aliases and choice-ID coercion were deliberately removed from value updates, so choice setters accept string IDs only; existing direct state mutation remains compatible (5acfbae)
  • Atomic Legacy Dispatch: Legacy dispatch now rejects the whole collected operation batch when field-access validation rejects any operation, replacing the earlier partial filtering (5acfbae)

📚 Documentation

  • Updating Values Guide: Added an "Updating values" section to the README covering setters, choice formats and error behavior (5acfbae)
  • Lifecycle Defaults: Updated the event contract so events.lifecycle defaults to true and events.fieldInteractions defaults to ['focus', 'blur', 'click'], with lifecycle: false or [] to opt out (6844ee4)
  • Adoption Notes: Recorded default-on lifecycle adoption in the alignment analysis docs (5035039)
  • Adoption Notes Moved: Moved application adoption notes out of core documentation (11ba187)
  • Issue 101 Verification: Added verification and review analysis documents for the value setter work (5acfbae)

🔧 Maintenance

  • Version Bump: Bumped the package version to 0.9.0 (3186017)

Full Changelog: v0.8.1...v0.9.0

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 27 Oct 10:22

What's Changed

🐛 Bug Fixes

  • COUNTA Description: Corrected the COUNTA catalog description to "Count all items in an array" to match runtime behavior, which is unchanged (81a98db)

📚 Documentation

  • Compatibility Audit: Added a consumer compatibility audit covering 32 builtins and 18 field types across core, CLI, React and Native (719c67e)
  • Audit Scope Notes: Recorded signature feedback verification and the compatibility audit scope (10b251a)
  • Preview Regressions: Recorded preview regression fixes and binding parity in the Plan 3 analyses (28f3417)

🔧 Maintenance

  • Compatibility Tests: Added a builtin and field compatibility audit test with shared fixtures (81a98db)
  • Literal Value Tests: Extended consumer compatibility tests with literal value handling (5167dbd)
  • Development Merge: Merged pull request #125 from development (6b07763)
  • Version Bump: Bumped the package version to 0.8.1 (ca8d8a5)

Full Changelog: v0.8.0...v0.8.1

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 10:11

What's Changed

🚀 New Features

  • Scoped Record Evaluation: Added evaluateScope() to evaluate only the active record, using accepted descendants and supplied ancestors and returning state, validation summary, changes and execution issues (ced343c)
  • Accepted View Mode: Added mode: 'readonly' | 'edit' with getMode()/setMode() on scalar engines, and interactionMode: 'readonly' for evaluateScope(), so accepted values are preserved and schema defaults are not applied (df6a9b8)
  • Event Mode: Added event.mode to event handlers, with view-time record writes such as SETVALUE failing before host delegation (df6a9b8)
  • Listener Registration: Synchronous ON/OFF inside permitted handlers now update the engine's listener registry after a successful dispatch (df6a9b8)
  • Bounded Record Preparation: Added bounded preparation work and cooperative serialization for records (ee43cf7)

⚡ Performance

  • Argument Layouts: Reused expression argument layouts across records (de1667d)
  • Context Setup: Reduced calculation and event context setup work (ea9adf0)
  • Event Registration: Avoided unused field bindings during literal event registration (e0ba647)

📚 Documentation

🔧 Maintenance

  • Package Funding: Added funding information to package.json (fdaf35e)
  • Version Bump: Bumped version to 0.8.0 (96959dc)

Full Changelog: v0.7.0...v0.8.0

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 17:51

What's Changed

🚀 New Features

  • Record Evaluator: Added createRecordEvaluator() to evaluate root and nested repeatable records without modifying the caller's snapshot, with evaluate() and prepareSubmission() methods (36a8e8f)
  • Repeatable Aggregation: Added REPEATABLEVALUES and REPEATABLESUM builtins for calculations over repeatable section rows (36a8e8f)
  • Repeatable Recalculation: Added the form.repeatable_recalculation setting with automatic and confirm modes, including a decision flow (requires_decision, reviewId) for changed child values (36a8e8f)
  • Draft Preparation: Added { intent: 'draft' } preparation that retains child values and permits ordinary validation failures (36a8e8f)

🐛 Bug Fixes

  • Pending Freshness: Fixed grouping of pending freshness identities so they are tracked per record instance (e254d38)

⚡ Performance

  • Calculation Bindings: Reused calculation bindings through a per-definition metadata cache, reducing repeated context construction on large record trees (021dbc0)
  • Complex Record Benchmark: Added a benchmark script and a deterministic complex-record fixture to verify performance on large, deeply nested forms (021dbc0)

📚 Documentation

  • README Update: Documented record-tree evaluation and submission preparation with usage examples (36a8e8f)
  • Evaluation Analyses: Added contract, verification and alignment documents for shared record evaluation (68f4b69)
  • Alignment Docs: Finalized shared record evaluation alignment documentation (5aa80a9)
  • Complex Coverage Notes: Recorded complex form coverage and release boundaries (f1fa18a)
  • Preparation Payloads: Clarified the difference between preparation payloads and persisted records (4b7cf7d)
  • Freshness Contract: Finalized grouped freshness contract and verification notes (67613c5)

🔧 Maintenance

  • Builtin Modules: Split repeatable builtins into separate repeatablevalues.js and repeatablesum.js modules (8ccba8f)
  • Development Merge: Merged development branch changes via PR #121 (7f081ea)
  • Version Bump: Bumped version to 0.7.0 (52fe4ed)

Full Changelog: v0.6.0...v0.7.0

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 12:25

What's Changed

🐛 Bug Fixes

  • Condition Scope: Schema validation and engine construction now reject visible, required and read-only condition references that point outside the owning record and its ancestors. Errors name the owner, the condition property, the reference and both ownership paths, and runtime checks throw and emit structured access warnings (6208dd7, #103)

📚 Documentation

  • Validation Alignment: Added an analysis document recording the validation freshness delivery alignment, plus a verification report for the condition scope change (469363a)

🔧 Maintenance

  • Node.js Pinning: Pinned CI to Node.js 22.23.4 and 24.22.1, and pinned the publish workflow to 24.22.1 (96f5e3a)
  • Development Merge: Merged the development branch into main via PR #119 (97e35b4)
  • Version Bump: Bumped the package version to 0.6.0 (10e4e3d)

Full Changelog: v0.5.1...v0.6.0

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 21 Oct 09:21

What's Changed

🐛 Bug Fixes

  • Media in Events: Fixed managed event copies so File and Blob media handles are preserved, with their binary content and standard file metadata (name, type, lastModified), instead of being rejected (fbd0d5d)
  • Event Data Error: Updated the error message for unsupported event data to mention native media handles (fbd0d5d)

📚 Documentation

  • Event Contract: Documented File/Blob media handles as portable event data, noting that custom properties on them are not copied and async schema handlers remain unsupported (fbd0d5d)
  • Delivery Guidelines: Updated delivery and acceptance notes for CLI tooling and the browser preview's opt-in lifecycle adoption (02d3e58)

🔧 Maintenance

  • Version Bump: Bumped the package version to 0.5.1 (6c467e6)
  • Development Merge: Merged pull request #117 from development (e77a0b6)
  • Media Tests: Added a managed-events test covering File and Blob handling (fbd0d5d)

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 09:42

What's Changed

🚀 New Features

  • Detailed Event Dispatch: Added engine.triggerDetailed(eventType, fieldKey?, metadata?), a synchronous call that returns operations, validationIssues and issues without writing values or saving records. engine.trigger() keeps its existing behavior (477158f)
  • Custom Validation: Added the INVALID(message) event builtin, available in managed validate-record and validate-repeatable handlers, to report custom validation messages (477158f)
  • Scoped Event Execution: Added an eventScope option to createFormEngine so a headless row engine can run events for a specific repeatable row, with reads and SETVALUE() writes limited to that scope (477158f)

📚 Documentation

  • Event Contract: Added EVENT_CONTRACT.md describing managed event execution, scope ownership and custom validation (477158f)
  • Builtin Proposals: Added a "Proposing a builtin" section to CONTRIBUTING.md covering helpers, criteria for core builtins, issue contents and the files a builtin pull request touches (fc97df5)

🔧 Maintenance

  • Package Check: Updated scripts/check-package-contents.mjs, which keeps EVENT_CONTRACT.md out of the npm package (477158f)
  • Version Bump: Bumped the package version to 0.5.0 (1562c67)

Full Changelog: v0.4.1...v0.5.0

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 07 Oct 17:16

What's Changed

🚀 New Features

  • Mutation Operation Catalog: Added mutationOperationCatalog to getFormAuthoringContext({ schema }), listing each supported operation's format, required parameters, and examples; mutationOperations still returns the list of names (0a26fa8)
  • Mutation Validation: applyFormMutationBatch now validates each operation against the catalog and rejects malformed operations, unknown parameters, and empty changes objects atomically, with diagnostics (0a26fa8)

💥 Breaking Changes

  • Stricter Mutation Input: Operations that were previously ignored silently are now rejected, such as a patch parameter on updateForm (use changes instead) or empty changes objects (0a26fa8)
  • Explicit Clearing: setTitleField, setStatusField, setCalculation, and setFormEventCode now require their parameter, so clearing a value takes an explicit null (for example field: null) rather than an omitted value (0a26fa8)

📚 Documentation

  • Authoring Guide: Added an "Authoring mutation validation" section to the README covering the catalog, rejection rules, and the note that valid idempotent batches remain valid in core (0a26fa8)

🔧 Maintenance

  • Version Bump: Bumped the package version from 0.4.0 to 0.4.1 (be1e301)

Full Changelog: v0.4.0...v0.4.1