@praxisui/rich-content 9.0.0-beta.7 → 9.0.0-beta.71
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 +1218 -207
- package/package.json +7 -3
- package/types/praxisui-rich-content.d.ts +37 -0
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.71",
|
|
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.71",
|
|
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';
|
|
@@ -313,8 +321,12 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
313
321
|
nodeCount: number;
|
|
314
322
|
nodeTypeSummary: string;
|
|
315
323
|
selectedNodeIndex: number;
|
|
324
|
+
activeEditorPanel: RichContentEditorPanel;
|
|
325
|
+
advancedRulesOpen: boolean;
|
|
326
|
+
advancedJsonFieldErrors: Record<string, string>;
|
|
316
327
|
private initialInputs;
|
|
317
328
|
private pendingRemoval;
|
|
329
|
+
private advancedJsonFieldDrafts;
|
|
318
330
|
ngOnChanges(changes: SimpleChanges): void;
|
|
319
331
|
ngOnInit(): void;
|
|
320
332
|
getSettingsValue(): PraxisRichContentEditorValue | null;
|
|
@@ -325,6 +337,9 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
325
337
|
tx(key: string, fallback: string): string;
|
|
326
338
|
useEmptyDocument(): void;
|
|
327
339
|
selectTopLevelNode(index: number): void;
|
|
340
|
+
selectEditorPanel(panel: RichContentEditorPanel): void;
|
|
341
|
+
openAdvancedRules(): void;
|
|
342
|
+
onAdvancedRulesToggle(event: Event): void;
|
|
328
343
|
addTopLevelNode(): void;
|
|
329
344
|
removeTopLevelNode(index: number): void;
|
|
330
345
|
moveTopLevelNode(index: number, delta: number): void;
|
|
@@ -457,6 +472,26 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
457
472
|
getFirstStyleValue(node: RichBlockNode): string;
|
|
458
473
|
setFirstStyleName(index: number, propertyName: string): void;
|
|
459
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;
|
|
460
495
|
requestTopLevelNodeRemoval(index: number): void;
|
|
461
496
|
confirmTopLevelNodeRemoval(index: number): void;
|
|
462
497
|
requestNestedRemoval(scope: string, index: number): void;
|
|
@@ -486,6 +521,8 @@ declare class PraxisRichContentConfigEditor implements SettingsValueProvider, On
|
|
|
486
521
|
getPresetSelection(node: RichBlockNode): string;
|
|
487
522
|
getPresetOptionValue(ref: CorePresetRef): string;
|
|
488
523
|
getIssueMessages(path: string): string[];
|
|
524
|
+
getIssueCount(path: string): number;
|
|
525
|
+
getSelectedNodeIssueCount(): number;
|
|
489
526
|
isEditableNodeType(type: string): type is EditableTopLevelNodeType;
|
|
490
527
|
private isPresenterNodeType;
|
|
491
528
|
private load;
|