@vectoriox/iox-ui 5.26.0 → 5.28.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.
Files changed (30) hide show
  1. package/design-core/index.d.ts +144 -4
  2. package/fesm2022/vectoriox-iox-ui-design-core.mjs +153 -5
  3. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  4. package/fesm2022/vectoriox-iox-ui-forms-core.mjs +40 -5
  5. package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +7018 -0
  7. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -0
  8. package/fesm2022/vectoriox-iox-ui.mjs +72 -14
  9. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  10. package/forms-core/index.d.ts +18 -2
  11. package/generation-core/index.d.ts +1397 -0
  12. package/generation-core/package.json +3 -0
  13. package/index.d.ts +13 -2
  14. package/package.json +5 -1
  15. package/src/design-core/flavor-spec.generated.ts +153 -5
  16. package/src/forms-core/collect.ts +3 -1
  17. package/src/forms-core/options.ts +29 -0
  18. package/src/forms-core/public-api.ts +1 -0
  19. package/src/forms-core/transport.ts +6 -2
  20. package/src/generation-core/compose-site.ts +474 -0
  21. package/src/generation-core/node-baseline.model.ts +10 -0
  22. package/src/generation-core/node-baselines.generated.ts +4841 -0
  23. package/src/generation-core/patterns.ts +125 -0
  24. package/src/generation-core/public-api.ts +20 -0
  25. package/src/generation-core/serialized-node.ts +91 -0
  26. package/src/generation-core/site-plan.model.ts +136 -0
  27. package/src/generation-core/site-spec.generated.ts +1111 -0
  28. package/src/generation-core/templates.ts +60 -0
  29. package/src/generation-core/validate-site-plan.ts +413 -0
  30. package/styles/iox-forms.css +136 -8
@@ -208,6 +208,18 @@ declare function collectFormSpec(node: FormNodeLike | null | undefined): FormSpe
208
208
  /** Every Field in this subtree, in document order, not descending into a nested Form. */
209
209
  declare function collectFieldNodes(nodes: readonly FormNodeLike[]): FormNodeLike[];
210
210
 
211
+ /**
212
+ * A Field's `optionsText` trait — the author's choices, one per line — as options. ONE parser for the
213
+ * builder canvas, both engine paths and iox-cms: until 2026-10-19 nothing parsed the trait, so a Radio
214
+ * group or a Dropdown from the tray rendered no choices at all on the canvas and on the live site.
215
+ */
216
+ declare function parseFieldOptions(text: unknown): FieldOption[];
217
+ /** The choices a saved Field offers: an explicit `options` list wins, else its `optionsText` parsed. */
218
+ declare function fieldOptionsOf(props: {
219
+ options?: unknown;
220
+ optionsText?: unknown;
221
+ } | null | undefined): FieldOption[];
222
+
211
223
  /** Everything the runtime needs to remember. Immutable — each transition returns a new state. */
212
224
  interface FormRuntimeState {
213
225
  /** Field names the visitor has left (blurred) at least once. */
@@ -343,7 +355,11 @@ type FormTransport = (request: SubmitRequest) => Promise<SubmitResponse>;
343
355
  * The public submit path. Built here rather than interpolated at each call site, so the engine and
344
356
  * any future host cannot disagree about it — and so changing it is one edit.
345
357
  *
346
- * Deliberately relative and WITHOUT a leading slash: the engine mounts under a per-org base href.
358
+ * ⚠️ ROOT-relative (leading slash), never base-relative. A live site is served under a per-org
359
+ * `<base href="/<label>/">`, so a relative `api/…` resolved to `/<label>/api/…` — a path the reverse
360
+ * proxy (`/api` → iox-cms, everything else → the engine) hands to the ENGINE, which answers a POST with
361
+ * 404: no visitor submission ever reached iox-cms from an org path (found 2026-10-19 by
362
+ * e2e:forminsert:real). The org is already in the path segment after `site/`.
347
363
  */
348
364
  declare function submitEndpointPath(orgId: string, formId: string): string;
349
365
  /**
@@ -363,5 +379,5 @@ declare function withAntiSpamFields(values: Record<string, any>, renderedAt: num
363
379
  */
364
380
  declare function interpretSubmitResponse(body: any): SubmitResponse;
365
381
 
366
- export { ControlType, DEFAULT_EN_MESSAGES, FIELD_NODE_TYPE, FORM_ERROR_KEYS, FORM_NODE_TYPE, FeedbackTiming, HONEYPOT_FIELD, IMPLIED_PATTERN, INITIAL_FORM_STATE, MESSAGE_NAMESPACE, MULTI_VALUE_CONTROLS, PATTERN_MESSAGE_KEYS, PATTERN_PRESETS, PATTERN_PRESET_OPTIONS, PatternPreset, RENDERED_AT_FIELD, RULE_DESCRIPTORS, RULE_MESSAGE_KEYS, RuleName, RuleParamKind, STORE_ACTION, addableRules, applyServerErrors, collectFieldNodes, collectFormSpec, deriveFieldName, firstInvalidField, interpretSubmitResponse, onFieldBlur, onFieldChange, onSubmitAttempt, resetFormState, rulesFor, shouldShowError, submitEndpointPath, uniqueFieldName, validateField, validateForm, withAntiSpamFields };
382
+ export { ControlType, DEFAULT_EN_MESSAGES, FIELD_NODE_TYPE, FORM_ERROR_KEYS, FORM_NODE_TYPE, FeedbackTiming, HONEYPOT_FIELD, IMPLIED_PATTERN, INITIAL_FORM_STATE, MESSAGE_NAMESPACE, MULTI_VALUE_CONTROLS, PATTERN_MESSAGE_KEYS, PATTERN_PRESETS, PATTERN_PRESET_OPTIONS, PatternPreset, RENDERED_AT_FIELD, RULE_DESCRIPTORS, RULE_MESSAGE_KEYS, RuleName, RuleParamKind, STORE_ACTION, addableRules, applyServerErrors, collectFieldNodes, collectFormSpec, deriveFieldName, fieldOptionsOf, firstInvalidField, interpretSubmitResponse, onFieldBlur, onFieldChange, onSubmitAttempt, parseFieldOptions, resetFormState, rulesFor, shouldShowError, submitEndpointPath, uniqueFieldName, validateField, validateForm, withAntiSpamFields };
367
383
  export type { FieldError, FieldOption, FieldOptionSource, FieldResult, FieldSpec, FormNodeLike, FormResult, FormRuntimeState, FormSpec, FormTransport, RuleDescriptor, SubmitAction, SubmitRequest, SubmitResponse, ValidationRule };