@praxisui/rich-content 10.0.0-rc.19 → 10.0.0-rc.21

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
@@ -166,7 +166,15 @@ The validator rejects unsupported document versions, unknown node types, unsafe
166
166
 
167
167
  The editor separates authoring into guided editing, preview and advanced JSON tabs. Guided editing keeps the document structure visible while document-level context (`context.scopes`, `context.aliases`) and the selected block expose focused controls. The advanced data/rule section surfaces canonical bindings and JsonLogic fields (`bindings`, `disabledWhen`, `loadWhen`, `classWhen`, `styleWhen`) as focused JSON editors, validates them before apply/save, and keeps the full document JSON synchronized. Preview renders the materialized document without mixing authoring fields, and advanced JSON remains available for diagnostics, migration and less common deep structures.
168
168
 
169
- The editor supports structured block authoring, nested card/timeline/action collections, preset selection, validation badges and advanced JSON for less common deep structures. A card body can contain a guided `compose` block, allowing icons, labels, badges, metrics, progress and action buttons bound to several record fields to be arranged in a row or column with governed spacing and wrapping. Labels and validation messages use the rich-content i18n dictionary; override them with `providePraxisRichContentI18n()`.
169
+ The editor supports structured block authoring, nested card/timeline/action collections, preset selection, validation badges and advanced JSON for less common deep structures. Clearing `rootClassName` emits `rootClassName: ''` so host runtime bindings clear any previously applied class, and the renderer safely ignores `null`/`undefined` or whitespace-only values. Card slots (`header`, `footer`, `aside`), card content and top-level `compose` blocks support nested `compose` structures with both Flex (`direction`, `gap`, `wrap`, `alignItems`) and CSS Grid (`layout: 'grid'`, `columns`, `minColumnWidth`, `gap`, `alignItems`) configurations plus nested items. All nested presenter and action nodes inside `card` (`header`, `content`, `actions`, `footer`, `aside`) and `compose` expose `className` in the guided editor, display explicit target breadcrumbs (`Card › Section › Compose › Item`), and support deep structure tree navigation (`Card -> Slot -> Compose -> Item`) and item reordering.
170
+
171
+ Both top-level and nested `icon` and `badge` nodes expose didactic visual appearance controls in the guided editor that persist directly to canonical `node.style` (without requiring host-specific CSS classes):
172
+
173
+ - **`icon` appearance & surface**: live preview, surface presets (`none`, `softTile`, `circleBadge`, `outlinedTile`, `elevatedTile`), primary controls (`fontSize`, `color`, `background`), progressive disclosure for container box (`width`/`height`, `padding`, `borderRadius`, `borderWidth`, `borderColor`, `boxShadow`), and one-click reset. The renderer applies container styles to the `.prx-rich-node[data-rich-node-type='icon']` wrapper while the inner `.prx-rich-icon` glyph inherits `fontSize` and `color`.
174
+ - **`badge` appearance & typography**: all semantic tones (`neutral`, `primary`, `secondary`, `tertiary`, `info`, `success`, `warning`, `danger`, `error`), live preview with long-text stress toggle, visual presets (`default`, `softPill`, `solidPill`, `outlinedTag`, `compactSquare`), primary controls (`color`, `background`, `borderRadius`, `fontSize`), progressive disclosure (`fontWeight`, `textTransform`, `letterSpacing`, `padding`, `borderWidth`, `borderColor`, `iconSize` mapped to `--prx-rich-badge-icon-size`, `maxWidth`, `whiteSpace`), and one-click reset. The renderer applies `resolveNodeStyles(node)` directly to the `.prx-rich-badge` pill element so background, radius, border, typography and truncation take effect without host CSS workarounds.
175
+ - **Didactic guardrails**: inline warnings for dimension values missing CSS units, low foreground/background contrast detection, and notices when dynamic `styleWhen` rules are active on the same node.
176
+
177
+ Horizontal cards (`orientation: 'horizontal'`) automatically stack media and content into a single column when their container is narrow (`<= 560px`) or on mobile viewports (`<= 640px`). Action editors (`actionButton`, `actionGroup`, `card` primary interaction, `lookupCard`, `relatedRecord`, `actionCard` and `formLauncher`) expose guided controls for literal `action.payload` (`payload.path` for `navigation.openRoute` and `payload` JSON) alongside `action.payloadExpr` bindings, preserving both across round-trip. Labels and validation messages use the rich-content i18n dictionary; override them with `providePraxisRichContentI18n()`.
170
178
 
171
179
  `PRAXIS_RICH_CONTENT_AUTHORING_MANIFEST` describes governed AI/tooling operations for document replacement, block add/remove/order, text updates, link nodes, media blocks, timeline nodes/items, presets, metadata and sanitization policy. Rich content authoring is structured JSON, not arbitrary HTML or markdown patches.
172
180
 
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-10-15T00:20:34.117Z",
3
+ "generatedAt": "2026-10-15T04:35:19.773Z",
4
4
  "packageName": "@praxisui/rich-content",
5
- "packageVersion": "10.0.0-rc.19",
5
+ "packageVersion": "10.0.0-rc.21",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 1,
@@ -1,10 +1,13 @@
1
1
  const RICH_CONTENT_CLASS_NAME_PATTERN = /^[a-zA-Z_][a-zA-Z0-9_-]*(\s+[a-zA-Z_][a-zA-Z0-9_-]*)*$/;
2
2
  function isSafeRichContentClassName(value) {
3
- return value === undefined
4
- || value === null
5
- || value === ''
6
- || (typeof value === 'string'
7
- && RICH_CONTENT_CLASS_NAME_PATTERN.test(value.trim()));
3
+ if (value === undefined || value === null) {
4
+ return true;
5
+ }
6
+ if (typeof value !== 'string') {
7
+ return false;
8
+ }
9
+ const trimmed = value.trim();
10
+ return trimmed === '' || RICH_CONTENT_CLASS_NAME_PATTERN.test(trimmed);
8
11
  }
9
12
 
10
13
  const SUPPORTED_DOCUMENT_KIND = 'praxis.rich-content';