@cohesivesystems/presentation-core 0.1.0-alpha.1
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/LICENSE +55 -0
- package/dist/api-scope-request.d.ts +43 -0
- package/dist/api-scope-request.d.ts.map +1 -0
- package/dist/api-scope-request.js +96 -0
- package/dist/api-scope-request.js.map +1 -0
- package/dist/collection-chrome-icons.d.ts +18 -0
- package/dist/collection-chrome-icons.d.ts.map +1 -0
- package/dist/collection-chrome-icons.js +57 -0
- package/dist/collection-chrome-icons.js.map +1 -0
- package/dist/collection-chrome-runtime.d.ts +25 -0
- package/dist/collection-chrome-runtime.d.ts.map +1 -0
- package/dist/collection-chrome-runtime.js +72 -0
- package/dist/collection-chrome-runtime.js.map +1 -0
- package/dist/collection-chrome-slot-renderer-registry.d.ts +110 -0
- package/dist/collection-chrome-slot-renderer-registry.d.ts.map +1 -0
- package/dist/collection-chrome-slot-renderer-registry.js +136 -0
- package/dist/collection-chrome-slot-renderer-registry.js.map +1 -0
- package/dist/collection-selection-state.d.ts +18 -0
- package/dist/collection-selection-state.d.ts.map +1 -0
- package/dist/collection-selection-state.js +2 -0
- package/dist/collection-selection-state.js.map +1 -0
- package/dist/data-source-projection.d.ts +475 -0
- package/dist/data-source-projection.d.ts.map +1 -0
- package/dist/data-source-projection.js +880 -0
- package/dist/data-source-projection.js.map +1 -0
- package/dist/data-source-query-lowering.d.ts +35 -0
- package/dist/data-source-query-lowering.d.ts.map +1 -0
- package/dist/data-source-query-lowering.js +104 -0
- package/dist/data-source-query-lowering.js.map +1 -0
- package/dist/date-time-filter-model.d.ts +20 -0
- package/dist/date-time-filter-model.d.ts.map +1 -0
- package/dist/date-time-filter-model.js +115 -0
- package/dist/date-time-filter-model.js.map +1 -0
- package/dist/document-badge-icons.d.ts +4 -0
- package/dist/document-badge-icons.d.ts.map +1 -0
- package/dist/document-badge-icons.js +4 -0
- package/dist/document-badge-icons.js.map +1 -0
- package/dist/document-module.d.ts +268 -0
- package/dist/document-module.d.ts.map +1 -0
- package/dist/document-module.js +347 -0
- package/dist/document-module.js.map +1 -0
- package/dist/document-summary-model.d.ts +2 -0
- package/dist/document-summary-model.d.ts.map +1 -0
- package/dist/document-summary-model.js +2 -0
- package/dist/document-summary-model.js.map +1 -0
- package/dist/document-workspace-chrome-projection.d.ts +18 -0
- package/dist/document-workspace-chrome-projection.d.ts.map +1 -0
- package/dist/document-workspace-chrome-projection.js +35 -0
- package/dist/document-workspace-chrome-projection.js.map +1 -0
- package/dist/document-workspace-surface-slots.d.ts +75 -0
- package/dist/document-workspace-surface-slots.d.ts.map +1 -0
- package/dist/document-workspace-surface-slots.js +268 -0
- package/dist/document-workspace-surface-slots.js.map +1 -0
- package/dist/endpoint-executor.d.ts +62 -0
- package/dist/endpoint-executor.d.ts.map +1 -0
- package/dist/endpoint-executor.js +35 -0
- package/dist/endpoint-executor.js.map +1 -0
- package/dist/field-display-resolution.d.ts +5 -0
- package/dist/field-display-resolution.d.ts.map +1 -0
- package/dist/field-display-resolution.js +50 -0
- package/dist/field-display-resolution.js.map +1 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/module.d.ts +48 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +108 -0
- package/dist/module.js.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts +12 -0
- package/dist/navigation-shell-frame-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-frame-renderer-registry.js +29 -0
- package/dist/navigation-shell-frame-renderer-registry.js.map +1 -0
- package/dist/navigation-shell-layout-runtime.d.ts +29 -0
- package/dist/navigation-shell-layout-runtime.d.ts.map +1 -0
- package/dist/navigation-shell-layout-runtime.js +50 -0
- package/dist/navigation-shell-layout-runtime.js.map +1 -0
- package/dist/navigation-shell-region-component-registry.d.ts +96 -0
- package/dist/navigation-shell-region-component-registry.d.ts.map +1 -0
- package/dist/navigation-shell-region-component-registry.js +108 -0
- package/dist/navigation-shell-region-component-registry.js.map +1 -0
- package/dist/navigation-shell-runtime.d.ts +48 -0
- package/dist/navigation-shell-runtime.d.ts.map +1 -0
- package/dist/navigation-shell-runtime.js +457 -0
- package/dist/navigation-shell-runtime.js.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts +15 -0
- package/dist/navigation-shell-slot-renderer-registry.d.ts.map +1 -0
- package/dist/navigation-shell-slot-renderer-registry.js +48 -0
- package/dist/navigation-shell-slot-renderer-registry.js.map +1 -0
- package/dist/navigation.d.ts +84 -0
- package/dist/navigation.d.ts.map +1 -0
- package/dist/navigation.js +167 -0
- package/dist/navigation.js.map +1 -0
- package/dist/object-path.d.ts +23 -0
- package/dist/object-path.d.ts.map +1 -0
- package/dist/object-path.js +63 -0
- package/dist/object-path.js.map +1 -0
- package/dist/page-host-renderer-registry.d.ts +119 -0
- package/dist/page-host-renderer-registry.d.ts.map +1 -0
- package/dist/page-host-renderer-registry.js +305 -0
- package/dist/page-host-renderer-registry.js.map +1 -0
- package/dist/presentation-action-endpoint-request-projection.d.ts +23 -0
- package/dist/presentation-action-endpoint-request-projection.d.ts.map +1 -0
- package/dist/presentation-action-endpoint-request-projection.js +117 -0
- package/dist/presentation-action-endpoint-request-projection.js.map +1 -0
- package/dist/presentation-action-endpoint.d.ts +24 -0
- package/dist/presentation-action-endpoint.d.ts.map +1 -0
- package/dist/presentation-action-endpoint.js +56 -0
- package/dist/presentation-action-endpoint.js.map +1 -0
- package/dist/presentation-action-icons.d.ts +4 -0
- package/dist/presentation-action-icons.d.ts.map +1 -0
- package/dist/presentation-action-icons.js +4 -0
- package/dist/presentation-action-icons.js.map +1 -0
- package/dist/presentation-action-result-state.d.ts +48 -0
- package/dist/presentation-action-result-state.d.ts.map +1 -0
- package/dist/presentation-action-result-state.js +109 -0
- package/dist/presentation-action-result-state.js.map +1 -0
- package/dist/presentation-action-runtime-binding.d.ts +48 -0
- package/dist/presentation-action-runtime-binding.d.ts.map +1 -0
- package/dist/presentation-action-runtime-binding.js +52 -0
- package/dist/presentation-action-runtime-binding.js.map +1 -0
- package/dist/presentation-action-runtime-diagnostics.d.ts +18 -0
- package/dist/presentation-action-runtime-diagnostics.d.ts.map +1 -0
- package/dist/presentation-action-runtime-diagnostics.js +69 -0
- package/dist/presentation-action-runtime-diagnostics.js.map +1 -0
- package/dist/presentation-action-runtime-labels.d.ts +15 -0
- package/dist/presentation-action-runtime-labels.d.ts.map +1 -0
- package/dist/presentation-action-runtime-labels.js +28 -0
- package/dist/presentation-action-runtime-labels.js.map +1 -0
- package/dist/presentation-action-runtime-projection.d.ts +17 -0
- package/dist/presentation-action-runtime-projection.d.ts.map +1 -0
- package/dist/presentation-action-runtime-projection.js +31 -0
- package/dist/presentation-action-runtime-projection.js.map +1 -0
- package/dist/presentation-badge-resolution.d.ts +8 -0
- package/dist/presentation-badge-resolution.d.ts.map +1 -0
- package/dist/presentation-badge-resolution.js +73 -0
- package/dist/presentation-badge-resolution.js.map +1 -0
- package/dist/presentation-collection-pagination.d.ts +32 -0
- package/dist/presentation-collection-pagination.d.ts.map +1 -0
- package/dist/presentation-collection-pagination.js +275 -0
- package/dist/presentation-collection-pagination.js.map +1 -0
- package/dist/presentation-content-diagnostics.d.ts +17 -0
- package/dist/presentation-content-diagnostics.d.ts.map +1 -0
- package/dist/presentation-content-diagnostics.js +61 -0
- package/dist/presentation-content-diagnostics.js.map +1 -0
- package/dist/presentation-content-resolution.d.ts +9 -0
- package/dist/presentation-content-resolution.d.ts.map +1 -0
- package/dist/presentation-content-resolution.js +19 -0
- package/dist/presentation-content-resolution.js.map +1 -0
- package/dist/presentation-data-source-binding-model.d.ts +81 -0
- package/dist/presentation-data-source-binding-model.d.ts.map +1 -0
- package/dist/presentation-data-source-binding-model.js +56 -0
- package/dist/presentation-data-source-binding-model.js.map +1 -0
- package/dist/presentation-data-source-runtime.d.ts +62 -0
- package/dist/presentation-data-source-runtime.d.ts.map +1 -0
- package/dist/presentation-data-source-runtime.js +80 -0
- package/dist/presentation-data-source-runtime.js.map +1 -0
- package/dist/presentation-design-intent-diagnostics.d.ts +25 -0
- package/dist/presentation-design-intent-diagnostics.d.ts.map +1 -0
- package/dist/presentation-design-intent-diagnostics.js +55 -0
- package/dist/presentation-design-intent-diagnostics.js.map +1 -0
- package/dist/presentation-icon-diagnostics.d.ts +45 -0
- package/dist/presentation-icon-diagnostics.d.ts.map +1 -0
- package/dist/presentation-icon-diagnostics.js +235 -0
- package/dist/presentation-icon-diagnostics.js.map +1 -0
- package/dist/presentation-icon-registry.d.ts +36 -0
- package/dist/presentation-icon-registry.d.ts.map +1 -0
- package/dist/presentation-icon-registry.js +81 -0
- package/dist/presentation-icon-registry.js.map +1 -0
- package/dist/presentation-navigation-action-runtime-bindings.d.ts +13 -0
- package/dist/presentation-navigation-action-runtime-bindings.d.ts.map +1 -0
- package/dist/presentation-navigation-action-runtime-bindings.js +29 -0
- package/dist/presentation-navigation-action-runtime-bindings.js.map +1 -0
- package/dist/presentation-pagination.d.ts +98 -0
- package/dist/presentation-pagination.d.ts.map +1 -0
- package/dist/presentation-pagination.js +427 -0
- package/dist/presentation-pagination.js.map +1 -0
- package/dist/presentation-projection-coverage.d.ts +38 -0
- package/dist/presentation-projection-coverage.d.ts.map +1 -0
- package/dist/presentation-projection-coverage.js +2429 -0
- package/dist/presentation-projection-coverage.js.map +1 -0
- package/dist/presentation-projection-diagnostics.d.ts +33 -0
- package/dist/presentation-projection-diagnostics.d.ts.map +1 -0
- package/dist/presentation-projection-diagnostics.js +17 -0
- package/dist/presentation-projection-diagnostics.js.map +1 -0
- package/dist/presentation-projection-trace.d.ts +97 -0
- package/dist/presentation-projection-trace.d.ts.map +1 -0
- package/dist/presentation-projection-trace.js +110 -0
- package/dist/presentation-projection-trace.js.map +1 -0
- package/dist/presentation-query-form-state.d.ts +15 -0
- package/dist/presentation-query-form-state.d.ts.map +1 -0
- package/dist/presentation-query-form-state.js +20 -0
- package/dist/presentation-query-form-state.js.map +1 -0
- package/dist/presentation-renderer-registry.d.ts +86 -0
- package/dist/presentation-renderer-registry.d.ts.map +1 -0
- package/dist/presentation-renderer-registry.js +108 -0
- package/dist/presentation-renderer-registry.js.map +1 -0
- package/dist/presentation-semantics.d.ts +288 -0
- package/dist/presentation-semantics.d.ts.map +1 -0
- package/dist/presentation-semantics.js +560 -0
- package/dist/presentation-semantics.js.map +1 -0
- package/dist/presentation-standards.d.ts +8 -0
- package/dist/presentation-standards.d.ts.map +1 -0
- package/dist/presentation-standards.js +9 -0
- package/dist/presentation-standards.js.map +1 -0
- package/dist/presentation-test-selectors.d.ts +146 -0
- package/dist/presentation-test-selectors.d.ts.map +1 -0
- package/dist/presentation-test-selectors.js +113 -0
- package/dist/presentation-test-selectors.js.map +1 -0
- package/dist/presentation-value-formatting.d.ts +12 -0
- package/dist/presentation-value-formatting.d.ts.map +1 -0
- package/dist/presentation-value-formatting.js +33 -0
- package/dist/presentation-value-formatting.js.map +1 -0
- package/dist/presentation-value-resolution.d.ts +7 -0
- package/dist/presentation-value-resolution.d.ts.map +1 -0
- package/dist/presentation-value-resolution.js +69 -0
- package/dist/presentation-value-resolution.js.map +1 -0
- package/dist/presentation-view-tree.d.ts +6 -0
- package/dist/presentation-view-tree.d.ts.map +1 -0
- package/dist/presentation-view-tree.js +15 -0
- package/dist/presentation-view-tree.js.map +1 -0
- package/dist/process-task-model.d.ts +80 -0
- package/dist/process-task-model.d.ts.map +1 -0
- package/dist/process-task-model.js +52 -0
- package/dist/process-task-model.js.map +1 -0
- package/dist/process-task-projection.d.ts +46 -0
- package/dist/process-task-projection.d.ts.map +1 -0
- package/dist/process-task-projection.js +233 -0
- package/dist/process-task-projection.js.map +1 -0
- package/dist/projected-action-status-projection.d.ts +18 -0
- package/dist/projected-action-status-projection.d.ts.map +1 -0
- package/dist/projected-action-status-projection.js +19 -0
- package/dist/projected-action-status-projection.js.map +1 -0
- package/dist/projected-activity-state-model.d.ts +22 -0
- package/dist/projected-activity-state-model.d.ts.map +1 -0
- package/dist/projected-activity-state-model.js +87 -0
- package/dist/projected-activity-state-model.js.map +1 -0
- package/dist/projected-collection-action-runtime-bindings.d.ts +12 -0
- package/dist/projected-collection-action-runtime-bindings.d.ts.map +1 -0
- package/dist/projected-collection-action-runtime-bindings.js +37 -0
- package/dist/projected-collection-action-runtime-bindings.js.map +1 -0
- package/dist/projected-collection-action-runtime-diagnostics.d.ts +23 -0
- package/dist/projected-collection-action-runtime-diagnostics.d.ts.map +1 -0
- package/dist/projected-collection-action-runtime-diagnostics.js +168 -0
- package/dist/projected-collection-action-runtime-diagnostics.js.map +1 -0
- package/dist/projected-collection-runtime.d.ts +475 -0
- package/dist/projected-collection-runtime.d.ts.map +1 -0
- package/dist/projected-collection-runtime.js +832 -0
- package/dist/projected-collection-runtime.js.map +1 -0
- package/dist/projected-document-action-diagnostics.d.ts +16 -0
- package/dist/projected-document-action-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-action-diagnostics.js +113 -0
- package/dist/projected-document-action-diagnostics.js.map +1 -0
- package/dist/projected-document-action-enablements.d.ts +25 -0
- package/dist/projected-document-action-enablements.d.ts.map +1 -0
- package/dist/projected-document-action-enablements.js +38 -0
- package/dist/projected-document-action-enablements.js.map +1 -0
- package/dist/projected-document-action-projection.d.ts +45 -0
- package/dist/projected-document-action-projection.d.ts.map +1 -0
- package/dist/projected-document-action-projection.js +201 -0
- package/dist/projected-document-action-projection.js.map +1 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.d.ts +16 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.js +168 -0
- package/dist/projected-document-action-runtime-profile-diagnostics.js.map +1 -0
- package/dist/projected-document-action-runtime-profile.d.ts +64 -0
- package/dist/projected-document-action-runtime-profile.d.ts.map +1 -0
- package/dist/projected-document-action-runtime-profile.js +33 -0
- package/dist/projected-document-action-runtime-profile.js.map +1 -0
- package/dist/projected-document-action-status-notice-diagnostics.d.ts +10 -0
- package/dist/projected-document-action-status-notice-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-action-status-notice-diagnostics.js +64 -0
- package/dist/projected-document-action-status-notice-diagnostics.js.map +1 -0
- package/dist/projected-document-badge-formatting.d.ts +2 -0
- package/dist/projected-document-badge-formatting.d.ts.map +1 -0
- package/dist/projected-document-badge-formatting.js +7 -0
- package/dist/projected-document-badge-formatting.js.map +1 -0
- package/dist/projected-document-editor-model.d.ts +4 -0
- package/dist/projected-document-editor-model.d.ts.map +1 -0
- package/dist/projected-document-editor-model.js +2 -0
- package/dist/projected-document-editor-model.js.map +1 -0
- package/dist/projected-document-field-navigation.d.ts +72 -0
- package/dist/projected-document-field-navigation.d.ts.map +1 -0
- package/dist/projected-document-field-navigation.js +143 -0
- package/dist/projected-document-field-navigation.js.map +1 -0
- package/dist/projected-document-field-semantics.d.ts +5 -0
- package/dist/projected-document-field-semantics.d.ts.map +1 -0
- package/dist/projected-document-field-semantics.js +16 -0
- package/dist/projected-document-field-semantics.js.map +1 -0
- package/dist/projected-document-workspace-data-source-bindings.d.ts +69 -0
- package/dist/projected-document-workspace-data-source-bindings.d.ts.map +1 -0
- package/dist/projected-document-workspace-data-source-bindings.js +81 -0
- package/dist/projected-document-workspace-data-source-bindings.js.map +1 -0
- package/dist/projected-document-workspace-notice-diagnostics.d.ts +12 -0
- package/dist/projected-document-workspace-notice-diagnostics.d.ts.map +1 -0
- package/dist/projected-document-workspace-notice-diagnostics.js +13 -0
- package/dist/projected-document-workspace-notice-diagnostics.js.map +1 -0
- package/dist/projected-input-form-runtime.d.ts +62 -0
- package/dist/projected-input-form-runtime.d.ts.map +1 -0
- package/dist/projected-input-form-runtime.js +2 -0
- package/dist/projected-input-form-runtime.js.map +1 -0
- package/dist/projected-process-task-notice-diagnostics.d.ts +13 -0
- package/dist/projected-process-task-notice-diagnostics.d.ts.map +1 -0
- package/dist/projected-process-task-notice-diagnostics.js +170 -0
- package/dist/projected-process-task-notice-diagnostics.js.map +1 -0
- package/dist/projected-query-form-runtime.d.ts +46 -0
- package/dist/projected-query-form-runtime.d.ts.map +1 -0
- package/dist/projected-query-form-runtime.js +2 -0
- package/dist/projected-query-form-runtime.js.map +1 -0
- package/dist/prompt-document-preview-projection.d.ts +46 -0
- package/dist/prompt-document-preview-projection.d.ts.map +1 -0
- package/dist/prompt-document-preview-projection.js +173 -0
- package/dist/prompt-document-preview-projection.js.map +1 -0
- package/dist/prompt-icons.d.ts +4 -0
- package/dist/prompt-icons.d.ts.map +1 -0
- package/dist/prompt-icons.js +4 -0
- package/dist/prompt-icons.js.map +1 -0
- package/dist/prompt-status-message-resolution.d.ts +18 -0
- package/dist/prompt-status-message-resolution.d.ts.map +1 -0
- package/dist/prompt-status-message-resolution.js +83 -0
- package/dist/prompt-status-message-resolution.js.map +1 -0
- package/dist/query-form-lowering.d.ts +16 -0
- package/dist/query-form-lowering.d.ts.map +1 -0
- package/dist/query-form-lowering.js +38 -0
- package/dist/query-form-lowering.js.map +1 -0
- package/dist/query-form-url-state.d.ts +44 -0
- package/dist/query-form-url-state.d.ts.map +1 -0
- package/dist/query-form-url-state.js +197 -0
- package/dist/query-form-url-state.js.map +1 -0
- package/dist/query-offset-page.d.ts +13 -0
- package/dist/query-offset-page.d.ts.map +1 -0
- package/dist/query-offset-page.js +24 -0
- package/dist/query-offset-page.js.map +1 -0
- package/dist/relation-query-input-form-target.d.ts +10 -0
- package/dist/relation-query-input-form-target.d.ts.map +1 -0
- package/dist/relation-query-input-form-target.js +30 -0
- package/dist/relation-query-input-form-target.js.map +1 -0
- package/dist/scope-selection.d.ts +94 -0
- package/dist/scope-selection.d.ts.map +1 -0
- package/dist/scope-selection.js +95 -0
- package/dist/scope-selection.js.map +1 -0
- package/dist/target-bindings.d.ts +39 -0
- package/dist/target-bindings.d.ts.map +1 -0
- package/dist/target-bindings.js +40 -0
- package/dist/target-bindings.js.map +1 -0
- package/dist/view-chrome-content-diagnostics.d.ts +8 -0
- package/dist/view-chrome-content-diagnostics.d.ts.map +1 -0
- package/dist/view-chrome-content-diagnostics.js +84 -0
- package/dist/view-chrome-content-diagnostics.js.map +1 -0
- package/dist/view-chrome-icons.d.ts +12 -0
- package/dist/view-chrome-icons.d.ts.map +1 -0
- package/dist/view-chrome-icons.js +50 -0
- package/dist/view-chrome-icons.js.map +1 -0
- package/dist/view-chrome-slot-renderer-registry.d.ts +19 -0
- package/dist/view-chrome-slot-renderer-registry.d.ts.map +1 -0
- package/dist/view-chrome-slot-renderer-registry.js +62 -0
- package/dist/view-chrome-slot-renderer-registry.js.map +1 -0
- package/package.json +53 -0
- package/src/api-scope-request.ts +186 -0
- package/src/collection-chrome-icons.ts +89 -0
- package/src/collection-chrome-runtime.ts +151 -0
- package/src/collection-chrome-slot-renderer-registry.ts +227 -0
- package/src/collection-selection-state.ts +32 -0
- package/src/data-source-projection.ts +2149 -0
- package/src/data-source-query-lowering.ts +217 -0
- package/src/date-time-filter-model.ts +156 -0
- package/src/document-badge-icons.ts +3 -0
- package/src/document-module.ts +741 -0
- package/src/document-summary-model.ts +1 -0
- package/src/document-workspace-chrome-projection.ts +62 -0
- package/src/document-workspace-surface-slots.ts +458 -0
- package/src/endpoint-executor.ts +122 -0
- package/src/field-display-resolution.ts +99 -0
- package/src/index.ts +104 -0
- package/src/module.ts +281 -0
- package/src/navigation-shell-frame-renderer-registry.ts +65 -0
- package/src/navigation-shell-layout-runtime.ts +124 -0
- package/src/navigation-shell-region-component-registry.ts +242 -0
- package/src/navigation-shell-runtime.ts +579 -0
- package/src/navigation-shell-slot-renderer-registry.ts +94 -0
- package/src/navigation.ts +364 -0
- package/src/object-path.ts +99 -0
- package/src/page-host-renderer-registry.ts +615 -0
- package/src/presentation-action-endpoint-request-projection.ts +223 -0
- package/src/presentation-action-endpoint.ts +130 -0
- package/src/presentation-action-icons.ts +3 -0
- package/src/presentation-action-result-state.ts +189 -0
- package/src/presentation-action-runtime-binding.ts +177 -0
- package/src/presentation-action-runtime-diagnostics.ts +120 -0
- package/src/presentation-action-runtime-labels.ts +57 -0
- package/src/presentation-action-runtime-projection.ts +67 -0
- package/src/presentation-badge-resolution.ts +138 -0
- package/src/presentation-collection-pagination.ts +436 -0
- package/src/presentation-content-diagnostics.ts +121 -0
- package/src/presentation-content-resolution.ts +46 -0
- package/src/presentation-data-source-binding-model.ts +140 -0
- package/src/presentation-data-source-runtime.ts +190 -0
- package/src/presentation-design-intent-diagnostics.ts +104 -0
- package/src/presentation-icon-diagnostics.ts +368 -0
- package/src/presentation-icon-registry.ts +181 -0
- package/src/presentation-navigation-action-runtime-bindings.ts +54 -0
- package/src/presentation-pagination.ts +694 -0
- package/src/presentation-projection-coverage.ts +3257 -0
- package/src/presentation-projection-diagnostics.ts +71 -0
- package/src/presentation-projection-trace.ts +293 -0
- package/src/presentation-query-form-state.ts +54 -0
- package/src/presentation-renderer-registry.ts +269 -0
- package/src/presentation-semantics.ts +1028 -0
- package/src/presentation-standards.ts +14 -0
- package/src/presentation-test-selectors.ts +312 -0
- package/src/presentation-value-formatting.ts +65 -0
- package/src/presentation-value-resolution.ts +100 -0
- package/src/presentation-view-tree.ts +33 -0
- package/src/process-task-model.ts +158 -0
- package/src/process-task-projection.ts +398 -0
- package/src/projected-action-status-projection.ts +43 -0
- package/src/projected-activity-state-model.ts +123 -0
- package/src/projected-collection-action-runtime-bindings.ts +76 -0
- package/src/projected-collection-action-runtime-diagnostics.ts +289 -0
- package/src/projected-collection-runtime.ts +1772 -0
- package/src/projected-document-action-diagnostics.ts +196 -0
- package/src/projected-document-action-enablements.ts +99 -0
- package/src/projected-document-action-projection.ts +464 -0
- package/src/projected-document-action-runtime-profile-diagnostics.ts +250 -0
- package/src/projected-document-action-runtime-profile.ts +133 -0
- package/src/projected-document-action-status-notice-diagnostics.ts +116 -0
- package/src/projected-document-badge-formatting.ts +7 -0
- package/src/projected-document-editor-model.ts +7 -0
- package/src/projected-document-field-navigation.ts +300 -0
- package/src/projected-document-field-semantics.ts +27 -0
- package/src/projected-document-workspace-data-source-bindings.ts +182 -0
- package/src/projected-document-workspace-notice-diagnostics.ts +41 -0
- package/src/projected-input-form-runtime.ts +86 -0
- package/src/projected-process-task-notice-diagnostics.ts +283 -0
- package/src/projected-query-form-runtime.ts +62 -0
- package/src/prompt-document-preview-projection.ts +345 -0
- package/src/prompt-icons.ts +3 -0
- package/src/prompt-status-message-resolution.ts +158 -0
- package/src/query-form-lowering.ts +77 -0
- package/src/query-form-url-state.ts +346 -0
- package/src/query-offset-page.ts +50 -0
- package/src/relation-query-input-form-target.ts +61 -0
- package/src/scope-selection.ts +201 -0
- package/src/target-bindings.ts +123 -0
- package/src/view-chrome-content-diagnostics.ts +139 -0
- package/src/view-chrome-icons.ts +81 -0
- package/src/view-chrome-slot-renderer-registry.ts +128 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on or derived from the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link or bind by name to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor grants You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor grants You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to patent claims licensable by such Contributor that are necessarily infringed by their Contribution alone or by combination of their Contribution with the Work to which such Contribution was submitted. If You institute patent litigation against any entity alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. This does not supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort, contract, or otherwise, unless required by applicable law or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages arising as a result of this License or out of the use or inability to use the Work, even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer and charge a fee for acceptance of support, warranty, indemnity, or other liability obligations. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type PresentationScopeRequestSelection } from './scope-selection.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generated API scope policy metadata projected into frontend runtimes.
|
|
4
|
+
*/
|
|
5
|
+
export interface ApiScopePolicyMetadata {
|
|
6
|
+
readonly kind: string;
|
|
7
|
+
readonly cardinality: 'single' | 'multiple';
|
|
8
|
+
readonly binding: 'ambient' | 'header' | 'query' | 'route' | 'body' | 'resource';
|
|
9
|
+
readonly access: 'requireSelected' | 'filterToAccessible' | 'validateAccessible';
|
|
10
|
+
readonly singleScopeParameterName?: string;
|
|
11
|
+
readonly multipleScopesParameterName?: string;
|
|
12
|
+
readonly scopeModeParameterName?: string;
|
|
13
|
+
readonly resourceParameterName?: string;
|
|
14
|
+
readonly resourceDerivation?: {
|
|
15
|
+
readonly strategy: string;
|
|
16
|
+
readonly format?: string;
|
|
17
|
+
readonly scopeField?: string;
|
|
18
|
+
};
|
|
19
|
+
readonly allowDefaultScope: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Minimal HTTP client contract used by generated API clients.
|
|
23
|
+
*/
|
|
24
|
+
export type ApiRequestHttpClient = (path: string, init: RequestInit) => Promise<unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* Projected request after scope policies have been applied.
|
|
27
|
+
*/
|
|
28
|
+
export interface ScopedApiRequest {
|
|
29
|
+
readonly path: string;
|
|
30
|
+
readonly init: RequestInit;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Applies generated API scope policies to a request using the current ambient selection.
|
|
34
|
+
*/
|
|
35
|
+
export declare function projectApiScopeRequest(path: string, init: RequestInit, selection: PresentationScopeRequestSelection, policies: readonly ApiScopePolicyMetadata[]): ScopedApiRequest;
|
|
36
|
+
/**
|
|
37
|
+
* Wraps an HTTP client so scope metadata is applied at request time.
|
|
38
|
+
*/
|
|
39
|
+
export declare function createScopedApiHttpClient<TClient extends ApiRequestHttpClient>(http: TClient, { getSelection, policies, }: {
|
|
40
|
+
readonly getSelection: () => PresentationScopeRequestSelection;
|
|
41
|
+
readonly policies: readonly ApiScopePolicyMetadata[];
|
|
42
|
+
}): TClient;
|
|
43
|
+
//# sourceMappingURL=api-scope-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-scope-request.d.ts","sourceRoot":"","sources":["../src/api-scope-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,mBAAmB,CAAA;AAE1B;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,OAA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EAAE,CAAA;CACrD,GACA,OAAO,CAKT"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { normalizePresentationScopeRequestSelection, } from './scope-selection.js';
|
|
2
|
+
/**
|
|
3
|
+
* Applies generated API scope policies to a request using the current ambient selection.
|
|
4
|
+
*/
|
|
5
|
+
export function projectApiScopeRequest(path, init, selection, policies) {
|
|
6
|
+
const normalizedSelection = normalizePresentationScopeRequestSelection(selection);
|
|
7
|
+
let projectedPath = path;
|
|
8
|
+
let projectedInit = init;
|
|
9
|
+
for (const policy of policies) {
|
|
10
|
+
if (policy.binding === 'header') {
|
|
11
|
+
const next = applyHeaderScopePolicy(projectedPath, projectedInit, normalizedSelection, policy);
|
|
12
|
+
projectedPath = next.path;
|
|
13
|
+
projectedInit = next.init;
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
if (policy.binding === 'query') {
|
|
17
|
+
const next = applyQueryScopePolicy(projectedPath, projectedInit, normalizedSelection, policy);
|
|
18
|
+
projectedPath = next.path;
|
|
19
|
+
projectedInit = next.init;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
init: projectedInit,
|
|
24
|
+
path: projectedPath,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Wraps an HTTP client so scope metadata is applied at request time.
|
|
29
|
+
*/
|
|
30
|
+
export function createScopedApiHttpClient(http, { getSelection, policies, }) {
|
|
31
|
+
return (async (path, init) => {
|
|
32
|
+
const projected = projectApiScopeRequest(path, init, getSelection(), policies);
|
|
33
|
+
return await http(projected.path, projected.init);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function applyHeaderScopePolicy(path, init, selection, policy) {
|
|
37
|
+
if (policy.cardinality !== 'single' || !policy.singleScopeParameterName) {
|
|
38
|
+
return { init, path };
|
|
39
|
+
}
|
|
40
|
+
if (selection.mode !== 'single' || selection.scopeId === null) {
|
|
41
|
+
return { init, path };
|
|
42
|
+
}
|
|
43
|
+
const headers = new Headers(init.headers);
|
|
44
|
+
if (headers.has(policy.singleScopeParameterName)) {
|
|
45
|
+
return { init, path };
|
|
46
|
+
}
|
|
47
|
+
headers.set(policy.singleScopeParameterName, selection.scopeId);
|
|
48
|
+
return {
|
|
49
|
+
init: {
|
|
50
|
+
...init,
|
|
51
|
+
headers,
|
|
52
|
+
},
|
|
53
|
+
path,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function applyQueryScopePolicy(path, init, selection, policy) {
|
|
57
|
+
if (policy.cardinality !== 'multiple' || !policy.multipleScopesParameterName) {
|
|
58
|
+
return { init, path };
|
|
59
|
+
}
|
|
60
|
+
const scopeIds = readRequestedScopeIds(selection);
|
|
61
|
+
if (scopeIds.length === 0) {
|
|
62
|
+
return { init, path };
|
|
63
|
+
}
|
|
64
|
+
const url = new URL(path, scopeProjectionBaseUrl);
|
|
65
|
+
if (url.searchParams.has(policy.multipleScopesParameterName)) {
|
|
66
|
+
return { init, path };
|
|
67
|
+
}
|
|
68
|
+
for (const scopeId of scopeIds) {
|
|
69
|
+
url.searchParams.append(policy.multipleScopesParameterName, scopeId);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
init,
|
|
73
|
+
path: formatProjectedPath(path, url),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function readRequestedScopeIds(selection) {
|
|
77
|
+
switch (selection.mode) {
|
|
78
|
+
case 'single':
|
|
79
|
+
return selection.scopeId ? [selection.scopeId] : [];
|
|
80
|
+
case 'multiple':
|
|
81
|
+
return [...selection.scopeIds];
|
|
82
|
+
case 'all':
|
|
83
|
+
case 'default':
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function formatProjectedPath(originalPath, url) {
|
|
88
|
+
return isAbsoluteUrl(originalPath)
|
|
89
|
+
? url.toString()
|
|
90
|
+
: `${url.pathname}${url.search}${url.hash}`;
|
|
91
|
+
}
|
|
92
|
+
function isAbsoluteUrl(value) {
|
|
93
|
+
return /^[a-zA-Z][a-zA-Z\d+.-]*:/.test(value);
|
|
94
|
+
}
|
|
95
|
+
const scopeProjectionBaseUrl = 'https://cohesive.local';
|
|
96
|
+
//# sourceMappingURL=api-scope-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-scope-request.js","sourceRoot":"","sources":["../src/api-scope-request.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,GAE3C,MAAM,mBAAmB,CAAA;AAsC1B;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAAY,EACZ,IAAiB,EACjB,SAA4C,EAC5C,QAA2C;IAE3C,MAAM,mBAAmB,GAAG,0CAA0C,CAAC,SAAS,CAAC,CAAA;IACjF,IAAI,aAAa,GAAG,IAAI,CAAA;IACxB,IAAI,aAAa,GAAG,IAAI,CAAA;IAExB,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;QAC9B,IAAI,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,MAAM,IAAI,GAAG,sBAAsB,CACjC,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,MAAM,CACP,CAAA;YACD,aAAa,GAAG,IAAI,CAAC,IAAI,CAAA;YACzB,aAAa,GAAG,IAAI,CAAC,IAAI,CAAA;YACzB,SAAQ;QACV,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;YAC/B,MAAM,IAAI,GAAG,qBAAqB,CAChC,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,MAAM,CACP,CAAA;YACD,aAAa,GAAG,IAAI,CAAC,IAAI,CAAA;YACzB,aAAa,GAAG,IAAI,CAAC,IAAI,CAAA;QAC3B,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,aAAa;KACpB,CAAA;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAAa,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,QAAQ,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,CAAA;AAC/C,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/C,CAAC;AAED,MAAM,sBAAsB,GAAG,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CollectionChromeRuntime } from './collection-chrome-runtime.js';
|
|
2
|
+
export declare const collectionChromeIconIds: {
|
|
3
|
+
readonly detailClose: "collection.detail.close";
|
|
4
|
+
readonly paginationFirstPage: "collection.pagination.first-page";
|
|
5
|
+
readonly paginationLoading: "collection.pagination.loading";
|
|
6
|
+
readonly paginationNextPage: "collection.pagination.next-page";
|
|
7
|
+
readonly paginationPreviousPage: "collection.pagination.previous-page";
|
|
8
|
+
readonly rowActionsMenu: "collection.row-actions.menu";
|
|
9
|
+
};
|
|
10
|
+
export interface CollectionChromeIconSubject {
|
|
11
|
+
readonly details?: Readonly<Record<string, unknown>>;
|
|
12
|
+
readonly icon: string;
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly kind: string;
|
|
15
|
+
readonly label?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveCollectionChromeIconSubjects(chrome: CollectionChromeRuntime): readonly CollectionChromeIconSubject[];
|
|
18
|
+
//# sourceMappingURL=collection-chrome-icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-chrome-icons.d.ts","sourceRoot":"","sources":["../src/collection-chrome-icons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACxB,MAAM,6BAA6B,CAAA;AAEpC,eAAO,MAAM,uBAAuB;;;;;;;CAO1B,CAAA;AAEV,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,uBAAuB,GAC9B,SAAS,2BAA2B,EAAE,CA6CxC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const collectionChromeIconIds = {
|
|
2
|
+
detailClose: 'collection.detail.close',
|
|
3
|
+
paginationFirstPage: 'collection.pagination.first-page',
|
|
4
|
+
paginationLoading: 'collection.pagination.loading',
|
|
5
|
+
paginationNextPage: 'collection.pagination.next-page',
|
|
6
|
+
paginationPreviousPage: 'collection.pagination.previous-page',
|
|
7
|
+
rowActionsMenu: 'collection.row-actions.menu',
|
|
8
|
+
};
|
|
9
|
+
export function resolveCollectionChromeIconSubjects(chrome) {
|
|
10
|
+
const subjects = [];
|
|
11
|
+
if (chrome.paginationSlot) {
|
|
12
|
+
subjects.push(createCollectionChromeIconSubject({
|
|
13
|
+
icon: collectionChromeIconIds.paginationLoading,
|
|
14
|
+
label: 'Pagination loading',
|
|
15
|
+
slotId: chrome.paginationSlot.Id,
|
|
16
|
+
}), createCollectionChromeIconSubject({
|
|
17
|
+
icon: collectionChromeIconIds.paginationFirstPage,
|
|
18
|
+
label: 'First page',
|
|
19
|
+
slotId: chrome.paginationSlot.Id,
|
|
20
|
+
}), createCollectionChromeIconSubject({
|
|
21
|
+
icon: collectionChromeIconIds.paginationPreviousPage,
|
|
22
|
+
label: 'Previous page',
|
|
23
|
+
slotId: chrome.paginationSlot.Id,
|
|
24
|
+
}), createCollectionChromeIconSubject({
|
|
25
|
+
icon: collectionChromeIconIds.paginationNextPage,
|
|
26
|
+
label: 'Next page',
|
|
27
|
+
slotId: chrome.paginationSlot.Id,
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
if (chrome.rowActionsSlot) {
|
|
31
|
+
subjects.push(createCollectionChromeIconSubject({
|
|
32
|
+
icon: collectionChromeIconIds.rowActionsMenu,
|
|
33
|
+
label: 'Row actions menu',
|
|
34
|
+
slotId: chrome.rowActionsSlot.Id,
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
if (chrome.detailSlot) {
|
|
38
|
+
subjects.push(createCollectionChromeIconSubject({
|
|
39
|
+
icon: collectionChromeIconIds.detailClose,
|
|
40
|
+
label: 'Close detail panel',
|
|
41
|
+
slotId: chrome.detailSlot.Id,
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
return subjects;
|
|
45
|
+
}
|
|
46
|
+
function createCollectionChromeIconSubject({ icon, label, slotId, }) {
|
|
47
|
+
return {
|
|
48
|
+
details: {
|
|
49
|
+
slotId,
|
|
50
|
+
},
|
|
51
|
+
icon,
|
|
52
|
+
id: `${slotId}:${icon}`,
|
|
53
|
+
kind: 'collection-chrome-icon',
|
|
54
|
+
label,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=collection-chrome-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-chrome-icons.js","sourceRoot":"","sources":["../src/collection-chrome-icons.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,WAAW,EAAE,yBAAyB;IACtC,mBAAmB,EAAE,kCAAkC;IACvD,iBAAiB,EAAE,+BAA+B;IAClD,kBAAkB,EAAE,iCAAiC;IACrD,sBAAsB,EAAE,qCAAqC;IAC7D,cAAc,EAAE,6BAA6B;CACrC,CAAA;AAUV,MAAM,UAAU,mCAAmC,CACjD,MAA+B;IAE/B,MAAM,QAAQ,GAAkC,EAAE,CAAA;IAElD,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;QAC1B,QAAQ,CAAC,IAAI,CACX,iCAAiC,CAAC;YAChC,IAAI,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AM,IAAI,IAAI,EAAE;QACvB,IAAI,EAAE,wBAAwB;QAC9B,KAAK;KACN,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CollectionChromeDefinition, CollectionChromeSlotDefinition, CollectionChromeSlotKind, CollectionChromeSlotPlacement, ViewDefinition } from './module.js';
|
|
2
|
+
export type CollectionChromeRuntimeDefinition = NonNullable<ViewDefinition['Collection']>;
|
|
3
|
+
export interface CollectionChromeRuntime {
|
|
4
|
+
readonly bodySlot: CollectionChromeSlotDefinition | null;
|
|
5
|
+
readonly definition: CollectionChromeDefinition | null;
|
|
6
|
+
readonly detailSlot: CollectionChromeSlotDefinition | null;
|
|
7
|
+
readonly paginationFooterSlot: CollectionChromeSlotDefinition | null;
|
|
8
|
+
readonly paginationSlot: CollectionChromeSlotDefinition | null;
|
|
9
|
+
readonly queryFormSlot: CollectionChromeSlotDefinition | null;
|
|
10
|
+
readonly rowActionsSlot: CollectionChromeSlotDefinition | null;
|
|
11
|
+
readonly selectionActionsSlot: CollectionChromeSlotDefinition | null;
|
|
12
|
+
readonly slots: readonly CollectionChromeSlotDefinition[];
|
|
13
|
+
readonly summarySlot: CollectionChromeSlotDefinition | null;
|
|
14
|
+
readonly findSlot: (kind: CollectionChromeSlotKind, placement?: CollectionChromeSlotPlacement) => CollectionChromeSlotDefinition | null;
|
|
15
|
+
readonly findSlots: (kind: CollectionChromeSlotKind, placement?: CollectionChromeSlotPlacement) => readonly CollectionChromeSlotDefinition[];
|
|
16
|
+
}
|
|
17
|
+
export declare function createCollectionChromeRuntime(collection: CollectionChromeRuntimeDefinition | null | undefined): CollectionChromeRuntime;
|
|
18
|
+
export declare function resolveCollectionChromeSlots(collection: CollectionChromeRuntimeDefinition | null | undefined): readonly CollectionChromeSlotDefinition[];
|
|
19
|
+
export declare function resolveCollectionChromeDataSourceIds(collection: CollectionChromeRuntimeDefinition | null | undefined): string[];
|
|
20
|
+
export declare function resolveCollectionChromePrimaryDataSourceId(collection: CollectionChromeRuntimeDefinition | null | undefined): string;
|
|
21
|
+
export declare function isCollectionChromeSlotKind(slot: CollectionChromeSlotDefinition, kind: CollectionChromeSlotKind): boolean;
|
|
22
|
+
export declare function isCollectionChromeSlotPlacement(slot: CollectionChromeSlotDefinition, placement: CollectionChromeSlotPlacement): boolean;
|
|
23
|
+
export declare function matchesCollectionChromeSlotKind(value: unknown, kind: CollectionChromeSlotKind): boolean;
|
|
24
|
+
export declare function matchesCollectionChromeSlotPlacement(value: unknown, placement: CollectionChromeSlotPlacement): boolean;
|
|
25
|
+
//# sourceMappingURL=collection-chrome-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-chrome-runtime.d.ts","sourceRoot":"","sources":["../src/collection-chrome-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,8BAA8B,EAC9B,wBAAwB,EACxB,6BAA6B,EAC7B,cAAc,EACf,MAAM,UAAU,CAAA;AAMjB,MAAM,MAAM,iCAAiC,GAAG,WAAW,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAA;AAEzF,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,8BAA8B,GAAG,IAAI,CAAA;IACxD,QAAQ,CAAC,UAAU,EAAE,0BAA0B,GAAG,IAAI,CAAA;IACtD,QAAQ,CAAC,UAAU,EAAE,8BAA8B,GAAG,IAAI,CAAA;IAC1D,QAAQ,CAAC,oBAAoB,EAAE,8BAA8B,GAAG,IAAI,CAAA;IACpE,QAAQ,CAAC,cAAc,EAAE,8BAA8B,GAAG,IAAI,CAAA;IAC9D,QAAQ,CAAC,aAAa,EAAE,8BAA8B,GAAG,IAAI,CAAA;IAC7D,QAAQ,CAAC,cAAc,EAAE,8BAA8B,GAAG,IAAI,CAAA;IAC9D,QAAQ,CAAC,oBAAoB,EAAE,8BAA8B,GAAG,IAAI,CAAA;IACpE,QAAQ,CAAC,KAAK,EAAE,SAAS,8BAA8B,EAAE,CAAA;IACzD,QAAQ,CAAC,WAAW,EAAE,8BAA8B,GAAG,IAAI,CAAA;IAC3D,QAAQ,CAAC,QAAQ,EAAE,CACjB,IAAI,EAAE,wBAAwB,EAC9B,SAAS,CAAC,EAAE,6BAA6B,KACtC,8BAA8B,GAAG,IAAI,CAAA;IAC1C,QAAQ,CAAC,SAAS,EAAE,CAClB,IAAI,EAAE,wBAAwB,EAC9B,SAAS,CAAC,EAAE,6BAA6B,KACtC,SAAS,8BAA8B,EAAE,CAAA;CAC/C;AAED,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,iCAAiC,GAAG,IAAI,GAAG,SAAS,GAC/D,uBAAuB,CA+BzB;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,iCAAiC,GAAG,IAAI,GAAG,SAAS,GAC/D,SAAS,8BAA8B,EAAE,CAE3C;AAED,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,iCAAiC,GAAG,IAAI,GAAG,SAAS,YAGjE;AAED,wBAAgB,0CAA0C,CACxD,UAAU,EAAE,iCAAiC,GAAG,IAAI,GAAG,SAAS,UAMjE;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,8BAA8B,EACpC,IAAI,EAAE,wBAAwB,WAG/B;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,8BAA8B,EACpC,SAAS,EAAE,6BAA6B,WAGzC;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,wBAAwB,WAa/B;AAED,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,6BAA6B,WAazC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { collectionChromeSlotKinds, collectionChromeSlotPlacements, } from '@cohesivesystems/presentation-contracts';
|
|
2
|
+
export function createCollectionChromeRuntime(collection) {
|
|
3
|
+
const slots = resolveCollectionChromeSlots(collection);
|
|
4
|
+
const findSlots = (kind, placement) => slots.filter((slot) => isCollectionChromeSlotKind(slot, kind) &&
|
|
5
|
+
(placement === undefined || isCollectionChromeSlotPlacement(slot, placement)));
|
|
6
|
+
const findSlot = (kind, placement) => findSlots(kind, placement)[0] ?? null;
|
|
7
|
+
return {
|
|
8
|
+
bodySlot: findSlot(collectionChromeSlotKinds.body),
|
|
9
|
+
definition: collection?.Chrome ?? null,
|
|
10
|
+
detailSlot: findSlot(collectionChromeSlotKinds.detail),
|
|
11
|
+
findSlot,
|
|
12
|
+
findSlots,
|
|
13
|
+
paginationFooterSlot: findSlot(collectionChromeSlotKinds.pagination, collectionChromeSlotPlacements.footer),
|
|
14
|
+
paginationSlot: findSlot(collectionChromeSlotKinds.pagination),
|
|
15
|
+
queryFormSlot: findSlot(collectionChromeSlotKinds.queryForm),
|
|
16
|
+
rowActionsSlot: findSlot(collectionChromeSlotKinds.rowActions),
|
|
17
|
+
selectionActionsSlot: findSlot(collectionChromeSlotKinds.selectionActions),
|
|
18
|
+
slots,
|
|
19
|
+
summarySlot: findSlot(collectionChromeSlotKinds.summary),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function resolveCollectionChromeSlots(collection) {
|
|
23
|
+
return collection?.Chrome?.Slots ?? [];
|
|
24
|
+
}
|
|
25
|
+
export function resolveCollectionChromeDataSourceIds(collection) {
|
|
26
|
+
return resolveCollectionChromeSlots(collection).flatMap((slot) => slot.DataSourceIds);
|
|
27
|
+
}
|
|
28
|
+
export function resolveCollectionChromePrimaryDataSourceId(collection) {
|
|
29
|
+
const chrome = createCollectionChromeRuntime(collection);
|
|
30
|
+
return chrome.bodySlot?.DataSourceIds[0] ??
|
|
31
|
+
chrome.slots.flatMap((slot) => slot.DataSourceIds)[0] ??
|
|
32
|
+
null;
|
|
33
|
+
}
|
|
34
|
+
export function isCollectionChromeSlotKind(slot, kind) {
|
|
35
|
+
return matchesCollectionChromeSlotKind(slot.Kind, kind);
|
|
36
|
+
}
|
|
37
|
+
export function isCollectionChromeSlotPlacement(slot, placement) {
|
|
38
|
+
return matchesCollectionChromeSlotPlacement(slot.Placement, placement);
|
|
39
|
+
}
|
|
40
|
+
export function matchesCollectionChromeSlotKind(value, kind) {
|
|
41
|
+
const labelsByKind = {
|
|
42
|
+
[collectionChromeSlotKinds.queryForm]: 'queryForm',
|
|
43
|
+
[collectionChromeSlotKinds.pagination]: 'pagination',
|
|
44
|
+
[collectionChromeSlotKinds.selectionActions]: 'selectionActions',
|
|
45
|
+
[collectionChromeSlotKinds.rowActions]: 'rowActions',
|
|
46
|
+
[collectionChromeSlotKinds.detail]: 'detail',
|
|
47
|
+
[collectionChromeSlotKinds.summary]: 'summary',
|
|
48
|
+
[collectionChromeSlotKinds.custom]: 'custom',
|
|
49
|
+
[collectionChromeSlotKinds.body]: 'body',
|
|
50
|
+
};
|
|
51
|
+
return matchesGeneratedEnumValue(value, kind, labelsByKind[kind]);
|
|
52
|
+
}
|
|
53
|
+
export function matchesCollectionChromeSlotPlacement(value, placement) {
|
|
54
|
+
const labelsByPlacement = {
|
|
55
|
+
[collectionChromeSlotPlacements.none]: 'none',
|
|
56
|
+
[collectionChromeSlotPlacements.header]: 'header',
|
|
57
|
+
[collectionChromeSlotPlacements.toolbar]: 'toolbar',
|
|
58
|
+
[collectionChromeSlotPlacements.above]: 'above',
|
|
59
|
+
[collectionChromeSlotPlacements.inline]: 'inline',
|
|
60
|
+
[collectionChromeSlotPlacements.footer]: 'footer',
|
|
61
|
+
[collectionChromeSlotPlacements.sidePanel]: 'sidePanel',
|
|
62
|
+
[collectionChromeSlotPlacements.drawer]: 'drawer',
|
|
63
|
+
};
|
|
64
|
+
return matchesGeneratedEnumValue(value, placement, labelsByPlacement[placement]);
|
|
65
|
+
}
|
|
66
|
+
function matchesGeneratedEnumValue(value, numericValue, camelLabel) {
|
|
67
|
+
const normalizedValue = String(value).toLocaleLowerCase();
|
|
68
|
+
return (value === numericValue ||
|
|
69
|
+
String(value) === String(numericValue) ||
|
|
70
|
+
normalizedValue === camelLabel.toLocaleLowerCase());
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=collection-chrome-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-chrome-runtime.js","sourceRoot":"","sources":["../src/collection-chrome-runtime.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,yCAAyC,CAAA;AAyBhD,MAAM,UAAU,6BAA6B,CAC3C,UAAgE;IAEhE,MAAM,KAAK,GAAG,4BAA4B,CAAC,UAAU,CAAC,CAAA;IACtD,MAAM,SAAS,GAAG,CAChB,IAA8B,EAC9B,SAAyC,EACzC,EAAE,CACF,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CACpB,0BAA0B,CAAC,IAAI,EAAE,IAAI,CAAC;QACtC,CAAC,SAAS,KAAK,SAAS,IAAI,+BAA+B,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IAClF,MAAM,QAAQ,GAAG,CACf,IAA8B,EAC9B,SAAyC,EACzC,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;IAE1C,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,yBAAyB,CAAC,IAAI,CAAC;QAClD,UAAU,EAAE,UAAU,EAAE,MAAM,IAAI,IAAI;QACtC,UAAU,EAAE,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC;QACtD,QAAQ;QACR,SAAS;QACT,oBAAoB,EAAE,QAAQ,CAC5B,yBAAyB,CAAC,UAAU,EACpC,8BAA8B,CAAC,MAAM,CACtC;QACD,cAAc,EAAE,QAAQ,CAAC,yBAAyB,CAAC,UAAU,CAAC;QAC9D,aAAa,EAAE,QAAQ,CAAC,yBAAyB,CAAC,SAAS,CAAC;QAC5D,cAAc,EAAE,QAAQ,CAAC,yBAAyB,CAAC,UAAU,CAAC;QAC9D,oBAA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E,CACnD,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { CollectionChromeSlotDefinition, CollectionChromeSlotKind, CollectionChromeSlotPlacement } from './module.js';
|
|
2
|
+
/**
|
|
3
|
+
* Placement token used by collection chrome renderer keys that apply to any
|
|
4
|
+
* placement for a slot kind.
|
|
5
|
+
*/
|
|
6
|
+
export declare const collectionChromeSlotAnyPlacement = "*";
|
|
7
|
+
/**
|
|
8
|
+
* Renderer function for a projected collection chrome slot.
|
|
9
|
+
*
|
|
10
|
+
* @typeParam TContext Rendering context supplied by the host projection layer.
|
|
11
|
+
* @typeParam TResult Render result produced by the host projection layer.
|
|
12
|
+
*/
|
|
13
|
+
export type CollectionChromeSlotRenderer<TContext, TResult = unknown> = (context: TContext) => TResult;
|
|
14
|
+
/**
|
|
15
|
+
* Lookup table from normalized collection chrome slot keys to renderer
|
|
16
|
+
* functions.
|
|
17
|
+
*
|
|
18
|
+
* Keys are created with {@link createCollectionChromeSlotRendererKey} and encode
|
|
19
|
+
* both the semantic slot kind and either a concrete placement or the any
|
|
20
|
+
* placement token.
|
|
21
|
+
*/
|
|
22
|
+
export type CollectionChromeSlotRendererRegistry<TContext, TResult = unknown> = Readonly<Record<string, CollectionChromeSlotRenderer<TContext, TResult>>>;
|
|
23
|
+
/**
|
|
24
|
+
* Declarative binding used to build a collection chrome slot renderer registry.
|
|
25
|
+
*
|
|
26
|
+
* Omit `placement` to register a kind-level fallback renderer that can satisfy
|
|
27
|
+
* slots of the same kind in any placement.
|
|
28
|
+
*/
|
|
29
|
+
export interface CollectionChromeSlotRendererBinding<TContext, TResult = unknown> {
|
|
30
|
+
/** Semantic collection chrome slot kind handled by the renderer. */
|
|
31
|
+
readonly kind: CollectionChromeSlotKind | string | number;
|
|
32
|
+
/** Optional concrete placement handled by the renderer. */
|
|
33
|
+
readonly placement?: CollectionChromeSlotPlacement | string | number | null;
|
|
34
|
+
/** Renderer invoked when the binding is selected for a slot. */
|
|
35
|
+
readonly render: CollectionChromeSlotRenderer<TContext, TResult>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Builds a normalized collection chrome slot renderer registry from declarative
|
|
39
|
+
* bindings.
|
|
40
|
+
*
|
|
41
|
+
* Later bindings with the same normalized key overwrite earlier bindings.
|
|
42
|
+
*
|
|
43
|
+
* @param bindings Slot renderer bindings to index by kind and placement.
|
|
44
|
+
* @returns Registry suitable for resolver and key-inspection helpers.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createCollectionChromeSlotRendererRegistry<TContext, TResult = unknown>(bindings: readonly CollectionChromeSlotRendererBinding<TContext, TResult>[]): CollectionChromeSlotRendererRegistry<TContext, TResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Creates the canonical registry key for a collection chrome slot kind and
|
|
49
|
+
* placement.
|
|
50
|
+
*
|
|
51
|
+
* Generated enum values, enum labels, and string values are normalized into the
|
|
52
|
+
* same lowercase alphanumeric token so backend-generated contracts and
|
|
53
|
+
* handwritten adapters can use the same registry.
|
|
54
|
+
*
|
|
55
|
+
* @param kind Collection chrome slot kind.
|
|
56
|
+
* @param placement Optional slot placement. `null` and `undefined` become the
|
|
57
|
+
* any-placement fallback token.
|
|
58
|
+
*/
|
|
59
|
+
export declare function createCollectionChromeSlotRendererKey(kind: CollectionChromeSlotKind | string | number, placement?: CollectionChromeSlotPlacement | string | number | null): string;
|
|
60
|
+
/**
|
|
61
|
+
* Returns the normalized keys currently registered in a collection chrome slot
|
|
62
|
+
* renderer registry.
|
|
63
|
+
*/
|
|
64
|
+
export declare function getCollectionChromeSlotRendererRegistryKeys<TContext, TResult = unknown>(registry: CollectionChromeSlotRendererRegistry<TContext, TResult> | null | undefined): string[];
|
|
65
|
+
/**
|
|
66
|
+
* Checks whether a precomputed key set contains a renderer that could satisfy
|
|
67
|
+
* the provided collection chrome slot.
|
|
68
|
+
*
|
|
69
|
+
* This uses the same candidate-key order as
|
|
70
|
+
* {@link resolveCollectionChromeSlotRenderer}.
|
|
71
|
+
*/
|
|
72
|
+
export declare function hasCollectionChromeSlotRendererBinding(keys: readonly string[], slot: CollectionChromeSlotDefinition): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Resolves the renderer for a collection chrome slot.
|
|
75
|
+
*
|
|
76
|
+
* Exact kind-and-placement bindings are preferred. If no exact binding exists,
|
|
77
|
+
* the resolver falls back to a kind-level any-placement binding.
|
|
78
|
+
*
|
|
79
|
+
* @param registry Registry to resolve from. `null` and `undefined` are treated
|
|
80
|
+
* as empty registries.
|
|
81
|
+
* @param slot Projected collection chrome slot definition.
|
|
82
|
+
* @returns Matching renderer, or `null` when no binding can satisfy the slot.
|
|
83
|
+
*/
|
|
84
|
+
export declare function resolveCollectionChromeSlotRenderer<TContext, TResult = unknown>(registry: CollectionChromeSlotRendererRegistry<TContext, TResult> | null | undefined, slot: CollectionChromeSlotDefinition): CollectionChromeSlotRenderer<TContext, TResult> | null;
|
|
85
|
+
/**
|
|
86
|
+
* Checks whether a collection chrome slot is assigned to the provided
|
|
87
|
+
* placement, using the same normalization rules as renderer keys.
|
|
88
|
+
*/
|
|
89
|
+
export declare function isCollectionChromeSlotPlacement(slot: CollectionChromeSlotDefinition, placement: CollectionChromeSlotPlacement | string | number): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Checks whether a collection chrome slot has the provided semantic kind, using
|
|
92
|
+
* the same normalization rules as renderer keys.
|
|
93
|
+
*/
|
|
94
|
+
export declare function isCollectionChromeSlotKind(slot: CollectionChromeSlotDefinition, kind: CollectionChromeSlotKind | string | number): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Checks whether an optional placement value matches a concrete placement.
|
|
97
|
+
*
|
|
98
|
+
* Missing slot placement values never match, including against any-placement
|
|
99
|
+
* fallback renderer bindings.
|
|
100
|
+
*/
|
|
101
|
+
export declare function isCollectionChromeSlotPlacementValue(value: CollectionChromeSlotPlacement | string | number | null | undefined, placement: CollectionChromeSlotPlacement | string | number): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Returns candidate renderer keys for a collection chrome slot in resolution
|
|
104
|
+
* order.
|
|
105
|
+
*
|
|
106
|
+
* The exact kind-and-placement key is first, followed by the kind-level
|
|
107
|
+
* any-placement fallback key.
|
|
108
|
+
*/
|
|
109
|
+
export declare function getCollectionChromeSlotRendererCandidateKeys(slot: CollectionChromeSlotDefinition): string[];
|
|
110
|
+
//# sourceMappingURL=collection-chrome-slot-renderer-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-chrome-slot-renderer-registry.d.ts","sourceRoot":"","sources":["../src/collection-chrome-slot-renderer-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,UAAU,CAAA;AAMjB;;;GAGG;AACH,eAAO,MAAM,gCAAgC,MAAM,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,IAAI,CACtE,OAAO,EAAE,QAAQ,KACd,OAAO,CAAA;AAEZ;;;;;;;GAOG;AACH,MAAM,MAAM,oCAAoC,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,IAAI,QAAQ,CACtF,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAChE,CAAA;AAED;;;;;GAKG;AACH,MAAM,WAAW,mCAAmC,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAC9E,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAA;IAEzD,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,CAAC,EAAE,6BAA6B,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAE3E,gEAAgE;IAChE,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;CACjE;AAED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