@praxisui/rich-content 9.0.0-beta.6 → 9.0.0-beta.61
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 +6 -2
- package/ai/component-registry.json +6559 -0
- package/fesm2022/praxisui-rich-content.mjs +2271 -244
- package/package.json +7 -3
- package/types/praxisui-rich-content.d.ts +58 -2
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/rich-content",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.61",
|
|
4
4
|
"description": "Rich content rendering and authoring primitives for Praxis UI surfaces, including semantic blocks and page-builder integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
|
-
"@praxisui/core": "^9.0.0-beta.
|
|
8
|
+
"@praxisui/core": "^9.0.0-beta.61",
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
10
|
"rxjs": "~7.8.0"
|
|
11
11
|
},
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"keywords": [
|
|
18
18
|
"angular",
|
|
19
19
|
"praxisui",
|
|
20
|
+
"praxis",
|
|
20
21
|
"rich-content",
|
|
21
22
|
"semantic-blocks",
|
|
22
23
|
"page-builder",
|
|
@@ -32,7 +33,10 @@
|
|
|
32
33
|
".": {
|
|
33
34
|
"types": "./types/praxisui-rich-content.d.ts",
|
|
34
35
|
"default": "./fesm2022/praxisui-rich-content.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./ai/component-registry.json": {
|
|
38
|
+
"default": "./ai/component-registry.json"
|
|
35
39
|
}
|
|
36
40
|
},
|
|
37
41
|
"type": "module"
|
|
38
|
-
}
|
|
42
|
+
}
|
|
@@ -59,6 +59,9 @@ declare class PraxisRichContent {
|
|
|
59
59
|
resolveProgressValue(node: Extract<RichPresenterNode, {
|
|
60
60
|
type: 'progress';
|
|
61
61
|
}>): number;
|
|
62
|
+
resolveProgressPercent(node: Extract<RichPresenterNode, {
|
|
63
|
+
type: 'progress';
|
|
64
|
+
}>): string;
|
|
62
65
|
resolveProgressLabel(node: Extract<RichPresenterNode, {
|
|
63
66
|
type: 'progress';
|
|
64
67
|
}>): string | null;
|
|
@@ -280,6 +283,10 @@ type EditableTimelineItemField = 'title' | 'titleExpr' | 'subtitle' | 'subtitleE
|
|
|
280
283
|
type DecisionPackageStringField = 'title' | 'titleExpr' | 'subtitle' | 'subtitleExpr' | 'summary' | 'summaryExpr' | 'status' | 'statusExpr' | 'owner' | 'ownerExpr' | 'policySource' | 'policySourceExpr' | 'version' | 'versionExpr' | 'confidenceExpr' | 'risk' | 'riskExpr' | 'lastReviewed' | 'lastReviewedExpr' | 'supersedes' | 'supersedesExpr';
|
|
281
284
|
type DecisionPackageEvidence = NonNullable<RichDecisionPackageNode['evidence']>[number];
|
|
282
285
|
type DecisionPackageEvidenceField = 'id' | 'label' | 'labelExpr' | 'source' | 'sourceExpr';
|
|
286
|
+
type RichContentEditorPanel = 'guided' | 'preview' | 'json';
|
|
287
|
+
declare const ADVANCED_JSON_ONLY_NODE_FIELDS: readonly ["bindings", "disabledWhen", "loadWhen", "classWhen", "styleWhen"];
|
|
288
|
+
type AdvancedJsonOnlyNodeField = (typeof ADVANCED_JSON_ONLY_NODE_FIELDS)[number];
|
|
289
|
+
type DocumentContextField = 'scopes' | 'aliases';
|
|
283
290
|
interface PraxisRichContentEditorInputs {
|
|
284
291
|
document?: RichContentDocument | null;
|
|
285
292
|
layout?: 'block' | 'inline';
|
|
@@ -301,6 +308,7 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
301
308
|
readonly editableNodeTypes: ("text" | "icon" | "image" | "link" | "badge" | "avatar" | "metric" | "progress" | "actionButton" | "compose" | "card" | "callout" | "ctaGroup" | "keyValueList" | "propertySheet" | "statGroup" | "tabs" | "emptyState" | "recordSummary" | "lookupResult" | "lookupCard" | "relatedRecord" | "actionCard" | "decisionPackage" | "formLauncher" | "collapsibleCard" | "disclosure" | "accordion" | "mediaBlock" | "timeline" | "preset")[];
|
|
302
309
|
readonly presenterNodeTypes: ("text" | "icon" | "image" | "link" | "badge" | "avatar" | "metric" | "progress" | "actionButton")[];
|
|
303
310
|
readonly cardContentNodeTypes: EditableCardContentNodeType[];
|
|
311
|
+
readonly advancedJsonOnlyNodeFields: readonly ["bindings", "disabledWhen", "loadWhen", "classWhen", "styleWhen"];
|
|
304
312
|
readonly presetOptions: _praxisui_rich_content.RichBlockPresetDefinition[];
|
|
305
313
|
documentJson: string;
|
|
306
314
|
layout: 'block' | 'inline';
|
|
@@ -312,8 +320,13 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
312
320
|
validationIssues: RichContentValidationIssue[];
|
|
313
321
|
nodeCount: number;
|
|
314
322
|
nodeTypeSummary: string;
|
|
323
|
+
selectedNodeIndex: number;
|
|
324
|
+
activeEditorPanel: RichContentEditorPanel;
|
|
325
|
+
advancedRulesOpen: boolean;
|
|
326
|
+
advancedJsonFieldErrors: Record<string, string>;
|
|
315
327
|
private initialInputs;
|
|
316
328
|
private pendingRemoval;
|
|
329
|
+
private advancedJsonFieldDrafts;
|
|
317
330
|
ngOnChanges(changes: SimpleChanges): void;
|
|
318
331
|
ngOnInit(): void;
|
|
319
332
|
getSettingsValue(): PraxisRichContentEditorValue | null;
|
|
@@ -323,6 +336,10 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
323
336
|
onDocumentJsonChange(): void;
|
|
324
337
|
tx(key: string, fallback: string): string;
|
|
325
338
|
useEmptyDocument(): void;
|
|
339
|
+
selectTopLevelNode(index: number): void;
|
|
340
|
+
selectEditorPanel(panel: RichContentEditorPanel): void;
|
|
341
|
+
openAdvancedRules(): void;
|
|
342
|
+
onAdvancedRulesToggle(event: Event): void;
|
|
326
343
|
addTopLevelNode(): void;
|
|
327
344
|
removeTopLevelNode(index: number): void;
|
|
328
345
|
moveTopLevelNode(index: number, delta: number): void;
|
|
@@ -342,6 +359,14 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
342
359
|
getCardContentNodes(index: number): Array<RichPresenterNode | RichComposeNode>;
|
|
343
360
|
getCardMediaField(index: number, field: string): string;
|
|
344
361
|
setCardMediaField(index: number, field: string, value: string): void;
|
|
362
|
+
getCardInteractionField(index: number, field: string): string;
|
|
363
|
+
setCardInteractionField(index: number, field: string, value: string): void;
|
|
364
|
+
getCardInteractionBooleanField(index: number, field: string): boolean;
|
|
365
|
+
setCardInteractionBooleanField(index: number, field: string, value: boolean): void;
|
|
366
|
+
getCardInteractionActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage'): string;
|
|
367
|
+
setCardInteractionActionField(index: number, field: 'actionId' | 'payloadExpr' | 'availabilityExpr' | 'confirmMessage', value: string): void;
|
|
368
|
+
getCardAccessibilityField(index: number, field: string): string;
|
|
369
|
+
setCardAccessibilityField(index: number, field: string, value: string): void;
|
|
345
370
|
addCardSlotNode(index: number, slot: 'header' | 'footer' | 'aside'): void;
|
|
346
371
|
addCardSlotNodeOfType(index: number, slot: 'header' | 'footer' | 'aside', type: EditablePresenterNodeType): void;
|
|
347
372
|
setCardSlotStringField(index: number, slot: 'header' | 'footer' | 'aside', itemIndex: number, field: string, value: string): void;
|
|
@@ -391,8 +416,15 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
391
416
|
getTabsItems(index: number): Array<RichTabsNode['items'][number]>;
|
|
392
417
|
addTabsItem(index: number): void;
|
|
393
418
|
removeTabsItem(index: number, itemIndex: number): void;
|
|
394
|
-
getTabsItemField(index: number, itemIndex: number, field: 'id' | 'label' | 'icon' | 'badge'): string;
|
|
395
|
-
setTabsItemField(index: number, itemIndex: number, field: 'id' | 'label' | 'icon' | 'badge', value: string): void;
|
|
419
|
+
getTabsItemField(index: number, itemIndex: number, field: 'id' | 'label' | 'labelExpr' | 'icon' | 'badge' | 'badgeExpr' | 'capabilityMode'): string;
|
|
420
|
+
setTabsItemField(index: number, itemIndex: number, field: 'id' | 'label' | 'labelExpr' | 'icon' | 'badge' | 'badgeExpr' | 'capabilityMode', value: string): void;
|
|
421
|
+
getTabsItemCapabilityList(index: number, itemIndex: number): string;
|
|
422
|
+
setTabsItemCapabilityList(index: number, itemIndex: number, value: string): void;
|
|
423
|
+
getTabsItemVisibleWhenPath(index: number, itemIndex: number): string;
|
|
424
|
+
getTabsItemVisibleWhenValue(index: number, itemIndex: number): string;
|
|
425
|
+
setTabsItemVisibleWhenPath(index: number, itemIndex: number, path: string): void;
|
|
426
|
+
setTabsItemVisibleWhenValue(index: number, itemIndex: number, value: string): void;
|
|
427
|
+
private setTabsItemSimpleVisibleWhen;
|
|
396
428
|
getActionCardSecondaryActions(index: number): RichActionButtonNode[];
|
|
397
429
|
addActionCardSecondaryAction(index: number): void;
|
|
398
430
|
addActionCardSecondaryActionPreset(index: number, preset: 'primary' | 'secondary'): void;
|
|
@@ -440,6 +472,26 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
440
472
|
getFirstStyleValue(node: RichBlockNode): string;
|
|
441
473
|
setFirstStyleName(index: number, propertyName: string): void;
|
|
442
474
|
setFirstStyleValue(index: number, propertyValue: string): void;
|
|
475
|
+
hasDocumentContext(): boolean;
|
|
476
|
+
getDocumentContextScopes(): string;
|
|
477
|
+
setDocumentContextScopes(value: string): void;
|
|
478
|
+
getDocumentContextAliasesValue(): string;
|
|
479
|
+
setDocumentContextAliases(value: string): void;
|
|
480
|
+
getDocumentContextFieldError(field: DocumentContextField): string;
|
|
481
|
+
getDocumentContextAliasesPlaceholder(): string;
|
|
482
|
+
getAdvancedJsonOnlyFields(node: RichBlockNode): string[];
|
|
483
|
+
getAdvancedJsonFieldValue(index: number, node: RichBlockNode, field: AdvancedJsonOnlyNodeField): string;
|
|
484
|
+
setAdvancedJsonField(index: number, field: AdvancedJsonOnlyNodeField, value: string): void;
|
|
485
|
+
getAdvancedJsonFieldError(index: number, field: AdvancedJsonOnlyNodeField): string;
|
|
486
|
+
getAdvancedJsonFieldPlaceholder(field: AdvancedJsonOnlyNodeField): string;
|
|
487
|
+
private getAdvancedJsonFieldKey;
|
|
488
|
+
private getDocumentContextFieldKey;
|
|
489
|
+
private updateDocumentContext;
|
|
490
|
+
private setAdvancedJsonFieldInvalid;
|
|
491
|
+
private clearAdvancedJsonFieldState;
|
|
492
|
+
private hasAdvancedJsonFieldErrors;
|
|
493
|
+
private isAdvancedJsonFieldShapeValid;
|
|
494
|
+
private getAdvancedJsonFieldShapeError;
|
|
443
495
|
requestTopLevelNodeRemoval(index: number): void;
|
|
444
496
|
confirmTopLevelNodeRemoval(index: number): void;
|
|
445
497
|
requestNestedRemoval(scope: string, index: number): void;
|
|
@@ -469,6 +521,8 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
469
521
|
getPresetSelection(node: RichBlockNode): string;
|
|
470
522
|
getPresetOptionValue(ref: CorePresetRef): string;
|
|
471
523
|
getIssueMessages(path: string): string[];
|
|
524
|
+
getIssueCount(path: string): number;
|
|
525
|
+
getSelectedNodeIssueCount(): number;
|
|
472
526
|
isEditableNodeType(type: string): type is EditableTopLevelNodeType;
|
|
473
527
|
private isPresenterNodeType;
|
|
474
528
|
private load;
|
|
@@ -478,6 +532,7 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
478
532
|
private createDefaultNode;
|
|
479
533
|
private getDefaultPresetRef;
|
|
480
534
|
private ensureCardNode;
|
|
535
|
+
private pruneEmptyCardInteraction;
|
|
481
536
|
private ensureCardSlotNodes;
|
|
482
537
|
private ensureCardContentNodes;
|
|
483
538
|
private ensureCardActions;
|
|
@@ -510,6 +565,7 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
510
565
|
private ensureTimelineNode;
|
|
511
566
|
private parseDocument;
|
|
512
567
|
private setInvalidState;
|
|
568
|
+
private reconcileSelectedNodeIndex;
|
|
513
569
|
private updateDocumentOverview;
|
|
514
570
|
private matchesInitialState;
|
|
515
571
|
private cloneInputs;
|