base-screen 0.3.0 → 0.4.2
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 +5 -2
- package/dist/_internal/contracts/diagnostics/material-error.d.ts +1 -1
- package/dist/_internal/contracts/diagnostics/material-error.js +1 -1
- package/dist/_internal/contracts/document/blueprint-graph.d.ts +3 -3
- package/dist/_internal/contracts/document/blueprint-graph.js +4 -4
- package/dist/_internal/contracts/document/component-states.d.ts +1 -1
- package/dist/_internal/contracts/document/component-states.js +1 -1
- package/dist/_internal/contracts/document/image-url.js +1 -1
- package/dist/_internal/contracts/document/json-schema.js +1 -1
- package/dist/_internal/contracts/document/limits.d.ts +5 -5
- package/dist/_internal/contracts/document/limits.js +5 -5
- package/dist/_internal/contracts/document/references.js +3 -3
- package/dist/_internal/contracts/document/schema.d.ts +9 -2
- package/dist/_internal/contracts/document/schema.js +4 -4
- package/dist/_internal/contracts/document/sub-canvas.d.ts +2 -2
- package/dist/_internal/contracts/document/sub-canvas.js +2 -2
- package/dist/_internal/contracts/document/theme.d.ts +2 -2
- package/dist/_internal/contracts/document/theme.js +2 -2
- package/dist/_internal/contracts/document/validate-blueprint.d.ts +1 -1
- package/dist/_internal/contracts/document/validate-blueprint.js +1 -1
- package/dist/_internal/contracts/document/validate-component.js +2 -2
- package/dist/_internal/contracts/document/validate-data-source.js +2 -2
- package/dist/_internal/contracts/document/validate-sub-canvas.d.ts +1 -1
- package/dist/_internal/contracts/document/validate-sub-canvas.js +1 -1
- package/dist/_internal/contracts/document/validate-value-ref.js +6 -1
- package/dist/_internal/contracts/index.d.ts +1 -1
- package/dist/_internal/contracts/migration/blueprint-graph-migration.d.ts +1 -1
- package/dist/_internal/contracts/migration/migrate-document.js +2 -2
- package/dist/_internal/contracts/push/delivery.d.ts +1 -1
- package/dist/_internal/contracts/push/delivery.js +1 -1
- package/dist/_internal/contracts/push/level-scale.d.ts +1 -1
- package/dist/_internal/contracts/push/level-scale.js +1 -1
- package/dist/_internal/contracts/screen-document.schema.json +15 -3
- package/dist/_internal/contracts/types/diagnostics.d.ts +1 -1
- package/dist/_internal/contracts/types/document.d.ts +21 -19
- package/dist/_internal/contracts/types/execution.d.ts +3 -3
- package/dist/_internal/contracts/types/host.d.ts +23 -5
- package/dist/_internal/contracts/types/host.js +1 -1
- package/dist/_internal/contracts/types/push.d.ts +3 -3
- package/dist/_internal/contracts/types/variable.d.ts +3 -3
- package/dist/_internal/contracts/variable/parse.js +5 -1
- package/dist/_internal/core/blueprint/runtime-compile.d.ts +1 -1
- package/dist/_internal/core/blueprint/runtime-compile.js +1 -1
- package/dist/_internal/core/blueprint/runtime-dispatch.js +1 -1
- package/dist/_internal/core/blueprint/runtime-simulate.d.ts +57 -0
- package/dist/_internal/core/blueprint/runtime-simulate.js +177 -0
- package/dist/_internal/core/blueprint/runtime-types.d.ts +4 -4
- package/dist/_internal/core/blueprint/runtime.d.ts +1 -0
- package/dist/_internal/core/blueprint/runtime.js +1 -0
- package/dist/_internal/core/commands/apply-collection-commands.d.ts +32 -0
- package/dist/_internal/core/commands/apply-collection-commands.js +174 -0
- package/dist/_internal/core/commands/apply-component-commands.d.ts +1 -1
- package/dist/_internal/core/commands/apply-component-commands.js +2 -2
- package/dist/_internal/core/commands/apply.js +15 -2
- package/dist/_internal/core/commands/parse-command.js +12 -0
- package/dist/_internal/core/commands/types.d.ts +33 -5
- package/dist/_internal/core/data/data-candidates.d.ts +38 -0
- package/dist/_internal/core/data/data-candidates.js +186 -0
- package/dist/_internal/core/data/data-source-dependents.d.ts +1 -1
- package/dist/_internal/core/data/data-source-dependents.js +1 -1
- package/dist/_internal/core/data/dataset-profile.d.ts +71 -0
- package/dist/_internal/core/data/dataset-profile.js +170 -0
- package/dist/_internal/core/data/host-dataset.d.ts +2 -2
- package/dist/_internal/core/data/host-dataset.js +2 -2
- package/dist/_internal/core/data/sample-values.d.ts +25 -0
- package/dist/_internal/core/data/sample-values.js +45 -0
- package/dist/_internal/core/data/value-ref.d.ts +2 -2
- package/dist/_internal/core/data/value-ref.js +1 -1
- package/dist/_internal/core/diff/screen-diff.js +6 -0
- package/dist/_internal/core/index.d.ts +7 -1
- package/dist/_internal/core/index.js +7 -1
- package/dist/_internal/core/state/state-preset.d.ts +32 -0
- package/dist/_internal/core/state/state-preset.js +37 -0
- package/dist/_internal/core/validation/layout-audit.d.ts +17 -0
- package/dist/_internal/core/validation/layout-audit.js +228 -0
- package/dist/_internal/core/validation/legibility.d.ts +9 -0
- package/dist/_internal/core/validation/legibility.js +33 -0
- package/dist/_internal/core/validation/validate-semantics.js +1 -1
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-canvas-bridge.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/dataset/designer-data-source-authoring.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-catalog-controller.d.ts +21 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-controller-context.d.ts +7 -2
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-draft-controller.d.ts +7 -2
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-effective-value.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-surface-controller.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/dataset/designer-update-policy-authoring.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/designer-artboard-controller.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/designer-canvas-runtime-controller.d.ts +2 -2
- package/dist/_internal/engine/browser/controllers/designer-change-controller.d.ts +27 -0
- package/dist/_internal/engine/browser/controllers/designer-command-palette-controller.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/designer-intent-controller.d.ts +5 -0
- package/dist/_internal/engine/browser/controllers/designer-page-preview-controller.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/designer-popup-preview-controller.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/designer-reference-layer-controller.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/designer-text-edit-controller.d.ts +2 -2
- package/dist/_internal/engine/browser/controllers/designer-viewport-controller.d.ts +7 -1
- package/dist/_internal/engine/browser/controllers/gesture/designer-drag-gesture.d.ts +6 -1
- package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-callbacks.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/panel/designer-component-states-controller.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller-callbacks.d.ts +6 -6
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-property-controller.d.ts +7 -0
- package/dist/_internal/engine/browser/controllers/variables/designer-variable-catalog-controller.d.ts +9 -1
- package/dist/_internal/engine/browser/controllers/variables/designer-variable-editor-controller.d.ts +6 -1
- package/dist/_internal/engine/browser/controllers/variables/designer-variables-controller.d.ts +16 -1
- package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-tabs-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/blueprint/designer-blueprint-inspector-configuration.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/change/designer-change-dom.d.ts +21 -5
- package/dist/_internal/engine/browser/dom/color/designer-color-palette-model.d.ts +3 -3
- package/dist/_internal/engine/browser/dom/color/designer-color-palette-types.d.ts +2 -2
- package/dist/_internal/engine/browser/dom/color/designer-color-theme-slots.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/dataset/designer-data-group-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/dataset/designer-data-panel-notice.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/dataset/designer-data-section-diff.d.ts +4 -6
- package/dist/_internal/engine/browser/dom/dataset/designer-data-state.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/dataset/designer-dataset-authoring-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/dataset/designer-dataset-catalog-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/dataset/designer-dataset-sections.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/dataset/designer-dataset-types.d.ts +11 -4
- package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-control-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-model.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/designer-field-primitives.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/designer-icons.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/designer-text-edit-dom.d.ts +2 -2
- package/dist/_internal/engine/browser/dom/designer-variable-inspector-dom.d.ts +7 -0
- package/dist/_internal/engine/browser/dom/designer-variables-dom.d.ts +5 -1
- package/dist/_internal/engine/browser/dom/designer-variables-editor-dom.d.ts +30 -1
- package/dist/_internal/engine/browser/dom/designer-variables-toolbar-dom.d.ts +4 -2
- package/dist/_internal/engine/browser/dom/intent/designer-intent-reference-picker-dom.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/material-library/designer-material-library-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/menu/designer-menu-model.d.ts +3 -3
- package/dist/_internal/engine/browser/dom/menu/designer-plugin-command-menu.d.ts +5 -2
- package/dist/_internal/engine/browser/dom/panel/designer-canvas-transactions.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/panel/designer-component-states-dom.d.ts +2 -2
- package/dist/_internal/engine/browser/dom/panel/designer-multi-selection-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/panel/designer-panel-primitives.d.ts +2 -2
- package/dist/_internal/engine/browser/dom/panel/designer-property-transactions.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-picker-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-picker-mount.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-summary-dom.d.ts +1 -1
- package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-types.d.ts +6 -4
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids-types.d.ts +3 -3
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids.d.ts +5 -3
- package/dist/_internal/engine/browser/viewport/designer-canvas-measurements.d.ts +2 -14
- package/dist/_internal/engine/browser/viewport/designer-guide-overlay-nodes.d.ts +2 -0
- package/dist/_internal/engine/browser/viewport/designer-snap-tuning.d.ts +14 -0
- package/dist/_internal/engine/common/observability/designer-metrics.d.ts +1 -1
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-capabilities.d.ts +1 -1
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-graph.d.ts +5 -5
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-model.d.ts +1 -1
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-protocol-types.d.ts +2 -2
- package/dist/_internal/engine/common/operations/canvas/canvas-background-image.d.ts +1 -1
- package/dist/_internal/engine/common/operations/catalog/designer-catalog-refresh.d.ts +1 -1
- package/dist/_internal/engine/common/operations/change/designer-change-events.d.ts +2 -0
- package/dist/_internal/engine/common/operations/change/designer-change-proposal.d.ts +35 -2
- package/dist/_internal/engine/common/operations/designer-clipboard.d.ts +5 -1
- package/dist/_internal/engine/common/operations/designer-text-edit-operations.d.ts +1 -1
- package/dist/_internal/engine/common/operations/designer-variable-operations.d.ts +3 -3
- package/dist/_internal/engine/common/operations/display/designer-target-display.d.ts +2 -2
- package/dist/_internal/engine/common/operations/element/designer-element-operation-types.d.ts +1 -1
- package/dist/_internal/engine/common/operations/intent/designer-parameter-intent.d.ts +1 -1
- package/dist/_internal/engine/common/operations/material-component/material-component-fragment-extract.d.ts +2 -2
- package/dist/_internal/engine/common/operations/material-library/material-library-fragments.d.ts +1 -1
- package/dist/_internal/engine/common/operations/material-library/material-library-grouping.d.ts +1 -1
- package/dist/_internal/engine/common/operations/plugin/designer-plugin-commands.d.ts +2 -0
- package/dist/_internal/engine/common/operations/selection/designer-multi-selection-operations.d.ts +9 -9
- package/dist/_internal/engine/common/operations/style/designer-component-states.d.ts +12 -7
- package/dist/_internal/engine/common/operations/style/designer-material-appearance.d.ts +1 -1
- package/dist/_internal/engine/common/session/designer-artboard.d.ts +1 -1
- package/dist/_internal/engine/common/session/designer-session.d.ts +1 -1
- package/dist/_internal/engine/common/ui-text/designer-blueprint-ui-text.d.ts +3 -3
- package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +127 -70
- package/dist/_internal/engine/{designer-blueprint-workbench-panel-CJ3iZo5v.js → designer-blueprint-workbench-panel-DVvKcSvJ.js} +269 -349
- package/dist/_internal/engine/{designer-dataset-controller-CrfOg2Ys.js → designer-dataset-controller-bSR5OB6n.js} +1512 -1348
- package/dist/_internal/engine/designer-element/api/designer-element-catalog.d.ts +2 -2
- package/dist/_internal/engine/designer-element/api/designer-element-change.d.ts +24 -0
- package/dist/_internal/engine/designer-element/api/designer-element-configuration-types.d.ts +4 -4
- package/dist/_internal/engine/designer-element/api/designer-element-fragment-save.d.ts +2 -2
- package/dist/_internal/engine/designer-element/api/designer-element-host-resource-selection.d.ts +1 -1
- package/dist/_internal/engine/designer-element/base-screen-designer-element.d.ts +21 -9
- package/dist/_internal/engine/designer-element/designer-element-public-api.d.ts +2 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-plugin-commands.d.ts +3 -3
- package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +3 -3
- package/dist/_internal/engine/designer-element/runtime/designer-element-runtime.d.ts +4 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-sample-data.d.ts +23 -0
- package/dist/_internal/engine/designer-element/runtime/designer-element-state.d.ts +7 -7
- package/dist/_internal/engine/{designer-field-primitives-KBZuWN_D.js → designer-field-primitives-C_StzrUa.js} +240 -180
- package/dist/_internal/engine/{designer-left-panel-groups-dom-N2OHOWjl.js → designer-left-panel-groups-dom-DBpI3Nc2.js} +19 -19
- package/dist/_internal/engine/{host-resource-selection-xo2mLCD4.js → host-resource-selection-BCRU23WQ.js} +446 -446
- package/dist/_internal/engine/index.js +5477 -4677
- package/dist/_internal/host-kit/index.d.ts +1 -0
- package/dist/_internal/host-kit/index.js +1 -0
- package/dist/_internal/host-kit/intent/index.d.ts +17 -0
- package/dist/_internal/host-kit/intent/index.js +14 -0
- package/dist/_internal/host-kit/intent/intent-behavior.d.ts +59 -0
- package/dist/_internal/host-kit/intent/intent-behavior.js +812 -0
- package/dist/_internal/host-kit/intent/intent-block.d.ts +66 -0
- package/dist/_internal/host-kit/intent/intent-block.js +438 -0
- package/dist/_internal/host-kit/intent/intent-catalog.d.ts +108 -0
- package/dist/_internal/host-kit/intent/intent-catalog.js +60 -0
- package/dist/_internal/host-kit/intent/intent-compile-types.d.ts +222 -0
- package/dist/_internal/host-kit/intent/intent-compile-types.js +10 -0
- package/dist/_internal/host-kit/intent/intent-compile.d.ts +35 -0
- package/dist/_internal/host-kit/intent/intent-compile.js +465 -0
- package/dist/_internal/host-kit/intent/intent-data-check.d.ts +50 -0
- package/dist/_internal/host-kit/intent/intent-data-check.js +163 -0
- package/dist/_internal/host-kit/intent/intent-data-context.d.ts +53 -0
- package/dist/_internal/host-kit/intent/intent-data-context.js +200 -0
- package/dist/_internal/host-kit/intent/intent-dataset.d.ts +52 -0
- package/dist/_internal/host-kit/intent/intent-dataset.js +125 -0
- package/dist/_internal/host-kit/intent/intent-format.d.ts +33 -0
- package/dist/_internal/host-kit/intent/intent-format.js +94 -0
- package/dist/_internal/host-kit/intent/intent-freeform.d.ts +48 -0
- package/dist/_internal/host-kit/intent/intent-freeform.js +412 -0
- package/dist/_internal/host-kit/intent/intent-kpi-bind.d.ts +29 -0
- package/dist/_internal/host-kit/intent/intent-kpi-bind.js +59 -0
- package/dist/_internal/host-kit/intent/intent-layout.d.ts +102 -0
- package/dist/_internal/host-kit/intent/intent-layout.js +264 -0
- package/dist/_internal/host-kit/intent/intent-parse.d.ts +41 -0
- package/dist/_internal/host-kit/intent/intent-parse.js +931 -0
- package/dist/_internal/host-kit/intent/intent-prepare.d.ts +55 -0
- package/dist/_internal/host-kit/intent/intent-prepare.js +156 -0
- package/dist/_internal/host-kit/intent/intent-session.d.ts +202 -0
- package/dist/_internal/host-kit/intent/intent-session.js +1001 -0
- package/dist/_internal/host-kit/intent/intent-stream.d.ts +28 -0
- package/dist/_internal/host-kit/intent/intent-stream.js +183 -0
- package/dist/_internal/host-kit/intent/intent-style.d.ts +37 -0
- package/dist/_internal/host-kit/intent/intent-style.js +77 -0
- package/dist/_internal/host-kit/intent/intent-types.d.ts +277 -0
- package/dist/_internal/host-kit/intent/intent-types.js +10 -0
- package/dist/_internal/host-kit/push-result.d.ts +1 -1
- package/dist/_internal/host-kit/push-result.js +1 -1
- package/dist/_internal/host-kit/sse-subscribe.d.ts +1 -1
- package/dist/_internal/host-kit/sse-subscribe.js +1 -1
- package/dist/_internal/host-kit/subscription-hub.d.ts +3 -3
- package/dist/_internal/host-kit/subscription-hub.js +1 -1
- package/dist/_internal/material/base-material.d.ts +3 -3
- package/dist/_internal/material/chart.js +34 -12
- package/dist/_internal/material/editor-descriptor.d.ts +3 -3
- package/dist/_internal/material/table.js +52 -21
- package/dist/_internal/plugin-core/contracts.d.ts +18 -16
- package/dist/_internal/plugin-core/contracts.js +1 -0
- package/dist/_internal/plugin-core/contribution-kind.d.ts +5 -5
- package/dist/_internal/plugin-core/contribution-kind.js +14 -6
- package/dist/_internal/plugin-core/editor/editor-descriptor-inference.d.ts +1 -1
- package/dist/_internal/plugin-core/editor/editor-descriptor-inference.js +2 -2
- package/dist/_internal/plugin-core/editor/editor-descriptor-items.d.ts +1 -1
- package/dist/_internal/plugin-core/editor/editor-descriptor-items.js +1 -1
- package/dist/_internal/plugin-core/editor/editor-descriptor-model.d.ts +2 -2
- package/dist/_internal/plugin-core/editor/editor-descriptor.js +1 -1
- package/dist/_internal/plugin-core/fragment/fragment.d.ts +4 -4
- package/dist/_internal/plugin-core/fragment/fragment.js +1 -1
- package/dist/_internal/plugin-core/material/material-manifest-fields.js +1 -1
- package/dist/_internal/plugin-core/material/material-manifest.js +1 -1
- package/dist/_internal/plugin-core/material/material-theme.d.ts +2 -2
- package/dist/_internal/plugin-core/material/material-theme.js +2 -2
- package/dist/_internal/plugin-manager/contribution-kind-plan.d.ts +5 -1
- package/dist/_internal/plugin-manager/contribution-kind-plan.js +20 -12
- package/dist/_internal/plugin-manager/manager.js +47 -30
- package/dist/_internal/plugin-manager/resolver.js +7 -13
- package/dist/_internal/plugin-manager/types.d.ts +2 -2
- package/dist/_internal/plugin-sdk/authoring-finding.d.ts +3 -3
- package/dist/_internal/plugin-sdk/fragment-audit.d.ts +6 -6
- package/dist/_internal/plugin-sdk/fragment-audit.js +8 -8
- package/dist/_internal/plugin-sdk/fragment-definition.d.ts +3 -3
- package/dist/_internal/plugin-sdk/fragment-definition.js +3 -3
- package/dist/_internal/plugin-sdk/index.d.ts +6 -0
- package/dist/_internal/plugin-sdk/index.js +6 -0
- package/dist/_internal/plugin-sdk/material-config-groups.d.ts +2 -2
- package/dist/_internal/plugin-sdk/material-definition.d.ts +5 -1
- package/dist/_internal/plugin-sdk/material-definition.js +3 -3
- package/dist/_internal/plugin-sdk/material-editor-audit.d.ts +9 -8
- package/dist/_internal/plugin-sdk/material-editor-audit.js +19 -11
- package/dist/_internal/plugin-sdk/material-isolated-csp.d.ts +38 -0
- package/dist/_internal/plugin-sdk/material-isolated-csp.js +67 -0
- package/dist/_internal/plugin-sdk/material-isolated-runtime.d.ts +22 -0
- package/dist/_internal/plugin-sdk/material-isolated-runtime.js +262 -0
- package/dist/_internal/plugin-sdk/material-isolated.d.ts +94 -0
- package/dist/_internal/plugin-sdk/material-isolated.js +1044 -0
- package/dist/_internal/plugin-sdk/material-package.d.ts +3 -3
- package/dist/_internal/plugin-sdk/material-package.js +7 -7
- package/dist/_internal/plugin-sdk/material-rendered-element.d.ts +22 -7
- package/dist/_internal/plugin-sdk/material-rendered-element.js +103 -10
- package/dist/_internal/plugin-sdk/material-spec-audit.d.ts +20 -10
- package/dist/_internal/plugin-sdk/material-spec-audit.js +108 -22
- package/dist/_internal/plugin-sdk/material-spec.d.ts +81 -16
- package/dist/_internal/plugin-sdk/material-spec.js +241 -42
- package/dist/_internal/plugin-sdk/material-style-keys.d.ts +6 -6
- package/dist/_internal/plugin-sdk/material-style-keys.js +7 -7
- package/dist/_internal/plugin-sdk/material-template-audit.d.ts +12 -0
- package/dist/_internal/plugin-sdk/material-template-audit.js +302 -0
- package/dist/_internal/plugin-sdk/material-template-expression.d.ts +98 -0
- package/dist/_internal/plugin-sdk/material-template-expression.js +549 -0
- package/dist/_internal/plugin-sdk/material-template-render.d.ts +32 -0
- package/dist/_internal/plugin-sdk/material-template-render.js +579 -0
- package/dist/_internal/plugin-sdk/material-template.d.ts +185 -0
- package/dist/_internal/plugin-sdk/material-template.js +879 -0
- package/dist/_internal/plugin-sdk/plugin-package.d.ts +2 -2
- package/dist/_internal/plugin-sdk/plugin-package.js +3 -3
- package/dist/_internal/plugin-sdk/plugin-registration.d.ts +2 -5
- package/dist/_internal/plugin-sdk/plugin-registration.js +3 -3
- package/dist/_internal/renderer/renderer/renderer-candidates.d.ts +1 -1
- package/dist/_internal/renderer/renderer/renderer-component-states.d.ts +1 -1
- package/dist/_internal/renderer/renderer/renderer-effective-style.d.ts +1 -1
- package/dist/_internal/renderer/renderer/renderer-material-dom.d.ts +1 -1
- package/dist/_internal/renderer/renderer/renderer-state.d.ts +2 -2
- package/dist/_internal/renderer/renderer/renderer-theme.d.ts +1 -1
- package/dist/_internal/renderer/renderer/renderer-types.d.ts +1 -1
- package/dist/_internal/renderer/renderer/renderer.d.ts +5 -5
- package/dist/_internal/renderer/resource/data-source-runtime.d.ts +3 -3
- package/dist/_internal/renderer/resource/push-window.d.ts +1 -1
- package/dist/_internal/renderer/resource/request-coordinator.d.ts +1 -1
- package/dist/_internal/renderer/resource/source-query-port.d.ts +3 -3
- package/dist/_internal/renderer/sub-canvas-layer.d.ts +2 -2
- package/dist/_internal/renderer/viewer/viewer-configuration.d.ts +1 -1
- package/dist/_internal/renderer/viewer/viewer.d.ts +3 -3
- package/dist/auto-register.js +10 -10
- package/dist/contracts.js +5 -5
- package/dist/contracts.js.map +1 -1
- package/dist/contrast-DRPezUIl.js +131 -0
- package/dist/contrast-DRPezUIl.js.map +1 -0
- package/dist/core.js +156 -136
- package/dist/core.js.map +1 -1
- package/dist/dataset-port-D993nOlT.js.map +1 -1
- package/dist/dataset-profile-Dk6xdtsM.js +261 -0
- package/dist/dataset-profile-Dk6xdtsM.js.map +1 -0
- package/dist/{designer-3Tb0EIDV.js → designer-DzBm8tXS.js} +2 -2
- package/dist/{designer-3Tb0EIDV.js.map → designer-DzBm8tXS.js.map} +1 -1
- package/dist/designer-auto-register.js +5 -5
- package/dist/{designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js → designer-blueprint-workbench-panel-DVvKcSvJ-CkRMBKZA.js} +452 -531
- package/dist/designer-blueprint-workbench-panel-DVvKcSvJ-CkRMBKZA.js.map +1 -0
- package/dist/{designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js → designer-dataset-controller-bSR5OB6n-DfUP24S6.js} +1355 -1191
- package/dist/designer-dataset-controller-bSR5OB6n-DfUP24S6.js.map +1 -0
- package/dist/{designer-field-primitives-KBZuWN_D-B3h4jpYe.js → designer-field-primitives-C_StzrUa-QZpcn0yX.js} +241 -181
- package/dist/designer-field-primitives-C_StzrUa-QZpcn0yX.js.map +1 -0
- package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js → designer-left-panel-groups-dom-DBpI3Nc2-D8kYJLCg.js} +18 -18
- package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js.map → designer-left-panel-groups-dom-DBpI3Nc2-D8kYJLCg.js.map} +1 -1
- package/dist/designer.js +5 -5
- package/dist/{dist-6GRboBs-.js → dist-B2bW2Tru.js} +4 -4
- package/dist/{dist-6GRboBs-.js.map → dist-B2bW2Tru.js.map} +1 -1
- package/dist/{dist-BjLjFUy1.js → dist-YCmniYuO.js} +5636 -4838
- package/dist/dist-YCmniYuO.js.map +1 -0
- package/dist/engine.js +5 -5
- package/dist/{fragment-Y6YnW6wy.js → fragment-B-oP0Fru.js} +3 -3
- package/dist/fragment-B-oP0Fru.js.map +1 -0
- package/dist/host-kit.js +4388 -187
- package/dist/host-kit.js.map +1 -1
- package/dist/{host-resource-selection-xo2mLCD4-BR5XCcim.js → host-resource-selection-BCRU23WQ-Cedz0d14.js} +208 -208
- package/dist/host-resource-selection-BCRU23WQ-Cedz0d14.js.map +1 -0
- package/dist/image-url-D6mUcjY1.js.map +1 -1
- package/dist/index.js +10 -10
- package/dist/legibility-CS28ivEz.js +12 -0
- package/dist/legibility-CS28ivEz.js.map +1 -0
- package/dist/{level-scale-BzUjE31V.js → level-scale-CwHqFEVd.js} +2 -2
- package/dist/level-scale-CwHqFEVd.js.map +1 -0
- package/dist/{manager-Ch0RTu_i.js → manager-BcvdcZjM.js} +230 -210
- package/dist/manager-BcvdcZjM.js.map +1 -0
- package/dist/{material-UbSfiuZq.js → material-ReRzBIbb.js} +2 -2
- package/dist/{material-UbSfiuZq.js.map → material-ReRzBIbb.js.map} +1 -1
- package/dist/material-auto-register.js +1 -1
- package/dist/{material-definition-BeW34dJr.js → material-definition-BcjFM-B-.js} +9 -9
- package/dist/material-definition-BcjFM-B-.js.map +1 -0
- package/dist/material-manifest-B1XatGPx.js.map +1 -1
- package/dist/material-theme-C91eus78.js.map +1 -1
- package/dist/material.js +2 -2
- package/dist/{migrate-document-D3HhCVlZ.js → migrate-document-BM888PtC.js} +2 -2
- package/dist/migrate-document-BM888PtC.js.map +1 -0
- package/dist/{parse-B1OD1teS.js → parse-1U_-Qtn4.js} +4 -4
- package/dist/parse-1U_-Qtn4.js.map +1 -0
- package/dist/{parse-AOTE9WnD.js → parse-Ji7kE9ZT.js} +9 -4
- package/dist/parse-Ji7kE9ZT.js.map +1 -0
- package/dist/{parse-parts-BNrpdG5o.js → parse-parts-qzl4suzk.js} +2 -2
- package/dist/{parse-parts-BNrpdG5o.js.map → parse-parts-qzl4suzk.js.map} +1 -1
- package/dist/{plugin-DHgh9uHh.js → plugin-BH-4oNvT.js} +63 -55
- package/dist/plugin-BH-4oNvT.js.map +1 -0
- package/dist/plugin-core.js +2 -2
- package/dist/plugin-manager.js +1 -1
- package/dist/plugin-package-Cj-3iLv3.js +4369 -0
- package/dist/plugin-package-Cj-3iLv3.js.map +1 -0
- package/dist/{plugin-registration-rsmb4GvS.js → plugin-registration-C9_IxTxc.js} +9 -9
- package/dist/{plugin-registration-rsmb4GvS.js.map → plugin-registration-C9_IxTxc.js.map} +1 -1
- package/dist/plugin-sdk.js +6 -6
- package/dist/{plugins-DGRHgREK.js → plugins-CwATlfr0.js} +2 -2
- package/dist/{plugins-DGRHgREK.js.map → plugins-CwATlfr0.js.map} +1 -1
- package/dist/plugins.js +8 -8
- package/dist/renderer.js +1 -1
- package/dist/{runtime-dispatch-BfnRDtMe.js → runtime-dispatch-C0gyIrTv.js} +2 -2
- package/dist/runtime-dispatch-C0gyIrTv.js.map +1 -0
- package/dist/runtime-simulate-aSYO9yDX.js +147 -0
- package/dist/runtime-simulate-aSYO9yDX.js.map +1 -0
- package/dist/{src-Bm7u11mN-_0u6cMEw.js → src-Bm7u11mN-DFLnFQSk.js} +39 -39
- package/dist/{src-Bm7u11mN-_0u6cMEw.js.map → src-Bm7u11mN-DFLnFQSk.js.map} +1 -1
- package/dist/state-preset-DtpygJOH.js +22 -0
- package/dist/state-preset-DtpygJOH.js.map +1 -0
- package/dist/{text-BNksUr5J.js → text-DfKom8EG.js} +88 -35
- package/dist/text-DfKom8EG.js.map +1 -0
- package/dist/theme-CcBXf4Ay.js.map +1 -1
- package/dist/{value-ref-BG_MV9C-.js → value-ref-XkLuckGV.js} +2 -2
- package/dist/{value-ref-BG_MV9C-.js.map → value-ref-XkLuckGV.js.map} +1 -1
- package/dist/{viewer-CrJupI8I-D9dVcNw4.js → viewer-CrJupI8I-CeQS58mA.js} +5 -5
- package/dist/{viewer-CrJupI8I-D9dVcNw4.js.map → viewer-CrJupI8I-CeQS58mA.js.map} +1 -1
- package/dist/viewer-auto-register.js +2 -2
- package/dist/viewer.js +2 -2
- package/dist/{viewport-CiCKeAQH.js → viewport-BNIRWjiT.js} +354 -155
- package/dist/viewport-BNIRWjiT.js.map +1 -0
- package/package.json +12 -12
- package/dist/designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js.map +0 -1
- package/dist/designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js.map +0 -1
- package/dist/designer-field-primitives-KBZuWN_D-B3h4jpYe.js.map +0 -1
- package/dist/dist-BjLjFUy1.js.map +0 -1
- package/dist/fragment-Y6YnW6wy.js.map +0 -1
- package/dist/host-resource-selection-xo2mLCD4-BR5XCcim.js.map +0 -1
- package/dist/level-scale-BzUjE31V.js.map +0 -1
- package/dist/manager-Ch0RTu_i.js.map +0 -1
- package/dist/material-definition-BeW34dJr.js.map +0 -1
- package/dist/migrate-document-D3HhCVlZ.js.map +0 -1
- package/dist/parse-AOTE9WnD.js.map +0 -1
- package/dist/parse-B1OD1teS.js.map +0 -1
- package/dist/plugin-DHgh9uHh.js.map +0 -1
- package/dist/plugin-package-Dr5ro6h6.js +0 -1221
- package/dist/plugin-package-Dr5ro6h6.js.map +0 -1
- package/dist/runtime-dispatch-BfnRDtMe.js.map +0 -1
- package/dist/text-BNksUr5J.js.map +0 -1
- package/dist/viewport-CiCKeAQH.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manager-Ch0RTu_i.js","names":["#items","compareStrings","compareStrings","#status","#snapshot","#disposePromise","#queue","#active","#handlers","#plan","#lazy","#declaredHandlers","#lazyFailures","#disposalOrder","#appendFailure","#activatePending","#ensureLazyOwner","#maps"],"sources":["../../plugin-manager/dist/contribution-command-port.js","../../plugin-manager/dist/contribution-kind-plan.js","../../plugin-manager/dist/contributions.js","../../plugin-manager/dist/diagnostics.js","../../plugin-manager/dist/input.js","../../plugin-manager/dist/registry.js","../../plugin-manager/dist/resolver.js","../../plugin-manager/dist/session.js","../../plugin-manager/dist/preflight.js","../../plugin-manager/dist/manager.js"],"sourcesContent":["export function createBaseScreenPluginContributionCommandPort(manager) {\n return Object.freeze({\n execute(request) {\n return manager.executeContributionCommand(request);\n },\n });\n}\n//# sourceMappingURL=contribution-command-port.js.map","export const CONTRIBUTION_KIND_PLAN = {\n material: {},\n command: {},\n dataResourceType: {\n index(contribution, buckets) {\n buckets.resourceTypes.set(contribution.id, contribution);\n },\n },\n blueprintAction: {\n requiresGrant: true,\n index(contribution, buckets) {\n buckets.blueprintActions.set(contribution.id, contribution);\n },\n },\n dataProcessor: {\n index(contribution, buckets) {\n buckets.dataProcessors.set(contribution.id, contribution);\n },\n },\n blueprintCapability: {\n requiresGrant: true,\n index(contribution, buckets) {\n buckets.blueprintCapabilities.add(contribution.id);\n },\n },\n panel: {},\n inspectorControl: {},\n // ADR-0100:分片是纯数据、只在作者期展开,不需要能力授权;跨插件同 id 由清单身份冲突拦截。\n fragment: {\n index(contribution, buckets) {\n buckets.fragments.set(contribution.id, contribution);\n },\n },\n};\n/**\n * 分发到对应 kind 的表项。\n *\n * 唯一的类型断言点:per-kind 的 `index` 回调按各自的贡献类型收窄,而这里的调用方只有联合类型,\n * TypeScript 无法自行关联 `contribution.kind` 与 `CONTRIBUTION_KIND_PLAN[contribution.kind]`。\n * 表本身是穷尽的,所以运行期只可能命中已声明的 kind。\n */\nexport function planForContribution(contribution) {\n return CONTRIBUTION_KIND_PLAN[contribution.kind];\n}\n/** 按计划表把一项贡献写入索引桶;未配置 `index` 的 kind 静默跳过(不参与投影)。 */\nexport function indexContribution(contribution, grantedCapabilities, buckets) {\n const plan = planForContribution(contribution);\n if (plan.index === undefined)\n return;\n if (plan.requiresGrant === true && !hasGrantedCapability(contribution, grantedCapabilities)) {\n return;\n }\n plan.index(contribution, buckets);\n}\n/** 该贡献的授权门:只有声明了 `requiredCapability` 的 kind 需要命中授权集合。 */\nfunction hasGrantedCapability(contribution, grantedCapabilities) {\n const required = contribution.requiredCapability;\n if (typeof required === 'string') {\n return grantedCapabilities.includes(required);\n }\n // blueprintCapability 以自身 id 作为能力:授权集合里出现该 id 才可见。\n return grantedCapabilities.includes(contributionIdentityId(contribution));\n}\nfunction contributionIdentityId(contribution) {\n const identity = contribution;\n return typeof identity.id === 'string' ? identity.id : '';\n}\n//# sourceMappingURL=contribution-kind-plan.js.map","import { indexContribution } from './contribution-kind-plan.js';\nexport function createRuntimeContributionIndex(plugins) {\n const buckets = {\n resourceTypes: new Map(),\n blueprintActions: new Map(),\n dataProcessors: new Map(),\n blueprintCapabilities: new Set(),\n fragments: new Map(),\n };\n for (const plugin of plugins.list()) {\n for (const contribution of plugin.contributions) {\n // 每个 kind 的投影去向与授权门由 manager 侧计划表决定,见 contribution-kind-plan.ts。\n indexContribution(contribution, plugin.grantedCapabilities, buckets);\n }\n }\n const { resourceTypes, blueprintActions, dataProcessors, blueprintCapabilities } = buckets;\n const { fragments } = buckets;\n const resourceTypeList = Object.freeze([...resourceTypes.values()].sort((first, second) => first.id.localeCompare(second.id)));\n const blueprintActionList = Object.freeze([...blueprintActions.values()].sort((first, second) => first.id.localeCompare(second.id)));\n const dataProcessorList = Object.freeze([...dataProcessors.values()].sort((first, second) => first.id.localeCompare(second.id)));\n // 分片保留插件声明顺序(不按 id 排序):物料库按插件作者给的顺序展示推荐组合。\n const fragmentList = Object.freeze([...fragments.values()]);\n return Object.freeze({\n getResourceType(resourceType) {\n return resourceTypes.get(resourceType);\n },\n hasBlueprintCapability(capability) {\n return blueprintCapabilities.has(capability);\n },\n listResourceTypes() {\n return resourceTypeList;\n },\n getBlueprintAction(actionId) {\n return blueprintActions.get(actionId);\n },\n listBlueprintActions() {\n return blueprintActionList;\n },\n getDataProcessor(processorId) {\n return dataProcessors.get(processorId);\n },\n listDataProcessors() {\n return dataProcessorList;\n },\n getFragment(fragmentId) {\n return fragments.get(fragmentId);\n },\n listFragments() {\n return fragmentList;\n },\n });\n}\n//# sourceMappingURL=contributions.js.map","import { sortScreenDiagnostics, } from '@base-screen/contracts';\nconst MAX_DIAGNOSTICS = 100;\nexport class DiagnosticCollector {\n #items = [];\n add(code, path, message) {\n if (this.#items.length < MAX_DIAGNOSTICS) {\n this.#items.push({ severity: 'error', code, path, message });\n }\n }\n get hasErrors() {\n return this.#items.length > 0;\n }\n get items() {\n return this.#items;\n }\n failure() {\n return { ok: false, diagnostics: sortDiagnostics(this.#items) };\n }\n}\nexport function failure(code, path, message) {\n return { ok: false, diagnostics: sortDiagnostics([{ severity: 'error', code, path, message }]) };\n}\nexport function sortDiagnostics(diagnostics) {\n const sorted = sortScreenDiagnostics(diagnostics);\n return sorted.length < MAX_DIAGNOSTICS\n ? sorted\n : [\n ...sorted.slice(0, MAX_DIAGNOSTICS - 1),\n {\n severity: 'error',\n code: 'DIAGNOSTIC_LIMIT_REACHED',\n path: [],\n message: 'Too many validation errors; further diagnostics were suppressed.',\n },\n ];\n}\n//# sourceMappingURL=diagnostics.js.map","import { DiagnosticCollector } from './diagnostics.js';\nconst MAX_PLUGINS = 128;\nconst MAX_STANDALONE_MATERIALS = 512;\nexport function snapshotManagerInput(options) {\n const diagnostics = new DiagnosticCollector();\n if (!isObject(options)) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_NOT_OBJECT', [], 'Manager options must be an object.');\n return diagnostics.failure();\n }\n try {\n const values = readOptions(options, diagnostics);\n if (values === undefined)\n return diagnostics.failure();\n const standaloneMaterialTagNames = readStringArray(values.standaloneMaterialTagNames, ['standaloneMaterialTagNames'], MAX_STANDALONE_MATERIALS, diagnostics);\n const runtimes = readArray(values.plugins, ['plugins'], MAX_PLUGINS, diagnostics);\n const grantedCapabilities = snapshotGrants(values.grantedCapabilities, diagnostics);\n const registry = snapshotRegistry(values.registry, diagnostics);\n const instanceId = values.instanceId;\n if (typeof instanceId !== 'string' || instanceId.length === 0 || instanceId.length > 128) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_INVALID', ['instanceId'], 'Instance id is invalid.');\n }\n if (values.createCommandPort !== undefined && typeof values.createCommandPort !== 'function') {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['createCommandPort'], 'Command port factory is invalid.');\n }\n if (values.createDesignReadPort !== undefined &&\n typeof values.createDesignReadPort !== 'function') {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['createDesignReadPort'], 'Design read port factory is invalid.');\n }\n const activation = values.activation === undefined || values.activation === 'eager' ? 'eager' : 'lazy';\n if (values.activation !== undefined && activation !== values.activation) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['activation'], 'Activation must be \"eager\" or \"lazy\".');\n }\n if (diagnostics.hasErrors ||\n standaloneMaterialTagNames === undefined ||\n runtimes === undefined ||\n grantedCapabilities === undefined ||\n registry === undefined) {\n return diagnostics.failure();\n }\n return {\n ok: true,\n value: Object.freeze({\n instanceId: instanceId,\n standaloneMaterialTagNames: Object.freeze(standaloneMaterialTagNames),\n runtimes: Object.freeze(runtimes),\n grantedCapabilities,\n registry: registry.value,\n registryGet: registry.get,\n createCommandPort: values.createCommandPort,\n createDesignReadPort: values.createDesignReadPort,\n activation,\n }),\n diagnostics: [],\n };\n }\n catch {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', [], 'Manager options cannot be safely read.');\n return diagnostics.failure();\n }\n}\nfunction readOptions(value, diagnostics) {\n const fields = [\n 'instanceId',\n 'standaloneMaterialTagNames',\n 'plugins',\n 'grantedCapabilities',\n 'registry',\n ];\n const values = {};\n for (const field of fields) {\n const descriptor = Object.getOwnPropertyDescriptor(value, field);\n if (descriptor === undefined || !Object.hasOwn(descriptor, 'value')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', [field], 'Manager option must be an own data property.');\n }\n else {\n values[field] = descriptor.value;\n }\n }\n // 可选工厂:缺键即无端口,与显式 undefined 同义;能力门控已负责拒绝无工厂的\n // command.execute 与 design.read。\n const readCommandPort = Object.getOwnPropertyDescriptor(value, 'createCommandPort');\n if (readCommandPort !== undefined && !Object.hasOwn(readCommandPort, 'value')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['createCommandPort'], 'Manager option must be an own data property.');\n }\n else {\n values.createCommandPort = readCommandPort?.value;\n }\n const readPort = Object.getOwnPropertyDescriptor(value, 'createDesignReadPort');\n if (readPort !== undefined && !Object.hasOwn(readPort, 'value')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['createDesignReadPort'], 'Manager option must be an own data property.');\n }\n else {\n values.createDesignReadPort = readPort?.value;\n }\n const readActivation = Object.getOwnPropertyDescriptor(value, 'activation');\n if (readActivation !== undefined && !Object.hasOwn(readActivation, 'value')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['activation'], 'Manager option must be an own data property.');\n }\n else {\n values.activation = readActivation?.value;\n }\n return diagnostics.hasErrors\n ? undefined\n : values;\n}\nfunction snapshotGrants(value, diagnostics) {\n if (!isObject(value)) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['grantedCapabilities'], 'Granted capabilities must be an object.');\n return undefined;\n }\n const grants = new Map();\n for (const pluginId of Object.getOwnPropertyNames(value)) {\n const descriptor = Object.getOwnPropertyDescriptor(value, pluginId);\n if (descriptor === undefined || !Object.hasOwn(descriptor, 'value')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['grantedCapabilities', pluginId], 'Capability grant must be data.');\n continue;\n }\n const capabilities = readStringArray(descriptor.value, ['grantedCapabilities', pluginId], 128, diagnostics);\n if (capabilities !== undefined)\n grants.set(pluginId, Object.freeze(capabilities.sort(compareStrings)));\n }\n return diagnostics.hasErrors ? undefined : grants;\n}\nfunction snapshotRegistry(value, diagnostics) {\n if (!isObject(value)) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['registry'], 'Registry port is invalid.');\n return undefined;\n }\n const descriptor = Object.getOwnPropertyDescriptor(value, 'get');\n if (descriptor === undefined || typeof descriptor.value !== 'function') {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['registry'], 'Registry port is invalid.');\n return undefined;\n }\n return { value: value, get: descriptor.value.bind(value) };\n}\nfunction readStringArray(value, path, limit, diagnostics) {\n const values = readArray(value, path, limit, diagnostics);\n if (values === undefined)\n return undefined;\n if (values.some((item) => typeof item !== 'string')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', path, 'Expected a string array.');\n return undefined;\n }\n return values;\n}\nfunction readArray(value, path, limit, diagnostics) {\n if (!Array.isArray(value)) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', path, 'Expected an array.');\n return undefined;\n }\n if (value.length > limit) {\n diagnostics.add('PLUGIN_CORE_LIMIT_EXCEEDED', path, 'Candidate limit exceeded.');\n return undefined;\n }\n const values = [];\n for (let index = 0; index < value.length; index++) {\n const descriptor = Object.getOwnPropertyDescriptor(value, String(index));\n if (descriptor === undefined || !Object.hasOwn(descriptor, 'value')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', [...path, index], 'Array item must be data.');\n continue;\n }\n values.push(descriptor.value);\n }\n return diagnostics.hasErrors ? undefined : values;\n}\nfunction isObject(value) {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\nfunction compareStrings(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n//# sourceMappingURL=input.js.map","import { parseBaseScreenMaterialManifest } from '@base-screen/plugin-core';\nimport { DiagnosticCollector } from './diagnostics.js';\nexport function inspectMaterialRegistry(input, candidates, diagnostics) {\n const requirements = createRequirements(input, candidates);\n const byTag = new Map();\n const byType = new Map();\n for (const requirement of requirements) {\n const constructor = queryConstructor(input, requirement, diagnostics);\n if (constructor === undefined)\n continue;\n const priorConstructor = byTag.get(requirement.tagName);\n if (priorConstructor !== undefined && priorConstructor !== constructor) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_CONFLICT', requirement.path, 'Material tag resolves to different constructors.');\n continue;\n }\n byTag.set(requirement.tagName, constructor);\n const manifest = readManifest(constructor, requirement, diagnostics);\n if (manifest === undefined)\n continue;\n if (manifest.tagName !== requirement.tagName ||\n (requirement.type !== undefined && manifest.type !== requirement.type)) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_CONFLICT', requirement.path, 'Material contribution does not match constructor manifest.');\n continue;\n }\n const adapter = readTabularDataAdapter(constructor, requirement, diagnostics);\n if (adapter === null)\n continue;\n const entry = {\n manifest,\n constructor,\n ...(adapter === undefined ? {} : { tabularDataAdapter: adapter }),\n };\n const priorEntry = byType.get(manifest.type);\n if (priorEntry !== undefined &&\n (priorEntry.constructor !== constructor || priorEntry.manifest.tagName !== manifest.tagName)) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_CONFLICT', requirement.path, 'Material type conflicts with another candidate.');\n continue;\n }\n byType.set(manifest.type, entry);\n }\n return [...byType.values()];\n}\nexport function inspectPluginPanels(candidates, registryGet, diagnostics) {\n const byId = new Map();\n const tagOwners = new Map();\n for (const candidate of candidates) {\n for (let index = 0; index < candidate.manifest.contributions.length; index++) {\n const contribution = candidate.manifest.contributions[index];\n if (contribution.kind !== 'panel')\n continue;\n const path = ['plugins', candidate.index, 'manifest', 'contributions', index];\n const constructor = queryAuthorizedConstructor(registryGet, contribution.tagName, path, diagnostics, 'Panel tag is not registered.');\n if (constructor === undefined)\n continue;\n const priorOwner = tagOwners.get(contribution.tagName);\n if (priorOwner !== undefined && priorOwner !== contribution.id) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_CONFLICT', path, 'Panel tag resolves to a different panel.');\n continue;\n }\n tagOwners.set(contribution.tagName, contribution.id);\n byId.set(contribution.id, {\n pluginId: candidate.manifest.id,\n contribution,\n constructor: constructor,\n });\n }\n }\n return [...byId.values()];\n}\nexport function inspectInspectorControls(candidates, registryGet, diagnostics) {\n const byId = new Map();\n const tagOwners = new Map();\n for (const candidate of candidates) {\n for (let index = 0; index < candidate.manifest.contributions.length; index++) {\n const contribution = candidate.manifest.contributions[index];\n if (contribution.kind !== 'inspectorControl')\n continue;\n const path = ['plugins', candidate.index, 'manifest', 'contributions', index];\n const constructor = queryAuthorizedConstructor(registryGet, contribution.tagName, path, diagnostics, 'Inspector control tag is not registered.');\n if (constructor === undefined)\n continue;\n const priorOwner = tagOwners.get(contribution.tagName);\n if (priorOwner !== undefined && priorOwner !== contribution.id) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_CONFLICT', path, 'Inspector control tag resolves to a different control.');\n continue;\n }\n tagOwners.set(contribution.tagName, contribution.id);\n byId.set(contribution.id, {\n pluginId: candidate.manifest.id,\n contribution,\n constructor: constructor,\n });\n }\n }\n return [...byId.values()];\n}\n/**\n * 宿主 registry 是唯一来源:描述里出现的 tagName 若未被某个 inspectorControl 贡献声明并\n * 解析成功,就永远不会进入目录,Engine 也就拿不到它的构造函数。\n */\nfunction queryAuthorizedConstructor(registryGet, tagName, path, diagnostics, notRegisteredMessage) {\n let value;\n try {\n value = registryGet(tagName);\n }\n catch {\n diagnostics.add('PLUGIN_CORE_IDENTITY_INVALID', path, 'Registry query failed.');\n return undefined;\n }\n if (typeof value !== 'function') {\n diagnostics.add('PLUGIN_CORE_IDENTITY_INVALID', path, notRegisteredMessage);\n return undefined;\n }\n return value;\n}\nfunction readTabularDataAdapter(constructor, requirement, diagnostics) {\n try {\n const descriptor = Object.getOwnPropertyDescriptor(constructor, 'tabularDataAdapter');\n if (descriptor === undefined)\n return undefined;\n if (!Object.hasOwn(descriptor, 'value') ||\n descriptor.value === null ||\n typeof descriptor.value !== 'object' ||\n typeof descriptor.value.adapt !== 'function') {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', requirement.path, 'Material dataset adapter is invalid.');\n return null;\n }\n return descriptor.value;\n }\n catch {\n diagnostics.add('PLUGIN_CORE_IDENTITY_INVALID', requirement.path, 'Material dataset adapter cannot be safely read.');\n return null;\n }\n}\nfunction createRequirements(input, candidates) {\n const standalone = input.standaloneMaterialTagNames.map((tagName, index) => ({\n tagName,\n type: undefined,\n path: ['standaloneMaterialTagNames', index],\n }));\n const contributions = candidates.flatMap((candidate) => candidate.manifest.contributions.flatMap((contribution, index) => contribution.kind === 'material'\n ? [\n {\n tagName: contribution.tagName,\n type: contribution.type,\n path: ['plugins', candidate.index, 'manifest', 'contributions', index],\n },\n ]\n : []));\n return [...standalone, ...contributions].sort((left, right) => {\n const byTag = compareStrings(left.tagName, right.tagName);\n if (byTag !== 0)\n return byTag;\n return compareStrings(left.type ?? '', right.type ?? '');\n });\n}\nfunction queryConstructor(input, requirement, diagnostics) {\n try {\n const value = input.registryGet(requirement.tagName);\n if (typeof value !== 'function') {\n diagnostics.add('PLUGIN_CORE_IDENTITY_INVALID', requirement.path, 'Material tag is not registered.');\n return undefined;\n }\n return value;\n }\n catch {\n diagnostics.add('PLUGIN_CORE_IDENTITY_INVALID', requirement.path, 'Registry query failed.');\n return undefined;\n }\n}\nfunction readManifest(constructor, requirement, diagnostics) {\n try {\n const descriptor = Object.getOwnPropertyDescriptor(constructor, 'manifest');\n if (descriptor === undefined || !Object.hasOwn(descriptor, 'value')) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', requirement.path, 'Material constructor manifest is invalid.');\n return undefined;\n }\n const parsed = parseBaseScreenMaterialManifest(descriptor.value);\n if (!parsed.ok) {\n for (const item of parsed.diagnostics) {\n diagnostics.add(item.code, [...requirement.path, ...item.path], item.message);\n }\n return undefined;\n }\n return parsed.value;\n }\n catch {\n diagnostics.add('PLUGIN_CORE_IDENTITY_INVALID', requirement.path, 'Material constructor cannot be safely read.');\n return undefined;\n }\n}\nfunction compareStrings(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n//# sourceMappingURL=registry.js.map","import { SCREEN_BLUEPRINT_CAPABILITY_IDS } from '@base-screen/contracts';\nimport { contributionCapabilityField, contributionIdentity } from '@base-screen/plugin-core';\nimport { DiagnosticCollector } from './diagnostics.js';\nconst MAX_DEPENDENCY_EDGES = 16_384;\nexport const PLUGIN_CAPABILITY_DESCRIPTORS = Object.freeze([\n { id: 'command.execute', port: 'command' },\n { id: 'design.read', port: 'design' },\n // ADR-0076:插件参与文档的运行时语义。这两项都是**宿主→插件**方向(宿主/引擎发起请求,\n // manager 路由到插件自己的 handler),不要求宿主为插件提供任何端口,因此无工厂——\n // 它们只标记\"该插件声明的处理器/动作可被执行\"。\n { id: 'data.process' },\n { id: 'blueprint.action.execute' },\n // 蓝图能力 id 的唯一来源在 contracts:engine 需据同一词汇归一化规则能力,\n // 两侧各自硬编码会在漂移时静默授权失败。\n ...SCREEN_BLUEPRINT_CAPABILITY_IDS.map((id) => ({ id, blueprint: true })),\n]);\nconst CAPABILITY_TABLE = new Map(PLUGIN_CAPABILITY_DESCRIPTORS.map((item) => [item.id, item]));\n/**\n * 解析幸存候选:重复 id 按稳定顺序 first-wins(后声明方获得诊断并被排除出图),\n * 依赖缺失/成环只标记对应候选,不再整体熔断——调用方按诊断归属淘汰插件后重入,\n * 直到幸存集合稳定。返回值是当前幸存集的拓扑序(可能只包含一部分候选)。\n */\nexport function resolveCandidates(candidates, diagnostics) {\n const ordered = [...candidates].sort(compareCandidates);\n const byId = new Map();\n const deduped = [];\n for (const candidate of ordered) {\n if (byId.has(candidate.manifest.id)) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_CONFLICT', ['plugins', candidate.index, 'manifest', 'id'], 'Plugin id is duplicated.');\n continue;\n }\n byId.set(candidate.manifest.id, candidate);\n deduped.push(candidate);\n }\n validateContributions(deduped, diagnostics);\n let edgeCount = 0;\n const remaining = new Map();\n const dependencyCount = new Map();\n const dependents = new Map();\n const unresolvedDeps = new Set();\n for (const candidate of deduped) {\n remaining.set(candidate.manifest.id, candidate);\n let count = 0;\n for (const dependency of candidate.manifest.dependencies) {\n edgeCount++;\n const resolved = byId.get(dependency.id);\n if (resolved === undefined) {\n diagnostics.add('PLUGIN_CORE_DEPENDENCY_MISSING', ['plugins', candidate.index, 'manifest', 'dependencies'], 'Plugin dependency is missing from the candidate set.');\n unresolvedDeps.add(candidate.manifest.id);\n continue;\n }\n count++;\n const list = dependents.get(dependency.id) ?? [];\n list.push(candidate.manifest.id);\n dependents.set(dependency.id, list);\n }\n dependencyCount.set(candidate.manifest.id, count);\n }\n if (edgeCount > MAX_DEPENDENCY_EDGES) {\n diagnostics.add('PLUGIN_CORE_LIMIT_EXCEEDED', ['plugins'], 'Dependency edge limit exceeded.');\n }\n const resolved = [];\n const ready = deduped.filter((candidate) => dependencyCount.get(candidate.manifest.id) === 0 &&\n !unresolvedDeps.has(candidate.manifest.id));\n while (ready.length > 0) {\n const current = ready.shift();\n if (!remaining.delete(current.manifest.id))\n continue;\n resolved.push(current);\n for (const dependentId of dependents.get(current.manifest.id) ?? []) {\n const nextCount = dependencyCount.get(dependentId) - 1;\n dependencyCount.set(dependentId, nextCount);\n const dependent = remaining.get(dependentId);\n if (nextCount === 0 && dependent !== undefined && !unresolvedDeps.has(dependentId)) {\n ready.push(dependent);\n ready.sort(compareCandidates);\n }\n }\n }\n for (const candidate of [...remaining.values()].sort(compareCandidates)) {\n if (unresolvedDeps.has(candidate.manifest.id))\n continue;\n diagnostics.add('PLUGIN_CORE_DEPENDENCY_CYCLE', ['plugins', candidate.index, 'manifest', 'dependencies'], 'Plugin dependency graph contains a cycle.');\n }\n return resolved;\n}\nexport function validateCapabilityPlan(candidates, input, diagnostics) {\n const grants = new Map();\n for (const candidate of candidates) {\n const hostGrants = new Set(input.grantedCapabilities.get(candidate.manifest.id) ?? []);\n const granted = [];\n for (const capability of candidate.manifest.capabilities) {\n const descriptor = CAPABILITY_TABLE.get(capability);\n if (!hostGrants.has(capability)) {\n diagnostics.add('PLUGIN_CORE_CAPABILITY_UNAUTHORIZED', ['plugins', candidate.index, 'manifest', 'capabilities'], 'Plugin capability is not approved by the host.');\n }\n else if (descriptor === undefined) {\n diagnostics.add('PLUGIN_CORE_CAPABILITY_INCOMPATIBLE', ['plugins', candidate.index, 'manifest', 'capabilities'], 'Plugin capability is not supported by this host.');\n }\n else if (descriptor.port !== undefined && !hasPortFactory(input, descriptor.port)) {\n diagnostics.add('PLUGIN_CORE_CAPABILITY_INCOMPATIBLE', ['plugins', candidate.index, 'manifest', 'capabilities'], 'Plugin capability has no compatible port factory.');\n }\n else {\n granted.push(capability);\n }\n }\n grants.set(candidate, Object.freeze(granted.sort(compareStrings)));\n }\n return grants;\n}\nfunction hasPortFactory(input, port) {\n switch (port) {\n case 'command':\n return input.createCommandPort !== undefined;\n case 'design':\n return input.createDesignReadPort !== undefined;\n }\n}\nfunction validateContributions(candidates, diagnostics) {\n const identities = new Set();\n for (const candidate of candidates) {\n const capabilities = candidate.manifest.capabilities;\n for (let index = 0; index < candidate.manifest.contributions.length; index++) {\n const contribution = candidate.manifest.contributions[index];\n const path = ['plugins', candidate.index, 'manifest', 'contributions', index];\n const identity = contributionIdentity(contribution);\n if (identity === undefined)\n continue;\n if (identities.has(identity)) {\n diagnostics.add(contribution.kind === 'material'\n ? 'PLUGIN_CORE_IDENTITY_CONFLICT'\n : 'PLUGIN_CORE_CONTRIBUTION_CONFLICT', path, 'Contribution identity conflicts with another plugin.');\n }\n identities.add(identity);\n // 哪些 kind 必须把能力写进清单 `capabilities`,由 plugin-core 的贡献类型描述符回答;\n // 这里只读取答案。命令与蓝图动作共用同一条声明门,不再各自持有 kind 清单。\n const capabilityField = contributionCapabilityField(contribution.kind);\n if (capabilityField !== undefined) {\n const declared = contribution[capabilityField];\n if (typeof declared === 'string' && !capabilities.includes(declared)) {\n diagnostics.add('PLUGIN_CORE_CAPABILITY_UNDECLARED', path, 'Contribution requires an undeclared capability.');\n }\n }\n if (contribution.kind === 'blueprintCapability') {\n if (CAPABILITY_TABLE.get(contribution.id)?.blueprint !== true) {\n diagnostics.add('PLUGIN_CORE_CONTRIBUTION_UNKNOWN', path, 'Blueprint contribution is not supported by this host.');\n }\n if (!capabilities.includes(contribution.id)) {\n diagnostics.add('PLUGIN_CORE_CAPABILITY_UNDECLARED', path, 'Blueprint contribution requires a declared capability.');\n }\n }\n }\n }\n}\nfunction compareCandidates(left, right) {\n return compareStrings(left.manifest.id, right.manifest.id) || left.index - right.index;\n}\nfunction compareStrings(left, right) {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n//# sourceMappingURL=resolver.js.map","import { failure } from './diagnostics.js';\nexport function createActivationSession(input, candidate, grantedCapabilities) {\n let valid = true;\n const commandPort = grantedCapabilities.includes('command.execute')\n ? createCommandPort(input, candidate, () => valid)\n : undefined;\n const designReadPort = grantedCapabilities.includes('design.read')\n ? createDesignReadPort(input, candidate, () => valid)\n : undefined;\n return {\n context: Object.freeze({\n instanceId: input.instanceId,\n pluginId: candidate.manifest.id,\n grantedCapabilities: Object.freeze([...grantedCapabilities]),\n commandPort,\n designReadPort,\n }),\n isValid() {\n return valid;\n },\n invalidate() {\n valid = false;\n },\n };\n}\nfunction createCommandPort(input, candidate, isValid) {\n const port = input.createCommandPort({\n instanceId: input.instanceId,\n pluginId: candidate.manifest.id,\n });\n if (port === null ||\n typeof port !== 'object' ||\n typeof Object.getOwnPropertyDescriptor(port, 'execute')?.value !== 'function') {\n throw new TypeError('Command port factory returned an invalid port.');\n }\n const execute = Object.getOwnPropertyDescriptor(port, 'execute')\n .value;\n return Object.freeze({\n async execute(request) {\n if (!isValid()) {\n return failure('PLUGIN_CORE_SESSION_INVALID', [], 'Plugin activation session is no longer valid.');\n }\n return execute.call(port, request);\n },\n });\n}\nfunction createDesignReadPort(input, candidate, isValid) {\n const port = input.createDesignReadPort({\n instanceId: input.instanceId,\n pluginId: candidate.manifest.id,\n });\n if (port === null ||\n typeof port !== 'object' ||\n typeof Object.getOwnPropertyDescriptor(port, 'read')?.value !== 'function') {\n throw new TypeError('Design read port factory returned an invalid port.');\n }\n const read = Object.getOwnPropertyDescriptor(port, 'read').value;\n return Object.freeze({\n async read() {\n if (!isValid()) {\n return failure('PLUGIN_CORE_SESSION_INVALID', [], 'Plugin activation session is no longer valid.');\n }\n return read.call(port);\n },\n });\n}\n//# sourceMappingURL=session.js.map","import { sortScreenDiagnostics, } from '@base-screen/contracts';\nimport { parseBaseScreenPluginManifest, readContributionHandlerRecord, } from '@base-screen/plugin-core';\nimport { DiagnosticCollector } from './diagnostics.js';\nimport { snapshotManagerInput } from './input.js';\nimport { inspectInspectorControls, inspectMaterialRegistry, inspectPluginPanels, } from './registry.js';\nimport { resolveCandidates, validateCapabilityPlan } from './resolver.js';\nimport { createActivationSession } from './session.js';\n/**\n * 激活计划:全局门(输入快照、宿主自营物料、不可归因的配置错误)失败关闭;\n * 可归因到单个插件的失败只排除该插件——幂等收敛直到幸存集合稳定,\n * 跨插件冲突按稳定顺序 first-wins,后声明方失败,依赖失败级联排除。\n */\nexport function createActivationPlan(options) {\n const input = snapshotManagerInput(options);\n if (!input.ok)\n return input;\n const parseCollector = new DiagnosticCollector();\n const parsed = parsePluginCandidates(input.value.runtimes, parseCollector);\n let survivors = parsed.candidates;\n const failures = [\n ...withPluginIdentities(attributeByPlugin(parseCollector.items), parsed.identities),\n ];\n // 收敛循环:每一轮只会淘汰插件,淘汰后其依赖方级联失败,直到没有新的排除。\n for (;;) {\n const round = new DiagnosticCollector();\n const ordered = resolveCandidates(survivors, round);\n const grants = validateCapabilityPlan(ordered, input.value, round);\n const materials = inspectMaterialRegistry(input.value, ordered, round);\n const panels = inspectPluginPanels(ordered, input.value.registryGet, round);\n const inspectorControls = inspectInspectorControls(ordered, input.value.registryGet, round);\n const global = attributeGlobal(round.items);\n if (global.length > 0) {\n return {\n ok: false,\n diagnostics: sortAll([...failures.flatMap((item) => item.diagnostics), ...global]),\n };\n }\n const attributed = attributeByPlugin(round.items);\n const excludedIndexes = new Set(attributed.map((failure) => failure.index));\n if (excludedIndexes.size === 0) {\n return {\n ok: true,\n value: {\n materials,\n panels,\n inspectorControls,\n activation: input.value.activation,\n failures: sortFailures(withPluginIdentities(failures, parsed.identities)),\n plugins: ordered.map((candidate) => {\n const grantedCapabilities = grants.get(candidate);\n return Object.freeze({\n ...candidate,\n grantedCapabilities,\n createSession: () => createActivationSession(input.value, candidate, grantedCapabilities),\n });\n }),\n },\n diagnostics: [],\n };\n }\n failures.push(...attributed);\n survivors = survivors.filter((candidate) => !excludedIndexes.has(candidate.index));\n }\n}\nfunction attributeByPlugin(diagnostics) {\n const byIndex = new Map();\n for (const item of diagnostics) {\n const index = pluginIndexAt(item.path);\n if (index === undefined)\n continue;\n const list = byIndex.get(index) ?? [];\n list.push(item);\n byIndex.set(index, list);\n }\n return [...byIndex.entries()]\n .map(([index, items]) => ({\n index,\n pluginId: '',\n diagnostics: sortAll(items),\n }))\n .sort((first, second) => first.index - second.index);\n}\n/** 把失败记录的 pluginId 用已知身份回填:清单已解析的插件才拥有身份。 */\nfunction withPluginIdentities(failures, identities) {\n return failures.map((failure) => {\n if (failure.pluginId !== '')\n return failure;\n const pluginId = identities.get(failure.index);\n return pluginId === undefined ? failure : { ...failure, pluginId };\n });\n}\nfunction attributeGlobal(diagnostics) {\n return diagnostics.filter((item) => pluginIndexAt(item.path) === undefined);\n}\nfunction pluginIndexAt(path) {\n if (path[0] !== 'plugins')\n return undefined;\n const index = path[1];\n return typeof index === 'number' ? index : undefined;\n}\nfunction sortFailures(failures) {\n return [...failures].sort((first, second) => first.index - second.index);\n}\nfunction sortAll(diagnostics) {\n return sortScreenDiagnostics(diagnostics);\n}\nfunction parsePluginCandidates(runtimes, diagnostics) {\n const candidates = [];\n const identities = new Map();\n for (let index = 0; index < runtimes.length; index++) {\n try {\n const runtime = runtimes[index];\n if (runtime === null || typeof runtime !== 'object' || Array.isArray(runtime)) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['plugins', index], 'Plugin runtime must be an object.');\n continue;\n }\n const manifest = readOwnValue(runtime, 'manifest');\n const activate = readOwnValue(runtime, 'activate');\n const deactivate = readOwnValue(runtime, 'deactivate');\n const dispose = readOwnValue(runtime, 'dispose');\n const commandsValue = readOwnValue(runtime, 'commands');\n const blueprintActionsValue = readOwnValue(runtime, 'blueprintActions');\n const dataProcessorsValue = readOwnValue(runtime, 'dataProcessors');\n if (manifest === undefined ||\n activate === undefined ||\n deactivate === undefined ||\n dispose === undefined) {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['plugins', index], 'Plugin runtime must use own data properties.');\n continue;\n }\n if (typeof activate !== 'function' ||\n typeof deactivate !== 'function' ||\n typeof dispose !== 'function') {\n diagnostics.add('PLUGIN_CORE_LIFECYCLE_INVALID', ['plugins', index], 'Plugin runtime lifecycle is invalid.');\n continue;\n }\n const parsed = parseBaseScreenPluginManifest(manifest);\n if (!parsed.ok) {\n for (const item of parsed.diagnostics) {\n diagnostics.add(item.code, ['plugins', index, 'manifest', ...item.path], item.message);\n }\n continue;\n }\n if (!areEqual(manifest, parsed.value)) {\n diagnostics.add('PLUGIN_CORE_IDENTITY_CONFLICT', ['plugins', index, 'manifest'], 'Plugin runtime manifest differs from canonical manifest.');\n continue;\n }\n identities.set(index, parsed.value.id);\n const commands = readCommandHandlers(commandsValue, parsed.value, index, diagnostics);\n if (commands === undefined)\n continue;\n const blueprintActions = readBlueprintActionHandlers(blueprintActionsValue, parsed.value, index, diagnostics);\n if (blueprintActions === undefined)\n continue;\n const dataProcessors = readDataProcessorHandlers(dataProcessorsValue, parsed.value, index, diagnostics);\n if (dataProcessors === undefined)\n continue;\n candidates.push({\n index,\n runtime: runtime,\n manifest: parsed.value,\n activate: activate,\n deactivate: deactivate,\n dispose: dispose,\n commands,\n blueprintActions,\n dataProcessors,\n });\n }\n catch {\n diagnostics.add('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['plugins', index], 'Plugin runtime cannot be safely read.');\n }\n }\n return { candidates, identities };\n}\nfunction readOwnValue(value, key) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n return descriptor !== undefined && Object.hasOwn(descriptor, 'value')\n ? descriptor.value\n : undefined;\n}\n/**\n * 校验\"声明 ↔ handler\"一一对应并把 handler 收进 Map。\n *\n * command / blueprintAction / dataProcessor 三者规则完全相同(缺 handler、多 handler 都失败\n * 关闭),因此共用一份实现:`kind` 决定从清单里取哪类声明的 id,`field` 是诊断路径用的\n * runtime 字段名。\n */\nfunction readContributionHandlers(value, manifest, pluginIndex, diagnostics, kind, field) {\n const result = readContributionHandlerRecord({\n kind,\n manifest,\n field,\n value,\n pathPrefix: ['plugins', pluginIndex],\n });\n for (const item of result.diagnostics) {\n diagnostics.add(item.code, item.path, item.message);\n }\n return result.handlers;\n}\nfunction readCommandHandlers(value, manifest, pluginIndex, diagnostics) {\n return readContributionHandlers(value, manifest, pluginIndex, diagnostics, 'command', 'commands');\n}\nfunction readBlueprintActionHandlers(value, manifest, pluginIndex, diagnostics) {\n return readContributionHandlers(value, manifest, pluginIndex, diagnostics, 'blueprintAction', 'blueprintActions');\n}\nfunction readDataProcessorHandlers(value, manifest, pluginIndex, diagnostics) {\n return readContributionHandlers(value, manifest, pluginIndex, diagnostics, 'dataProcessor', 'dataProcessors');\n}\n/**\n * 运行时清单与其规范化结果的自有数据属性相等。\n *\n * 有意不复用 contracts 的 `screenJsonEquals`:那条是 JSON 结构相等(读 `Object.keys` 可枚举键、\n * 取值经属性访问会触发 getter),而这里要回答的是\"作者写的运行时对象是否逐属性等于规范化结果\"。\n * 因此只读自有**数据**属性(getter 视为不存在)并纳入不可枚举键——getter 或不可枚举成员\n * 不能冒充匹配。\n */\nfunction areEqual(left, right) {\n if (Object.is(left, right))\n return true;\n if (left === null || right === null || typeof left !== 'object' || typeof right !== 'object')\n return false;\n try {\n const leftKeys = Object.getOwnPropertyNames(left).sort();\n const rightKeys = Object.getOwnPropertyNames(right).sort();\n if (leftKeys.length !== rightKeys.length ||\n leftKeys.some((key, index) => key !== rightKeys[index])) {\n return false;\n }\n return leftKeys.every((key) => {\n const leftValue = readOwnValue(left, key);\n const rightValue = readOwnValue(right, key);\n return leftValue !== undefined && rightValue !== undefined && areEqual(leftValue, rightValue);\n });\n }\n catch {\n return false;\n }\n}\n//# sourceMappingURL=preflight.js.map","import { contributionHandlerField, createBaseScreenMaterialCatalog, createBaseScreenPluginCatalog, createBaseScreenPluginInspectorControlCatalog, createBaseScreenPluginPanelCatalog, declaredContributionIds, listContributionHandlerKinds, parsePluginCommandRequest, } from '@base-screen/plugin-core';\nimport { CONTRIBUTION_KIND_PLAN } from './contribution-kind-plan.js';\nimport { createRuntimeContributionIndex } from './contributions.js';\nimport { failure, sortDiagnostics } from './diagnostics.js';\nimport { createActivationPlan, } from './preflight.js';\nexport function createBaseScreenPluginManager(options) {\n return new PluginManager(options);\n}\nclass PluginManager {\n options;\n #status = 'inactive';\n #snapshot;\n #active = [];\n #disposalOrder = [];\n #handlers = new ContributionHandlerRegistry();\n #disposePromise;\n #queue = Promise.resolve();\n // 懒激活状态:activate() 只完成预检与目录发布;插件钩子推迟到首次使用。\n #plan;\n #lazy = false;\n #declaredHandlers = createDeclaredHandlerOwners();\n #lazyFailures = new Map();\n constructor(options) {\n this.options = options;\n }\n get status() {\n return this.#status;\n }\n get snapshot() {\n return this.#snapshot;\n }\n activate() {\n return this.enqueue(() => this.performActivate());\n }\n deactivate() {\n return this.enqueue(() => this.performDeactivate());\n }\n dispose() {\n if (this.#disposePromise === undefined) {\n this.#disposePromise = this.enqueue(() => this.performDispose());\n }\n return this.#disposePromise;\n }\n ensureActive(pluginId) {\n return this.enqueue(() => this.performEnsureActive(pluginId));\n }\n executeContributionCommand(request) {\n return this.enqueue(() => this.performExecuteContributionCommand(request));\n }\n executeBlueprintAction(request) {\n return this.enqueue(() => this.performExecuteBlueprintAction(request));\n }\n applyDataProcessor(request) {\n return this.enqueue(() => this.performApplyDataProcessor(request));\n }\n enqueue(operation) {\n const pending = this.#queue.then(operation, operation);\n this.#queue = pending.then(() => undefined, () => undefined);\n return pending;\n }\n async performActivate() {\n if (this.#status !== 'inactive') {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', [], 'Plugin manager cannot activate from its current state.');\n }\n this.#status = 'activating';\n const plan = createActivationPlan(this.options);\n if (!plan.ok) {\n // 全局门失败:输入快照或宿主自营物料不可用,保持未激活。\n this.#status = 'inactive';\n return plan;\n }\n if (plan.value.activation === 'lazy') {\n return this.publishLazyActivation(plan.value);\n }\n const active = [];\n const failures = plan.value.failures.map((item) => ({\n ...item,\n }));\n const failedIds = new Set(failures.flatMap((item) => (item.pluginId === '' ? [] : [item.pluginId])));\n for (const plugin of plan.value.plugins) {\n // 运行期级联:声明的依赖已失败时不再调用该插件的生命周期钩子。\n const failedDependency = plugin.manifest.dependencies.find((dep) => failedIds.has(dep.id));\n if (failedDependency !== undefined) {\n failures.push({\n index: plugin.index,\n pluginId: plugin.manifest.id,\n diagnostics: [\n diagnostic('PLUGIN_CORE_DEPENDENCY_MISSING', ['plugins', plugin.index, 'manifest', 'dependencies'], 'Plugin dependency failed to activate.'),\n ],\n });\n failedIds.add(plugin.manifest.id);\n continue;\n }\n // 失败爆炸半径收敛:单插件激活失败只排除自身并失效其会话端口,\n // 已激活插件与核心目录不受影响,不再整体回滚。\n const attempt = await attemptActivation(plugin);\n if (!attempt.ok) {\n failures.push(attempt.failure);\n failedIds.add(plugin.manifest.id);\n continue;\n }\n active.push({ plugin, session: attempt.session });\n this.recordActivated(plugin);\n }\n failures.sort((first, second) => first.index - second.index);\n // 目录只发布成功激活的插件:运行期失败者连同其贡献一并排除。\n const pluginEntries = active.map(({ plugin }) => ({\n manifest: plugin.manifest,\n grantedCapabilities: plugin.grantedCapabilities,\n contributions: plugin.manifest.contributions,\n }));\n const plugins = createBaseScreenPluginCatalog(pluginEntries);\n this.#active = active;\n this.#handlers.merge(active);\n this.#snapshot = {\n materials: createBaseScreenMaterialCatalog(plan.value.materials),\n panels: createBaseScreenPluginPanelCatalog(plan.value.panels),\n inspectorControls: createBaseScreenPluginInspectorControlCatalog(plan.value.inspectorControls),\n plugins,\n contributions: createRuntimeContributionIndex(plugins),\n failures: Object.freeze(failures.map((item) => Object.freeze({ ...item }))),\n };\n this.#status = 'active';\n return { ok: true, value: this.#snapshot, diagnostics: [] };\n }\n async performDeactivate() {\n if (this.#status !== 'active') {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', [], 'Plugin manager is not active.');\n }\n this.#status = 'deactivating';\n this.#snapshot = undefined;\n this.#handlers.clear();\n this.#plan = undefined;\n this.#lazy = false;\n this.#declaredHandlers = createDeclaredHandlerOwners();\n this.#lazyFailures = new Map();\n const diagnostics = await deactivateEntries(this.#active);\n this.#active = [];\n this.#status = diagnostics.length === 0 ? 'inactive' : 'failed';\n return diagnostics.length === 0\n ? { ok: true, value: null, diagnostics: [] }\n : failureResult(diagnostics);\n }\n async performDispose() {\n if (this.#status === 'disposed') {\n return { ok: true, value: null, diagnostics: [] };\n }\n this.#status = 'disposing';\n this.#snapshot = undefined;\n this.#handlers.clear();\n this.#plan = undefined;\n this.#lazy = false;\n this.#declaredHandlers = createDeclaredHandlerOwners();\n this.#lazyFailures = new Map();\n const diagnostics = await deactivateEntries(this.#active);\n this.#active = [];\n for (const plugin of [...this.#disposalOrder].reverse()) {\n try {\n await plugin.dispose();\n }\n catch {\n diagnostics.push(diagnostic('PLUGIN_CORE_LIFECYCLE_INVALID', ['plugins', plugin.index], 'Plugin disposal failed.'));\n }\n }\n this.#status = 'disposed';\n return diagnostics.length === 0\n ? { ok: true, value: null, diagnostics: [] }\n : failureResult(diagnostics);\n }\n /** 懒激活发布:预检与目录一次完成,插件钩子推迟到首次使用。 */\n publishLazyActivation(plan) {\n const pluginEntries = plan.plugins.map((plugin) => ({\n manifest: plugin.manifest,\n grantedCapabilities: plugin.grantedCapabilities,\n contributions: plugin.manifest.contributions,\n }));\n const plugins = createBaseScreenPluginCatalog(pluginEntries);\n this.#active = [];\n this.#handlers.clear();\n this.#plan = plan;\n this.#lazy = true;\n this.#lazyFailures = new Map();\n this.#declaredHandlers = collectDeclaredHandlerOwners(plan.plugins);\n this.#snapshot = {\n materials: createBaseScreenMaterialCatalog(plan.materials),\n panels: createBaseScreenPluginPanelCatalog(plan.panels),\n inspectorControls: createBaseScreenPluginInspectorControlCatalog(plan.inspectorControls),\n plugins,\n contributions: createRuntimeContributionIndex(plugins),\n failures: Object.freeze(plan.failures.map((item) => Object.freeze({ ...item }))),\n };\n this.#status = 'active';\n return { ok: true, value: this.#snapshot, diagnostics: [] };\n }\n async performEnsureActive(pluginId) {\n if (this.#status !== 'active') {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', [], 'Plugin manager cannot ensure activation from its current state.');\n }\n const plan = this.#plan;\n if (plan === undefined) {\n // eager 模式:所有插件已在 activate() 时运行,只校验身份。\n const known = this.#active.some((entry) => entry.plugin.manifest.id === pluginId);\n return known\n ? { ok: true, value: null, diagnostics: [] }\n : failure('PLUGIN_CORE_IDENTITY_INVALID', ['pluginId'], 'Plugin id is unknown.');\n }\n if (this.#active.some((entry) => entry.plugin.manifest.id === pluginId)) {\n return { ok: true, value: null, diagnostics: [] };\n }\n const recorded = this.#lazyFailures.get(pluginId);\n if (recorded !== undefined) {\n return failureResult([...recorded.diagnostics]);\n }\n const target = plan.plugins.find((plugin) => plugin.manifest.id === pluginId);\n if (target === undefined) {\n return failure('PLUGIN_CORE_IDENTITY_INVALID', ['pluginId'], 'Plugin id is unknown.');\n }\n // 目标及其传递依赖按拓扑序激活;依赖链上任一失败即停止并级联。\n const required = new Set([pluginId]);\n let grew = true;\n while (grew) {\n grew = false;\n for (const plugin of plan.plugins) {\n if (!required.has(plugin.manifest.id))\n continue;\n for (const dependency of plugin.manifest.dependencies) {\n if (plan.plugins.some((item) => item.manifest.id === dependency.id)) {\n if (!required.has(dependency.id)) {\n required.add(dependency.id);\n grew = true;\n }\n }\n }\n }\n }\n for (const plugin of plan.plugins) {\n if (!required.has(plugin.manifest.id))\n continue;\n if (this.#active.some((entry) => entry.plugin === plugin))\n continue;\n const failed = this.#lazyFailures.get(plugin.manifest.id);\n if (failed !== undefined) {\n return failureResult([...failed.diagnostics]);\n }\n const failedDependency = plugin.manifest.dependencies.find((dep) => this.#lazyFailures.has(dep.id));\n if (failedDependency !== undefined) {\n const cascade = {\n index: plugin.index,\n pluginId: plugin.manifest.id,\n diagnostics: [\n diagnostic('PLUGIN_CORE_DEPENDENCY_MISSING', ['plugins', plugin.index, 'manifest', 'dependencies'], 'Plugin dependency failed to activate.'),\n ],\n };\n this.#lazyFailures.set(plugin.manifest.id, cascade);\n this.#appendFailure(cascade);\n return failureResult([...cascade.diagnostics]);\n }\n const failure = await this.#activatePending(plugin);\n if (failure !== undefined) {\n return failureResult([...failure.diagnostics]);\n }\n }\n return { ok: true, value: null, diagnostics: [] };\n }\n async #activatePending(plugin) {\n const attempt = await attemptActivation(plugin);\n if (!attempt.ok) {\n this.#lazyFailures.set(plugin.manifest.id, attempt.failure);\n this.#appendFailure(attempt.failure);\n return attempt.failure;\n }\n const entry = { plugin, session: attempt.session };\n this.#active.push(entry);\n this.recordActivated(plugin);\n // 与 eager 激活同一份合并实现:三类 handler 一起进入可执行集合。只在懒激活里合并命令\n // 会让已声明、已授权的 blueprintAction / dataProcessor 在作者面可见却在执行面按\n // \"未声明\"失败关闭。\n this.#handlers.merge([entry]);\n return undefined;\n }\n #appendFailure(failure) {\n if (this.#snapshot === undefined)\n return;\n this.#snapshot = {\n ...this.#snapshot,\n failures: Object.freeze([...this.#snapshot.failures, Object.freeze({ ...failure })].sort((first, second) => first.index - second.index)),\n };\n }\n recordActivated(plugin) {\n const existing = this.#disposalOrder.findIndex((item) => item.runtime === plugin.runtime);\n if (existing !== -1)\n this.#disposalOrder.splice(existing, 1);\n this.#disposalOrder.push(plugin);\n }\n /**\n * 懒激活:首次使用某贡献时先按依赖拓扑序激活声明它的插件。\n *\n * 返回失败表示激活(或依赖链)失败,调用方原样返回;undefined 表示无需激活——eager 模式、\n * 该插件已在运行、或该 id 未被任何插件声明(最后一种由调用方按\"未声明\"失败关闭)。\n * 三类 handler 共用这一条路径,因此懒激活的触发面与可执行集合一致。\n */\n async #ensureLazyOwner(kind, id) {\n if (!this.#lazy)\n return undefined;\n const owner = this.#declaredHandlers.get(kind)?.get(id);\n if (owner === undefined)\n return undefined;\n const ensured = await this.performEnsureActive(owner.manifest.id);\n return ensured.ok ? undefined : ensured;\n }\n async performExecuteBlueprintAction(request) {\n if (this.#status !== 'active') {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', [], 'Plugin manager cannot execute blueprint actions from its current state.');\n }\n const ensured = await this.#ensureLazyOwner('blueprintAction', request.actionId);\n if (ensured !== undefined)\n return ensured;\n const entry = this.#handlers.get('blueprintAction', request.actionId);\n if (entry === undefined) {\n // ADR-0076:未声明的 actionId 失败关闭,不再落到宿主任意解释。\n return failure('PLUGIN_CORE_CONTRIBUTION_UNKNOWN', ['actionId'], 'Blueprint action is not declared by any active plugin.');\n }\n if (!entry.isValid()) {\n return failure('PLUGIN_CORE_SESSION_INVALID', [], 'Plugin activation session is no longer valid.');\n }\n try {\n const result = await entry.handler(request.payload);\n if (result === undefined)\n return { ok: true, value: null, diagnostics: [] };\n if (result === null ||\n typeof result !== 'object' ||\n typeof result.ok !== 'boolean') {\n return failure('PLUGIN_CORE_COMMAND_RESULT_INVALID', [], 'Plugin blueprint action returned an invalid result.');\n }\n return result;\n }\n catch {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', ['actionId'], 'Plugin blueprint action failed.');\n }\n }\n async performApplyDataProcessor(request) {\n if (this.#status !== 'active') {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', [], 'Plugin manager cannot apply data processors from its current state.');\n }\n const ensured = await this.#ensureLazyOwner('dataProcessor', request.processorId);\n if (ensured !== undefined)\n return ensured;\n const entry = this.#handlers.get('dataProcessor', request.processorId);\n if (entry === undefined) {\n return failure('PLUGIN_CORE_CONTRIBUTION_UNKNOWN', ['processorId'], 'Data processor is not declared by any active plugin.');\n }\n if (!entry.isValid()) {\n return failure('PLUGIN_CORE_SESSION_INVALID', [], 'Plugin activation session is no longer valid.');\n }\n try {\n const result = await entry.handler(request.value, request.config);\n if (result === null ||\n typeof result !== 'object' ||\n typeof result.ok !== 'boolean') {\n return failure('PLUGIN_CORE_COMMAND_RESULT_INVALID', [], 'Plugin data processor returned an invalid result.');\n }\n return result;\n }\n catch {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', ['processorId'], 'Plugin data processor failed.');\n }\n }\n async performExecuteContributionCommand(request) {\n const parsed = parsePluginCommandRequest(request);\n if (!parsed.ok)\n return parsed;\n if (this.#status !== 'active') {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', [], 'Plugin manager cannot execute contribution commands from its current state.');\n }\n const ensured = await this.#ensureLazyOwner('command', parsed.value.commandId);\n if (ensured !== undefined)\n return ensured;\n const command = this.#handlers.get('command', parsed.value.commandId);\n if (command === undefined) {\n return failure('PLUGIN_CORE_COMMAND_UNAUTHORIZED', ['commandId'], 'Plugin contribution command is not available.');\n }\n if (!command.isValid()) {\n return failure('PLUGIN_CORE_SESSION_INVALID', [], 'Plugin activation session is no longer valid.');\n }\n try {\n const result = await command.handler(parsed.value.args);\n if (result === undefined) {\n return { ok: true, value: null, diagnostics: [] };\n }\n if (result === null ||\n typeof result !== 'object' ||\n typeof result.ok !== 'boolean') {\n return failure('PLUGIN_CORE_COMMAND_RESULT_INVALID', [], 'Plugin contribution command returned an invalid result.');\n }\n return result;\n }\n catch {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', ['commandId'], 'Plugin contribution command failed.');\n }\n }\n}\n/**\n * 运行一次插件激活尝试:先装配会话,再调用插件 `activate` 钩子。\n *\n * eager 与懒激活共用这一份实现,失败按发生阶段归因:会话装配只可能因宿主注入的端口工厂\n * 或管理器的端口校验抛错,此时插件代码尚未运行;钩子失败则必然发生在插件自己的 `activate`\n * 内。输出走同一条最小披露归一化路径——稳定 code/path 与固定文案,被捕获 error 的\n * message、name、stack 一律不回显(诊断最小披露:plugin-manager-runtime R10)。\n */\nasync function attemptActivation(plugin) {\n let session;\n try {\n session = plugin.createSession();\n }\n catch {\n return { ok: false, failure: activationFailure(plugin, 'session') };\n }\n try {\n await plugin.activate(session.context);\n }\n catch {\n session.invalidate();\n return { ok: false, failure: activationFailure(plugin, 'hook') };\n }\n return { ok: true, session };\n}\n/** 激活失败的归一化记录:两类阶段文案固定,被捕获 error 不作任何投影。 */\nfunction activationFailure(plugin, phase) {\n return {\n index: plugin.index,\n pluginId: plugin.manifest.id,\n diagnostics: [\n diagnostic('PLUGIN_CORE_LIFECYCLE_INVALID', ['plugins', plugin.index], phase === 'session'\n ? 'Plugin activation session setup failed.'\n : 'Plugin activation hook failed.'),\n ],\n };\n}\nasync function deactivateEntries(entries) {\n for (const entry of entries) {\n entry.session.invalidate();\n }\n const diagnostics = [];\n for (const entry of [...entries].reverse()) {\n try {\n await entry.plugin.deactivate();\n }\n catch {\n diagnostics.push(diagnostic('PLUGIN_CORE_LIFECYCLE_INVALID', ['plugins', entry.plugin.index], 'Plugin deactivation failed.'));\n }\n }\n return diagnostics;\n}\n/**\n * 三类 handler 的运行时注册表。\n *\n * command / blueprintAction / dataProcessor 的收集规则完全一致(声明存在 + 计划表授权门),\n * 差别只有描述符里的记录字段名与消费方。把三个 Map 收进一处后,eager 激活与懒激活共用同一份\n * 合并实现——\"懒激活只合并命令\"这一历史缺口正是三份平行代码的产物。\n */\nclass ContributionHandlerRegistry {\n #maps = new Map();\n constructor() {\n for (const kind of listContributionHandlerKinds()) {\n this.#maps.set(kind, new Map());\n }\n }\n clear() {\n for (const map of this.#maps.values())\n map.clear();\n }\n /** 合并一批已激活插件的 handler;id 冲突已在预检按 first-wins 裁决,此处不再判定。 */\n merge(entries) {\n for (const kind of listContributionHandlerKinds()) {\n const target = this.#maps.get(kind);\n for (const [id, entry] of collectContributionHandlerEntries(entries, kind)) {\n target.set(id, entry);\n }\n }\n }\n get(kind, id) {\n return this.#maps.get(kind)?.get(id);\n }\n}\n/**\n * 该插件在某 kind 下**可执行**的 handler:清单里声明了、且过了计划表授权门的那些。\n *\n * 可执行集合与懒激活索引(`collectDeclaredHandlerOwners`)读同一份判定,因此\"是否会为它\n * 触发懒激活\"与\"激活后是否真的能执行\"不会给出两个答案。\n */\nfunction executableHandlers(plugin, kind) {\n const field = contributionHandlerField(kind);\n if (field === undefined)\n return new Map();\n const records = plugin[field];\n if (records.size === 0)\n return new Map();\n const requiresGrant = CONTRIBUTION_KIND_PLAN[kind].requiresGrant === true;\n const declared = new Map();\n for (const contribution of plugin.manifest.contributions) {\n if (contribution.kind !== kind)\n continue;\n const id = declaredContributionIds(kind, [contribution])[0];\n if (id !== undefined)\n declared.set(id, contribution);\n }\n const executable = new Map();\n for (const [id, handler] of records) {\n // 未声明的 handler 不进入可执行集合:声明与 handler 一一对应由预检保证,\n // 这里再挡一次是为了让\"声明是唯一入口\"在执行面也成立。\n const contribution = declared.get(id);\n if (contribution === undefined)\n continue;\n // 与 command 同一门禁:声明的能力未获授权即不进入可执行集合。\n if (requiresGrant && !isContributionGranted(plugin, contribution))\n continue;\n executable.set(id, handler);\n }\n return executable;\n}\n/**\n * 从已激活会话里收集一类贡献的 handler,构建可执行集合。\n *\n * 三种 handler 承载的 kind(command / blueprintAction / dataProcessor)规则一致,差别只有\n * 运行时的记录字段名与是否需要授权门,两者分别来自 plugin-core 的贡献类型描述符与 manager\n * 的计划表,因此只保留一份实现。\n */\nfunction collectContributionHandlerEntries(entries, kind) {\n const collected = new Map();\n for (const entry of entries) {\n for (const [id, handler] of executableHandlers(entry.plugin, kind)) {\n collected.set(id, { handler, isValid: () => entry.session.isValid() });\n }\n }\n return collected;\n}\n/**\n * 懒激活索引:某 kind 下可执行的 handler id → 声明它的插件。\n *\n * 插件钩子尚未运行时也要能回答\"这个 id 该由谁提供\",否则懒激活只能在目录层面延迟、\n * 无法在执行面按需唤醒。\n */\nfunction collectDeclaredHandlerOwners(plugins) {\n const owners = createDeclaredHandlerOwners();\n for (const kind of listContributionHandlerKinds()) {\n const byId = owners.get(kind);\n for (const plugin of plugins) {\n for (const id of executableHandlers(plugin, kind).keys()) {\n byId.set(id, plugin);\n }\n }\n }\n return owners;\n}\nfunction createDeclaredHandlerOwners() {\n return new Map(listContributionHandlerKinds().map((kind) => [kind, new Map()]));\n}\nfunction isContributionGranted(plugin, contribution) {\n const required = contribution.requiredCapability;\n const capability = typeof required === 'string'\n ? required\n : contribution.id;\n return capability !== undefined && plugin.grantedCapabilities.includes(capability);\n}\nfunction diagnostic(code, path, message) {\n return { severity: 'error', code, path, message };\n}\nfunction failureResult(diagnostics) {\n return {\n ok: false,\n diagnostics: sortDiagnostics(diagnostics),\n };\n}\n//# sourceMappingURL=manager.js.map"],"mappings":";;;;;;AAAA,SAAgB,EAA8C,GAAS;CACnE,OAAO,OAAO,OAAO,EACjB,QAAQ,GAAS;EACb,OAAO,EAAQ,2BAA2B,CAAO;CACrD,EACJ,CAAC;AACL;;;ACNA,IAAa,IAAyB;CAClC,UAAU,CAAC;CACX,SAAS,CAAC;CACV,kBAAkB,EACd,MAAM,GAAc,GAAS;EACzB,EAAQ,cAAc,IAAI,EAAa,IAAI,CAAY;CAC3D,EACJ;CACA,iBAAiB;EACb,eAAe;EACf,MAAM,GAAc,GAAS;GACzB,EAAQ,iBAAiB,IAAI,EAAa,IAAI,CAAY;EAC9D;CACJ;CACA,eAAe,EACX,MAAM,GAAc,GAAS;EACzB,EAAQ,eAAe,IAAI,EAAa,IAAI,CAAY;CAC5D,EACJ;CACA,qBAAqB;EACjB,eAAe;EACf,MAAM,GAAc,GAAS;GACzB,EAAQ,sBAAsB,IAAI,EAAa,EAAE;EACrD;CACJ;CACA,OAAO,CAAC;CACR,kBAAkB,CAAC;CAEnB,UAAU,EACN,MAAM,GAAc,GAAS;EACzB,EAAQ,UAAU,IAAI,EAAa,IAAI,CAAY;CACvD,EACJ;AACJ;AAQA,SAAgB,EAAoB,GAAc;CAC9C,OAAO,EAAuB,EAAa;AAC/C;AAEA,SAAgB,GAAkB,GAAc,GAAqB,GAAS;CAC1E,IAAM,IAAO,EAAoB,CA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;AACA,SAAS,IAA8B;CACnC,OAAO,IAAI,IAAI,EAA6B,CAAC,CAAC,KAAK,MAAS,CAAC,mBAAM,IAAI,IAAI,CAAC,CAAC,CAAC;AAClF;AACA,SAAS,GAAsB,GAAQ,GAAc;CACjD,IAAM,IAAW,EAAa,oBACxB,IAAa,OAAO,KAAa,WACjC,IACA,EAAa;CACnB,OAAO,MAAe,KAAA,KAAa,EAAO,oBAAoB,SAAS,CAAU;AACrF;AACA,SAAS,EAAW,GAAM,GAAM,GAAS;CACrC,OAAO;EAAE,UAAU;EAAS;EAAM;EAAM;CAAQ;AACpD;AACA,SAAS,EAAc,GAAa;CAChC,OAAO;EACH,IAAI;EACJ,aAAa,EAAgB,CAAW;CAC5C;AACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"material-definition-BeW34dJr.js","names":[],"sources":["../../plugin-sdk/dist/diagnostics.js","../../plugin-sdk/dist/material-definition.js"],"sourcesContent":["import { sortScreenDiagnostics, } from '@base-screen/contracts';\nexport function prefixFailure(diagnostics, prefix) {\n return {\n ok: false,\n diagnostics: sortScreenDiagnostics(diagnostics.map((item) => ({ ...item, path: [...prefix, ...item.path] }))),\n };\n}\nexport function sortDiagnostics(diagnostics) {\n return sortScreenDiagnostics(diagnostics);\n}\nexport function failure(code, path, message) {\n return { ok: false, diagnostics: [{ severity: 'error', code, path, message }] };\n}\n//# sourceMappingURL=diagnostics.js.map","import { screenJsonEquals } from '@base-screen/contracts';\nimport { parseBaseScreenMaterialEditorDescriptor, parseBaseScreenMaterialManifest, } from '@base-screen/plugin-core';\nimport { failure } from './diagnostics.js';\n/** 纯数据 builder:把 JSON-safe 的 Descriptor 输入解析为规范形态,不渲染任何 UI。 */\nexport function createBaseScreenMaterialEditorDescriptor(input, options = {}) {\n return parseBaseScreenMaterialEditorDescriptor(input, options.propsSchema, options.styleSchema, options.manifestEvents, options.dataBindingRoles);\n}\nexport function createMaterialDefinition(options) {\n const parsedManifest = parseBaseScreenMaterialManifest(options.manifest);\n if (!parsedManifest.ok) {\n return parsedManifest;\n }\n const staticManifest = readStaticManifest(options.element);\n if (!staticManifest.ok) {\n return staticManifest;\n }\n if (!screenJsonEquals(parsedManifest.value, staticManifest.value)) {\n return failure('PLUGIN_CORE_IDENTITY_CONFLICT', ['element', 'manifest'], 'Element static manifest does not match the definition manifest.');\n }\n const adapter = readStaticTabularDataAdapter(options.element);\n if (!adapter.ok)\n return adapter;\n const entry = {\n manifest: parsedManifest.value,\n constructor: options.element,\n ...(adapter.value === undefined ? {} : { tabularDataAdapter: adapter.value }),\n };\n return {\n ok: true,\n value: {\n manifest: parsedManifest.value,\n element: options.element,\n define: () => defineMaterial(entry),\n },\n diagnostics: [],\n };\n}\nfunction readStaticTabularDataAdapter(element) {\n const descriptor = Object.getOwnPropertyDescriptor(element, 'tabularDataAdapter');\n if (descriptor === undefined)\n return { ok: true, value: undefined, diagnostics: [] };\n if (!Object.hasOwn(descriptor, 'value')) {\n return failure('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['element', 'tabularDataAdapter'], 'Material dataset adapter must be a static data property.');\n }\n const value = descriptor.value;\n if (value === undefined)\n return { ok: true, value: undefined, diagnostics: [] };\n if (value === null ||\n typeof value !== 'object' ||\n typeof value.adapt !== 'function') {\n return failure('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['element', 'tabularDataAdapter'], 'Material dataset adapter is invalid.');\n }\n return {\n ok: true,\n value: value,\n diagnostics: [],\n };\n}\nfunction defineMaterial(entry) {\n const registry = globalThis.customElements;\n if (registry === undefined) {\n return failure('PLUGIN_CORE_LIFECYCLE_INVALID', [], 'Custom Elements are unavailable in this runtime.');\n }\n const existing = registry.get(entry.manifest.tagName);\n if (existing === entry.constructor) {\n return { ok: true, value: entry, diagnostics: [] };\n }\n if (existing !== undefined) {\n return failure('PLUGIN_CORE_IDENTITY_CONFLICT', ['tagName'], 'Tag name is already bound to a different constructor.');\n }\n try {\n registry.define(entry.manifest.tagName, entry.constructor);\n }\n catch {\n return failure('PLUGIN_CORE_IDENTITY_CONFLICT', ['tagName'], 'Material constructor cannot be registered for this tag name.');\n }\n return { ok: true, value: entry, diagnostics: [] };\n}\nfunction readStaticManifest(element) {\n const descriptor = Object.getOwnPropertyDescriptor(element, 'manifest');\n if (descriptor === undefined || !Object.hasOwn(descriptor, 'value')) {\n return failure('PLUGIN_CORE_MANIFEST_FIELD_INVALID', ['element', 'manifest'], 'Element constructor must expose a static manifest data property.');\n }\n return parseBaseScreenMaterialManifest(descriptor.value);\n}\n//# sourceMappingURL=material-definition.js.map"],"mappings":";;;;AACA,SAAgB,EAAc,GAAa,GAAQ;CAC/C,OAAO;EACH,IAAI;EACJ,aAAa,EAAsB,EAAY,KAAK,OAAU;GAAE,GAAG;GAAM,MAAM,CAAC,GAAG,GAAQ,GAAG,EAAK,IAAI;EAAE,EAAE,CAAC;CAChH;AACJ;AACA,SAAgB,EAAgB,GAAa;CACzC,OAAO,EAAsB,CAAW;AAC5C;AACA,SAAgB,EAAQ,GAAM,GAAM,GAAS;CACzC,OAAO;EAAE,IAAI;EAAO,aAAa,CAAC;GAAE,UAAU;GAAS;GAAM;GAAM;EAAQ,CAAC;CAAE;AAClF;;;ACRA,SAAgB,EAAyC,GAAO,IAAU,CAAC,GAAG;CAC1E,OAAO,EAAwC,GAAO,EAAQ,aAAa,EAAQ,aAAa,EAAQ,gBAAgB,EAAQ,gBAAgB;AACpJ;AACA,SAAgB,EAAyB,GAAS;CAC9C,IAAM,IAAiB,EAAgC,EAAQ,QAAQ;CACvE,IAAI,CAAC,EAAe,IAChB,OAAO;CAEX,IAAM,IAAiB,EAAmB,EAAQ,OAAO;CACzD,IAAI,CAAC,EAAe,IAChB,OAAO;CAEX,IAAI,CAAC,EAAiB,EAAe,OAAO,EAAe,KAAK,GAC5D,OAAO,EAAQ,iCAAiC,CAAC,WAAW,UAAU,GAAG,iEAAiE;CAE9I,IAAM,IAAU,EAA6B,EAAQ,OAAO;CAC5D,IAAI,CAAC,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EAAQ,iCAAiC,CAAC,SAAS,GAAG,8DAA8D;CAC/H;CACA,OAAO;EAAE,IAAI;EAAM,OAAO;EAAO,aAAa,CAAC;CAAE;AACrD;AACA,SAAS,EAAmB,GAAS;CACjC,IAAM,IAAa,OAAO,yBAAyB,GAAS,UAAU;CAItE,OAHI,MAAe,KAAA,KAAa,CAAC,OAAO,OAAO,GAAY,OAAO,IACvD,EAAQ,sCAAsC,CAAC,WAAW,UAAU,GAAG,kEAAkE,IAE7I,EAAgC,EAAW,KAAK;AAC3D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-document-D3HhCVlZ.js","names":[],"sources":["../../contracts/dist/migration/blueprint-graph-migration.js","../../contracts/dist/migration/migrate-document.js"],"sourcesContent":["import { serializeCanonicalJson } from '../json/canonical.js';\nexport function migrateRelationBlueprint(input) {\n const unchanged = { input, decisions: [] };\n if (!isObject(input) || !isObject(input.blueprint))\n return unchanged;\n const blueprint = input.blueprint;\n if ('nodes' in blueprint || 'edges' in blueprint || !('relations' in blueprint)) {\n return unchanged;\n }\n if (Object.keys(blueprint).some((key) => key !== 'relations' && key !== 'layout')) {\n return unchanged;\n }\n const relations = blueprint.relations;\n if (!Array.isArray(relations))\n return unchanged;\n const nodes = [];\n const nodeIds = new Set();\n const edges = [];\n const edgeIds = new Set();\n const flowKeys = new Set();\n const semanticKeys = new Set();\n const decisions = [];\n const usedIds = new Set();\n for (const relation of relations) {\n if (isObject(relation) && typeof relation.id === 'string')\n usedIds.add(relation.id);\n }\n let conditionCounter = 0;\n let edgeCounter = 0;\n const allocate = (prefix, next) => {\n for (;;) {\n const candidate = `${prefix}-${next()}`;\n if (!usedIds.has(candidate) && !nodeIds.has(candidate)) {\n usedIds.add(candidate);\n return candidate;\n }\n }\n };\n const ensureNode = (id, node) => {\n if (!nodeIds.has(id)) {\n nodeIds.add(id);\n nodes.push(node);\n }\n return id;\n };\n const pushEdge = (edge, key, index) => {\n if (flowKeys.has(key) || semanticKeys.has(key) || edgeIds.has(edge.id)) {\n decisions.push({\n kind: 'blueprint-edge',\n path: ['blueprint', 'relations', index],\n action: 'rejected',\n detail: 'Relation duplicated an earlier relation between the same ports and was dropped.',\n });\n return false;\n }\n (edge.kind === 'semantic' ? semanticKeys : flowKeys).add(key);\n edgeIds.add(edge.id);\n edges.push(edge);\n return true;\n };\n let previousGroupKey;\n let currentCondition;\n for (let index = 0; index < relations.length; index++) {\n const relation = relations[index];\n if (!isObject(relation) || typeof relation.id !== 'string')\n return unchanged;\n if (relation.type === 'semantic') {\n // 旧派生规则跳过语义关系,不打断行为关系的分组。\n const from = componentEndpoint(relation.source);\n const to = componentEndpoint(relation.target);\n if (from === undefined || to === undefined || typeof relation.role !== 'string') {\n return unchanged;\n }\n ensureNode(from, {\n kind: 'component',\n id: from,\n componentId: componentIdOf(relation.source),\n });\n ensureNode(to, { kind: 'component', id: to, componentId: componentIdOf(relation.target) });\n const created = pushEdge({\n kind: 'semantic',\n id: relation.id,\n from: { node: from },\n to: { node: to },\n role: relation.role,\n }, `semantic\\u0000${from}\\u0000${to}`, index);\n if (created) {\n decisions.push({\n kind: 'blueprint-edge',\n path: ['blueprint', 'relations', index],\n action: 'mapped',\n detail: 'Semantic relation became a semantic edge.',\n createdEdgeIds: [relation.id],\n });\n }\n continue;\n }\n if (relation.type !== 'behavior')\n return unchanged;\n const source = sourceEndpoint(relation.source);\n if (source === null)\n return unchanged;\n if (source === 'request-state') {\n // 旧派生规则里它自成一组:后续同源同条件的关系不与之前的组合并。\n previousGroupKey = `request-state\\u0000${index}`;\n currentCondition = undefined;\n decisions.push({\n kind: 'blueprint-edge',\n path: ['blueprint', 'relations', index],\n action: 'rejected',\n detail: 'Relation was triggered by variable request-state, which the runtime never emits; it was dropped.',\n });\n continue;\n }\n ensureNode(source.endpoint.nodeId, source.node);\n const target = targetEndpoint(relation.target, relation.effect);\n if (target === null)\n return unchanged;\n ensureNode(target.endpoint.nodeId, target.node);\n const condition = relation.condition;\n if (condition !== undefined && !isObject(condition))\n return unchanged;\n const capabilities = relation.requiredCapabilities;\n if (capabilities !== undefined && !Array.isArray(capabilities))\n return unchanged;\n const groupKey = `${source.endpoint.nodeId}\\u0000${source.endpoint.port}\\u0000${condition === undefined\n ? 'null'\n : serializeCanonicalJson(condition)}`;\n const createdEdgeIds = [];\n let from = source.endpoint;\n if (condition !== undefined) {\n if (previousGroupKey !== groupKey || currentCondition === undefined) {\n currentCondition = allocate('condition', () => ++conditionCounter);\n ensureNode(currentCondition, { kind: 'condition', id: currentCondition, condition });\n const judgeId = allocate('edge', () => ++edgeCounter);\n pushEdge({\n kind: 'flow',\n id: judgeId,\n from: { node: source.endpoint.nodeId, port: source.endpoint.port },\n to: { node: currentCondition, port: 'judge' },\n }, `${source.endpoint.nodeId}\\u0000${source.endpoint.port}\\u0000${currentCondition}\\u0000judge`, index);\n createdEdgeIds.push(judgeId);\n decisions.push({\n kind: 'blueprint-node',\n path: ['blueprint', 'relations', index, 'condition'],\n action: 'mapped',\n detail: `Relation condition became condition node \"${currentCondition}\".`,\n });\n }\n from = { nodeId: currentCondition, port: 'yes' };\n }\n else {\n currentCondition = undefined;\n }\n previousGroupKey = groupKey;\n const edge = {\n kind: 'flow',\n id: relation.id,\n from: { node: from.nodeId, port: from.port },\n to: { node: target.endpoint.nodeId, port: target.endpoint.port },\n ...target.fields,\n ...(capabilities === undefined ? {} : { requiredCapabilities: capabilities }),\n };\n if (pushEdge(edge, `${from.nodeId}\\u0000${from.port}\\u0000${target.endpoint.nodeId}\\u0000${target.endpoint.port}`, index)) {\n createdEdgeIds.push(relation.id);\n }\n if (createdEdgeIds.length > 0) {\n decisions.push({\n kind: 'blueprint-edge',\n path: ['blueprint', 'relations', index],\n action: 'mapped',\n detail: condition === undefined\n ? 'Behavior relation became a flow edge.'\n : 'Conditional behavior relation became a flow edge from a condition node.',\n createdEdgeIds,\n });\n }\n }\n const layout = blueprint.layout;\n let migratedLayout;\n if (layout !== undefined) {\n if (!isObject(layout))\n return unchanged;\n const layoutNodes = layout.nodes;\n if (layoutNodes !== undefined && !Array.isArray(layoutNodes))\n return unchanged;\n const kept = [];\n let dropped = 0;\n for (const node of layoutNodes ?? []) {\n if (!isObject(node) || typeof node.id !== 'string')\n return unchanged;\n if (nodeIds.has(node.id))\n kept.push(node);\n else\n dropped += 1;\n }\n if (dropped > 0) {\n decisions.push({\n kind: 'blueprint-layout',\n path: ['blueprint', 'layout', 'nodes'],\n action: 'rejected',\n detail: `Dropped ${dropped} layout position(s) for components or variables that no longer have a blueprint node.`,\n });\n }\n migratedLayout = {\n nodes: kept,\n ...(layout.viewport === undefined ? {} : { viewport: layout.viewport }),\n };\n }\n return {\n input: {\n ...input,\n blueprint: {\n nodes,\n edges,\n ...(migratedLayout === undefined ? {} : { layout: migratedLayout }),\n },\n },\n decisions,\n };\n}\nfunction isObject(value) {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\nfunction componentIdOf(value) {\n return value.componentId;\n}\nfunction componentEndpoint(value) {\n if (!isObject(value) || value.kind !== 'component' || typeof value.componentId !== 'string') {\n return undefined;\n }\n return `component:${value.componentId}`;\n}\nfunction sourceEndpoint(source) {\n if (!isObject(source) || !isObject(source.event))\n return null;\n const eventName = source.event.eventName;\n if (source.kind === 'component' && typeof source.componentId === 'string') {\n if (typeof eventName !== 'string')\n return null;\n const id = `component:${source.componentId}`;\n return {\n endpoint: { nodeId: id, port: `event:${eventName}` },\n node: { kind: 'component', id, componentId: source.componentId },\n };\n }\n if (source.kind === 'variable' && typeof source.variableId === 'string') {\n if (eventName === 'request-state')\n return 'request-state';\n if (eventName !== 'data-updated')\n return null;\n const id = `variable:${source.variableId}`;\n return {\n endpoint: { nodeId: id, port: 'data-updated' },\n node: { kind: 'variable', id, variableId: source.variableId },\n };\n }\n if (source.kind === 'lifecycle' && eventName === 'ready') {\n return {\n endpoint: { nodeId: 'lifecycle', port: 'ready' },\n node: { kind: 'lifecycle', id: 'lifecycle' },\n };\n }\n if (source.kind === 'timer' && eventName === 'tick' && Number.isInteger(source.intervalSeconds)) {\n const id = `timer:${source.intervalSeconds}`;\n return {\n endpoint: { nodeId: id, port: 'tick' },\n node: { kind: 'timer', id, intervalSeconds: source.intervalSeconds },\n };\n }\n return null;\n}\nfunction targetEndpoint(target, effect) {\n if (!isObject(target) || !isObject(effect))\n return null;\n if (target.kind === 'component' && typeof target.componentId === 'string') {\n const id = `component:${target.componentId}`;\n const node = { kind: 'component', id, componentId: target.componentId };\n if (effect.type === 'component-visibility') {\n const operation = effect.operation;\n if (operation !== 'show' && operation !== 'hide' && operation !== 'toggle')\n return null;\n return {\n endpoint: { nodeId: id, port: operation },\n node,\n fields: effect.transition === undefined ? {} : { transition: effect.transition },\n };\n }\n if (effect.type === 'request-component-data') {\n return { endpoint: { nodeId: id, port: 'request-data' }, node, fields: {} };\n }\n return null;\n }\n if (target.kind === 'variable' && typeof target.variableId === 'string') {\n const id = `variable:${target.variableId}`;\n const node = { kind: 'variable', id, variableId: target.variableId };\n if (effect.type === 'set-variable' && effect.value !== undefined) {\n return { endpoint: { nodeId: id, port: 'set' }, node, fields: { value: effect.value } };\n }\n if (effect.type === 'request-variable') {\n return { endpoint: { nodeId: id, port: 'request' }, node, fields: {} };\n }\n return null;\n }\n if (target.kind === 'host') {\n const node = { kind: 'host', id: 'host' };\n if (effect.type === 'emit-host-event' && typeof effect.eventName === 'string') {\n if (effect.payload === undefined)\n return null;\n return {\n endpoint: { nodeId: 'host', port: `event:${effect.eventName}` },\n node,\n fields: { payload: effect.payload },\n };\n }\n if (effect.type === 'host-action' && typeof effect.actionId === 'string') {\n if (effect.payload === undefined)\n return null;\n return {\n endpoint: { nodeId: 'host', port: `action:${effect.actionId}` },\n node,\n fields: { payload: effect.payload },\n };\n }\n }\n return null;\n}\n//# sourceMappingURL=blueprint-graph-migration.js.map","import { parseScreenDocument } from '../document/parse.js';\nimport { migrateRelationBlueprint } from './blueprint-graph-migration.js';\nconst CREATED_ID_PREFIX = 'data-source-';\n/**\n * 把旧形态文档迁移到当前形态,返回新文档与逐条决策。\n *\n * 这是「旧 → 新」的唯一转换路径:读取适配窗口只读,从不产出可写文档。\n * 迁移是幂等的——已经写过 `dataValue` / `dataSources` / 单形态变量的文档原样返回。\n *\n * @param input 待迁移的原始文档(未校验 JSON)。\n */\nexport function migrateScreenDocument(input) {\n const legacy = preprocessLegacyBlueprint(input);\n const graph = migrateRelationBlueprint(legacy.input);\n const preprocessed = {\n input: graph.input,\n decisions: [...legacy.decisions, ...graph.decisions],\n };\n const parsed = parseScreenDocument(preprocessed.input);\n if (!parsed.ok) {\n return {\n ok: false,\n document: undefined,\n decisions: preprocessed.decisions,\n diagnostics: parsed.diagnostics,\n };\n }\n const context = {\n dataSources: [...(parsed.value.dataSources ?? [])],\n usedIds: new Set((parsed.value.dataSources ?? []).map((instance) => instance.id)),\n decisions: [],\n counter: 0,\n };\n const components = parsed.value.components.map((component, index) => migrateComponent(component, index, context));\n const variables = parsed.value.variables.map((entry, index) => migrateVariable(entry, index, context));\n const migrated = parseScreenDocument({\n canvas: parsed.value.canvas,\n components,\n dataSources: context.dataSources,\n variables,\n blueprint: parsed.value.blueprint,\n ...(parsed.value.theme === undefined ? {} : { theme: parsed.value.theme }),\n });\n const decisions = [...preprocessed.decisions, ...context.decisions];\n if (!migrated.ok) {\n return {\n ok: false,\n document: undefined,\n decisions,\n diagnostics: migrated.diagnostics,\n };\n }\n return { ok: true, document: migrated.value, decisions, diagnostics: [] };\n}\nfunction isPlainObject(value) {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n/**\n * 旧 `blueprint.rules` → relations 的转换路径(ADR-0091);产物随后由\n * `migrateRelationBlueprint` 转成节点图(ADR-0107),因此三种旧形态都能一次迁到当前形态。\n *\n * 只处理结构完整可识别的旧文档;任何无法安全转换的形状都原样返回,让严格解析失败关闭,\n * 不做部分迁移、不静默丢弃规则。\n */\nfunction preprocessLegacyBlueprint(input) {\n if (!isPlainObject(input) || !isPlainObject(input.blueprint)) {\n return { input, decisions: [] };\n }\n const blueprint = input.blueprint;\n if ('relations' in blueprint || !('rules' in blueprint)) {\n return { input, decisions: [] };\n }\n if (Object.keys(blueprint).some((key) => key !== 'rules' && key !== 'layout')) {\n return { input, decisions: [] };\n }\n const rules = blueprint.rules;\n if (!Array.isArray(rules) ||\n !Array.isArray(input.components) ||\n !Array.isArray(input.variables)) {\n return { input, decisions: [] };\n }\n const componentIds = new Set();\n for (const component of input.components) {\n if (!isPlainObject(component) || typeof component.id !== 'string') {\n return { input, decisions: [] };\n }\n componentIds.add(component.id);\n }\n const variableIds = new Set();\n for (const variable of input.variables) {\n if (!isPlainObject(variable) || typeof variable.id !== 'string') {\n return { input, decisions: [] };\n }\n variableIds.add(variable.id);\n }\n const decisions = [];\n const relations = [];\n let relationCounter = 0;\n const allocateRelationId = () => {\n for (;;) {\n relationCounter += 1;\n const candidate = `relation-${relationCounter}`;\n if (!relations.some((relation) => relation.id === candidate))\n return candidate;\n }\n };\n for (let index = 0; index < rules.length; index++) {\n const rule = rules[index];\n if (!isPlainObject(rule))\n return { input, decisions: [] };\n const source = legacyTriggerSource(rule.trigger);\n if (source === null)\n return { input, decisions: [] };\n const actions = rule.actions;\n if (!Array.isArray(actions))\n return { input, decisions: [] };\n const condition = rule.condition;\n if (condition !== undefined && !isPlainObject(condition))\n return { input, decisions: [] };\n const requiredCapabilities = rule.requiredCapabilities;\n if (requiredCapabilities !== undefined && !Array.isArray(requiredCapabilities)) {\n return { input, decisions: [] };\n }\n const createdRelationIds = [];\n for (const action of actions) {\n const relationId = allocateRelationId();\n const relation = legacyActionRelation(action, relationId, source, condition, requiredCapabilities);\n if (relation === null)\n return { input, decisions: [] };\n relations.push(relation);\n createdRelationIds.push(relationId);\n }\n decisions.push({\n kind: 'blueprint-relation',\n path: ['blueprint', 'rules', index],\n action: createdRelationIds.length === 0 ? 'rejected' : 'mapped',\n detail: createdRelationIds.length === 0\n ? 'Rule had no actions and was dropped; it had no runtime behavior.'\n : `Rule was split into ${createdRelationIds.length} behavior relation(s).`,\n ...(createdRelationIds.length === 0 ? {} : { createdRelationIds }),\n });\n }\n const layout = blueprint.layout;\n let migratedLayout;\n if (layout !== undefined) {\n if (!isPlainObject(layout))\n return { input, decisions: [] };\n if (Object.keys(layout).some((key) => key !== 'nodes' && key !== 'viewport')) {\n return { input, decisions: [] };\n }\n const nodes = layout.nodes;\n if (nodes !== undefined && !Array.isArray(nodes))\n return { input, decisions: [] };\n if (layout.viewport !== undefined && !isPlainObject(layout.viewport)) {\n return { input, decisions: [] };\n }\n const keptNodes = [];\n let droppedCondition = 0;\n let droppedAction = 0;\n let droppedUnconnected = 0;\n let droppedOther = 0;\n for (const node of nodes ?? []) {\n if (!isPlainObject(node) || typeof node.id !== 'string')\n return { input, decisions: [] };\n const id = node.id;\n if (id.startsWith('component:') && componentIds.has(id.slice('component:'.length))) {\n keptNodes.push(node);\n }\n else if (id.startsWith('variable:') && variableIds.has(id.slice('variable:'.length))) {\n keptNodes.push(node);\n }\n else if (id.startsWith('condition:')) {\n droppedCondition += 1;\n }\n else if (id.startsWith('action:')) {\n droppedAction += 1;\n }\n else if (id.startsWith('unconnected:')) {\n droppedUnconnected += 1;\n }\n else {\n droppedOther += 1;\n }\n }\n const droppedTotal = droppedCondition + droppedAction + droppedUnconnected + droppedOther;\n if (droppedTotal > 0) {\n decisions.push({\n kind: 'blueprint-layout',\n path: ['blueprint', 'layout', 'nodes'],\n action: 'rejected',\n detail: `Dropped ${droppedTotal} layout position(s) with no relation-model equivalent (${droppedCondition} condition, ${droppedAction} action, ${droppedUnconnected} unconnected, ${droppedOther} stale).`,\n });\n }\n const hasViewport = layout.viewport !== undefined;\n if (keptNodes.length > 0 || hasViewport) {\n migratedLayout = {\n ...(keptNodes.length === 0 ? {} : { nodes: keptNodes }),\n ...(hasViewport ? { viewport: layout.viewport } : {}),\n };\n }\n }\n return {\n input: {\n ...input,\n blueprint: {\n relations,\n ...(migratedLayout === undefined ? {} : { layout: migratedLayout }),\n },\n },\n decisions,\n };\n}\nfunction legacyTriggerSource(trigger) {\n if (!isPlainObject(trigger))\n return null;\n if (trigger.type === 'material-event' &&\n typeof trigger.componentId === 'string' &&\n typeof trigger.eventName === 'string') {\n return {\n kind: 'component',\n componentId: trigger.componentId,\n event: { type: 'material-event', eventName: trigger.eventName },\n };\n }\n if (trigger.type === 'variable-event' &&\n typeof trigger.variableId === 'string' &&\n (trigger.eventName === 'data-updated' || trigger.eventName === 'request-state')) {\n return {\n kind: 'variable',\n variableId: trigger.variableId,\n event: { type: 'variable-event', eventName: trigger.eventName },\n };\n }\n return null;\n}\nfunction legacyActionRelation(action, id, source, condition, requiredCapabilities) {\n if (!isPlainObject(action))\n return null;\n const base = {\n type: 'behavior',\n id,\n source,\n ...(condition === undefined ? {} : { condition }),\n ...(requiredCapabilities === undefined ? {} : { requiredCapabilities }),\n };\n if (action.type === 'component-visibility') {\n if (typeof action.componentId !== 'string' ||\n (action.operation !== 'show' && action.operation !== 'hide' && action.operation !== 'toggle')) {\n return null;\n }\n return {\n ...base,\n target: { kind: 'component', componentId: action.componentId },\n effect: {\n type: 'component-visibility',\n operation: action.operation,\n ...(action.transition === undefined ? {} : { transition: action.transition }),\n },\n };\n }\n if (action.type === 'request-component-data') {\n if (typeof action.componentId !== 'string')\n return null;\n return {\n ...base,\n target: { kind: 'component', componentId: action.componentId },\n effect: { type: 'request-component-data' },\n };\n }\n if (action.type === 'set-variable') {\n if (typeof action.variableId !== 'string' || action.value === undefined)\n return null;\n return {\n ...base,\n target: { kind: 'variable', variableId: action.variableId },\n effect: { type: 'set-variable', value: action.value },\n };\n }\n if (action.type === 'request-variable') {\n if (typeof action.variableId !== 'string')\n return null;\n return {\n ...base,\n target: { kind: 'variable', variableId: action.variableId },\n effect: { type: 'request-variable' },\n };\n }\n if (action.type === 'emit-host-event') {\n if (typeof action.eventName !== 'string' || action.payload === undefined)\n return null;\n return {\n ...base,\n target: { kind: 'host' },\n effect: { type: 'emit-host-event', eventName: action.eventName, payload: action.payload },\n };\n }\n if (action.type === 'host-action') {\n if (typeof action.actionId !== 'string' || action.payload === undefined)\n return null;\n return {\n ...base,\n target: { kind: 'host' },\n effect: { type: 'host-action', actionId: action.actionId, payload: action.payload },\n };\n }\n return null;\n}\n/** `data-source-<n>`:按实例创建顺序自增、与文档内既有 id 去重、不含时间戳与随机数。 */\nfunction allocateDataSourceId(context) {\n for (;;) {\n context.counter += 1;\n const candidate = `${CREATED_ID_PREFIX}${context.counter}`;\n if (!context.usedIds.has(candidate)) {\n context.usedIds.add(candidate);\n return candidate;\n }\n }\n}\nfunction migrateComponent(component, index, context) {\n if (component.dataValue !== undefined)\n return component;\n const previousSource = component.dataSource;\n if (previousSource === null) {\n return { ...component, dataValue: null };\n }\n const migrated = migrateComponentDataSource(component, previousSource, index, context);\n return migrated;\n}\nfunction migrateComponentDataSource(component, previousSource, index, context) {\n const path = ['components', index, 'dataSource'];\n const base = {\n id: component.id,\n type: component.type,\n name: component.name,\n parentId: component.parentId,\n position: component.position,\n size: component.size,\n rotation: component.rotation,\n zIndex: component.zIndex,\n status: component.status,\n props: component.props,\n style: component.style,\n // 旧字段保留为 null:当前契约仍要求该键存在,它不再是写入口。\n dataSource: null,\n ...(component.states === undefined ? {} : { states: component.states }),\n };\n switch (previousSource.type) {\n case 'static':\n context.decisions.push({\n kind: 'component-value',\n path,\n action: 'mapped',\n detail: 'Static component value became an inline value reference.',\n });\n return {\n ...base,\n dataValue: { kind: 'inline', value: previousSource.value },\n ...(previousSource.binding === undefined ? {} : { dataBinding: previousSource.binding }),\n };\n case 'variable':\n context.decisions.push({\n kind: 'component-value',\n path,\n action: 'mapped',\n detail: 'Variable component value became a variable value reference.',\n });\n if (previousSource.processorId !== undefined) {\n context.decisions.push({\n kind: 'component-value',\n path: [...path, 'processorId'],\n action: 'rejected',\n detail: 'A component value has no data source instance to own processorId; the field was dropped.',\n });\n }\n return {\n ...base,\n dataValue: { kind: 'variable', variableId: previousSource.variableId },\n ...(previousSource.binding === undefined ? {} : { dataBinding: previousSource.binding }),\n };\n default: {\n const dataSourceId = allocateDataSourceId(context);\n const instance = previousSource.type === 'dataset'\n ? {\n id: dataSourceId,\n name: previousSource.datasetId,\n source: { kind: 'dataset', datasetId: previousSource.datasetId },\n params: migrateComponentParams(previousSource.params, index, context),\n }\n : {\n id: dataSourceId,\n name: previousSource.resourceId,\n source: {\n kind: 'host-resource',\n resourceType: previousSource.resourceType,\n resourceId: previousSource.resourceId,\n },\n params: migrateComponentParams(previousSource.params, index, context),\n };\n context.dataSources.push(instance);\n context.decisions.push({\n kind: 'component-value',\n path,\n action: 'mapped',\n detail: previousSource.type === 'dataset'\n ? `Dataset component source became a data source instance \"${dataSourceId}\" referenced through an empty field path.`\n : `Host resource component source became a data source instance \"${dataSourceId}\" referenced through an empty field path.`,\n createdDataSourceId: dataSourceId,\n });\n return {\n ...base,\n dataValue: { kind: 'data-source-field', dataSourceId, path: [] },\n dataBinding: previousSource.binding,\n };\n }\n }\n}\nfunction migrateComponentParams(params, componentIndex, context) {\n const migrated = {};\n for (const [name, parameter] of Object.entries(params)) {\n if (parameter.kind === 'literal') {\n migrated[name] = { kind: 'inline', value: parameter.value };\n context.decisions.push({\n kind: 'parameter',\n path: ['components', componentIndex, 'dataSource', 'params', name, 'kind'],\n action: 'renamed',\n detail: 'Literal parameter became an inline value reference.',\n });\n }\n else {\n migrated[name] = { kind: 'variable', variableId: parameter.variableId };\n }\n }\n return migrated;\n}\nfunction migrateVariable(entry, index, context) {\n if (!('type' in entry))\n return entry;\n const path = ['variables', index];\n const withDescription = entry.description === undefined ? {} : { description: entry.description };\n if (entry.type === 'static') {\n context.decisions.push({\n kind: 'variable',\n path: [...path, 'type'],\n action: 'mapped',\n detail: 'Static variable became a variable record with an inline value and controlled false.',\n });\n return {\n id: entry.id,\n name: entry.name,\n ...withDescription,\n initialValue: entry.initialValue,\n value: { kind: 'inline', value: entry.initialValue },\n controlled: false,\n };\n }\n const dataSourceId = allocateDataSourceId(context);\n const updatePolicy = entry.type === 'data-source' && entry.autoUpdate !== undefined\n ? { mode: 'auto', intervalSeconds: entry.autoUpdate.intervalSeconds }\n : { mode: 'manual' };\n const instance = {\n id: dataSourceId,\n name: entry.name,\n source: entry.type === 'url-query'\n ? { kind: 'url-query', sourceId: entry.sourceId }\n : { kind: 'host-catalog', sourceId: entry.sourceId },\n params: {},\n updatePolicy,\n ...(entry.processorId === undefined ? {} : { processorId: entry.processorId }),\n };\n context.dataSources.push(instance);\n context.decisions.push({\n kind: 'variable',\n path,\n action: 'mapped',\n detail: entry.type === 'url-query'\n ? `Url query variable became data source instance \"${dataSourceId}\"; processorId moved to the instance.`\n : `Data source variable became data source instance \"${dataSourceId}\"; autoUpdate mapped to updatePolicy and processorId moved to the instance.`,\n createdDataSourceId: dataSourceId,\n });\n return {\n id: entry.id,\n name: entry.name,\n ...withDescription,\n initialValue: entry.initialValue,\n value: { kind: 'data-source-field', dataSourceId, path: [] },\n controlled: entry.controlled,\n };\n}\n//# sourceMappingURL=migrate-document.js.map"],"mappings":";;;AACA,SAAgB,EAAyB,GAAO;CAC5C,IAAM,IAAY;EAAE;EAAO,WAAW,CAAC;CAAE;CACzC,IAAI,CAAC,EAAS,CAAK,KAAK,CAAC,EAAS,EAAM,SAAS,GAC7C,OAAO;CACX,IAAM,IAAY,EAAM;CAIxB,IAHI,WAAW,KAAa,WAAW,KAAa,EAAE,eAAe,MAGjE,OAAO,KAAK,CAAS,CAAC,CAAC,MAAM,MAAQ,MAAQ,eAAe,MAAQ,QAAQ,GAC5E,OAAO;CAEX,IAAM,IAAY,EAAU;CAC5B,IAAI,CAAC,MAAM,QAAQ,CAAS,GACxB,OAAO;CACX,IAAM,IAAQ,CAAC,GACT,oBAAU,IAAI,IAAI,GAClB,IAAQ,CAAC,GACT,oBAAU,IAAI,IAAI,GAClB,oBAAW,IAAI,IAAI,GACnB,oBAAe,IAAI,IAAI,GACvB,IAAY,CAAC,GACb,oBAAU,IAAI,IAAI;CACxB,KAAK,IAAM,KAAY,G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