@praxisui/editorial-forms 8.0.0-beta.7 → 8.0.0-beta.71

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
@@ -40,6 +40,31 @@ Optional integration:
40
40
 
41
41
  - `@praxisui/dynamic-form` if your `dataCollection` blocks should render real forms instead of fallback content
42
42
 
43
+ ## App provider
44
+
45
+ Register the package provider in hosts that render the runtime through dynamic
46
+ widget composition, including `@praxisui/core` dynamic pages, page-builder
47
+ previews, examples, recipes and labs:
48
+
49
+ ```ts
50
+ import { providePraxisEditorialForms } from '@praxisui/editorial-forms';
51
+
52
+ export const appConfig = {
53
+ providers: [
54
+ providePraxisEditorialForms(),
55
+ ],
56
+ };
57
+ ```
58
+
59
+ `providePraxisEditorialForms()` registers the package dynamic widget metadata for
60
+ `praxis-editorial-form-runtime`. It does not register the optional
61
+ `@praxisui/dynamic-form` adapter and does not create a global singleton runtime
62
+ graph.
63
+
64
+ Without this provider, hosts may still use `EditorialFormRuntimeComponent`
65
+ directly through a standalone import, but `DynamicWidgetLoader` cannot discover
66
+ `praxis-editorial-form-runtime` from a JSON page definition.
67
+
43
68
  ## Core concepts
44
69
 
45
70
  - `solution`: canonical editorial definition
@@ -78,18 +103,21 @@ import {
78
103
  export class EditorialRuntimeDemoComponent {
79
104
  solution: EditorialRuntimeInput['solution'] = {
80
105
  solutionId: 'privacy-consent',
106
+ version: '1.0.0',
107
+ problemType: 'generic',
108
+ title: 'Privacy consent',
81
109
  journeys: [
82
110
  {
83
- id: 'privacy-consent-journey',
84
- title: 'Privacy consent',
111
+ journeyId: 'privacy-consent-journey',
112
+ label: 'Privacy consent',
85
113
  steps: [
86
114
  {
87
- id: 'review',
88
- title: 'Review and confirm',
115
+ stepId: 'review',
116
+ label: 'Review and confirm',
89
117
  blocks: [
90
118
  {
91
- id: 'consent-form',
92
- type: 'dataCollection',
119
+ blockId: 'consent-form',
120
+ kind: 'dataCollection',
93
121
  formBlockId: 'consent-form',
94
122
  },
95
123
  ],
@@ -144,6 +172,34 @@ Recommended host usage:
144
172
  - use `operationalEvent` for technical telemetry, not as primary user-facing UI content
145
173
  - keep `runtimeContext` immutable from the host side; the runtime now emits refreshed state as blocks and adapters materialize `formData`
146
174
 
175
+ ## Dynamic widget composition
176
+
177
+ The runtime publishes `praxis-editorial-form-runtime` as dynamic widget metadata
178
+ with these canonical component ports:
179
+
180
+ Inputs:
181
+
182
+ - `solution`
183
+ - `instance`
184
+ - `runtimeContext`
185
+ - `hostConfig`
186
+
187
+ Outputs:
188
+
189
+ - `snapshotChange`
190
+ - `fallbackChange`
191
+ - `operationalEvent`
192
+
193
+ Nested dynamic page links must target these ports through
194
+ `composition.links` using `component-port` endpoints. When the editorial runtime
195
+ is nested inside a container such as Tabs or Expansion, persist the nested child
196
+ identity through `nestedPath` and keep the terminal segment as a widget segment
197
+ with stable `key` and `componentType: "praxis-editorial-form-runtime"`.
198
+
199
+ Do not expose `widgetEvent`, `bindingPath`, host-specific aliases, or
200
+ container-owned child-specific ports as the final contract for editorial runtime
201
+ composition.
202
+
147
203
  ## Presentation layer
148
204
 
149
205
  The runtime now supports an optional `presentation` contract inside the editorial `solution`.
@@ -267,6 +323,7 @@ Without this provider, `dataCollection` blocks degrade to an accessible fallback
267
323
  ## Public API highlights
268
324
 
269
325
  - `EditorialFormRuntimeComponent`
326
+ - `PRAXIS_EDITORIAL_FORMS_AUTHORING_MANIFEST`
270
327
  - `resolveEditorialRuntimeSnapshot(...)`
271
328
  - `EditorialDataBlockAdapter`
272
329
  - `EDITORIAL_DATA_BLOCK_ADAPTER`
@@ -293,6 +350,30 @@ Presentation model types from `@praxisui/core`:
293
350
  - `EditorialStepperConfig`
294
351
  - `EditorialStepVisualConfig`
295
352
 
353
+ ## Agentic authoring contract
354
+
355
+ `PRAXIS_EDITORIAL_FORMS_AUTHORING_MANIFEST` is the executable AI authoring contract for this package.
356
+
357
+ The manifest governs editorial document orchestration:
358
+
359
+ - `snapshot.set`
360
+ - `fallback.configure`
361
+ - `presentation.configure`
362
+ - `adapter.bind`
363
+ - `dataBlock.add`
364
+ - `dataBlock.remove`
365
+ - `fieldBinding.set`
366
+
367
+ Boundary rules:
368
+
369
+ - `solution`, `instance` and `runtimeContext` resolve into `EditorialRuntimeSnapshot` without hidden drift
370
+ - `fallback` must be explicit and backed by diagnostics
371
+ - `presentation` only changes `solution.presentation`; it must not mutate domain data
372
+ - `dataCollection` blocks require a registered adapter that supports the requested context
373
+ - `dataBlock` authoring uses canonical `blockId` and `kind`; `id` and `type` are not accepted aliases
374
+ - `snapshot.set` updates canonical runtime inputs (`solution`, `instance.context`, and `runtimeContext`) and does not persist active journey state as `instance.journeyId`
375
+ - `FieldMetadata` shape changes are delegated to `@praxisui/metadata-editor` and dynamic-fields discovery instead of being redefined here
376
+
296
377
  ## Resolution and fallback behavior
297
378
 
298
379
  The resolved snapshot formalizes: