@form-engine-ts/react 2.1.0 → 2.2.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/README.md CHANGED
@@ -55,12 +55,23 @@ batch-translation action.
55
55
 
56
56
  `useFormBuilder({ schema, onChange, policy, idFactory, factories })` exposes controlled field, option, page, condition,
57
57
  source-text, and localized-text actions. Core's `FormPolicy` enforces allowed field types, field/option limits, text and
58
- schema-byte limits, and required locales identically in browser and server code. Every mutation returns a typed
58
+ schema-byte limits, and required/allowed/maximum locale constraints identically in browser and server code. Every mutation returns a typed
59
59
  `BuilderActionResult`; invalid, empty, or duplicate generated IDs leave the schema unchanged. `BuilderFactories` injects
60
60
  initial field, option, and page shapes. `<FormBuilder>` delegates its UI mutations to this hook and accepts the same
61
61
  options. Its completion-message editors cover both source and locale text. `translationOptions` and
62
62
  `onTranslationReport` expose automatic-translation policy and reporting.
63
63
 
64
+ Visual-builder field creation uses `defaultFieldType` when it is allowed, otherwise the first allowed policy type, then
65
+ `text` when unrestricted. The add button is disabled when no type is allowed or `maxFields` is reached.
66
+ `onActionError` receives typed failures from visual headless actions, and `createManualTranslationMetadata` can attach
67
+ per-locale/property metadata to manual edits. Automatic translation defaults to `overwrite: "missing-only"`; explicitly
68
+ pass `{ overwrite: "all" }` to replace existing translations.
69
+
70
+ Pass `readOnly` to keep the complete builder visible while disabling every mutation. The `features` prop independently
71
+ controls `pages`, `localization`, and `conditions` authoring surfaces; each defaults to `true`. When `allowedLocales` is
72
+ set, locale addition becomes a selector containing only unregistered allowed locales, and the action is disabled at
73
+ `maxLocales`.
74
+
64
75
  `FormRenderer` can also be used without an explicit provider:
65
76
 
66
77
  ```tsx