@praxisui/rich-content 8.0.0-beta.1 → 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
@@ -61,6 +61,17 @@ settings-panel editor for `praxis-rich-content`. Hosts such as
61
61
  `@praxisui/page-builder` should open this editor from the component metadata
62
62
  instead of creating local rich-content JSON editors.
63
63
 
64
+ The canonical editor provides structured block authoring for common top-level
65
+ nodes (`text`, `badge`, `icon`, `image`, `metric`, `progress`, `compose`,
66
+ `link`, `card`, `mediaBlock`, `timeline` and `preset`), including add, reorder, inline
67
+ removal confirmation and field-level editing. It also supports nested authoring
68
+ for `card.content[]`, `compose.items[]` and `timeline.items[]`, plus governed
69
+ preset selection from `PRAXIS_RICH_BLOCK_PRESETS`. Common node metadata such as
70
+ `testId`, `className`, a simple `visibleWhen` equality rule and one safe inline
71
+ style declaration can be edited visually. Advanced JSON remains available for
72
+ less common nested fields and deep structures, but it is no longer the only
73
+ authoring path.
74
+
64
75
  The editor receives the widget input envelope and returns the same canonical
65
76
  shape expected by the runtime:
66
77
 
@@ -85,6 +96,34 @@ Authoring labels, helper text and validation messages use the rich-content i18n
85
96
  dictionary. Apps can provide overrides with `providePraxisRichContentI18n()` or
86
97
  reuse `resolvePraxisRichContentText()` when extending the canonical editor.
87
98
 
99
+ The editor validates the public `RichContentDocument` contract before
100
+ Apply/Save. Hosts that need the same checks outside the settings panel can use
101
+ `validateRichContentDocument()` from `@praxisui/rich-content` to reject
102
+ unsupported document versions, unknown node types, unsafe URLs, unsafe style
103
+ values and malformed nested nodes before persistence.
104
+
105
+ ## Agentic Authoring Contract
106
+
107
+ `@praxisui/rich-content` publishes an executable `ComponentAuthoringManifest`
108
+ through `PRAXIS_RICH_CONTENT_AUTHORING_MANIFEST`.
109
+
110
+ The manifest treats rich content as structured `RichContentDocument` data, not
111
+ HTML or markdown patches. It governs document replacement, block add/remove,
112
+ block order, text updates, canonical link nodes, common node metadata,
113
+ `mediaBlock` fields, `timeline.items[]`, preset refs and sanitization policy.
114
+ Security-sensitive policy edits and destructive removals require confirmation
115
+ before a patch can be compiled.
116
+
117
+ Link authoring uses a first-class `link` node with `label`, `href`, `target`
118
+ and `rel`; unsafe protocols are rejected by `validateRichContentDocument()`.
119
+
120
+ Each operation declares its own editable target resolver, ambiguity policy,
121
+ preconditions, validators, affected paths, effects and typed submission impact.
122
+ Document, block, text, link, media, timeline, preset, metadata and sanitization
123
+ operations are `config-only` because they edit the structured widget input
124
+ contract. `display.mode.set` is `visual-only` because it changes `layout` and
125
+ `rootClassName` without mutating the `RichContentDocument`.
126
+
88
127
  ## Layout Modes
89
128
 
90
129
  The component defaults to `layout="block"` to preserve document-style rendering.