@praxisui/editorial-forms 8.0.0-beta.11 → 8.0.0-beta.12

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
@@ -103,18 +103,21 @@ import {
103
103
  export class EditorialRuntimeDemoComponent {
104
104
  solution: EditorialRuntimeInput['solution'] = {
105
105
  solutionId: 'privacy-consent',
106
+ version: '1.0.0',
107
+ problemType: 'generic',
108
+ title: 'Privacy consent',
106
109
  journeys: [
107
110
  {
108
- id: 'privacy-consent-journey',
109
- title: 'Privacy consent',
111
+ journeyId: 'privacy-consent-journey',
112
+ label: 'Privacy consent',
110
113
  steps: [
111
114
  {
112
- id: 'review',
113
- title: 'Review and confirm',
115
+ stepId: 'review',
116
+ label: 'Review and confirm',
114
117
  blocks: [
115
118
  {
116
- id: 'consent-form',
117
- type: 'dataCollection',
119
+ blockId: 'consent-form',
120
+ kind: 'dataCollection',
118
121
  formBlockId: 'consent-form',
119
122
  },
120
123
  ],
@@ -320,6 +323,7 @@ Without this provider, `dataCollection` blocks degrade to an accessible fallback
320
323
  ## Public API highlights
321
324
 
322
325
  - `EditorialFormRuntimeComponent`
326
+ - `PRAXIS_EDITORIAL_FORMS_AUTHORING_MANIFEST`
323
327
  - `resolveEditorialRuntimeSnapshot(...)`
324
328
  - `EditorialDataBlockAdapter`
325
329
  - `EDITORIAL_DATA_BLOCK_ADAPTER`
@@ -346,6 +350,30 @@ Presentation model types from `@praxisui/core`:
346
350
  - `EditorialStepperConfig`
347
351
  - `EditorialStepVisualConfig`
348
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
+
349
377
  ## Resolution and fallback behavior
350
378
 
351
379
  The resolved snapshot formalizes:
@@ -3929,6 +3929,356 @@ function providePraxisEditorialForms() {
3929
3929
  ]);
3930
3930
  }
3931
3931
 
3932
+ const snapshotSetSchema = {
3933
+ type: 'object',
3934
+ required: ['solutionId'],
3935
+ properties: {
3936
+ solutionId: { type: 'string' },
3937
+ instanceId: { type: 'string' },
3938
+ journeyId: { type: 'string' },
3939
+ stepId: { type: 'string' },
3940
+ runtimeContextPatch: { type: 'object' },
3941
+ instanceContextPatch: { type: 'object' },
3942
+ preserveDiagnostics: { type: 'boolean' },
3943
+ },
3944
+ };
3945
+ const fallbackConfigureSchema = {
3946
+ type: 'object',
3947
+ required: ['mode'],
3948
+ properties: {
3949
+ mode: { enum: ['normal', 'warning', 'degraded', 'blocked'] },
3950
+ diagnosticCode: { type: 'string' },
3951
+ progressionBlocked: { type: 'boolean' },
3952
+ requiresEngineAttention: { type: 'boolean' },
3953
+ scope: {
3954
+ type: 'object',
3955
+ properties: {
3956
+ journeyId: { type: 'string' },
3957
+ stepId: { type: 'string' },
3958
+ blockId: { type: 'string' },
3959
+ },
3960
+ },
3961
+ },
3962
+ };
3963
+ const presentationConfigureSchema = {
3964
+ type: 'object',
3965
+ minProperties: 1,
3966
+ properties: {
3967
+ layout: {
3968
+ type: 'object',
3969
+ properties: {
3970
+ orientation: { enum: ['horizontal', 'vertical'] },
3971
+ density: { enum: ['compact', 'comfortable', 'relaxed'] },
3972
+ maxWidth: { type: 'string' },
3973
+ shellVariant: { type: 'string' },
3974
+ spacing: { type: 'object' },
3975
+ responsive: { type: 'object' },
3976
+ },
3977
+ },
3978
+ theme: { type: 'object' },
3979
+ stepper: {
3980
+ type: 'object',
3981
+ properties: {
3982
+ visible: { type: 'boolean' },
3983
+ orientation: { enum: ['horizontal', 'vertical'] },
3984
+ showLabels: { type: 'boolean' },
3985
+ showDescriptions: { type: 'boolean' },
3986
+ showConnectors: { type: 'boolean' },
3987
+ connectorStyle: { type: 'string' },
3988
+ allowStepJump: { type: 'boolean' },
3989
+ },
3990
+ },
3991
+ },
3992
+ };
3993
+ const adapterBindSchema = {
3994
+ type: 'object',
3995
+ required: ['adapterId', 'dataBlockType'],
3996
+ properties: {
3997
+ adapterId: { type: 'string' },
3998
+ dataBlockType: { enum: ['dataCollection'] },
3999
+ componentRef: { type: 'string' },
4000
+ requiredInputs: {
4001
+ type: 'array',
4002
+ items: { type: 'string' },
4003
+ },
4004
+ forwardOperationalEvents: { type: 'boolean' },
4005
+ fallbackModeWhenMissing: { enum: ['warning', 'degraded', 'blocked'] },
4006
+ },
4007
+ };
4008
+ const dataBlockAddSchema = {
4009
+ type: 'object',
4010
+ required: ['journeyId', 'stepId', 'block'],
4011
+ properties: {
4012
+ journeyId: { type: 'string' },
4013
+ stepId: { type: 'string' },
4014
+ insert: {
4015
+ type: 'object',
4016
+ properties: {
4017
+ mode: { enum: ['append', 'insertBefore', 'insertAfter'] },
4018
+ relativeToBlockId: { type: 'string' },
4019
+ },
4020
+ },
4021
+ block: {
4022
+ type: 'object',
4023
+ required: ['blockId', 'kind'],
4024
+ properties: {
4025
+ blockId: { type: 'string' },
4026
+ kind: { enum: ['dataCollection', 'introHero', 'selectionCards', 'reviewSections', 'successPanel'] },
4027
+ formBlockId: { type: 'string' },
4028
+ formConfigRef: { type: 'string' },
4029
+ title: { type: 'string' },
4030
+ description: { type: 'string' },
4031
+ visibility: { type: 'array' },
4032
+ },
4033
+ },
4034
+ },
4035
+ };
4036
+ const dataBlockRemoveSchema = {
4037
+ type: 'object',
4038
+ required: ['journeyId', 'stepId', 'blockId'],
4039
+ properties: {
4040
+ journeyId: { type: 'string' },
4041
+ stepId: { type: 'string' },
4042
+ blockId: { type: 'string' },
4043
+ requireNoFieldBindings: { type: 'boolean' },
4044
+ },
4045
+ };
4046
+ const fieldBindingSetSchema = {
4047
+ type: 'object',
4048
+ required: ['blockId', 'fieldName', 'contextPath'],
4049
+ properties: {
4050
+ blockId: { type: 'string' },
4051
+ fieldName: { type: 'string' },
4052
+ contextPath: { type: 'string' },
4053
+ mode: { enum: ['read', 'write', 'readWrite'] },
4054
+ valueMode: { enum: ['merge', 'replace'] },
4055
+ delegateFieldMetadataTo: { enum: ['praxis-metadata-editor'] },
4056
+ },
4057
+ };
4058
+ const PRAXIS_EDITORIAL_FORMS_AUTHORING_MANIFEST = {
4059
+ schemaVersion: '1.0.0',
4060
+ componentId: 'praxis-editorial-forms',
4061
+ ownerPackage: '@praxisui/editorial-forms',
4062
+ configSchemaId: 'EditorialRuntimeInput',
4063
+ manifestVersion: '1.0.0',
4064
+ runtimeInputs: [
4065
+ { name: 'solution', type: 'EditorialSolutionDefinition | null', description: 'Canonical editorial solution definition with journeys, steps, blocks and presentation.' },
4066
+ { name: 'instance', type: 'EditorialTemplateInstance | null', description: 'Runtime instance with selected journey, context, overrides and compatibility form configs.' },
4067
+ { name: 'runtimeContext', type: 'Record<string, unknown> | null', description: 'Host-provided immutable context merged into the resolved editorial snapshot.' },
4068
+ { name: 'hostConfig', type: 'EditorialRuntimeHostConfig | null', description: 'Host controls for operational event and adapter event forwarding.' },
4069
+ { name: 'snapshotChange', type: 'EditorialRuntimeSnapshot', description: 'Resolved runtime snapshot emitted to hosts for product UX and audit derivation.' },
4070
+ { name: 'fallbackChange', type: 'EditorialRuntimeFallbackState', description: 'Operational fallback state emitted when diagnostics affect runtime health.' },
4071
+ { name: 'operationalEvent', type: 'EditorialRuntimeOperationalEvent', description: 'Technical diagnostics event stream for logs, monitoring and runbooks.' },
4072
+ ],
4073
+ editableTargets: [
4074
+ { kind: 'snapshot', resolver: 'editorial-runtime-snapshot', description: 'Resolved editorial state from solution, instance and runtime context.' },
4075
+ { kind: 'fallback', resolver: 'editorial-runtime-fallback-state', description: 'Explicit operational fallback state derived from runtime diagnostics.' },
4076
+ { kind: 'presentation', resolver: 'editorial-solution-presentation', description: 'Editorial presentation contract under solution.presentation.' },
4077
+ { kind: 'adapter', resolver: 'editorial-data-block-adapter-registry', description: 'Optional dataCollection adapter binding and compatibility requirements.' },
4078
+ { kind: 'dataBlock', resolver: 'editorial-journey-step-block-by-id', description: 'Editorial blocks inside journey steps, including dataCollection and presentational blocks.' },
4079
+ { kind: 'fieldBinding', resolver: 'editorial-data-block-field-binding', description: 'Field-to-runtime-context binding for dataCollection blocks without redefining FieldMetadata.' },
4080
+ ],
4081
+ operations: [
4082
+ {
4083
+ operationId: 'snapshot.set',
4084
+ title: 'Set editorial snapshot inputs',
4085
+ scope: 'global',
4086
+ targetKind: 'snapshot',
4087
+ target: { kind: 'snapshot', resolver: 'editorial-runtime-snapshot', ambiguityPolicy: 'fail', required: false },
4088
+ inputSchema: snapshotSetSchema,
4089
+ effects: [{ kind: 'compile-domain-patch', handler: 'editorial-snapshot-set', handlerContract: {
4090
+ reads: ['EditorialSolutionDefinition', 'EditorialTemplateInstance', 'runtimeContext', 'resolveEditorialRuntimeSnapshot'],
4091
+ writes: ['solution.solutionId', 'instance.instanceId', 'instance.context', 'runtimeContext'],
4092
+ identityKeys: ['solutionId', 'instanceId', 'journeyId'],
4093
+ inputSchema: snapshotSetSchema,
4094
+ failureModes: ['solution-not-found', 'journey-not-found', 'step-not-found', 'snapshot-shape-invalid', 'diagnostics-lost'],
4095
+ description: 'Compiles a deterministic patch to editorial runtime inputs, validates the requested journey/step against the resolved snapshot and requires diagnostics to be preserved.',
4096
+ } }],
4097
+ validators: ['snapshot-shape-canonical', 'journey-exists', 'step-exists', 'diagnostics-preserved', 'editorial-round-trip'],
4098
+ affectedPaths: ['solution.solutionId', 'instance.instanceId', 'instance.context', 'runtimeContext'],
4099
+ submissionImpact: 'config-only',
4100
+ preconditions: ['editorial-runtime-inputs-loaded'],
4101
+ destructive: false,
4102
+ requiresConfirmation: false,
4103
+ },
4104
+ {
4105
+ operationId: 'fallback.configure',
4106
+ title: 'Configure explicit fallback behavior',
4107
+ scope: 'meta',
4108
+ targetKind: 'fallback',
4109
+ target: { kind: 'fallback', resolver: 'editorial-runtime-fallback-state', ambiguityPolicy: 'fail', required: false },
4110
+ inputSchema: fallbackConfigureSchema,
4111
+ effects: [{ kind: 'compile-domain-patch', handler: 'editorial-fallback-configure', handlerContract: {
4112
+ reads: ['EditorialRuntimeDiagnostics', 'deriveRuntimeFallbackState', 'EditorialRuntimeFallbackScope'],
4113
+ writes: ['hostConfig.emitOperationalEvents', 'snapshot.diagnostics.items'],
4114
+ identityKeys: ['mode', 'diagnosticCode', 'scope.journeyId', 'scope.stepId'],
4115
+ inputSchema: fallbackConfigureSchema,
4116
+ failureModes: ['fallback-mode-invalid', 'blocking-diagnostic-missing', 'scope-not-found', 'implicit-degradation-not-allowed'],
4117
+ description: 'Requires fallback policy to be explicit and tied to snapshot diagnostics, because fallback state is derived by deriveRuntimeFallbackState instead of persisted as domain data.',
4118
+ } }],
4119
+ validators: ['fallback-explicit', 'fallback-diagnostic-backed', 'fallback-scope-exists', 'editorial-round-trip'],
4120
+ affectedPaths: ['hostConfig.emitOperationalEvents', 'snapshot.diagnostics.items'],
4121
+ submissionImpact: 'config-only',
4122
+ preconditions: ['snapshot-resolved'],
4123
+ destructive: false,
4124
+ requiresConfirmation: false,
4125
+ },
4126
+ {
4127
+ operationId: 'presentation.configure',
4128
+ title: 'Configure editorial presentation',
4129
+ scope: 'skin',
4130
+ targetKind: 'presentation',
4131
+ target: { kind: 'presentation', resolver: 'editorial-solution-presentation', ambiguityPolicy: 'fail', required: false },
4132
+ inputSchema: presentationConfigureSchema,
4133
+ effects: [{ kind: 'compile-domain-patch', handler: 'editorial-presentation-configure', handlerContract: {
4134
+ reads: ['solution.presentation', 'buildRuntimeLayoutCss', 'buildRuntimeCssVars', 'resolveRuntimeOrientation'],
4135
+ writes: ['solution.presentation.layout', 'solution.presentation.theme', 'solution.presentation.stepper'],
4136
+ identityKeys: ['solutionId', 'presentation.layout.orientation', 'presentation.stepper.orientation'],
4137
+ inputSchema: presentationConfigureSchema,
4138
+ failureModes: ['presentation-key-unsupported', 'theme-token-invalid', 'domain-data-mutation-detected', 'renderer-coverage-missing'],
4139
+ description: 'Applies presentation-only changes under solution.presentation and rejects changes that mutate editorial domain data.',
4140
+ } }],
4141
+ validators: ['presentation-supported-by-runtime', 'presentation-does-not-mutate-domain-data', 'theme-tokens-valid', 'editorial-round-trip'],
4142
+ affectedPaths: ['solution.presentation.layout', 'solution.presentation.theme', 'solution.presentation.stepper'],
4143
+ submissionImpact: 'visual-only',
4144
+ preconditions: ['solution-loaded'],
4145
+ destructive: false,
4146
+ requiresConfirmation: false,
4147
+ },
4148
+ {
4149
+ operationId: 'adapter.bind',
4150
+ title: 'Bind data block adapter',
4151
+ scope: 'dataBinding',
4152
+ targetKind: 'adapter',
4153
+ target: { kind: 'adapter', resolver: 'editorial-data-block-adapter-registry', ambiguityPolicy: 'fail', required: true },
4154
+ inputSchema: adapterBindSchema,
4155
+ effects: [{ kind: 'compile-domain-patch', handler: 'editorial-adapter-bind', handlerContract: {
4156
+ reads: ['EDITORIAL_DATA_BLOCK_ADAPTER', 'EditorialDataBlockAdapterRegistry', 'EditorialDataBlockContext', 'ComponentDocMeta'],
4157
+ writes: ['hostConfig.forwardAdapterOperationalEvents', 'snapshot.diagnostics.items'],
4158
+ identityKeys: ['adapterId', 'dataBlockType'],
4159
+ inputSchema: adapterBindSchema,
4160
+ failureModes: ['adapter-not-registered', 'adapter-does-not-support-data-block', 'adapter-component-invalid', 'fallback-policy-missing'],
4161
+ description: 'Validates the external provider binding for a dataCollection adapter and records the host operational-event policy required when the adapter is missing or incompatible.',
4162
+ } }],
4163
+ validators: ['adapter-exists', 'adapter-supports-data-block', 'adapter-component-valid', 'fallback-explicit', 'editorial-round-trip'],
4164
+ affectedPaths: ['hostConfig.forwardAdapterOperationalEvents', 'snapshot.diagnostics.items'],
4165
+ submissionImpact: 'config-only',
4166
+ preconditions: ['adapter-registry-loaded'],
4167
+ destructive: false,
4168
+ requiresConfirmation: false,
4169
+ },
4170
+ {
4171
+ operationId: 'dataBlock.add',
4172
+ title: 'Add editorial data block',
4173
+ scope: 'section',
4174
+ targetKind: 'dataBlock',
4175
+ target: { kind: 'dataBlock', resolver: 'editorial-journey-step-block-by-id', ambiguityPolicy: 'fail', required: true },
4176
+ inputSchema: dataBlockAddSchema,
4177
+ effects: [{ kind: 'compile-domain-patch', handler: 'editorial-data-block-add', handlerContract: {
4178
+ reads: ['EditorialSolutionDefinition.journeys', 'EditorialResolvedStep.blocks', 'EditorialDataBlockAdapterRegistry'],
4179
+ writes: ['solution.journeys[].steps[].blocks'],
4180
+ identityKeys: ['journeyId', 'stepId', 'block.blockId'],
4181
+ inputSchema: dataBlockAddSchema,
4182
+ failureModes: ['journey-not-found', 'step-not-found', 'duplicate-block-id', 'data-collection-config-unresolved', 'adapter-not-registered'],
4183
+ description: 'Adds a canonical editorial block to a step and validates dataCollection readiness without redefining Dynamic Form config semantics.',
4184
+ } }],
4185
+ validators: ['data-block-id-unique', 'journey-exists', 'step-exists', 'adapter-supports-data-block', 'editorial-round-trip'],
4186
+ affectedPaths: ['solution.journeys[].steps[].blocks'],
4187
+ submissionImpact: 'config-only',
4188
+ preconditions: ['solution-loaded'],
4189
+ destructive: false,
4190
+ requiresConfirmation: false,
4191
+ },
4192
+ {
4193
+ operationId: 'dataBlock.remove',
4194
+ title: 'Remove editorial data block',
4195
+ scope: 'section',
4196
+ targetKind: 'dataBlock',
4197
+ target: { kind: 'dataBlock', resolver: 'editorial-journey-step-block-by-id', ambiguityPolicy: 'fail', required: true },
4198
+ inputSchema: dataBlockRemoveSchema,
4199
+ effects: [{ kind: 'compile-domain-patch', handler: 'editorial-data-block-remove', handlerContract: {
4200
+ reads: ['EditorialSolutionDefinition.journeys', 'EditorialResolvedStep.blocks', 'fieldBinding'],
4201
+ writes: ['solution.journeys[].steps[].blocks'],
4202
+ identityKeys: ['journeyId', 'stepId', 'blockId'],
4203
+ inputSchema: dataBlockRemoveSchema,
4204
+ failureModes: ['journey-not-found', 'step-not-found', 'block-not-found', 'field-bindings-still-reference-block'],
4205
+ description: 'Removes a block by stable id and rejects removal when governed field bindings still reference the block.',
4206
+ } }],
4207
+ destructive: true,
4208
+ requiresConfirmation: true,
4209
+ validators: ['data-block-exists', 'field-binding-target-exists', 'editorial-round-trip'],
4210
+ affectedPaths: ['solution.journeys[].steps[].blocks'],
4211
+ submissionImpact: 'config-only',
4212
+ preconditions: ['solution-loaded', 'explicit-confirmation-provided'],
4213
+ },
4214
+ {
4215
+ operationId: 'fieldBinding.set',
4216
+ title: 'Set editorial field binding',
4217
+ scope: 'fieldMetadataPath',
4218
+ targetKind: 'fieldBinding',
4219
+ target: { kind: 'fieldBinding', resolver: 'editorial-data-block-field-binding', ambiguityPolicy: 'fail', required: true },
4220
+ inputSchema: fieldBindingSetSchema,
4221
+ effects: [{ kind: 'compile-domain-patch', handler: 'editorial-field-binding-set', handlerContract: {
4222
+ reads: ['EditorialDataCollectionBlock', 'resolvedFormConfig.fieldMetadata', 'runtimeContext.formData', 'PRAXIS_METADATA_EDITOR_AUTHORING_MANIFEST'],
4223
+ writes: ['runtimeContext.formData'],
4224
+ identityKeys: ['blockId', 'fieldName', 'contextPath'],
4225
+ inputSchema: fieldBindingSetSchema,
4226
+ failureModes: ['block-not-found', 'field-not-found', 'context-path-invalid', 'field-metadata-delegation-required', 'domain-data-mutation-detected'],
4227
+ description: 'Sets the governed runtimeContext.formData path used by dataCollection adapters and delegates FieldMetadata shape changes to the metadata-editor manifest.',
4228
+ } }],
4229
+ validators: ['field-binding-target-exists', 'field-binding-path-valid', 'delegates-field-metadata', 'editorial-round-trip'],
4230
+ affectedPaths: ['runtimeContext.formData'],
4231
+ submissionImpact: 'affects-schema-backed-data',
4232
+ preconditions: ['data-block-resolved', 'field-metadata-loaded'],
4233
+ destructive: false,
4234
+ requiresConfirmation: false,
4235
+ },
4236
+ ],
4237
+ validators: [
4238
+ { validatorId: 'snapshot-shape-canonical', level: 'error', code: 'EDITORIAL_SNAPSHOT_SHAPE_CANONICAL', description: 'Resolved snapshot must remain compatible with EditorialRuntimeSnapshot.' },
4239
+ { validatorId: 'journey-exists', level: 'error', code: 'EDITORIAL_JOURNEY_EXISTS', description: 'Target journey must exist in the editorial solution.' },
4240
+ { validatorId: 'step-exists', level: 'error', code: 'EDITORIAL_STEP_EXISTS', description: 'Target step must exist in the selected journey.' },
4241
+ { validatorId: 'diagnostics-preserved', level: 'error', code: 'EDITORIAL_DIAGNOSTICS_PRESERVED', description: 'Patch compilation must not drop runtime diagnostics.' },
4242
+ { validatorId: 'fallback-explicit', level: 'error', code: 'EDITORIAL_FALLBACK_EXPLICIT', description: 'Fallback behavior must be explicit instead of implied by missing adapter or hidden diagnostics.' },
4243
+ { validatorId: 'fallback-diagnostic-backed', level: 'error', code: 'EDITORIAL_FALLBACK_DIAGNOSTIC_BACKED', description: 'Warning, degraded and blocked fallback states must be backed by diagnostics.' },
4244
+ { validatorId: 'fallback-scope-exists', level: 'error', code: 'EDITORIAL_FALLBACK_SCOPE_EXISTS', description: 'Fallback scope must resolve to an existing journey, step or block.' },
4245
+ { validatorId: 'presentation-supported-by-runtime', level: 'error', code: 'EDITORIAL_PRESENTATION_SUPPORTED', description: 'Presentation keys must be supported by the runtime or intentionally diagnosed as unsupported.' },
4246
+ { validatorId: 'presentation-does-not-mutate-domain-data', level: 'error', code: 'EDITORIAL_PRESENTATION_DOMAIN_SAFE', description: 'Presentation changes must not mutate solution journeys, blocks, field metadata or runtime context data.' },
4247
+ { validatorId: 'theme-tokens-valid', level: 'error', code: 'EDITORIAL_THEME_TOKENS_VALID', description: 'Theme tokens must be valid runtime CSS variable inputs.' },
4248
+ { validatorId: 'adapter-exists', level: 'error', code: 'EDITORIAL_ADAPTER_EXISTS', description: 'Requested adapter must exist in EditorialDataBlockAdapterRegistry.' },
4249
+ { validatorId: 'adapter-supports-data-block', level: 'error', code: 'EDITORIAL_ADAPTER_SUPPORTS_DATA_BLOCK', description: 'Requested adapter must support the target data block context.' },
4250
+ { validatorId: 'adapter-component-valid', level: 'error', code: 'EDITORIAL_ADAPTER_COMPONENT_VALID', description: 'Adapter component must expose the inputs required by the adapter contract.' },
4251
+ { validatorId: 'data-block-id-unique', level: 'error', code: 'EDITORIAL_DATA_BLOCK_ID_UNIQUE', description: 'Block ids must be unique within the resolved editorial step.' },
4252
+ { validatorId: 'data-block-exists', level: 'error', code: 'EDITORIAL_DATA_BLOCK_EXISTS', description: 'Target data block must exist before destructive or binding operations.' },
4253
+ { validatorId: 'field-binding-target-exists', level: 'error', code: 'EDITORIAL_FIELD_BINDING_TARGET_EXISTS', description: 'Field binding must target an existing dataCollection block and field.' },
4254
+ { validatorId: 'field-binding-path-valid', level: 'error', code: 'EDITORIAL_FIELD_BINDING_PATH_VALID', description: 'Field binding context path must be deterministic and inside governed runtime context data.' },
4255
+ { validatorId: 'delegates-field-metadata', level: 'error', code: 'EDITORIAL_DELEGATES_FIELD_METADATA', description: 'FieldMetadata shape changes must be delegated to the metadata-editor manifest instead of duplicated here.' },
4256
+ { validatorId: 'editorial-round-trip', level: 'error', code: 'EDITORIAL_ROUND_TRIP', description: 'Open, edit, apply/save, reopen and runtime consume must preserve the editorial document.' },
4257
+ ],
4258
+ roundTripRequirements: [
4259
+ 'EditorialRuntimeInput is the package-level authoring document; solution, instance and runtimeContext must resolve into EditorialRuntimeSnapshot without drift.',
4260
+ 'Fallback behavior must be explicit and backed by diagnostics; missing adapters cannot be hidden as successful rendering.',
4261
+ 'Presentation changes are constrained to solution.presentation and must not mutate journeys, blocks, FormConfig, FieldMetadata or runtimeContext domain data.',
4262
+ 'dataCollection blocks require an adapter that exists and supports the requested context, while Dynamic Form config semantics remain owned by @praxisui/dynamic-form.',
4263
+ 'FieldMetadata authoring is delegated to praxis-metadata-editor and dynamic-fields discovery; this manifest only governs editorial binding and orchestration.',
4264
+ 'Destructive block removal requires confirmation and must reject references from existing field bindings.',
4265
+ ],
4266
+ examples: [
4267
+ { id: 'select-journey', request: 'Set the onboarding journey as the active editorial path.', operationId: 'snapshot.set', params: { solutionId: 'customer-onboarding', journeyId: 'onboarding' }, isPositive: true },
4268
+ { id: 'merge-runtime-context', request: 'Prefill the runtime context with the selected plan.', operationId: 'snapshot.set', params: { solutionId: 'plan-signup', runtimeContextPatch: { selectedPlan: 'pro' } }, isPositive: true },
4269
+ { id: 'configure-blocked-fallback', request: 'Block progression when the required dataCollection adapter is missing.', operationId: 'fallback.configure', params: { mode: 'blocked', diagnosticCode: 'data-collection-adapter-missing', progressionBlocked: true }, isPositive: true },
4270
+ { id: 'configure-stepper', request: 'Use a vertical compact stepper with hidden descriptions.', operationId: 'presentation.configure', params: { layout: { orientation: 'vertical', density: 'compact' }, stepper: { showDescriptions: false } }, isPositive: true },
4271
+ { id: 'bind-dynamic-form-adapter', request: 'Bind the dynamic-form adapter for dataCollection blocks.', operationId: 'adapter.bind', params: { adapterId: 'dynamic-form', dataBlockType: 'dataCollection', requiredInputs: ['config', 'formId', 'editorialContext'], fallbackModeWhenMissing: 'blocked' }, isPositive: true },
4272
+ { id: 'add-data-block', request: 'Add a consent form block to the review step.', operationId: 'dataBlock.add', params: { journeyId: 'privacy', stepId: 'review', block: { blockId: 'consent-form', kind: 'dataCollection', formBlockId: 'consent-form' } }, isPositive: true },
4273
+ { id: 'remove-block', request: 'Remove the unused legacy consent block.', operationId: 'dataBlock.remove', params: { journeyId: 'privacy', stepId: 'review', blockId: 'legacy-consent', requireNoFieldBindings: true }, isPositive: true },
4274
+ { id: 'set-field-binding', request: 'Bind the email field into runtimeContext.formData.email.', operationId: 'fieldBinding.set', params: { blockId: 'contact-form', fieldName: 'email', contextPath: 'formData.email', mode: 'readWrite', delegateFieldMetadataTo: 'praxis-metadata-editor' }, isPositive: true },
4275
+ { id: 'reject-presentation-domain-mutation', request: 'Change presentation and also rewrite the collected email value.', operationId: 'presentation.configure', params: { layout: { density: 'relaxed' }, runtimeContextPatch: { formData: { email: 'changed@example.com' } } }, isPositive: false },
4276
+ { id: 'reject-missing-adapter', request: 'Render a dataCollection block with an adapter that is not registered.', operationId: 'adapter.bind', params: { adapterId: 'unknown-form-engine', dataBlockType: 'dataCollection' }, isPositive: false },
4277
+ { id: 'reject-duplicate-block', request: 'Add another block using the existing consent-form id.', operationId: 'dataBlock.add', params: { journeyId: 'privacy', stepId: 'review', block: { blockId: 'consent-form', kind: 'dataCollection', formBlockId: 'consent-form-copy' } }, isPositive: false },
4278
+ { id: 'reject-field-metadata-duplication', request: 'Change the control type inside editorial forms instead of metadata editor.', operationId: 'fieldBinding.set', params: { blockId: 'contact-form', fieldName: 'email', contextPath: 'formData.email', controlType: 'select' }, isPositive: false },
4279
+ ],
4280
+ };
4281
+
3932
4282
  const REQUIRED_DYNAMIC_FORM_INPUTS = ['config', 'formId', 'editorialContext'];
3933
4283
  function readRuntimeFormData(runtimeContext) {
3934
4284
  const formData = runtimeContext?.['formData'];
@@ -4455,4 +4805,4 @@ function getHarnessDataEngineComponent() {
4455
4805
  * Generated bundle index. Do not edit.
4456
4806
  */
4457
4807
 
4458
- export { DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG, EDITORIAL_DATA_BLOCK_ADAPTER, EDITORIAL_FORM_RUNTIME_COMPONENT_METADATA, EditorialBlockRendererComponent, EditorialDataBlockAdapterRegistry, EditorialDataCollectionBlockOutletComponent, EditorialFormRuntimeComponent, EditorialIntroHeroBlockComponent, EditorialReviewSectionsBlockComponent, EditorialRuntimeState, EditorialSelectionCardsBlockComponent, EditorialStepperComponent, EditorialSuccessPanelBlockComponent, HarnessDataEngineComponent, PRAXIS_EDITORIAL_FORMS_EN_US, PRAXIS_EDITORIAL_FORMS_PT_BR, buildRuntimeCssVars, buildRuntimeLayoutCss, createEditorialDynamicFormAdapter, createEditorialRuntimeHarnessCatalog, createPraxisEditorialFormsI18nConfig, deriveRuntimeFallbackState, getHarnessDataEngineComponent, getStepDisplayState, getValueAtPath, getVisibleBlocks, isBlockVisible, matchesVisibilityRule, provideEditorialDataBlockAdapter, provideEditorialDynamicFormAdapter, providePraxisEditorialFormRuntimeMetadata, providePraxisEditorialForms, providePraxisEditorialFormsI18n, resolveActiveJourney, resolveActiveStep, resolveDensity, resolveEditorialDataBlockAdapter, resolveEditorialDataBlockFormConfig, resolveEditorialDataBlockFormConfigDetails, resolveEditorialRuntimeSnapshot, resolveRuntimeOrientation, resolveShellVariant };
4808
+ export { DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG, EDITORIAL_DATA_BLOCK_ADAPTER, EDITORIAL_FORM_RUNTIME_COMPONENT_METADATA, EditorialBlockRendererComponent, EditorialDataBlockAdapterRegistry, EditorialDataCollectionBlockOutletComponent, EditorialFormRuntimeComponent, EditorialIntroHeroBlockComponent, EditorialReviewSectionsBlockComponent, EditorialRuntimeState, EditorialSelectionCardsBlockComponent, EditorialStepperComponent, EditorialSuccessPanelBlockComponent, HarnessDataEngineComponent, PRAXIS_EDITORIAL_FORMS_AUTHORING_MANIFEST, PRAXIS_EDITORIAL_FORMS_EN_US, PRAXIS_EDITORIAL_FORMS_PT_BR, buildRuntimeCssVars, buildRuntimeLayoutCss, createEditorialDynamicFormAdapter, createEditorialRuntimeHarnessCatalog, createPraxisEditorialFormsI18nConfig, deriveRuntimeFallbackState, getHarnessDataEngineComponent, getStepDisplayState, getValueAtPath, getVisibleBlocks, isBlockVisible, matchesVisibilityRule, provideEditorialDataBlockAdapter, provideEditorialDynamicFormAdapter, providePraxisEditorialFormRuntimeMetadata, providePraxisEditorialForms, providePraxisEditorialFormsI18n, resolveActiveJourney, resolveActiveStep, resolveDensity, resolveEditorialDataBlockAdapter, resolveEditorialDataBlockFormConfig, resolveEditorialDataBlockFormConfigDetails, resolveEditorialRuntimeSnapshot, resolveRuntimeOrientation, resolveShellVariant };
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { EnvironmentProviders, Provider, Type, InjectionToken } from '@angular/core';
3
3
  import * as _praxisui_core from '@praxisui/core';
4
- import { EditorialProblemType, EditorialWizardPresentation, EditorialThemePreset, EditorialCompliancePreset, EditorialStepKind, EditorialIconSpec, EditorialStepVisualConfig, EditorialBlock, EditorialDataCollectionBlock, EditorialSolutionDefinition, EditorialTemplateInstance, PraxisTranslationParams, ComponentDocMeta, FormConfig, EditorialLayoutConfig, EditorialStepperConfig, EditorialOrientation, EditorialThemeTokens, EditorialBlockVisibilityRule, PraxisI18nDictionary, PraxisI18nConfig, EditorialIntroHeroBlock, EditorialHeroBlock, EditorialRichTextBlock, EditorialPolicyListBlock, EditorialTimelineStepsBlock, EditorialReviewSummaryBlock, EditorialReviewSectionsBlock, EditorialContextSummaryBlock, EditorialSelectionCardsBlock, EditorialInfoCardsBlock, EditorialSuccessPanelBlock, EditorialFaqAccordionBlock, EditorialPresentationalAction, EditorialReviewSectionField } from '@praxisui/core';
4
+ import { ComponentAuthoringManifest, EditorialProblemType, EditorialWizardPresentation, EditorialThemePreset, EditorialCompliancePreset, EditorialStepKind, EditorialIconSpec, EditorialStepVisualConfig, EditorialBlock, EditorialDataCollectionBlock, EditorialSolutionDefinition, EditorialTemplateInstance, PraxisTranslationParams, ComponentDocMeta, FormConfig, EditorialLayoutConfig, EditorialStepperConfig, EditorialOrientation, EditorialThemeTokens, EditorialBlockVisibilityRule, PraxisI18nDictionary, PraxisI18nConfig, EditorialIntroHeroBlock, EditorialHeroBlock, EditorialRichTextBlock, EditorialPolicyListBlock, EditorialTimelineStepsBlock, EditorialReviewSummaryBlock, EditorialReviewSectionsBlock, EditorialContextSummaryBlock, EditorialSelectionCardsBlock, EditorialInfoCardsBlock, EditorialSuccessPanelBlock, EditorialFaqAccordionBlock, EditorialPresentationalAction, EditorialReviewSectionField } from '@praxisui/core';
5
5
 
6
6
  /**
7
7
  * Root provider entrypoint for the editorial runtime package.
@@ -13,6 +13,8 @@ import { EditorialProblemType, EditorialWizardPresentation, EditorialThemePreset
13
13
  */
14
14
  declare function providePraxisEditorialForms(): EnvironmentProviders;
15
15
 
16
+ declare const PRAXIS_EDITORIAL_FORMS_AUTHORING_MANIFEST: ComponentAuthoringManifest;
17
+
16
18
  type EditorialRuntimeDiagnosticSeverity = 'info' | 'warning' | 'error';
17
19
  type EditorialRuntimeDiagnosticScopeKind = 'global' | 'journey' | 'step' | 'block';
18
20
  type EditorialRuntimeDiagnosticCode = 'solution-missing' | 'theme-preset-not-found' | 'compliance-preset-not-found' | 'compliance-preset-problem-type-mismatch' | 'presentation-config-unsupported' | 'context-required-missing' | 'compliance-context-required-missing' | 'compliance-evidence-missing' | 'compliance-acceptance-missing' | 'data-collection-config-missing' | 'data-collection-config-ambiguous' | 'data-collection-adapter-missing' | 'data-collection-invalid' | 'instance-journey-block-conflict' | 'journey-override-target-missing' | 'step-override-target-missing' | 'block-override-invalid' | 'block-override-conflict' | 'block-override-target-missing';
@@ -751,5 +753,5 @@ interface EditorialRuntimeHarnessCatalog {
751
753
  declare function createEditorialRuntimeHarnessCatalog(): EditorialRuntimeHarnessCatalog;
752
754
  declare function getHarnessDataEngineComponent(): Type<unknown>;
753
755
 
754
- export { DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG, EDITORIAL_DATA_BLOCK_ADAPTER, EDITORIAL_FORM_RUNTIME_COMPONENT_METADATA, EditorialBlockRendererComponent, EditorialDataBlockAdapterRegistry, EditorialDataCollectionBlockOutletComponent, EditorialFormRuntimeComponent, EditorialIntroHeroBlockComponent, EditorialReviewSectionsBlockComponent, EditorialRuntimeState, EditorialSelectionCardsBlockComponent, EditorialStepperComponent, EditorialSuccessPanelBlockComponent, HarnessDataEngineComponent, PRAXIS_EDITORIAL_FORMS_EN_US, PRAXIS_EDITORIAL_FORMS_PT_BR, buildRuntimeCssVars, buildRuntimeLayoutCss, createEditorialDynamicFormAdapter, createEditorialRuntimeHarnessCatalog, createPraxisEditorialFormsI18nConfig, deriveRuntimeFallbackState, getHarnessDataEngineComponent, getStepDisplayState, getValueAtPath, getVisibleBlocks, isBlockVisible, matchesVisibilityRule, provideEditorialDataBlockAdapter, provideEditorialDynamicFormAdapter, providePraxisEditorialFormRuntimeMetadata, providePraxisEditorialForms, providePraxisEditorialFormsI18n, resolveActiveJourney, resolveActiveStep, resolveDensity, resolveEditorialDataBlockAdapter, resolveEditorialDataBlockFormConfig, resolveEditorialDataBlockFormConfigDetails, resolveEditorialRuntimeSnapshot, resolveRuntimeOrientation, resolveShellVariant };
756
+ export { DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG, EDITORIAL_DATA_BLOCK_ADAPTER, EDITORIAL_FORM_RUNTIME_COMPONENT_METADATA, EditorialBlockRendererComponent, EditorialDataBlockAdapterRegistry, EditorialDataCollectionBlockOutletComponent, EditorialFormRuntimeComponent, EditorialIntroHeroBlockComponent, EditorialReviewSectionsBlockComponent, EditorialRuntimeState, EditorialSelectionCardsBlockComponent, EditorialStepperComponent, EditorialSuccessPanelBlockComponent, HarnessDataEngineComponent, PRAXIS_EDITORIAL_FORMS_AUTHORING_MANIFEST, PRAXIS_EDITORIAL_FORMS_EN_US, PRAXIS_EDITORIAL_FORMS_PT_BR, buildRuntimeCssVars, buildRuntimeLayoutCss, createEditorialDynamicFormAdapter, createEditorialRuntimeHarnessCatalog, createPraxisEditorialFormsI18nConfig, deriveRuntimeFallbackState, getHarnessDataEngineComponent, getStepDisplayState, getValueAtPath, getVisibleBlocks, isBlockVisible, matchesVisibilityRule, provideEditorialDataBlockAdapter, provideEditorialDynamicFormAdapter, providePraxisEditorialFormRuntimeMetadata, providePraxisEditorialForms, providePraxisEditorialFormsI18n, resolveActiveJourney, resolveActiveStep, resolveDensity, resolveEditorialDataBlockAdapter, resolveEditorialDataBlockFormConfig, resolveEditorialDataBlockFormConfigDetails, resolveEditorialRuntimeSnapshot, resolveRuntimeOrientation, resolveShellVariant };
755
757
  export type { DynamicFormCompatibleComponent, EditorialDataBlockAdapter, EditorialDataBlockAdapterResolution, EditorialDataBlockAdapterResolutionStatus, EditorialDataBlockComponentInputs, EditorialDataBlockContext, EditorialDataBlockResolution, EditorialDataBlockValueChangeEvent, EditorialDynamicFormAdapterOptions, EditorialResolvedBlock, EditorialResolvedBlockBase, EditorialResolvedBlockCompositionEntry, EditorialResolvedBlockCompositionOperation, EditorialResolvedBlockProvenance, EditorialResolvedBlockSourceKind, EditorialResolvedBlockSourceRef, EditorialResolvedDataCollectionBlock, EditorialResolvedDataCollectionState, EditorialResolvedJourney, EditorialResolvedStep, EditorialRuntimeDiagnostic, EditorialRuntimeDiagnosticCode, EditorialRuntimeDiagnosticScopeKind, EditorialRuntimeDiagnosticSeverity, EditorialRuntimeDiagnostics, EditorialRuntimeFallbackMode, EditorialRuntimeFallbackScope, EditorialRuntimeFallbackState, EditorialRuntimeFixture, EditorialRuntimeHarnessCatalog, EditorialRuntimeHostConfig, EditorialRuntimeInput, EditorialRuntimeOperationalEvent, EditorialRuntimeOperationalEventBase, EditorialRuntimeOperationalEventSeverity, EditorialRuntimeOperationalEventType, EditorialRuntimeSnapshot, PraxisEditorialFormsI18nOptions, ResolveEditorialRuntimeSnapshotInput };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@praxisui/editorial-forms",
3
- "version": "8.0.0-beta.11",
3
+ "version": "8.0.0-beta.12",
4
4
  "description": "Editorial form runtime for Praxis UI: journeys, presets, semantic blocks, and specialist hosting for editorial experiences.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.0.0",
7
7
  "@angular/core": "^20.0.0",
8
- "@praxisui/core": "^8.0.0-beta.11"
8
+ "@praxisui/core": "^8.0.0-beta.12"
9
9
  },
10
10
  "dependencies": {
11
11
  "tslib": "^2.3.0"