@praxisui/rich-content 8.0.0-beta.1 → 8.0.0-beta.11

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,26 @@ 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, preset refs and sanitization
113
+ policy. Security-sensitive policy edits and destructive removals require
114
+ confirmation before a patch can be compiled.
115
+
116
+ Link authoring uses a first-class `link` node with `label`, `href`, `target`
117
+ and `rel`; unsafe protocols are rejected by `validateRichContentDocument()`.
118
+
88
119
  ## Layout Modes
89
120
 
90
121
  The component defaults to `layout="block"` to preserve document-style rendering.