@praxisui/page-builder 10.0.0-rc.3 → 10.0.0-rc.5

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
@@ -523,6 +523,23 @@ Schema-derived table columns already use the canonical `TableConfig.columnProjec
523
523
 
524
524
  `ComponentDocMeta.insertionPresets` remains the canonical catalog for reusable defaults owned by one component. It is not a page/domain template system: do not publish Employee Operations presets from CRUD, tabs, or related-resource outlet metadata merely to shorten a business recipe.
525
525
 
526
+ To streamline host registration of widget providers and component metadata without repetitive manual bootstrap code, `@praxisui/page-builder` exports the `providePraxisPageBuilderWidgets(widgets?: Array<Provider | ComponentDocMeta>)` helper. Hosts can supply a bundle of standard providers or direct `ComponentDocMeta` objects; any `ComponentDocMeta` passed is automatically registered with `ComponentMetadataRegistry` during environment initialization:
527
+
528
+ ```ts
529
+ import { providePraxisPageBuilderWidgets } from '@praxisui/page-builder';
530
+ import { providePraxisListMetadata } from '@praxisui/list';
531
+ import { providePraxisTableMetadata } from '@praxisui/table';
532
+
533
+ export const appConfig: ApplicationConfig = {
534
+ providers: [
535
+ ...providePraxisPageBuilderWidgets([
536
+ providePraxisListMetadata(),
537
+ providePraxisTableMetadata(),
538
+ ]),
539
+ ],
540
+ };
541
+ ```
542
+
526
543
  For complete governed page templates, the additive `UiCompositionPlanTemplateReference` pins the canonical `ai_registry` key and complete `configJson` SHA-256. The Config Starter resolves the active `SYSTEM/GLOBAL` record, verifies the exact hash, extracts its governed `authoringPlan`, and only then invokes the existing compiler. Angular consumers can use the pure `resolveUiCompositionPlanTemplate` helper only with an explicitly supplied `UiCompositionPlanTemplateMaterialization`; the helper performs no HTTP, search, or implicit selection. The first contract accepts no non-empty overrides, fails closed for missing, inactive, malformed, or stale references, and never persists the unresolved reference. `version` and `etag` are retained as audit evidence, while `configSha256` is the required content pin.
527
544
 
528
545
  Keep the compact authoring plan, the compiled executable page, and the surrounding recipe metadata as distinct artifacts. `UiCompositionPlan` is the reviewable authoring intent; `WidgetPageDefinition` is the explicit runtime graph; recipe metadata and operational evidence document when and how the example should be used. The server compiler must produce the same executable page as the Page Builder compiler before persistence.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-10-07T02:07:06.204Z",
3
+ "generatedAt": "2026-10-11T22:45:11.695Z",
4
4
  "packageName": "@praxisui/page-builder",
5
- "packageVersion": "10.0.0-rc.3",
5
+ "packageVersion": "10.0.0-rc.5",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 1,
@@ -31328,6 +31328,47 @@ function providePraxisPageBuilderMetadata() {
31328
31328
  };
31329
31329
  }
31330
31330
 
31331
+ /**
31332
+ * Type guard that verifies if an item is a canonical ComponentDocMeta.
31333
+ */
31334
+ function isComponentDocMeta(value) {
31335
+ return (typeof value === 'object' &&
31336
+ value !== null &&
31337
+ 'id' in value &&
31338
+ 'selector' in value &&
31339
+ 'component' in value);
31340
+ }
31341
+ /**
31342
+ * Convenient provider factory for registering widgets in the Page Builder host.
31343
+ *
31344
+ * Accepts a list of either Angular `Provider` entries (such as `providePraxisListMetadata()`)
31345
+ * or direct `ComponentDocMeta` definitions (such as `PRAXIS_LIST_COMPONENT_METADATA`).
31346
+ * Any `ComponentDocMeta` passed will be automatically registered with the
31347
+ * `ComponentMetadataRegistry` during environment initialization.
31348
+ */
31349
+ function providePraxisPageBuilderWidgets(widgets) {
31350
+ if (!Array.isArray(widgets) || widgets.length === 0) {
31351
+ return [];
31352
+ }
31353
+ const providers = [];
31354
+ for (const item of widgets) {
31355
+ if (isComponentDocMeta(item)) {
31356
+ providers.push({
31357
+ provide: ENVIRONMENT_INITIALIZER,
31358
+ multi: true,
31359
+ useFactory: (registry) => () => {
31360
+ registry.register(item);
31361
+ },
31362
+ deps: [ComponentMetadataRegistry],
31363
+ });
31364
+ }
31365
+ else if (item) {
31366
+ providers.push(item);
31367
+ }
31368
+ }
31369
+ return providers;
31370
+ }
31371
+
31331
31372
  /*
31332
31373
  * Public API Surface of @praxisui/page-builder
31333
31374
  */
@@ -31337,4 +31378,4 @@ function providePraxisPageBuilderMetadata() {
31337
31378
  * Generated bundle index. Do not edit.
31338
31379
  */
31339
31380
 
31340
- export { ComponentPaletteDialogComponent, ConfirmDialogComponent, ConnectionEditorComponent, DynamicPageBuilderComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_COMPONENT_CONTEXT_PACK, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, PRAXIS_PAGE_BUILDER_AUTHORING_MANIFEST, PRAXIS_PAGE_BUILDER_COMPONENT_METADATA, PageBuilderAgenticAuthoringService, PageConfigEditorComponent, TileToolbarComponent, UiCompositionResourcePreflightService, WidgetShellEditorComponent, clearWidgetAiCatalogs, compileUiCompositionPlan, getPageAiCatalog, getWidgetAiCapabilities, preflightUiCompositionPlan, preflightUiCompositionPlanResources, providePageBuilderWidgetAiCatalogs, providePraxisPageBuilderMetadata, registerWidgetAiCatalog, registerWidgetAiCatalogs, resolveUiCompositionPlanTemplate, validateUiCompositionPlan, verifyUiCompositionAuthoringSource };
31381
+ export { ComponentPaletteDialogComponent, ConfirmDialogComponent, ConnectionEditorComponent, DynamicPageBuilderComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_COMPONENT_CONTEXT_PACK, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, PRAXIS_PAGE_BUILDER_AUTHORING_MANIFEST, PRAXIS_PAGE_BUILDER_COMPONENT_METADATA, PageBuilderAgenticAuthoringService, PageConfigEditorComponent, TileToolbarComponent, UiCompositionResourcePreflightService, WidgetShellEditorComponent, clearWidgetAiCatalogs, compileUiCompositionPlan, getPageAiCatalog, getWidgetAiCapabilities, isComponentDocMeta, preflightUiCompositionPlan, preflightUiCompositionPlanResources, providePageBuilderWidgetAiCatalogs, providePraxisPageBuilderMetadata, providePraxisPageBuilderWidgets, registerWidgetAiCatalog, registerWidgetAiCatalogs, resolveUiCompositionPlanTemplate, validateUiCompositionPlan, verifyUiCompositionAuthoringSource };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/page-builder",
3
- "version": "10.0.0-rc.3",
3
+ "version": "10.0.0-rc.5",
4
4
  "description": "Page and widget builder utilities for Praxis UI (grid, dynamic widgets, editors).",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -8,9 +8,9 @@
8
8
  "@angular/forms": "^21.0.0",
9
9
  "@angular/cdk": "^21.0.0",
10
10
  "@angular/material": "^21.0.0",
11
- "@praxisui/ai": "^10.0.0-rc.3",
12
- "@praxisui/core": "^10.0.0-rc.3",
13
- "@praxisui/settings-panel": "^10.0.0-rc.3",
11
+ "@praxisui/ai": "^10.0.0-rc.5",
12
+ "@praxisui/core": "^10.0.0-rc.5",
13
+ "@praxisui/settings-panel": "^10.0.0-rc.5",
14
14
  "rxjs": "~7.8.0"
15
15
  },
16
16
  "dependencies": {
@@ -1186,6 +1186,7 @@ declare class DynamicPageConfigEditorComponent implements OnInit, SettingsValueP
1186
1186
  key: string;
1187
1187
  number: number;
1188
1188
  label: string;
1189
+ widgetKey?: string;
1189
1190
  col: number;
1190
1191
  row: number;
1191
1192
  colSpan: number;
@@ -2153,7 +2154,7 @@ type BuilderCanvasLayout = {
2153
2154
  rowUnit?: string;
2154
2155
  gap?: string;
2155
2156
  autoRows?: 'fixed' | 'content';
2156
- collisionPolicy?: 'block' | 'swap';
2157
+ collisionPolicy?: 'block' | 'swap' | 'push-down';
2157
2158
  items: Record<string, BuilderCanvasItem>;
2158
2159
  };
2159
2160
  type BuilderPageDefinition = Omit<WidgetPageDefinition, 'widgets'> & {
@@ -2726,5 +2727,19 @@ declare const PRAXIS_PAGE_BUILDER_COMPONENT_METADATA: ComponentDocMeta;
2726
2727
  /** Provider para auto-registrar metadados do componente Page Builder. */
2727
2728
  declare function providePraxisPageBuilderMetadata(): Provider;
2728
2729
 
2729
- export { ComponentPaletteDialogComponent, ConfirmDialogComponent, ConnectionEditorComponent, DynamicPageBuilderComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_COMPONENT_CONTEXT_PACK, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, PRAXIS_PAGE_BUILDER_AUTHORING_MANIFEST, PRAXIS_PAGE_BUILDER_COMPONENT_METADATA, PageBuilderAgenticAuthoringService, PageConfigEditorComponent, TileToolbarComponent, UiCompositionResourcePreflightService, WidgetShellEditorComponent, clearWidgetAiCatalogs, compileUiCompositionPlan, getPageAiCatalog, getWidgetAiCapabilities, preflightUiCompositionPlan, preflightUiCompositionPlanResources, providePageBuilderWidgetAiCatalogs, providePraxisPageBuilderMetadata, registerWidgetAiCatalog, registerWidgetAiCatalogs, resolveUiCompositionPlanTemplate, validateUiCompositionPlan, verifyUiCompositionAuthoringSource };
2730
+ /**
2731
+ * Type guard that verifies if an item is a canonical ComponentDocMeta.
2732
+ */
2733
+ declare function isComponentDocMeta(value: unknown): value is ComponentDocMeta;
2734
+ /**
2735
+ * Convenient provider factory for registering widgets in the Page Builder host.
2736
+ *
2737
+ * Accepts a list of either Angular `Provider` entries (such as `providePraxisListMetadata()`)
2738
+ * or direct `ComponentDocMeta` definitions (such as `PRAXIS_LIST_COMPONENT_METADATA`).
2739
+ * Any `ComponentDocMeta` passed will be automatically registered with the
2740
+ * `ComponentMetadataRegistry` during environment initialization.
2741
+ */
2742
+ declare function providePraxisPageBuilderWidgets(widgets?: Array<Provider | ComponentDocMeta>): Provider[];
2743
+
2744
+ export { ComponentPaletteDialogComponent, ConfirmDialogComponent, ConnectionEditorComponent, DynamicPageBuilderComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_COMPONENT_CONTEXT_PACK, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, PRAXIS_PAGE_BUILDER_AUTHORING_MANIFEST, PRAXIS_PAGE_BUILDER_COMPONENT_METADATA, PageBuilderAgenticAuthoringService, PageConfigEditorComponent, TileToolbarComponent, UiCompositionResourcePreflightService, WidgetShellEditorComponent, clearWidgetAiCatalogs, compileUiCompositionPlan, getPageAiCatalog, getWidgetAiCapabilities, isComponentDocMeta, preflightUiCompositionPlan, preflightUiCompositionPlanResources, providePageBuilderWidgetAiCatalogs, providePraxisPageBuilderMetadata, providePraxisPageBuilderWidgets, registerWidgetAiCatalog, registerWidgetAiCatalogs, resolveUiCompositionPlanTemplate, validateUiCompositionPlan, verifyUiCompositionAuthoringSource };
2730
2745
  export type { Capability, CapabilityCatalog, CapabilityCategory, ComponentPaletteData, ComponentPaletteSelection, ConfirmDialogData, PageBuilderAgenticAuthoringAttachmentSummary, PageBuilderAgenticAuthoringCandidate, PageBuilderAgenticAuthoringComponentCapabilitiesResult, PageBuilderAgenticAuthoringComponentCapability, PageBuilderAgenticAuthoringComponentCapabilityCatalog, PageBuilderAgenticAuthoringComponentCapabilityExample, PageBuilderAgenticAuthoringComponentFieldAlias, PageBuilderAgenticAuthoringConversationMessage, PageBuilderAgenticAuthoringGateResult, PageBuilderAgenticAuthoringIntentResolutionRequest, PageBuilderAgenticAuthoringIntentResolutionResult, PageBuilderAgenticAuthoringOptions, PageBuilderAgenticAuthoringPendingClarification, PageBuilderAgenticAuthoringPromptRequest, PageBuilderAgenticAuthoringProvider, PageBuilderAgenticAuthoringQuickReply, PageBuilderAgenticAuthoringResourceCandidatesRequest, PageBuilderAgenticAuthoringResourceCandidatesResult, PageBuilderAgenticAuthoringSharedRuleHandoff, PageBuilderAgenticAuthoringTarget, PageBuilderAgenticAuthoringTurnStreamConnectionError, PageBuilderAgenticAuthoringTurnStreamEvent, PageBuilderAgenticAuthoringTurnStreamRequest, PageBuilderAgenticAuthoringTurnStreamStartResponse, PageBuilderApplyRequest, PageBuilderApplyResult, PageBuilderAuthoringCapabilities, PageBuilderCompiledFormPatch, PageBuilderMinimalFormPlanResult, PageBuilderPreviewDiagnostics, PageBuilderPreviewResult, PageBuilderProjectKnowledgeAudit, UiCompositionAuthoringSourceDiagnostic, UiCompositionAuthoringSourceDiagnosticCode, UiCompositionAuthoringSourceVerification, UiCompositionAuthoringSourceVerificationContext, UiCompositionPlan, UiCompositionPlanAuthoringInput, UiCompositionPlanAuthoringSource, UiCompositionPlanBinding, UiCompositionPlanCompileResult, UiCompositionPlanComponentPortEndpoint, UiCompositionPlanContextScope, UiCompositionPlanContextScopeTarget, UiCompositionPlanContextValue, UiCompositionPlanDiagnostic, UiCompositionPlanEndpoint, UiCompositionPlanGlobalActionEndpoint, UiCompositionPlanGlobalActionSourceEndpoint, UiCompositionPlanInputSource, UiCompositionPlanPreflightResult, UiCompositionPlanSelectCase, UiCompositionPlanSelectionSync, UiCompositionPlanSelectionSyncMapping, UiCompositionPlanSourceEndpoint, UiCompositionPlanStateEndpoint, UiCompositionPlanTargetEndpoint, UiCompositionPlanTemplateMaterialization, UiCompositionPlanTemplateRef, UiCompositionPlanTemplateReference, UiCompositionPlanTemplateResolutionResult, UiCompositionPlanTemplateRevision, UiCompositionPlanTransform, UiCompositionPlanTransformOutput, UiCompositionPlanWidget, UiCompositionResourceSchemaRequest, UiCompositionResourceSchemaResolution, UiCompositionResourceSchemaResolver, ValueKind };