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,9 +1,9 @@
|
|
|
1
|
-
import { A as e, D as t, F as n, G as r, H as i, I as a, K as o, L as s, M as c, N as l, O as u, R as d, U as f, W as p, _ as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as ee, l as te, m as ne, n as C, p as re, q as w, r as ie, s as ae, t as oe, u as T, w as E, y as se, z as D } from "./designer-left-panel-groups-dom-
|
|
2
|
-
import {
|
|
3
|
-
import { compileScreenBlueprint as ue,
|
|
4
|
-
import { MAX_VALUE_REF_PATH_SEGMENTS as fe, SCREEN_BLUEPRINT_CAPABILITIES as pe, SCREEN_BLUEPRINT_FIXED_INPUT_PORTS as j, SCREEN_BLUEPRINT_FIXED_OUTPUT_PORTS as M, VALUE_REF_PATH_SEGMENT_PATTERN as me, parseScreenDocument as he, parseScreenJsonValue as ge, readScreenBlueprintActionPort as _e, readScreenBlueprintEdgeCategory as ve, readScreenBlueprintEventPort as N,
|
|
1
|
+
import { A as e, D as t, F as n, G as r, H as i, I as a, K as o, L as s, M as c, N as l, O as u, R as d, U as f, W as p, _ as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as ee, l as te, m as ne, n as C, p as re, q as w, r as ie, s as ae, t as oe, u as T, w as E, y as se, z as D } from "./designer-left-panel-groups-dom-DBpI3Nc2.js";
|
|
2
|
+
import { O, a as ce, c as le, j as k, p as A } from "./designer-field-primitives-C_StzrUa.js";
|
|
3
|
+
import { compileScreenBlueprint as ue, simulateScreenBlueprint as de } from "@base-screen/core";
|
|
4
|
+
import { MAX_VALUE_REF_PATH_SEGMENTS as fe, SCREEN_BLUEPRINT_CAPABILITIES as pe, SCREEN_BLUEPRINT_FIXED_INPUT_PORTS as j, SCREEN_BLUEPRINT_FIXED_OUTPUT_PORTS as M, VALUE_REF_PATH_SEGMENT_PATTERN as me, parseScreenDocument as he, parseScreenJsonValue as ge, readScreenBlueprintActionPort as _e, readScreenBlueprintEdgeCategory as ve, readScreenBlueprintEventPort as N, screenBlueprintPortTrigger as ye, screenJsonEquals as be } from "@base-screen/contracts";
|
|
5
5
|
//#region src/common/operations/blueprint/designer-blueprint-model.ts
|
|
6
|
-
var
|
|
6
|
+
var xe = 260, Se = 176, P = 80;
|
|
7
7
|
function F(e, t, n) {
|
|
8
8
|
let r = ae(n, pe.materialEvent);
|
|
9
9
|
return e.components.flatMap((e) => {
|
|
@@ -22,7 +22,7 @@ function F(e, t, n) {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ce(e, t, n) {
|
|
26
26
|
let r = F(e, t, n);
|
|
27
27
|
return {
|
|
28
28
|
isEventAvailable: (e, t) => r.some((n) => n.componentId === e && n.name === t && n.available),
|
|
@@ -30,8 +30,8 @@ function we(e, t, n) {
|
|
|
30
30
|
componentStateIds: (t) => e.components.find((e) => e.id === t)?.states?.items.map((e) => e.id) ?? []
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
let r = F(e, t, n), i =
|
|
33
|
+
function we(e, t, n) {
|
|
34
|
+
let r = F(e, t, n), i = Ne(e);
|
|
35
35
|
return e.components.map((t) => {
|
|
36
36
|
let n = s(e.blueprint, t.id);
|
|
37
37
|
return {
|
|
@@ -45,7 +45,7 @@ function Te(e, t, n) {
|
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Te(e, t) {
|
|
49
49
|
return A(e).map((n) => {
|
|
50
50
|
let r = d(e.blueprint, n.id);
|
|
51
51
|
return {
|
|
@@ -59,8 +59,8 @@ function Ee(e, t) {
|
|
|
59
59
|
};
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
let o = a.graph, s = e.blueprint, c = F(e, n, r), l = te(r), u = new Map(e.components.map((e) => [e.id, e])), d = new Map(A(e).map((e) => [e.id, e])), f = new Map((e.subCanvases ?? []).map((e) => [e.id, e])), p = new Map(s.layout?.nodes.map((e) => [e.id, e])), m =
|
|
62
|
+
function Ee(e, n, r, a) {
|
|
63
|
+
let o = a.graph, s = e.blueprint, c = F(e, n, r), l = te(r), u = new Map(e.components.map((e) => [e.id, e])), d = new Map(A(e).map((e) => [e.id, e])), f = new Map((e.subCanvases ?? []).map((e) => [e.id, e])), p = new Map(s.layout?.nodes.map((e) => [e.id, e])), m = Me(s.nodes, s.edges), h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
64
64
|
for (let e of s.edges) _.set(e.from.node, (_.get(e.from.node) ?? 0) + 1), g.set(e.to.node, (g.get(e.to.node) ?? 0) + 1), e.kind === "flow" && (h.add(`${e.from.node}\u0000out\u0000${e.from.port}`), h.add(`${e.to.node}\u0000in\u0000${e.to.port}`));
|
|
65
65
|
let v = (e, t, n, r, i = !0) => ({
|
|
66
66
|
id: n,
|
|
@@ -134,7 +134,7 @@ function De(e, n, r, a) {
|
|
|
134
134
|
let r = N(n);
|
|
135
135
|
r !== void 0 && t.push(v(e, "in", n, o.hostEventPort(r)));
|
|
136
136
|
}
|
|
137
|
-
t.push(v(e, "in", `event:${
|
|
137
|
+
t.push(v(e, "in", `event:${Oe(s, e.id)}`, o.newHostEventPort));
|
|
138
138
|
for (let n of l) t.push(v(e, "in", `action:${n.actionId}`, o.hostActionPort(n.name)));
|
|
139
139
|
for (let n of y(e, "in")) {
|
|
140
140
|
let r = _e(n);
|
|
@@ -186,7 +186,7 @@ function De(e, n, r, a) {
|
|
|
186
186
|
case "condition": return {
|
|
187
187
|
...i,
|
|
188
188
|
title: e.name ?? o.conditionTitle,
|
|
189
|
-
subtitle:
|
|
189
|
+
subtitle: ke(e.condition, a),
|
|
190
190
|
outputs: r,
|
|
191
191
|
inputs: n,
|
|
192
192
|
condition: e.condition,
|
|
@@ -194,7 +194,7 @@ function De(e, n, r, a) {
|
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
|
-
|
|
197
|
+
je(b, p);
|
|
198
198
|
let x = new Map(b.map((e) => [e.id, e])), S = t(s);
|
|
199
199
|
return {
|
|
200
200
|
nodes: b,
|
|
@@ -236,12 +236,12 @@ function De(e, n, r, a) {
|
|
|
236
236
|
...s.layout?.viewport === void 0 ? {} : { viewport: s.layout.viewport }
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function De(e, t) {
|
|
240
240
|
let n = [];
|
|
241
241
|
for (let r of t.blueprint.nodes) {
|
|
242
242
|
if (r.enabled === !1) continue;
|
|
243
243
|
let t = e.nodes.find((e) => e.id === r.id);
|
|
244
|
-
for (let e of t?.outputs ?? []) e.connected &&
|
|
244
|
+
for (let e of t?.outputs ?? []) e.connected && ye(r, e.id) !== void 0 && n.push({
|
|
245
245
|
nodeId: r.id,
|
|
246
246
|
port: e.id,
|
|
247
247
|
label: `${t?.title ?? r.id} · ${e.label}`
|
|
@@ -249,11 +249,11 @@ function Oe(e, t) {
|
|
|
249
249
|
}
|
|
250
250
|
return n;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function Oe(e, t) {
|
|
253
253
|
let n = new Set(e.edges.flatMap((e) => e.kind === "flow" && e.to.node === t ? [e.to.port] : []));
|
|
254
254
|
for (let e = 1;; e++) if (!n.has(`event:event${e}`)) return `event${e}`;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function ke(e, t) {
|
|
257
257
|
let n = (e) => {
|
|
258
258
|
switch (e.kind) {
|
|
259
259
|
case "literal": return JSON.stringify(e.value) ?? "null";
|
|
@@ -264,11 +264,11 @@ function Ae(e, t) {
|
|
|
264
264
|
}, r = t.conditionOperator(e.operator);
|
|
265
265
|
return e.right === void 0 ? `${n(e.left)} ${r}` : `${n(e.left)} ${r} ${n(e.right)}`;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Ae(e) {
|
|
268
268
|
let t = e.inputs.length + e.outputs.length + +!!e.semantic;
|
|
269
269
|
return Math.max(108, 71 + t * 27);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function je(e, t) {
|
|
272
272
|
let n = /* @__PURE__ */ new Map();
|
|
273
273
|
e.forEach((e, r) => {
|
|
274
274
|
if (t.has(e.id)) return;
|
|
@@ -282,11 +282,11 @@ function Me(e, t) {
|
|
|
282
282
|
e[r] = {
|
|
283
283
|
...t,
|
|
284
284
|
y: n
|
|
285
|
-
}, n +=
|
|
285
|
+
}, n += Ae(t) + 28;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Me(e, t) {
|
|
290
290
|
let n = /* @__PURE__ */ new Map();
|
|
291
291
|
for (let e of t) {
|
|
292
292
|
if (e.kind !== "flow") continue;
|
|
@@ -305,13 +305,13 @@ function Ne(e, t) {
|
|
|
305
305
|
for (let t of e) {
|
|
306
306
|
let e = a(t.id), n = o.get(e) ?? 0;
|
|
307
307
|
o.set(e, n + 1), s.set(t.id, {
|
|
308
|
-
x: P + e *
|
|
309
|
-
y: P + n *
|
|
308
|
+
x: P + e * xe,
|
|
309
|
+
y: P + n * Se
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
return s;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Ne(e) {
|
|
315
315
|
let t = new Map(e.components.map((e) => [e.id, e])), n = /* @__PURE__ */ new Map();
|
|
316
316
|
for (let r of e.components) {
|
|
317
317
|
let e = 0, i = r.parentId, a = /* @__PURE__ */ new Set([r.id]);
|
|
@@ -322,12 +322,12 @@ function Pe(e) {
|
|
|
322
322
|
}
|
|
323
323
|
//#endregion
|
|
324
324
|
//#region src/browser/dom/blueprint/designer-blueprint-default-canvas.ts
|
|
325
|
-
var
|
|
325
|
+
var Pe = 0, I = 8, L = .3, Fe = 2, R = k.blueprint.graph, Ie = [
|
|
326
326
|
"lifecycle",
|
|
327
327
|
"timer",
|
|
328
328
|
"condition",
|
|
329
329
|
"host"
|
|
330
|
-
],
|
|
330
|
+
], Le = {
|
|
331
331
|
component: "cube",
|
|
332
332
|
variable: "variable",
|
|
333
333
|
host: "database",
|
|
@@ -337,14 +337,14 @@ var Fe = 0, I = 8, L = .3, Ie = 2, R = O.blueprint.graph, Le = [
|
|
|
337
337
|
"sub-canvas": "copy",
|
|
338
338
|
"main-canvas": "grid"
|
|
339
339
|
};
|
|
340
|
-
function
|
|
341
|
-
let t = new
|
|
340
|
+
function Re(e) {
|
|
341
|
+
let t = new ze(e);
|
|
342
342
|
return {
|
|
343
343
|
element: t.element,
|
|
344
344
|
destroy: () => t.destroy()
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
var
|
|
347
|
+
var ze = class {
|
|
348
348
|
element;
|
|
349
349
|
#e;
|
|
350
350
|
#t;
|
|
@@ -392,7 +392,7 @@ var Be = class {
|
|
|
392
392
|
constructor(e) {
|
|
393
393
|
this.#e = e;
|
|
394
394
|
let t = e.createElement("div");
|
|
395
|
-
t.className = "designer-blueprint-canvas", t.tabIndex = 0, t.setAttribute("role", "application"), t.setAttribute("aria-label",
|
|
395
|
+
t.className = "designer-blueprint-canvas", t.tabIndex = 0, t.setAttribute("role", "application"), t.setAttribute("aria-label", k.blueprint.canvas), t.dataset.designerBlueprintCanvas = "true", t.innerHTML = `<div class="bp-toolbar" role="toolbar" aria-label="${T(k.blueprint.localToolbar)}"></div>
|
|
396
396
|
<div class="bp-stage" data-bp-stage>
|
|
397
397
|
<div class="bp-world" data-bp-world>
|
|
398
398
|
<svg class="bp-edges" data-bp-edges aria-hidden="true"></svg>
|
|
@@ -429,7 +429,7 @@ var Be = class {
|
|
|
429
429
|
this.#d = e, this.#h = e.selection, (t === void 0 || t.documentRevision !== e.documentRevision) && this.#m.clear(), !this.#p && e.graph.viewport !== void 0 && (this.#f = {
|
|
430
430
|
x: e.graph.viewport.x,
|
|
431
431
|
y: e.graph.viewport.y,
|
|
432
|
-
z: z(e.graph.viewport.zoom, L,
|
|
432
|
+
z: z(e.graph.viewport.zoom, L, Fe)
|
|
433
433
|
}, this.#p = !0), this.element.dataset.active = String(e.active), this.render();
|
|
434
434
|
let n = e.viewRequest;
|
|
435
435
|
n !== void 0 && n.id !== this.#T ? (this.#T = n.id, n.type === "fit" ? this.fit() : n.type === "auto-layout" ? this.autoLayout() : n.targetId !== void 0 && this.focus(n.targetId)) : !this.#p && e.graph.nodes.length > 0 && (this.#p = !0, this.fit());
|
|
@@ -481,7 +481,7 @@ var Be = class {
|
|
|
481
481
|
portPoint(e, t, n) {
|
|
482
482
|
let r = this.rows(e), i = Math.max(0, r.findIndex((e) => t === "semantic" ? e === "semantic" : e !== "semantic" && e.id === t && e.direction === n)), a = this.position(e);
|
|
483
483
|
return {
|
|
484
|
-
x: n === "out" ? a.x + 164 +
|
|
484
|
+
x: n === "out" ? a.x + 164 + Pe : a.x - Pe,
|
|
485
485
|
y: a.y + 1 + 44 + 12 + i * 27 + 27 / 2
|
|
486
486
|
};
|
|
487
487
|
}
|
|
@@ -498,7 +498,7 @@ var Be = class {
|
|
|
498
498
|
render() {
|
|
499
499
|
this.renderNodes(), this.renderEdges(), this.renderToolbar(), this.renderSimulation();
|
|
500
500
|
let e = this.graph.nodes.length === 0;
|
|
501
|
-
this.#u.hidden = !e, e && (this.#u.innerHTML = `<strong>${_(
|
|
501
|
+
this.#u.hidden = !e, e && (this.#u.innerHTML = `<strong>${_(k.blueprint.directNodeHint)}</strong>`);
|
|
502
502
|
}
|
|
503
503
|
renderNodes() {
|
|
504
504
|
let e = this.#y ? this.#d?.trace : null;
|
|
@@ -511,9 +511,9 @@ var Be = class {
|
|
|
511
511
|
}
|
|
512
512
|
let i = r.unavailableReason === void 0 ? r.id : `${r.id} · ${r.unavailableReason}`, a = n.get(`${e.id}\u0000${r.direction}\u0000${r.id}`);
|
|
513
513
|
return `<div class="bp-anchor" data-dir="${r.direction}" data-available="${String(r.available)}" title="${T(i)}"><span class="bp-port${r.connected ? " is-used" : ""}" data-bp-node="${T(e.id)}" data-bp-port="${T(r.id)}" data-bp-dir="${r.direction}" data-available="${String(r.available)}"${a === void 0 ? "" : ` data-category="${a}"`}></span><span class="bp-anchor-label">${_(r.label)}</span></div>`;
|
|
514
|
-
}).join(""), a = e.kind === "sub-canvas" && e.canvasDisplay !== void 0 ? R.subCanvasKinds[e.canvasDisplay] : R.nodeKinds[e.kind], o = e.kind === "sub-canvas" && e.canvasDisplay === "page" ? "doc" :
|
|
514
|
+
}).join(""), a = e.kind === "sub-canvas" && e.canvasDisplay !== void 0 ? R.subCanvasKinds[e.canvasDisplay] : R.nodeKinds[e.kind], o = e.kind === "sub-canvas" && e.canvasDisplay === "page" ? "doc" : Le[e.kind], s = this.#v === e.id ? `<input class="bp-rename" data-bp-rename-input value="${T(e.name ?? e.title)}" maxlength="64" aria-label="${T(R.nodeName)}">` : _(e.title);
|
|
515
515
|
return `<div class="bp-node" data-bp-node-id="${T(e.id)}" data-kind="${e.kind}" data-enabled="${String(e.enabled)}" style="left:${r.x}px;top:${r.y}px;min-height:${this.height(e)}px" role="group" aria-label="${T(`${a} ${e.title}`)}">
|
|
516
|
-
<div class="bp-node-header" data-bp-drag="${T(e.id)}" title="${T(`${e.title} · ${e.subtitle}`)}"><span class="bp-node-icon" aria-hidden="true">${
|
|
516
|
+
<div class="bp-node-header" data-bp-drag="${T(e.id)}" title="${T(`${e.title} · ${e.subtitle}`)}"><span class="bp-node-icon" aria-hidden="true">${O(o)}</span><span class="bp-node-heading"><span class="bp-node-title" data-bp-rename="${T(e.id)}">${s}</span>${e.title === a ? "" : `<span class="bp-node-kind">${_(a)}</span>`}</span></div>
|
|
517
517
|
<div class="bp-node-content">${i}</div>
|
|
518
518
|
</div>`;
|
|
519
519
|
}).join("");
|
|
@@ -547,7 +547,7 @@ var Be = class {
|
|
|
547
547
|
if (!this.visibleEdge(e)) continue;
|
|
548
548
|
let t = this.node(e.source), a = this.node(e.target);
|
|
549
549
|
if (t === void 0 || a === void 0) continue;
|
|
550
|
-
let o =
|
|
550
|
+
let o = Be(this.portPoint(t, e.sourcePort, "out"), this.portPoint(a, e.targetPort, "in")), s = [
|
|
551
551
|
"bp-edge",
|
|
552
552
|
`is-${e.kind}`,
|
|
553
553
|
e.active ? "" : "is-off",
|
|
@@ -557,7 +557,7 @@ var Be = class {
|
|
|
557
557
|
let c = e.order !== void 0 && (e.siblingCount ?? 1) > 1 ? `#${e.order} ` : "";
|
|
558
558
|
i += `<div class="bp-edge-label" data-bp-edge-label="${T(e.id)}" data-category="${e.category}" style="left:${o.mid.x}px;top:${o.mid.y}px">${_(c + e.label)}</div>`;
|
|
559
559
|
}
|
|
560
|
-
e !== void 0 && (r += `<path class="bp-edge-ghost" d="${
|
|
560
|
+
e !== void 0 && (r += `<path class="bp-edge-ghost" d="${Be(e.from, e.to).d}"/><circle class="bp-edge-ghost-end" cx="${e.to.x}" cy="${e.to.y}" r="4"/>`);
|
|
561
561
|
let a = `${r}\u0000${i}`;
|
|
562
562
|
a !== this.#O && (this.#O = a, this.#r.innerHTML = r, this.#a.innerHTML = i), this.applyEdgeState();
|
|
563
563
|
}
|
|
@@ -604,25 +604,25 @@ var Be = class {
|
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
renderToolbar() {
|
|
607
|
-
let e = this.#d, t =
|
|
608
|
-
<button type="button" class="designer-control designer-button bp-tool bp-tool-wide" data-bp-tool="add" aria-haspopup="menu" aria-label="${T(t.addNode)}" data-tip="${T(t.addNode)}">${
|
|
607
|
+
let e = this.#d, t = k.blueprint.graph.toolbar, n = (e, t, n, r = "") => `<button type="button" class="designer-control designer-button bp-tool" data-bp-tool="${e}" aria-label="${T(n)}" data-tip="${T(n)}"${r}>${O(t)}</button>`, r = e?.diagnostics.filter((e) => e.severity === "error").length ?? 0, i = `<div class="bp-tool-group">
|
|
608
|
+
<button type="button" class="designer-control designer-button bp-tool bp-tool-wide" data-bp-tool="add" aria-haspopup="menu" aria-label="${T(t.addNode)}" data-tip="${T(t.addNode)}">${O("plus")}<span>${_(t.addNode)}</span></button>
|
|
609
609
|
${n("auto-layout", "grid", t.autoLayout)}
|
|
610
610
|
</div>
|
|
611
611
|
<div class="bp-tool-group">
|
|
612
|
-
${n("undo", "undo",
|
|
613
|
-
${n("redo", "redo",
|
|
612
|
+
${n("undo", "undo", k.blueprint.graph.toolbar.undo, e?.canUndo === !0 ? "" : " disabled")}
|
|
613
|
+
${n("redo", "redo", k.blueprint.graph.toolbar.redo, e?.canRedo === !0 ? "" : " disabled")}
|
|
614
614
|
</div>
|
|
615
615
|
<div class="bp-tool-group">
|
|
616
616
|
${n("semantic", "link", t.semantic, ` aria-pressed="${String(this.#b)}"`)}
|
|
617
617
|
${n("trace", "activity", t.highlightTrace, ` aria-pressed="${String(this.#y)}"`)}
|
|
618
|
-
<span class="bp-tool-status" data-state="${r === 0 ? "ok" : "error"}" aria-live="polite">${
|
|
618
|
+
<span class="bp-tool-status" data-state="${r === 0 ? "ok" : "error"}" aria-live="polite">${O(r === 0 ? "check-circle" : "x-circle")}<span>${_(r === 0 ? k.blueprint.problemsHealthy : `${k.blueprint.problemsTitle} ${r}`)}</span></span>
|
|
619
619
|
</div>
|
|
620
620
|
<div class="bp-tool-group bp-tool-group-end">
|
|
621
621
|
${n("zoom-out", "zoom-out", t.zoomOut)}
|
|
622
622
|
<span class="bp-zoom-value" data-bp-zoom>${Math.round(this.#f.z * 100)}%</span>
|
|
623
623
|
${n("zoom-in", "zoom-in", t.zoomIn)}
|
|
624
624
|
${n("fit", "fit", t.fit)}
|
|
625
|
-
<button type="button" class="designer-control designer-button bp-tool bp-tool-wide" data-bp-tool="simulate" data-variant="${this.#x ? "primary" : "neutral"}" aria-pressed="${String(this.#x)}" aria-label="${T(t.simulate)}" data-tip="${T(t.simulate)}">${
|
|
625
|
+
<button type="button" class="designer-control designer-button bp-tool bp-tool-wide" data-bp-tool="simulate" data-variant="${this.#x ? "primary" : "neutral"}" aria-pressed="${String(this.#x)}" aria-label="${T(t.simulate)}" data-tip="${T(t.simulate)}">${O("play")}<span>${_(t.simulate)}</span></button>
|
|
626
626
|
</div>`;
|
|
627
627
|
i !== this.#k && (this.#k = i, this.#c.innerHTML = i, v(this.#c));
|
|
628
628
|
}
|
|
@@ -636,7 +636,7 @@ var Be = class {
|
|
|
636
636
|
let r = this.#l.querySelector("[data-bp-sim-payload]")?.value ?? "{}", i = t.length === 0 ? `<p class="bp-simulation-empty">${_(e.noTriggers)}</p>` : `<label class="designer-field"><span class="designer-field-label">${_(e.trigger)}</span><select class="designer-control designer-select" data-bp-sim-trigger>${t.map((e) => `<option value="${T(n(e))}"${n(e) === this.#S ? " selected" : ""}>${_(e.label)}</option>`).join("")}</select></label>
|
|
637
637
|
<label class="designer-field bp-simulation-payload"><span class="designer-field-label">${_(e.payload)}</span><textarea class="designer-control designer-input" data-bp-sim-payload rows="2" spellcheck="false">${_(r)}</textarea></label>
|
|
638
638
|
<div class="bp-simulation-actions">
|
|
639
|
-
<button type="button" class="designer-control designer-button" data-variant="primary" data-bp-sim="run">${
|
|
639
|
+
<button type="button" class="designer-control designer-button" data-variant="primary" data-bp-sim="run">${O("play")}<span>${_(e.run)}</span></button>
|
|
640
640
|
<button type="button" class="designer-control designer-button" data-bp-sim="clear"${this.#d?.trace === null ? " disabled" : ""}>${_(e.clear)}</button>
|
|
641
641
|
</div>
|
|
642
642
|
<p class="bp-simulation-message" data-bp-sim-message aria-live="polite"></p>`;
|
|
@@ -648,7 +648,7 @@ var Be = class {
|
|
|
648
648
|
e !== null && (e.textContent = `${Math.round(this.#f.z * 100)}%`);
|
|
649
649
|
}
|
|
650
650
|
zoomAt(e, t, n) {
|
|
651
|
-
let r = z(this.#f.z * e, L,
|
|
651
|
+
let r = z(this.#f.z * e, L, Fe), i = r / this.#f.z;
|
|
652
652
|
this.#f = {
|
|
653
653
|
x: t - (t - this.#f.x) * i,
|
|
654
654
|
y: n - (n - this.#f.y) * i,
|
|
@@ -677,7 +677,7 @@ var Be = class {
|
|
|
677
677
|
x: i.width / 2 - (a.x + 164 / 2) * this.#f.z,
|
|
678
678
|
y: i.height / 2 - (a.y + this.height(r) / 2) * this.#f.z
|
|
679
679
|
}, this.applyView();
|
|
680
|
-
let o = this.#i.querySelector(`[data-bp-node-id="${
|
|
680
|
+
let o = this.#i.querySelector(`[data-bp-node-id="${He(r.id)}"]`);
|
|
681
681
|
o?.classList.add("is-flash"), setTimeout(() => o?.classList.remove("is-flash"), 600);
|
|
682
682
|
}
|
|
683
683
|
autoLayout() {
|
|
@@ -856,7 +856,7 @@ var Be = class {
|
|
|
856
856
|
y: Math.round((a.y + r) / I) * I
|
|
857
857
|
};
|
|
858
858
|
this.#m.set(e, o);
|
|
859
|
-
let s = this.#i.querySelector(`[data-bp-node-id="${
|
|
859
|
+
let s = this.#i.querySelector(`[data-bp-node-id="${He(e)}"]`);
|
|
860
860
|
s !== null && (s.style.left = `${o.x}px`, s.style.top = `${o.y}px`);
|
|
861
861
|
}), this.#D = "", this.renderEdges();
|
|
862
862
|
return;
|
|
@@ -1100,11 +1100,11 @@ var Be = class {
|
|
|
1100
1100
|
});
|
|
1101
1101
|
}
|
|
1102
1102
|
menuItem(e, t, n, r = {}) {
|
|
1103
|
-
return `<button type="button" class="designer-control designer-button designer-menu-item" role="menuitem" data-bp-menu-action="${T(e)}"${r.danger === !0 ? " data-menu-tone=\"danger\"" : ""}${r.disabled === !0 ? " disabled" : ""}><span class="menu-item-icon" aria-hidden="true">${
|
|
1103
|
+
return `<button type="button" class="designer-control designer-button designer-menu-item" role="menuitem" data-bp-menu-action="${T(e)}"${r.danger === !0 ? " data-menu-tone=\"danger\"" : ""}${r.disabled === !0 ? " disabled" : ""}><span class="menu-item-icon" aria-hidden="true">${O(t)}</span><span class="menu-item-label">${_(n)}</span>${r.kbd === void 0 ? "" : `<kbd>${_(r.kbd)}</kbd>`}</button>`;
|
|
1104
1104
|
}
|
|
1105
1105
|
addItems() {
|
|
1106
1106
|
let e = new Set(this.graph.nodes.map((e) => e.kind));
|
|
1107
|
-
return
|
|
1107
|
+
return Ie.map((t) => this.menuItem(`add:${t}`, Le[t], R.nodeKinds[t], { disabled: (t === "host" || t === "lifecycle") && e.has(t) })).join("");
|
|
1108
1108
|
}
|
|
1109
1109
|
openMenu(e, t, n, r) {
|
|
1110
1110
|
let i = n?.closest("[data-bp-node-id]") ?? null, a = n?.closest("[data-bp-edge]") ?? null;
|
|
@@ -1125,8 +1125,8 @@ var Be = class {
|
|
|
1125
1125
|
edges: []
|
|
1126
1126
|
});
|
|
1127
1127
|
this.#w = this.toWorld(e, t);
|
|
1128
|
-
let o = R.menu, s = this.#h.nodes.map((e) => this.node(e)).filter(
|
|
1129
|
-
if (s.length > 1 && (l += `<div class="designer-context-menu-heading"><span class="designer-context-menu-heading-icon" aria-hidden="true">${
|
|
1128
|
+
let o = R.menu, s = this.#h.nodes.map((e) => this.node(e)).filter(Ve), c = s.length === 1 ? s[0] : void 0, l = "";
|
|
1129
|
+
if (s.length > 1 && (l += `<div class="designer-context-menu-heading"><span class="designer-context-menu-heading-icon" aria-hidden="true">${O("select-all")}</span><span class="designer-context-menu-heading-label">${_(R.multiSelection(s.length, this.#h.edges.length))}</span></div>`), s.length > 0) {
|
|
1130
1130
|
let e = s.some((e) => e.enabled);
|
|
1131
1131
|
l += this.menuItem("delete", "trash", o.delete, {
|
|
1132
1132
|
kbd: "Delete",
|
|
@@ -1222,7 +1222,7 @@ var Be = class {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
1224
|
};
|
|
1225
|
-
function
|
|
1225
|
+
function Be(e, t) {
|
|
1226
1226
|
let n = Math.abs(t.x - e.x), r = t.x < e.x ? .8 : .5, i = {
|
|
1227
1227
|
x: e.x + n * r,
|
|
1228
1228
|
y: e.y
|
|
@@ -1242,15 +1242,15 @@ function Ve(e, t) {
|
|
|
1242
1242
|
function z(e, t, n) {
|
|
1243
1243
|
return Math.min(n, Math.max(t, e));
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function Ve(e) {
|
|
1246
1246
|
return e !== void 0;
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function He(e) {
|
|
1249
1249
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/["\\]/g, "\\$&");
|
|
1250
1250
|
}
|
|
1251
1251
|
//#endregion
|
|
1252
1252
|
//#region src/browser/dom/blueprint/designer-blueprint-workbench-dom.ts
|
|
1253
|
-
function
|
|
1253
|
+
function Ue(e, t, n, r) {
|
|
1254
1254
|
let i = e.querySelector(".designer");
|
|
1255
1255
|
i !== null && (i.dataset.authoringMode = t);
|
|
1256
1256
|
let a = e.querySelector("[data-blueprint-surface]");
|
|
@@ -1258,29 +1258,29 @@ function We(e, t, n, r) {
|
|
|
1258
1258
|
for (let r of e.querySelectorAll("[data-workbench-mode-tab]")) {
|
|
1259
1259
|
let e = r.dataset.workbenchModeTab, i = e === t, a = e === "blueprint" && !n;
|
|
1260
1260
|
r.disabled = a, r.dataset.active = String(i), r.setAttribute("aria-selected", String(i)), r.tabIndex = i ? 0 : -1;
|
|
1261
|
-
let o = a ?
|
|
1261
|
+
let o = a ? k.interactionWorkspaceUnavailable : e === "blueprint" ? k.interactionWorkspaceHint : k.canvasWorkspace;
|
|
1262
1262
|
r.setAttribute("data-tip", o), r.ariaLabel = o;
|
|
1263
1263
|
}
|
|
1264
|
-
let o = t === "blueprint" ?
|
|
1264
|
+
let o = t === "blueprint" ? k.commandPalette.blueprintTrigger : k.commandPalette.trigger, s = e.querySelector("[data-command-palette-trigger-label]");
|
|
1265
1265
|
s !== null && (s.textContent = o);
|
|
1266
1266
|
let c = e.querySelector("[data-command-palette-toggle]");
|
|
1267
|
-
if (c !== null && (c.ariaLabel = o, c.setAttribute("data-tip", o)),
|
|
1267
|
+
if (c !== null && (c.ariaLabel = o, c.setAttribute("data-tip", o)), We(e, t, r.nodes), t !== "blueprint") return;
|
|
1268
1268
|
let l = e.querySelector("[data-status-selection]");
|
|
1269
|
-
l !== null && (l.textContent =
|
|
1269
|
+
l !== null && (l.textContent = k.blueprint.workbench);
|
|
1270
1270
|
let u = e.querySelector("[data-status-canvas]");
|
|
1271
|
-
u !== null && (u.textContent =
|
|
1271
|
+
u !== null && (u.textContent = k.blueprint.status(r.nodes, r.relations, r.semantic, r.structural, r.problems));
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1273
|
+
function We(e, t, n) {
|
|
1274
1274
|
let r = t === "blueprint", i = e.querySelector("[data-blueprint-library]"), a = e.querySelector("[data-blueprint-inspector]");
|
|
1275
|
-
i !== null && (i.hidden = !r), a !== null && (a.hidden = !r),
|
|
1275
|
+
i !== null && (i.hidden = !r), a !== null && (a.hidden = !r), Ge(e, "left", r, k.blueprint.library, n), Ge(e, "right", r, k.blueprint.inspector);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function Ge(e, t, n, r, i) {
|
|
1278
1278
|
let a = e.querySelector(`[data-${t}-panel-title]`), o = e.querySelector(`[data-${t}-panel-count]`);
|
|
1279
|
-
a !== null && (n ? (a.dataset.canvasTitle ??= a.textContent ?? "", a.textContent = r) : a.dataset.canvasTitle !== void 0 && (a.textContent = a.dataset.canvasTitle, delete a.dataset.canvasTitle)), o !== null && (n ? (o.dataset.canvasCount ??= o.textContent ?? "", o.dataset.canvasAriaLabel ??= o.getAttribute("aria-label") ?? "", o.textContent = String(i ?? 0), o.setAttribute("aria-label",
|
|
1279
|
+
a !== null && (n ? (a.dataset.canvasTitle ??= a.textContent ?? "", a.textContent = r) : a.dataset.canvasTitle !== void 0 && (a.textContent = a.dataset.canvasTitle, delete a.dataset.canvasTitle)), o !== null && (n ? (o.dataset.canvasCount ??= o.textContent ?? "", o.dataset.canvasAriaLabel ??= o.getAttribute("aria-label") ?? "", o.textContent = String(i ?? 0), o.setAttribute("aria-label", k.blueprint.panelCount(r, i ?? 0))) : o.dataset.canvasCount !== void 0 && (o.textContent = o.dataset.canvasCount, o.setAttribute("aria-label", o.dataset.canvasAriaLabel ?? ""), delete o.dataset.canvasCount, delete o.dataset.canvasAriaLabel));
|
|
1280
1280
|
}
|
|
1281
1281
|
//#endregion
|
|
1282
1282
|
//#region src/browser/controllers/blueprint/designer-blueprint-canvas-bridge-helpers.ts
|
|
1283
|
-
function
|
|
1283
|
+
function Ke(e) {
|
|
1284
1284
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1285
1285
|
}
|
|
1286
1286
|
function B(e, t) {
|
|
@@ -1297,15 +1297,15 @@ function V(e, t) {
|
|
|
1297
1297
|
diagnostics: [B(e, t)]
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
let n =
|
|
1300
|
+
function qe(e, t) {
|
|
1301
|
+
let n = Ke(e) && typeof e.commandId == "string" ? e.commandId.slice(0, 128) : "invalid-command";
|
|
1302
1302
|
return w({
|
|
1303
1303
|
commandId: n,
|
|
1304
1304
|
status: "rejected",
|
|
1305
1305
|
diagnostics: t
|
|
1306
1306
|
});
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Je(e) {
|
|
1309
1309
|
return { hasBlueprintCapability: (t) => {
|
|
1310
1310
|
try {
|
|
1311
1311
|
return e()?.hasBlueprintCapability(t) === !0;
|
|
@@ -1314,13 +1314,13 @@ function Ye(e) {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
} };
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1318
|
-
let t =
|
|
1317
|
+
function Ye(e) {
|
|
1318
|
+
let t = k.blueprint.graph.connection;
|
|
1319
1319
|
return e === "duplicate" ? t.duplicate : e === "cycle" ? t.cycle : e === "unavailable" ? t.unavailable : t.invalid;
|
|
1320
1320
|
}
|
|
1321
1321
|
//#endregion
|
|
1322
1322
|
//#region src/browser/controllers/blueprint/designer-blueprint-canvas-bridge.ts
|
|
1323
|
-
var
|
|
1323
|
+
var Xe = 256, H = k.blueprint.graph, Ze = class {
|
|
1324
1324
|
callbacks;
|
|
1325
1325
|
#e;
|
|
1326
1326
|
#t;
|
|
@@ -1367,7 +1367,7 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1367
1367
|
selection: this.callbacks.getSelection(),
|
|
1368
1368
|
diagnostics: this.stateDiagnostics(),
|
|
1369
1369
|
trace: this.#n,
|
|
1370
|
-
simulationTriggers: n === void 0 ? [] :
|
|
1370
|
+
simulationTriggers: n === void 0 ? [] : De(e, n),
|
|
1371
1371
|
showSemantic: this.callbacks.getShowSemantic(),
|
|
1372
1372
|
...r === void 0 ? {} : { viewRequest: r },
|
|
1373
1373
|
...this.#r === void 0 ? {} : { lastCommand: this.#r }
|
|
@@ -1376,9 +1376,9 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
commitBlueprint(e) {
|
|
1378
1378
|
let t = this.callbacks.getDocument();
|
|
1379
|
-
if (t === void 0) return V("AUTHORING_EXPIRED",
|
|
1380
|
-
if (e === null) return V("AUTHORING_REQUEST_INVALID",
|
|
1381
|
-
if (
|
|
1379
|
+
if (t === void 0) return V("AUTHORING_EXPIRED", k.lifecycle.unloaded);
|
|
1380
|
+
if (e === null) return V("AUTHORING_REQUEST_INVALID", k.blueprint.invalidCommand);
|
|
1381
|
+
if (be(e, t.blueprint)) return {
|
|
1382
1382
|
ok: !0,
|
|
1383
1383
|
value: t,
|
|
1384
1384
|
diagnostics: []
|
|
@@ -1402,7 +1402,7 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
receive(e) {
|
|
1404
1404
|
if (this.#t === void 0 || !e.composedPath().includes(this.#t)) return;
|
|
1405
|
-
let t = e.detail, n =
|
|
1405
|
+
let t = e.detail, n = Ke(t) && Object.keys(t).length === 1 && "command" in t ? t.command : void 0, r = ne(n);
|
|
1406
1406
|
if (!r.ok) {
|
|
1407
1407
|
this.rejectUnknown(n, r.diagnostics);
|
|
1408
1408
|
return;
|
|
@@ -1414,7 +1414,7 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
let o = i.type === "select" || i.type === "run-simulation" || i.type === "clear-simulation";
|
|
1416
1416
|
if (i.generation !== this.#i || !o && i.documentRevision !== this.callbacks.getDocumentRevision()) {
|
|
1417
|
-
this.finish(i.commandId, "rejected", [B("AUTHORING_EXPIRED",
|
|
1417
|
+
this.finish(i.commandId, "rejected", [B("AUTHORING_EXPIRED", k.blueprint.staleCommand)]);
|
|
1418
1418
|
return;
|
|
1419
1419
|
}
|
|
1420
1420
|
this.execute(i);
|
|
@@ -1426,7 +1426,7 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
let n = this.callbacks.getDocument();
|
|
1428
1428
|
if (n === void 0) {
|
|
1429
|
-
this.finish(t.commandId, "rejected", [B("AUTHORING_EXPIRED",
|
|
1429
|
+
this.finish(t.commandId, "rejected", [B("AUTHORING_EXPIRED", k.lifecycle.unloaded)]);
|
|
1430
1430
|
return;
|
|
1431
1431
|
}
|
|
1432
1432
|
let r = {
|
|
@@ -1439,8 +1439,8 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1439
1439
|
r = this.callbacks.select(t.selection, !1);
|
|
1440
1440
|
break;
|
|
1441
1441
|
case "connect": {
|
|
1442
|
-
let i = e(n.blueprint, t.from, t.to,
|
|
1443
|
-
r = i.ok ? this.commitBlueprint(i.blueprint) : V("AUTHORING_REQUEST_INVALID",
|
|
1442
|
+
let i = e(n.blueprint, t.from, t.to, Ce(n, this.callbacks.getCatalog(), this.callbacks.getRuntimeContributions()));
|
|
1443
|
+
r = i.ok ? this.commitBlueprint(i.blueprint) : V("AUTHORING_REQUEST_INVALID", Ye(i.reason)), r.ok && i.ok && (r = this.callbacks.select({
|
|
1444
1444
|
nodes: [],
|
|
1445
1445
|
edges: [i.edgeId]
|
|
1446
1446
|
}, !1));
|
|
@@ -1498,148 +1498,68 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
runSimulation(e, t, n) {
|
|
1500
1500
|
let r = this.callbacks.getDocument();
|
|
1501
|
-
if (r === void 0) return V("AUTHORING_EXPIRED",
|
|
1502
|
-
let i = a(r.blueprint, e), o = i === void 0 ? void 0 :
|
|
1503
|
-
if (o === void 0) return V("AUTHORING_REQUEST_INVALID",
|
|
1504
|
-
let s =
|
|
1501
|
+
if (r === void 0) return V("AUTHORING_EXPIRED", k.lifecycle.unloaded);
|
|
1502
|
+
let i = a(r.blueprint, e), o = i === void 0 ? void 0 : Qe(i, t, n);
|
|
1503
|
+
if (o === void 0) return V("AUTHORING_REQUEST_INVALID", k.blueprint.invalidCommand);
|
|
1504
|
+
let s = de(r, o);
|
|
1505
1505
|
if (!s.ok) return s;
|
|
1506
|
-
let c = s.value,
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1506
|
+
let { plan: c, dispatches: l } = s.value, u = [], d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set([e]), p = new Map(this.callbacks.getGraph().nodes.map((e) => [e.id, e.title]));
|
|
1507
|
+
for (let { depth: e, ruleTraces: t } of l) for (let n of t) {
|
|
1508
|
+
if (!n.triggerMatched) continue;
|
|
1509
|
+
let t = c.rules.find((e) => e.id === n.ruleId);
|
|
1510
|
+
if (t === void 0) continue;
|
|
1511
|
+
f.add(t.nodeId), u.push({
|
|
1512
|
+
kind: e === 0 ? "trigger" : "cascade",
|
|
1513
|
+
nodeId: t.nodeId,
|
|
1514
|
+
depth: e,
|
|
1515
|
+
text: p.get(t.nodeId) ?? t.nodeId
|
|
1510
1516
|
});
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
let i = g;
|
|
1520
|
-
i !== null && (n && _.push(i), v({
|
|
1521
|
-
type: "canvas-event",
|
|
1522
|
-
canvasId: i,
|
|
1523
|
-
name: "closed",
|
|
1524
|
-
payload: null
|
|
1525
|
-
}, r)), g = e, v({
|
|
1526
|
-
type: "canvas-event",
|
|
1527
|
-
canvasId: e,
|
|
1528
|
-
name: "opened",
|
|
1529
|
-
payload: t ?? null
|
|
1530
|
-
}, r), v({
|
|
1531
|
-
type: "page-changed",
|
|
1532
|
-
name: "page-changed",
|
|
1533
|
-
payload: {
|
|
1534
|
-
from: i,
|
|
1535
|
-
to: e
|
|
1536
|
-
}
|
|
1537
|
-
}, r);
|
|
1538
|
-
}, b = !1, x = [{
|
|
1539
|
-
event: o,
|
|
1540
|
-
depth: 0
|
|
1541
|
-
}];
|
|
1542
|
-
for (; x.length > 0;) {
|
|
1543
|
-
let { event: e, depth: t } = x.shift();
|
|
1544
|
-
if (t > Qe) {
|
|
1545
|
-
l.push({
|
|
1546
|
-
kind: "error",
|
|
1547
|
-
depth: t,
|
|
1548
|
-
text: H.simulation.depthExceeded
|
|
1549
|
-
}), b = !0;
|
|
1550
|
-
break;
|
|
1551
|
-
}
|
|
1552
|
-
let n = de(c, p, e);
|
|
1553
|
-
if (!n.ok) {
|
|
1554
|
-
l.push({
|
|
1555
|
-
kind: "error",
|
|
1556
|
-
depth: t,
|
|
1557
|
-
text: n.diagnostics[0]?.message ?? O.blueprint.invalidCommand
|
|
1558
|
-
}), b = !0;
|
|
1559
|
-
break;
|
|
1560
|
-
}
|
|
1561
|
-
for (let e of n.value.ruleTraces) {
|
|
1562
|
-
if (!e.triggerMatched) continue;
|
|
1563
|
-
let n = c.rules.find((t) => t.id === e.ruleId);
|
|
1564
|
-
if (n === void 0) continue;
|
|
1565
|
-
d.add(n.nodeId), l.push({
|
|
1566
|
-
kind: t === 0 ? "trigger" : "cascade",
|
|
1567
|
-
nodeId: n.nodeId,
|
|
1568
|
-
depth: t,
|
|
1569
|
-
text: f.get(n.nodeId) ?? n.nodeId
|
|
1570
|
-
});
|
|
1571
|
-
let i = [...e.conditions], a = [...e.actions], o = (e, t) => {
|
|
1572
|
-
for (let n of e) {
|
|
1573
|
-
if (n.type === "condition") {
|
|
1574
|
-
let e = i[0];
|
|
1575
|
-
if (e === void 0 || e.nodeId !== n.nodeId) return;
|
|
1576
|
-
i.shift(), u.add(n.edgeId), d.add(n.nodeId), l.push({
|
|
1577
|
-
kind: "condition",
|
|
1578
|
-
nodeId: n.nodeId,
|
|
1579
|
-
edgeId: n.edgeId,
|
|
1580
|
-
passed: e.passed,
|
|
1581
|
-
depth: t,
|
|
1582
|
-
text: `${f.get(n.nodeId) ?? n.nodeId} · ${e.passed ? H.simulation.passed : H.simulation.failed}`
|
|
1583
|
-
}), o(e.passed ? n.yes : n.no, t + 1);
|
|
1584
|
-
continue;
|
|
1585
|
-
}
|
|
1586
|
-
let e = a[0];
|
|
1587
|
-
if (e === void 0 || e.edgeId !== n.edgeId) continue;
|
|
1588
|
-
a.shift(), u.add(n.edgeId);
|
|
1589
|
-
let s = r.blueprint.edges.find((e) => e.id === n.edgeId)?.to.node;
|
|
1590
|
-
s !== void 0 && d.add(s), l.push({
|
|
1591
|
-
kind: n.action.type === "request-variable" || n.action.type === "request-component-data" ? "request" : "action",
|
|
1517
|
+
let i = [...n.conditions], a = [...n.actions], o = (e, t) => {
|
|
1518
|
+
for (let n of e) {
|
|
1519
|
+
if (n.type === "condition") {
|
|
1520
|
+
let e = i[0];
|
|
1521
|
+
if (e === void 0 || e.nodeId !== n.nodeId) return;
|
|
1522
|
+
i.shift(), d.add(n.edgeId), f.add(n.nodeId), u.push({
|
|
1523
|
+
kind: "condition",
|
|
1524
|
+
nodeId: n.nodeId,
|
|
1592
1525
|
edgeId: n.edgeId,
|
|
1593
|
-
|
|
1526
|
+
passed: e.passed,
|
|
1594
1527
|
depth: t,
|
|
1595
|
-
text:
|
|
1596
|
-
});
|
|
1597
|
-
|
|
1598
|
-
};
|
|
1599
|
-
o(n.steps, t + 1);
|
|
1600
|
-
}
|
|
1601
|
-
let i = n.value.variables;
|
|
1602
|
-
for (let [e, n] of Object.entries(i)) xe(n, p[e] ?? null) && e in p || x.push({
|
|
1603
|
-
event: {
|
|
1604
|
-
type: "variable-event",
|
|
1605
|
-
variableId: e,
|
|
1606
|
-
name: "data-updated",
|
|
1607
|
-
payload: n
|
|
1608
|
-
},
|
|
1609
|
-
depth: t + 1
|
|
1610
|
-
});
|
|
1611
|
-
p = i;
|
|
1612
|
-
for (let e of n.value.canvasEffects) {
|
|
1613
|
-
if (e.type === "page-navigation") {
|
|
1614
|
-
if (e.operation === "back") y(_.pop(), void 0, !1, t + 1);
|
|
1615
|
-
else {
|
|
1616
|
-
let n = g === null ? -1 : h.indexOf(g);
|
|
1617
|
-
y(h[e.operation === "next" ? n + 1 : n - 1], void 0, !0, t + 1);
|
|
1528
|
+
text: `${p.get(n.nodeId) ?? n.nodeId} · ${e.passed ? H.simulation.passed : H.simulation.failed}`
|
|
1529
|
+
}), o(e.passed ? n.yes : n.no, t + 1);
|
|
1530
|
+
continue;
|
|
1618
1531
|
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1532
|
+
let e = a[0];
|
|
1533
|
+
if (e === void 0 || e.edgeId !== n.edgeId) continue;
|
|
1534
|
+
a.shift(), d.add(n.edgeId);
|
|
1535
|
+
let s = r.blueprint.edges.find((e) => e.id === n.edgeId)?.to.node;
|
|
1536
|
+
s !== void 0 && f.add(s), u.push({
|
|
1537
|
+
kind: n.action.type === "request-variable" || n.action.type === "request-component-data" ? "request" : "action",
|
|
1538
|
+
edgeId: n.edgeId,
|
|
1539
|
+
...s === void 0 ? {} : { nodeId: s },
|
|
1540
|
+
depth: t,
|
|
1541
|
+
text: $e(n.action, r)
|
|
1542
|
+
});
|
|
1624
1543
|
}
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
type: "canvas-event",
|
|
1628
|
-
canvasId: e.canvasId,
|
|
1629
|
-
name: n ? "opened" : "closed",
|
|
1630
|
-
payload: n ? e.payload ?? null : null
|
|
1631
|
-
}, t + 1));
|
|
1632
|
-
}
|
|
1544
|
+
};
|
|
1545
|
+
o(t.steps, e + 1);
|
|
1633
1546
|
}
|
|
1547
|
+
let m = s.value.failure;
|
|
1548
|
+
m !== void 0 && u.push({
|
|
1549
|
+
kind: "error",
|
|
1550
|
+
depth: m.depth,
|
|
1551
|
+
text: m.kind === "depth-exceeded" ? H.simulation.depthExceeded : m.message
|
|
1552
|
+
});
|
|
1553
|
+
let h = m !== void 0;
|
|
1634
1554
|
return this.#n = {
|
|
1635
1555
|
trigger: {
|
|
1636
1556
|
nodeId: e,
|
|
1637
1557
|
port: t
|
|
1638
1558
|
},
|
|
1639
|
-
executedEdgeIds: [...
|
|
1640
|
-
visitedNodeIds: [...
|
|
1641
|
-
steps:
|
|
1642
|
-
failed:
|
|
1559
|
+
executedEdgeIds: [...d],
|
|
1560
|
+
visitedNodeIds: [...f],
|
|
1561
|
+
steps: u,
|
|
1562
|
+
failed: h
|
|
1643
1563
|
}, {
|
|
1644
1564
|
ok: !0,
|
|
1645
1565
|
value: null,
|
|
@@ -1652,16 +1572,16 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
|
|
|
1652
1572
|
status: t,
|
|
1653
1573
|
diagnostics: n
|
|
1654
1574
|
});
|
|
1655
|
-
this.#r = r, this.#a.set(e, r), this.#a.size >
|
|
1575
|
+
this.#r = r, this.#a.set(e, r), this.#a.size > Xe && this.#a.delete(this.#a.keys().next().value), this.callbacks.render(), t === "rejected" && this.callbacks.emitDiagnostics(n);
|
|
1656
1576
|
}
|
|
1657
1577
|
rejectUnknown(e, t) {
|
|
1658
|
-
this.#r =
|
|
1578
|
+
this.#r = qe(e, t), this.callbacks.render(), this.callbacks.emitDiagnostics(t);
|
|
1659
1579
|
}
|
|
1660
1580
|
get capabilities() {
|
|
1661
|
-
return
|
|
1581
|
+
return Je(this.callbacks.getRuntimeContributions);
|
|
1662
1582
|
}
|
|
1663
1583
|
};
|
|
1664
|
-
function
|
|
1584
|
+
function Qe(e, t, n) {
|
|
1665
1585
|
if (e.kind === "component") {
|
|
1666
1586
|
if (t === "state-changed") return {
|
|
1667
1587
|
type: "component-state-changed",
|
|
@@ -1705,18 +1625,18 @@ function et(e, t, n) {
|
|
|
1705
1625
|
payload: n
|
|
1706
1626
|
};
|
|
1707
1627
|
}
|
|
1708
|
-
function
|
|
1628
|
+
function $e(e, t) {
|
|
1709
1629
|
let n = (e) => t.components.find((t) => t.id === e)?.name ?? e;
|
|
1710
1630
|
switch (e.type) {
|
|
1711
1631
|
case "component-visibility": return `${H.ports[e.operation] ?? e.operation} · ${n(e.componentId)}`;
|
|
1712
1632
|
case "request-component-data": return H.simulation.requested(n(e.componentId));
|
|
1713
1633
|
case "request-variable": return H.simulation.requested(e.variableId);
|
|
1714
|
-
case "set-variable": return
|
|
1715
|
-
case "emit-host-event": return
|
|
1716
|
-
case "host-action": return
|
|
1634
|
+
case "set-variable": return k.blueprint.setVariableAction(e.variableId);
|
|
1635
|
+
case "emit-host-event": return k.blueprint.emitHostEventAction(e.eventName);
|
|
1636
|
+
case "host-action": return k.blueprint.hostAction(e.actionId);
|
|
1717
1637
|
case "canvas-visibility": {
|
|
1718
1638
|
let n = t.subCanvases?.find((t) => t.id === e.canvasId);
|
|
1719
|
-
return
|
|
1639
|
+
return k.blueprint.canvasAction(H.subCanvasPorts[n?.display ?? "popup"][e.operation] ?? e.operation, n?.name ?? e.canvasId);
|
|
1720
1640
|
}
|
|
1721
1641
|
case "page-navigation": return H.mainCanvasPorts[e.operation] ?? e.operation;
|
|
1722
1642
|
case "component-state": {
|
|
@@ -1727,18 +1647,18 @@ function tt(e, t) {
|
|
|
1727
1647
|
}
|
|
1728
1648
|
//#endregion
|
|
1729
1649
|
//#region src/common/operations/blueprint/designer-blueprint-value-sources.ts
|
|
1730
|
-
var
|
|
1731
|
-
function
|
|
1650
|
+
var et = new RegExp(me);
|
|
1651
|
+
function tt(e, t) {
|
|
1732
1652
|
return c(e.blueprint, t).some((e) => e.node.kind === "component" || e.node.kind === "sub-canvas" && e.port === "opened" || e.node.kind === "main-canvas" && e.port === "page-changed");
|
|
1733
1653
|
}
|
|
1734
|
-
function
|
|
1654
|
+
function nt(e) {
|
|
1735
1655
|
let t = e.split(".").map((e) => e.trim());
|
|
1736
|
-
return t.length === 0 || t.length > fe || t.some((e) => e === "" || !
|
|
1656
|
+
return t.length === 0 || t.length > fe || t.some((e) => e === "" || !et.test(e)) ? null : t;
|
|
1737
1657
|
}
|
|
1738
|
-
function
|
|
1658
|
+
function rt(e) {
|
|
1739
1659
|
return e.kind === "literal" ? "literal" : e.kind === "event-payload" ? e.path.length === 0 ? "event" : "event-field" : e.kind === "variable" ? "variable" : "advanced";
|
|
1740
1660
|
}
|
|
1741
|
-
function
|
|
1661
|
+
function it(e, t, n) {
|
|
1742
1662
|
let r = [], i = /* @__PURE__ */ new Set();
|
|
1743
1663
|
for (let a of c(e.blueprint, t)) {
|
|
1744
1664
|
if (a.node.kind !== "component") continue;
|
|
@@ -1751,36 +1671,36 @@ function ot(e, t, n) {
|
|
|
1751
1671
|
continue;
|
|
1752
1672
|
}
|
|
1753
1673
|
let t = a.node.componentId, o = N(a.port), s = e.components.find((e) => e.id === t), c = n?.get(s?.type ?? "")?.manifest.editorDescriptor?.events?.find((e) => e.name === o)?.payloadSchema;
|
|
1754
|
-
if (c !== void 0) for (let e of
|
|
1674
|
+
if (c !== void 0) for (let e of at(c)) {
|
|
1755
1675
|
let t = e.join(".");
|
|
1756
1676
|
i.has(t) || (i.add(t), r.push(e));
|
|
1757
1677
|
}
|
|
1758
1678
|
}
|
|
1759
1679
|
return r;
|
|
1760
1680
|
}
|
|
1761
|
-
function
|
|
1681
|
+
function at(e, t = []) {
|
|
1762
1682
|
return Object.entries(e.properties).flatMap(([e, n]) => {
|
|
1763
1683
|
let r = [...t, e];
|
|
1764
|
-
return n.kind === "object" ? [r, ...
|
|
1684
|
+
return n.kind === "object" ? [r, ...at(n, r)] : [r];
|
|
1765
1685
|
});
|
|
1766
1686
|
}
|
|
1767
1687
|
//#endregion
|
|
1768
1688
|
//#region src/browser/dom/blueprint/designer-blueprint-host-left-panel-dom.ts
|
|
1769
|
-
function
|
|
1689
|
+
function ot(e, t, n) {
|
|
1770
1690
|
for (let n of e.querySelectorAll(".host-left-panel-view[data-host-left-panel-group]")) {
|
|
1771
1691
|
let e = n.dataset.hostLeftPanelGroup === t?.id;
|
|
1772
1692
|
n.hidden = !e, e && t !== void 0 && n.setAttribute("aria-labelledby", oe(t.id));
|
|
1773
1693
|
}
|
|
1774
1694
|
let r = e.querySelector("[data-left-panel-count]");
|
|
1775
|
-
r !== null && (r.hidden = t !== void 0, t === void 0 ? (r.textContent = String(n), r.setAttribute("aria-label",
|
|
1695
|
+
r !== null && (r.hidden = t !== void 0, t === void 0 ? (r.textContent = String(n), r.setAttribute("aria-label", k.blueprint.panelCount(k.blueprint.library, n))) : (r.textContent = "", r.removeAttribute("aria-label")));
|
|
1776
1696
|
let i = e.querySelector("[data-left-panel-title]");
|
|
1777
|
-
i !== null && (i.textContent = t?.label ??
|
|
1697
|
+
i !== null && (i.textContent = t?.label ?? k.blueprint.library);
|
|
1778
1698
|
let a = e.querySelector("[data-left-panel-scope]");
|
|
1779
|
-
a !== null && (a.textContent = t === void 0 ?
|
|
1699
|
+
a !== null && (a.textContent = t === void 0 ? k.panelScope.builtin : k.panelScope.host);
|
|
1780
1700
|
}
|
|
1781
1701
|
//#endregion
|
|
1782
1702
|
//#region src/browser/dom/blueprint/designer-blueprint-inspector-configuration.ts
|
|
1783
|
-
var U =
|
|
1703
|
+
var U = k.blueprint, W = U.graph, st = [
|
|
1784
1704
|
"eq",
|
|
1785
1705
|
"neq",
|
|
1786
1706
|
"gt",
|
|
@@ -1789,38 +1709,38 @@ var U = O.blueprint, W = U.graph, lt = [
|
|
|
1789
1709
|
"lte",
|
|
1790
1710
|
"contains",
|
|
1791
1711
|
"exists"
|
|
1792
|
-
],
|
|
1712
|
+
], ct = [
|
|
1793
1713
|
"appear",
|
|
1794
1714
|
"fade",
|
|
1795
1715
|
"slide-up"
|
|
1796
|
-
],
|
|
1716
|
+
], lt = [
|
|
1797
1717
|
"related",
|
|
1798
1718
|
"detail",
|
|
1799
1719
|
"group",
|
|
1800
1720
|
"drill-down"
|
|
1801
1721
|
];
|
|
1802
|
-
function
|
|
1722
|
+
function ut(e, t, n, r) {
|
|
1803
1723
|
let i = n.nodes.length + n.edges.length;
|
|
1804
|
-
if (e === void 0 || i === 0) return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${
|
|
1805
|
-
if (i > 1) return
|
|
1724
|
+
if (e === void 0 || i === 0) return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${O("sliders")}</span><p class="designer-empty-title">${U.inspectorEmpty}</p><p class="designer-empty-hint">${U.inspectorEmptyHint}</p></div>`;
|
|
1725
|
+
if (i > 1) return dt(n);
|
|
1806
1726
|
let a = n.nodes[0];
|
|
1807
1727
|
if (a !== void 0) {
|
|
1808
1728
|
let n = t.nodes.find((e) => e.id === a);
|
|
1809
|
-
return n === void 0 ? "" :
|
|
1729
|
+
return n === void 0 ? "" : mt(e, t, n);
|
|
1810
1730
|
}
|
|
1811
1731
|
let o = t.edges.find((e) => e.id === n.edges[0]);
|
|
1812
|
-
return o === void 0 ? "" :
|
|
1732
|
+
return o === void 0 ? "" : gt(e, t, o, r);
|
|
1813
1733
|
}
|
|
1814
|
-
function
|
|
1734
|
+
function dt(e) {
|
|
1815
1735
|
let t = e.nodes.length === 0 ? "" : `<button type="button" class="designer-control designer-button" data-blueprint-nodes-enabled="true">${W.enableNodes}</button><button type="button" class="designer-control designer-button" data-blueprint-nodes-enabled="false">${W.disableNodes}</button>`;
|
|
1816
1736
|
return `<div class="blueprint-config" data-blueprint-multi>
|
|
1817
1737
|
${G("multi", U.selectionOverview, `<p class="blueprint-config-summary">${_(W.multiSelection(e.nodes.length, e.edges.length))}</p>
|
|
1818
1738
|
<div class="blueprint-config-actions">${t}</div>`)}
|
|
1819
|
-
${
|
|
1739
|
+
${pt(W.menu.delete)}
|
|
1820
1740
|
</div>`;
|
|
1821
1741
|
}
|
|
1822
1742
|
function G(e, t, n, r = "") {
|
|
1823
|
-
return `<details class="designer-panel-section designer-inspector-section designer-inspector-disclosure blueprint-config-section" data-inspector-search-key="blueprint-${e}" open><summary class="designer-panel-section-title designer-inspector-section-title designer-inspector-section-summary designer-panel-section-summary">${_(t)}${r === "" ? "" : `<span class="designer-inspector-section-meta">${_(r)}</span>`}<span class="designer-panel-section-disclosure designer-inspector-section-disclosure" aria-hidden="true">${
|
|
1743
|
+
return `<details class="designer-panel-section designer-inspector-section designer-inspector-disclosure blueprint-config-section" data-inspector-search-key="blueprint-${e}" open><summary class="designer-panel-section-title designer-inspector-section-title designer-inspector-section-summary designer-panel-section-summary">${_(t)}${r === "" ? "" : `<span class="designer-inspector-section-meta">${_(r)}</span>`}<span class="designer-panel-section-disclosure designer-inspector-section-disclosure" aria-hidden="true">${O("chevron-down")}</span></summary><div class="blueprint-config-content">${n}</div></details>`;
|
|
1824
1744
|
}
|
|
1825
1745
|
function K(e, t, n = "row") {
|
|
1826
1746
|
return `<div data-blueprint-field-row="${T(e)}" data-blueprint-field-variant="${n}">${t}</div>`;
|
|
@@ -1828,19 +1748,19 @@ function K(e, t, n = "row") {
|
|
|
1828
1748
|
function q(e, t, n = "") {
|
|
1829
1749
|
return K(e, `<span class="blueprint-config-value">${t === "" ? "" : `<span>${_(t)}</span>`}${n === "" ? "" : `<code>${_(n)}</code>`}</span>`);
|
|
1830
1750
|
}
|
|
1831
|
-
function
|
|
1751
|
+
function ft(e, t, n) {
|
|
1832
1752
|
return `<span data-blueprint-field-switch="${T(e)}" data-checked="${String(t)}" ${n}></span>`;
|
|
1833
1753
|
}
|
|
1834
|
-
function
|
|
1754
|
+
function pt(e) {
|
|
1835
1755
|
return `<div class="blueprint-config-footer"><button type="button" class="designer-control designer-button blueprint-delete-button" data-variant="danger" data-blueprint-delete>${_(e)}</button></div>`;
|
|
1836
1756
|
}
|
|
1837
1757
|
function J(e) {
|
|
1838
1758
|
return `<p class="blueprint-config-empty">${_(e)}</p>`;
|
|
1839
1759
|
}
|
|
1840
|
-
function
|
|
1841
|
-
let r = (e, t) => e.map((e) => `<li class="blueprint-anchor" data-direction="${t}" data-connected="${String(e.connected)}" data-available="${String(e.available)}"><span class="designer-badge" data-tone="${t === "in" ? "success" : "accent"}">${t === "in" ? W.inputs : W.outputs}</span><span class="blueprint-anchor-label">${_(e.label)}</span><code>${_(e.id)}</code></li>`).join(""), i = `${r(n.outputs, "out")}${r(n.inputs, "in")}`, a = i === "" ? J(W.noEdges) : `<ul class="blueprint-anchor-list">${i}</ul>`, o = T(n.id), s = [n.renamable ? K(W.nodeName, `<input type="text" class="designer-control designer-input" data-blueprint-node-field="name" data-node-id="${o}" value="${T(n.name ?? "")}" placeholder="${T(W.nodeNamePlaceholder)}" maxlength="64">`) : "",
|
|
1760
|
+
function mt(e, t, n) {
|
|
1761
|
+
let r = (e, t) => e.map((e) => `<li class="blueprint-anchor" data-direction="${t}" data-connected="${String(e.connected)}" data-available="${String(e.available)}"><span class="designer-badge" data-tone="${t === "in" ? "success" : "accent"}">${t === "in" ? W.inputs : W.outputs}</span><span class="blueprint-anchor-label">${_(e.label)}</span><code>${_(e.id)}</code></li>`).join(""), i = `${r(n.outputs, "out")}${r(n.inputs, "in")}`, a = i === "" ? J(W.noEdges) : `<ul class="blueprint-anchor-list">${i}</ul>`, o = T(n.id), s = [n.renamable ? K(W.nodeName, `<input type="text" class="designer-control designer-input" data-blueprint-node-field="name" data-node-id="${o}" value="${T(n.name ?? "")}" placeholder="${T(W.nodeNamePlaceholder)}" maxlength="64">`) : "", ft(W.enabledState, n.enabled, `data-blueprint-node-field="enabled" data-node-id="${o}"`)].join(""), c = ht(e, n), l = t.edges.filter((e) => e.source === n.id || e.target === n.id), u = new Map(t.nodes.map((e) => [e.id, e.title])), d = l.length === 0 ? J(W.noEdges) : `<ul class="blueprint-config-edges">${l.map((e) => {
|
|
1842
1762
|
let t = e.target === n.id, r = t ? e.source : e.target;
|
|
1843
|
-
return `<li><button type="button" class="blueprint-config-link" data-blueprint-select-edge="${T(e.id)}" data-category="${e.category}"><span class="designer-badge" data-tone="${t ? "success" : "accent"}">${t ? W.upstream : W.downstream}</span><span class="blueprint-config-link-copy"><strong>${_(u.get(r) ?? r)}</strong><small>${_(e.label)}</small></span><span class="blueprint-config-link-arrow" aria-hidden="true">${
|
|
1763
|
+
return `<li><button type="button" class="blueprint-config-link" data-blueprint-select-edge="${T(e.id)}" data-category="${e.category}"><span class="designer-badge" data-tone="${t ? "success" : "accent"}">${t ? W.upstream : W.downstream}</span><span class="blueprint-config-link-copy"><strong>${_(u.get(r) ?? r)}</strong><small>${_(e.label)}</small></span><span class="blueprint-config-link-arrow" aria-hidden="true">${O("chevron-right")}</span></button></li>`;
|
|
1844
1764
|
}).join("")}</ul>`;
|
|
1845
1765
|
return `<div class="blueprint-config" data-blueprint-node-config="${o}" data-node-kind="${n.kind}">
|
|
1846
1766
|
${G("anchors", W.anchorInfo, a, String(n.inputs.length + n.outputs.length))}
|
|
@@ -1849,7 +1769,7 @@ function gt(e, t, n) {
|
|
|
1849
1769
|
${G("edges", W.edgeList, d, String(l.length))}
|
|
1850
1770
|
</div>`;
|
|
1851
1771
|
}
|
|
1852
|
-
function
|
|
1772
|
+
function ht(e, t) {
|
|
1853
1773
|
let n = T(t.id);
|
|
1854
1774
|
switch (t.kind) {
|
|
1855
1775
|
case "timer": return K(U.timerInterval, `<input type="number" class="designer-control designer-input" min="1" max="86400" step="1" data-blueprint-node-field="interval" data-node-id="${n}" value="${t.intervalSeconds ?? 5}">`);
|
|
@@ -1857,26 +1777,26 @@ function _t(e, t) {
|
|
|
1857
1777
|
let r = t.condition;
|
|
1858
1778
|
return r === void 0 ? "" : [
|
|
1859
1779
|
Y(e, "node", t.id, "left", W.conditionLeft, r.left, !0),
|
|
1860
|
-
K(U.conditionOperatorLabel, `<select class="designer-control designer-select" data-blueprint-node-field="operator" data-node-id="${n}">${
|
|
1780
|
+
K(U.conditionOperatorLabel, `<select class="designer-control designer-select" data-blueprint-node-field="operator" data-node-id="${n}">${st.map((e) => `<option value="${e}"${e === r.operator ? " selected" : ""}>${_(U.conditionOperator(e))}</option>`).join("")}</select>`),
|
|
1861
1781
|
r.operator === "exists" || r.right === void 0 ? "" : Y(e, "node", t.id, "right", W.conditionRight, r.right, !0)
|
|
1862
1782
|
].join("");
|
|
1863
1783
|
}
|
|
1864
1784
|
case "component": return q(W.material, "", t.materialType ?? t.subtitle);
|
|
1865
1785
|
case "variable": {
|
|
1866
1786
|
let n = A(e).find((e) => e.id === t.variableId);
|
|
1867
|
-
return [q(U.variableId, "", t.variableId ?? ""), q(W.initialValue, "",
|
|
1787
|
+
return [q(U.variableId, "", t.variableId ?? ""), q(W.initialValue, "", vt(JSON.stringify(n?.initialValue ?? null) ?? "null"))].join("");
|
|
1868
1788
|
}
|
|
1869
1789
|
default: return J(t.subtitle);
|
|
1870
1790
|
}
|
|
1871
1791
|
}
|
|
1872
|
-
function
|
|
1792
|
+
function gt(e, t, n, r) {
|
|
1873
1793
|
let i = new Map(t.nodes.map((e) => [e.id, e])), a = i.get(n.source), o = i.get(n.target), s = T(n.id), c = a?.outputs.find((e) => e.id === n.sourcePort), l = o?.inputs.find((e) => e.id === n.targetPort), u = [q(W.source, `${a?.title ?? n.source} · ${c?.label ?? n.sourcePort}`, n.sourcePort), q(W.target, n.kind === "semantic" ? o?.title ?? n.target : `${o?.title ?? n.target} · ${l?.label ?? n.targetPort}`, n.kind === "semantic" ? "" : n.targetPort)].join(""), d = [];
|
|
1874
|
-
if (n.kind === "semantic") d.push(K(W.role, `<select class="designer-control designer-select" data-blueprint-edge-field="role" data-edge-id="${s}">${
|
|
1794
|
+
if (n.kind === "semantic") d.push(K(W.role, `<select class="designer-control designer-select" data-blueprint-edge-field="role" data-edge-id="${s}">${lt.map((e) => `<option value="${e}"${e === n.role ? " selected" : ""}>${_(U.semanticRoles[e])}</option>`).join("")}</select>`), J(U.semanticHint));
|
|
1875
1795
|
else {
|
|
1876
1796
|
let t = o?.inputs.filter((e) => e.available) ?? [];
|
|
1877
1797
|
o?.kind === "host" && n.targetPort.startsWith("event:") ? d.push(K(W.hostEventName, `<input type="text" class="designer-control designer-input" data-blueprint-edge-field="host-event" data-edge-id="${s}" value="${T(n.targetPort.slice(6))}" maxlength="128">`)) : t.length > 1 && d.push(K(W.targetPort, `<select class="designer-control designer-select" data-blueprint-edge-field="target-port" data-edge-id="${s}">${t.map((e) => `<option value="${T(e.id)}"${e.id === n.targetPort ? " selected" : ""}>${_(e.label)}</option>`).join("")}</select>`));
|
|
1878
|
-
let i =
|
|
1879
|
-
if (n.value !== void 0 && d.push(Y(e, "edge", n.id, "value", W.writeValue, n.value, i, r)), o?.kind === "sub-canvas" && (n.targetPort === "open" || n.targetPort === "toggle") && d.push(
|
|
1798
|
+
let i = tt(e, n.id);
|
|
1799
|
+
if (n.value !== void 0 && d.push(Y(e, "edge", n.id, "value", W.writeValue, n.value, i, r)), o?.kind === "sub-canvas" && (n.targetPort === "open" || n.targetPort === "toggle") && d.push(ft(W.popupPayload, n.payload !== void 0, `data-blueprint-edge-field="payload-enabled" data-edge-id="${s}"`)), n.payload !== void 0 && d.push(Y(e, "edge", n.id, "payload", o?.kind === "sub-canvas" ? W.popupPayloadValue : W.payload, n.payload, i, r)), o?.kind === "component" && n.targetPort === "set-state") {
|
|
1880
1800
|
let t = e.components.find((e) => e.id === o.componentId)?.states?.items ?? [];
|
|
1881
1801
|
d.push(K(W.targetState, `<select class="designer-control designer-select" data-blueprint-edge-field="state" data-edge-id="${s}">${t.map((e) => `<option value="${T(e.id)}"${e.id === n.stateId ? " selected" : ""}>${_(e.name)}</option>`).join("")}</select>`));
|
|
1882
1802
|
}
|
|
@@ -1888,19 +1808,19 @@ function vt(e, t, n, r) {
|
|
|
1888
1808
|
let e = n.transition;
|
|
1889
1809
|
d.push(K(W.transition, `<select class="designer-control designer-select" data-blueprint-edge-field="transition-effect" data-edge-id="${s}">
|
|
1890
1810
|
<option value=""${e === void 0 ? " selected" : ""}>${W.noTransition}</option>
|
|
1891
|
-
${
|
|
1811
|
+
${ct.map((t) => `<option value="${t}"${e?.effect === t ? " selected" : ""}>${_(W.transitionEffects[t])}</option>`).join("")}
|
|
1892
1812
|
</select>`), e === void 0 ? "" : K(W.durationMs, `<input type="number" class="designer-control designer-input" min="0" max="10000" step="50" data-blueprint-edge-field="transition-duration" data-edge-id="${s}" value="${e.durationMs}">`));
|
|
1893
1813
|
}
|
|
1894
|
-
n.order !== void 0 && (n.siblingCount ?? 1) > 1 && d.push(K(W.executionOrder, `<span class="blueprint-config-order"><span>${_(W.edgeOrder(n.order, n.siblingCount ?? 1))}</span><button type="button" class="designer-control designer-icon-button" data-blueprint-edge-order="earlier" data-edge-id="${s}" data-tip="${T(W.earlier)}" aria-label="${T(W.earlier)}"${n.order <= 1 ? " disabled" : ""}>${
|
|
1814
|
+
n.order !== void 0 && (n.siblingCount ?? 1) > 1 && d.push(K(W.executionOrder, `<span class="blueprint-config-order"><span>${_(W.edgeOrder(n.order, n.siblingCount ?? 1))}</span><button type="button" class="designer-control designer-icon-button" data-blueprint-edge-order="earlier" data-edge-id="${s}" data-tip="${T(W.earlier)}" aria-label="${T(W.earlier)}"${n.order <= 1 ? " disabled" : ""}>${O("arrow-up")}</button><button type="button" class="designer-control designer-icon-button" data-blueprint-edge-order="later" data-edge-id="${s}" data-tip="${T(W.later)}" aria-label="${T(W.later)}"${n.order >= (n.siblingCount ?? 1) ? " disabled" : ""}>${O("arrow-down")}</button></span>`));
|
|
1895
1815
|
}
|
|
1896
1816
|
return `<div class="blueprint-config" data-blueprint-edge-config="${s}" data-category="${n.category}">
|
|
1897
1817
|
${G("anchors", W.anchorInfo, u)}
|
|
1898
1818
|
${d.length === 0 ? "" : G("edge", W.edgeConfig, d.join(""))}
|
|
1899
|
-
${
|
|
1819
|
+
${pt(W.menu.deleteEdge)}
|
|
1900
1820
|
</div>`;
|
|
1901
1821
|
}
|
|
1902
1822
|
function Y(e, t, n, r, i, a, o, s) {
|
|
1903
|
-
let c =
|
|
1823
|
+
let c = rt(a), l = `data-blueprint-expression="${r}" data-expression-owner="${t}" data-expression-owner-id="${T(n)}"`, u = [
|
|
1904
1824
|
["literal", U.valueSources.literal],
|
|
1905
1825
|
["event", U.valueSources.event],
|
|
1906
1826
|
["event-field", U.valueSources.eventField],
|
|
@@ -1909,15 +1829,15 @@ function Y(e, t, n, r, i, a, o, s) {
|
|
|
1909
1829
|
].filter(([e]) => e !== "event-field" || o || c === "event-field").map(([e, t]) => `<option value="${e}"${e === c ? " selected" : ""}${e === "advanced" ? " disabled" : ""}>${_(t)}</option>`).join(""), d = "";
|
|
1910
1830
|
if (a.kind === "literal") d = `<input type="text" class="designer-control designer-input" data-expression-part="literal" value="${T(JSON.stringify(a.value) ?? "null")}" aria-label="${T(U.literalJson)}">`;
|
|
1911
1831
|
else if (a.kind === "event-payload" && a.path.length > 0) {
|
|
1912
|
-
let i = `blueprint-fields-${t}-${n}-${r}`.replace(/[^A-Za-z0-9_-]/g, "-"), o = t === "edge" ?
|
|
1832
|
+
let i = `blueprint-fields-${t}-${n}-${r}`.replace(/[^A-Za-z0-9_-]/g, "-"), o = t === "edge" ? it(e, n, s) : [];
|
|
1913
1833
|
d = `<input type="text" class="designer-control designer-input" data-expression-part="field" list="${i}" value="${T(a.path.join("."))}" aria-label="${T(U.eventField)}"><datalist id="${i}">${o.map((e) => `<option value="${T(e.join("."))}"></option>`).join("")}</datalist>`;
|
|
1914
1834
|
} else if (a.kind === "variable") {
|
|
1915
1835
|
let t = A(e);
|
|
1916
1836
|
d = `<select class="designer-control designer-select" data-expression-part="variable" aria-label="${T(U.sourceVariable)}">${t.map((e) => `<option value="${T(e.id)}"${e.id === a.variableId ? " selected" : ""}>${_(e.name)}</option>`).join("")}</select>`;
|
|
1917
|
-
} else c === "advanced" && (d = `<code class="blueprint-config-advanced">${_(
|
|
1837
|
+
} else c === "advanced" && (d = `<code class="blueprint-config-advanced">${_(vt(JSON.stringify(a) ?? ""))}</code>`);
|
|
1918
1838
|
return `<div class="blueprint-expression" ${l}>${K(i, `<span class="blueprint-expression-stack"><select class="designer-control designer-select" data-expression-part="source" aria-label="${T(U.valueSource)}">${u}</select>${d}</span>`, "expression")}</div>`;
|
|
1919
1839
|
}
|
|
1920
|
-
function
|
|
1840
|
+
function _t(e) {
|
|
1921
1841
|
if (typeof e.querySelectorAll != "function") return;
|
|
1922
1842
|
let t = e.ownerDocument ?? e;
|
|
1923
1843
|
for (let n of e.querySelectorAll("[data-blueprint-field-row]")) {
|
|
@@ -1942,53 +1862,53 @@ function yt(e) {
|
|
|
1942
1862
|
n.replaceWith(e);
|
|
1943
1863
|
}
|
|
1944
1864
|
}
|
|
1945
|
-
function
|
|
1865
|
+
function vt(e, t = 96) {
|
|
1946
1866
|
return e.length <= t ? e : `${e.slice(0, t - 1)}…`;
|
|
1947
1867
|
}
|
|
1948
1868
|
//#endregion
|
|
1949
1869
|
//#region src/browser/dom/blueprint/designer-blueprint-inspector-dom.ts
|
|
1950
|
-
var
|
|
1870
|
+
var yt = [
|
|
1951
1871
|
"configuration",
|
|
1952
1872
|
"problems",
|
|
1953
1873
|
"trace"
|
|
1954
1874
|
];
|
|
1955
|
-
function
|
|
1875
|
+
function bt(e, t, n, r, i, a, o, s) {
|
|
1956
1876
|
if (e === void 0) return;
|
|
1957
1877
|
let c = {
|
|
1958
1878
|
configuration: 0,
|
|
1959
1879
|
problems: a.length,
|
|
1960
1880
|
trace: o?.steps.length ?? 0
|
|
1961
|
-
}, l =
|
|
1881
|
+
}, l = wt(t, n, r, i);
|
|
1962
1882
|
e.innerHTML = `<div class="blueprint-inspector-shell">
|
|
1963
1883
|
<header class="blueprint-inspector-topbar">
|
|
1964
1884
|
<span><strong>${_(l.title)}</strong><small>${_(l.detail)}</small></span>
|
|
1965
|
-
<div class="blueprint-inspector-modes" role="tablist" aria-label="${
|
|
1966
|
-
${
|
|
1885
|
+
<div class="blueprint-inspector-modes" role="tablist" aria-label="${k.blueprint.inspector}">
|
|
1886
|
+
${yt.map((e) => Tt(e, i, c[e])).join("")}
|
|
1967
1887
|
</div>
|
|
1968
1888
|
</header>
|
|
1969
1889
|
<div class="blueprint-panel-scroll inspector-pane" data-blueprint-inspector-pane id="designer-blueprint-inspector-${i}-panel" role="tabpanel" aria-labelledby="designer-blueprint-inspector-${i}-tab" tabindex="0" aria-live="polite">
|
|
1970
|
-
${
|
|
1890
|
+
${xt(i, t, n, r, a, o, s)}
|
|
1971
1891
|
</div>
|
|
1972
|
-
</div>`,
|
|
1892
|
+
</div>`, _t(e);
|
|
1973
1893
|
}
|
|
1974
|
-
function
|
|
1975
|
-
return e === "problems" ?
|
|
1894
|
+
function xt(e, t, n, r, i, a, o) {
|
|
1895
|
+
return e === "problems" ? St(i) : e === "trace" ? Ct(a) : ut(t, n, r, o);
|
|
1976
1896
|
}
|
|
1977
|
-
function
|
|
1897
|
+
function St(e) {
|
|
1978
1898
|
let t = e.slice(0, 8);
|
|
1979
|
-
return t.length === 0 ? `<div class="designer-empty" data-tone="success"><span class="designer-empty-icon" aria-hidden="true">${
|
|
1899
|
+
return t.length === 0 ? `<div class="designer-empty" data-tone="success"><span class="designer-empty-icon" aria-hidden="true">${O("check")}</span><p class="designer-empty-title">${k.blueprint.problemsHealthy}</p><p class="designer-empty-hint">${k.blueprint.problemsHealthyHint}</p></div>` : `<section class="blueprint-inspector-status" data-blueprint-problems><ul>${t.map((e) => `<li data-severity="${e.severity}"><strong>${_(e.code)}</strong><span>${_(e.message)}</span><small>${_(e.path.join(".") || "—")}</small></li>`).join("")}</ul></section>`;
|
|
1980
1900
|
}
|
|
1981
|
-
function
|
|
1982
|
-
if (e === null) return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${
|
|
1901
|
+
function Ct(e) {
|
|
1902
|
+
if (e === null) return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${O("terminal")}</span><p class="designer-empty-title">${k.blueprint.noTrace}</p><p class="designer-empty-hint">${k.blueprint.noTraceHint}</p></div>`;
|
|
1983
1903
|
let t = e.steps.filter((e) => e.kind === "condition" && e.passed === !1).length;
|
|
1984
1904
|
return `<section class="blueprint-inspector-status" data-blueprint-trace data-failed="${String(e.failed)}">
|
|
1985
|
-
<div class="blueprint-trace-summary">${
|
|
1905
|
+
<div class="blueprint-trace-summary">${k.blueprint.traceSummary(e.executedEdgeIds.length, t)}</div>
|
|
1986
1906
|
<ol class="blueprint-trace-steps">${e.steps.slice(0, 200).map((e) => `<li data-kind="${e.kind}"${e.passed === void 0 ? "" : ` data-passed="${String(e.passed)}"`} style="--bp-trace-depth: ${Math.min(e.depth, 12)}">${e.nodeId === void 0 ? _(e.text) : `<button type="button" class="blueprint-trace-step" data-blueprint-select-node="${_(e.nodeId)}">${_(e.text)}</button>`}</li>`).join("")}</ol>
|
|
1987
|
-
<button type="button" class="designer-button" data-blueprint-clear-trace>${
|
|
1907
|
+
<button type="button" class="designer-button" data-blueprint-clear-trace>${k.blueprint.graph.simulation.clear}</button>
|
|
1988
1908
|
</section>`;
|
|
1989
1909
|
}
|
|
1990
|
-
function
|
|
1991
|
-
let i =
|
|
1910
|
+
function wt(e, t, n, r) {
|
|
1911
|
+
let i = k.blueprint;
|
|
1992
1912
|
if (r === "problems") return {
|
|
1993
1913
|
title: i.problemsTitle,
|
|
1994
1914
|
detail: i.inspector
|
|
@@ -2017,75 +1937,75 @@ function Et(e, t, n, r) {
|
|
|
2017
1937
|
detail: s === void 0 ? i.selectionType.edge : `${s.id} | ${i.graph.edgeCategories[s.category]}`
|
|
2018
1938
|
};
|
|
2019
1939
|
}
|
|
2020
|
-
function
|
|
2021
|
-
let r =
|
|
2022
|
-
return `<button type="button" class="blueprint-inspector-mode" id="designer-blueprint-inspector-${e}-tab" role="tab" aria-controls="designer-blueprint-inspector-${e}-panel" aria-selected="${String(e === t)}" tabindex="${e === t ? 0 : -1}" data-blueprint-inspector-tab="${e}" data-tip="${r}" aria-label="${r}"><span aria-hidden="true">${
|
|
1940
|
+
function Tt(e, t, n) {
|
|
1941
|
+
let r = k.blueprint.inspectorTabs[e];
|
|
1942
|
+
return `<button type="button" class="blueprint-inspector-mode" id="designer-blueprint-inspector-${e}-tab" role="tab" aria-controls="designer-blueprint-inspector-${e}-panel" aria-selected="${String(e === t)}" tabindex="${e === t ? 0 : -1}" data-blueprint-inspector-tab="${e}" data-tip="${r}" aria-label="${r}"><span aria-hidden="true">${O(e === "configuration" ? "sliders" : e === "problems" ? "check" : "terminal")}</span>${n === 0 ? "" : `<em data-tone="${e === "problems" ? "danger" : "neutral"}">${n}</em>`}</button>`;
|
|
2023
1943
|
}
|
|
2024
1944
|
//#endregion
|
|
2025
1945
|
//#region src/browser/dom/blueprint/designer-blueprint-library-dom.ts
|
|
2026
|
-
var
|
|
1946
|
+
var Et = [
|
|
2027
1947
|
"components",
|
|
2028
1948
|
"relations",
|
|
2029
1949
|
"variables"
|
|
2030
|
-
],
|
|
1950
|
+
], Dt = [
|
|
2031
1951
|
"lifecycle",
|
|
2032
1952
|
"timer",
|
|
2033
1953
|
"condition",
|
|
2034
1954
|
"host"
|
|
2035
|
-
], X =
|
|
2036
|
-
function
|
|
1955
|
+
], X = k.blueprint;
|
|
1956
|
+
function Ot(e, t) {
|
|
2037
1957
|
if (e === void 0) return;
|
|
2038
|
-
let n = (t.groups ?? []).filter((e) => E(e, "blueprint")), r = C(t.activeTab), i = n.some((e) => e.id === r) ? r : void 0, a =
|
|
1958
|
+
let n = (t.groups ?? []).filter((e) => E(e, "blueprint")), r = C(t.activeTab), i = n.some((e) => e.id === r) ? r : void 0, a = It(t.activeTab) ? t.activeTab : "components", o = i === void 0 ? a : x(i), s = a === "relations" ? X.relationList.search : X.librarySearch;
|
|
2039
1959
|
e.innerHTML = `<div class="blueprint-library-shell">
|
|
2040
1960
|
<nav class="rail-tabs blueprint-library-rail" role="tablist" aria-orientation="vertical" aria-label="${X.library}">
|
|
2041
|
-
${
|
|
2042
|
-
${n.map((e) =>
|
|
1961
|
+
${Et.map((e) => Pt(e, o)).join("")}
|
|
1962
|
+
${n.map((e) => Ft(e, i)).join("")}
|
|
2043
1963
|
</nav>
|
|
2044
1964
|
<section class="rail-view blueprint-library-main"${i === void 0 ? "" : " hidden"}>
|
|
2045
1965
|
<div class="layer-panel-controls blueprint-library-controls">
|
|
2046
1966
|
<label class="designer-field layer-search blueprint-library-search">
|
|
2047
|
-
<span class="layer-search-glyph" aria-hidden="true">${
|
|
1967
|
+
<span class="layer-search-glyph" aria-hidden="true">${O("search")}</span>
|
|
2048
1968
|
<input type="search" class="designer-control designer-input" data-blueprint-library-search value="${T(t.query)}" placeholder="${s}" aria-label="${s}">
|
|
2049
1969
|
</label>
|
|
2050
1970
|
</div>
|
|
2051
1971
|
<div class="blueprint-panel-scroll" id="designer-blueprint-library-${a}-panel" role="tabpanel" aria-labelledby="designer-blueprint-library-${a}-tab" tabindex="0">
|
|
2052
|
-
${
|
|
1972
|
+
${kt(a, t)}
|
|
2053
1973
|
</div>
|
|
2054
1974
|
</section>
|
|
2055
1975
|
</div>`;
|
|
2056
1976
|
}
|
|
2057
|
-
function
|
|
1977
|
+
function kt(e, t) {
|
|
2058
1978
|
let n = t.query.trim().toLocaleLowerCase();
|
|
2059
|
-
return e === "components" ?
|
|
1979
|
+
return e === "components" ? At(t.components, t.selection, n, X.layers, X.noComponentNodes) : e === "variables" ? At(t.variables, t.selection, n, X.globalVariables, X.noVariables) : Mt(t, n);
|
|
2060
1980
|
}
|
|
2061
|
-
function
|
|
1981
|
+
function At(e, t, n, r, i) {
|
|
2062
1982
|
let a = e.filter((e) => n.length === 0 || `${e.name} ${e.entityId} ${e.subtitle}`.toLocaleLowerCase().includes(n));
|
|
2063
1983
|
return a.length === 0 ? Z(i) : `<section class="blueprint-palette-group" aria-label="${T(r)}">
|
|
2064
1984
|
<header><strong>${_(r)}</strong><span>${a.length}</span></header>
|
|
2065
1985
|
<div class="blueprint-palette-list">
|
|
2066
|
-
${a.map((e) =>
|
|
1986
|
+
${a.map((e) => jt(e, t)).join("")}
|
|
2067
1987
|
</div>
|
|
2068
1988
|
<p class="blueprint-library-hint">${X.componentNodeHint}</p>
|
|
2069
1989
|
</section>`;
|
|
2070
1990
|
}
|
|
2071
|
-
function
|
|
1991
|
+
function jt(e, t) {
|
|
2072
1992
|
let n = e.nodeId !== void 0, r = n && t.nodes.includes(e.nodeId ?? ""), i = e.kind === "component", a = n ? `data-blueprint-select-node="${T(e.nodeId ?? "")}"` : i ? `data-blueprint-add-component="${T(e.entityId)}"` : `data-blueprint-add-variable="${T(e.entityId)}"`, o = n ? i ? X.locateComponent(e.name) : X.locateVariable(e.name) : i ? X.addComponent(e.name) : X.addVariableNode(e.name), s = n ? "" : ` draggable="true" data-blueprint-drag-kind="${e.kind}" data-${i ? "component" : "variable"}-id="${T(e.entityId)}" data-blueprint-drag-label="${T(e.name)}"`, c = i ? "layers" : "variable", l = i ? X.componentEventCount(e.eventCount) : e.subtitle;
|
|
2073
1993
|
return `<div class="designer-list-row blueprint-palette-item" data-density="default" data-depth="${e.depth}" style="--bp-indent: ${e.depth * 16}px" data-placed="${String(n)}" data-selected="${String(r)}" data-node-kind="${e.kind}"${s}>
|
|
2074
1994
|
<button type="button" class="blueprint-palette-primary" ${a} aria-label="${T(o)}" data-tip="${T(o)}">
|
|
2075
|
-
<span class="blueprint-palette-glyph" aria-hidden="true">${
|
|
1995
|
+
<span class="blueprint-palette-glyph" aria-hidden="true">${O(c)}</span>
|
|
2076
1996
|
<span class="blueprint-palette-copy"><strong>${_(e.name)}</strong><small>${_(l)}</small></span>
|
|
2077
|
-
<span class="blueprint-palette-state" aria-hidden="true">${
|
|
1997
|
+
<span class="blueprint-palette-state" aria-hidden="true">${O(n ? "check" : "plus")}</span>
|
|
2078
1998
|
</button>
|
|
2079
1999
|
</div>`;
|
|
2080
2000
|
}
|
|
2081
|
-
function
|
|
2082
|
-
let n = X.graph, r = new Set(e.graph.nodes.filter((e) => e.kind === "host" || e.kind === "lifecycle").map((e) => e.kind)), i =
|
|
2001
|
+
function Mt(e, t) {
|
|
2002
|
+
let n = X.graph, r = new Set(e.graph.nodes.filter((e) => e.kind === "host" || e.kind === "lifecycle").map((e) => e.kind)), i = Dt.filter((e) => t.length === 0 || `${n.nodeKinds[e]} ${n.nodeKindHints[e]} ${e}`.toLocaleLowerCase().includes(t)), a = i.map((t) => {
|
|
2083
2003
|
let i = t === "host" || t === "lifecycle" ? e.graph.nodes.find((e) => e.kind === t) : void 0, a = r.has(t), o = i === void 0 ? `data-blueprint-insert-node="${t}"` : `data-blueprint-select-node="${T(i.id)}"`, s = X.addLogicNode(n.nodeKinds[t]), c = t === "timer" ? "activity" : t === "condition" ? "sliders" : t === "host" ? "terminal" : "play";
|
|
2084
2004
|
return `<div class="designer-list-row blueprint-palette-item" data-density="default" data-placed="${String(a)}" data-node-kind="${t}"${a ? "" : ` draggable="true" data-blueprint-drag-kind="${t}" data-blueprint-drag-label="${T(n.nodeKinds[t])}"`}>
|
|
2085
2005
|
<button type="button" class="blueprint-palette-primary" ${o} aria-label="${T(s)}" data-tip="${T(s)}">
|
|
2086
|
-
<span class="blueprint-palette-glyph" aria-hidden="true">${
|
|
2006
|
+
<span class="blueprint-palette-glyph" aria-hidden="true">${O(c)}</span>
|
|
2087
2007
|
<span class="blueprint-palette-copy"><strong>${_(n.nodeKinds[t])}</strong><small>${_(n.nodeKindHints[t])}</small></span>
|
|
2088
|
-
<span class="blueprint-palette-state" aria-hidden="true">${
|
|
2008
|
+
<span class="blueprint-palette-state" aria-hidden="true">${O(a ? "check" : "plus")}</span>
|
|
2089
2009
|
</button>
|
|
2090
2010
|
</div>`;
|
|
2091
2011
|
}).join(""), o = new Map(e.graph.nodes.map((e) => [e.id, e.title])), s = e.graph.edges.filter((e) => t.length === 0 || `${o.get(e.source) ?? ""} ${o.get(e.target) ?? ""} ${e.label} ${e.sourcePort} ${e.targetPort}`.toLocaleLowerCase().includes(t)), c = s.map((t) => {
|
|
@@ -2102,13 +2022,13 @@ function Pt(e, t) {
|
|
|
2102
2022
|
<div class="blueprint-palette-list">${a || Z(X.noLogicNodes)}</div>
|
|
2103
2023
|
<p class="blueprint-library-hint">${X.directNodeHint}</p>
|
|
2104
2024
|
</section>
|
|
2105
|
-
${
|
|
2025
|
+
${Nt(e, t)}
|
|
2106
2026
|
<section class="blueprint-palette-group" aria-label="${X.graph.edgeList}">
|
|
2107
2027
|
<header><strong>${X.graph.edgeList}</strong><span>${s.length}</span></header>
|
|
2108
2028
|
<div class="blueprint-palette-list">${c || Z(n.noEdges)}</div>
|
|
2109
2029
|
</section>`;
|
|
2110
2030
|
}
|
|
2111
|
-
function
|
|
2031
|
+
function Nt(e, t) {
|
|
2112
2032
|
let n = e.document?.subCanvases ?? [], r = [...n.some((e) => e.display === "page") ? [{
|
|
2113
2033
|
id: "",
|
|
2114
2034
|
name: X.graph.nodeKinds["main-canvas"],
|
|
@@ -2125,9 +2045,9 @@ function Ft(e, t) {
|
|
|
2125
2045
|
let n = e.graph.nodes.find((e) => t.kind === "main-canvas" ? e.kind === "main-canvas" : e.kind === "sub-canvas" && e.canvasId === t.id), r = n !== void 0, i = r && e.selection.nodes.includes(n.id), a = r ? `data-blueprint-select-node="${T(n.id)}"` : `data-blueprint-add-canvas="${T(t.id)}"`, o = r ? X.locateCanvas(t.name) : X.addCanvasNode(t.name), s = r ? "" : ` draggable="true" data-blueprint-drag-kind="${t.kind}"${t.kind === "sub-canvas" ? ` data-canvas-id="${T(t.id)}"` : ""} data-blueprint-drag-label="${T(t.name)}"`;
|
|
2126
2046
|
return `<div class="designer-list-row blueprint-palette-item" data-density="default" data-placed="${String(r)}" data-selected="${String(i)}" data-node-kind="${t.kind}"${s}>
|
|
2127
2047
|
<button type="button" class="blueprint-palette-primary" ${a} aria-label="${T(o)}" data-tip="${T(o)}">
|
|
2128
|
-
<span class="blueprint-palette-glyph" aria-hidden="true">${
|
|
2048
|
+
<span class="blueprint-palette-glyph" aria-hidden="true">${O(t.icon)}</span>
|
|
2129
2049
|
<span class="blueprint-palette-copy"><strong>${_(t.name)}</strong><small>${_(t.detail)}</small></span>
|
|
2130
|
-
<span class="blueprint-palette-state" aria-hidden="true">${
|
|
2050
|
+
<span class="blueprint-palette-state" aria-hidden="true">${O(r ? "check" : "plus")}</span>
|
|
2131
2051
|
</button>
|
|
2132
2052
|
</div>`;
|
|
2133
2053
|
}).join("");
|
|
@@ -2136,34 +2056,34 @@ function Ft(e, t) {
|
|
|
2136
2056
|
<div class="blueprint-palette-list">${i || Z(X.noSubCanvases)}</div>
|
|
2137
2057
|
</section>`;
|
|
2138
2058
|
}
|
|
2139
|
-
function
|
|
2059
|
+
function Pt(e, t) {
|
|
2140
2060
|
let n = X.libraryTabs[e], r = e === "components" ? X.layers : e === "relations" ? X.logic : X.globalVariables;
|
|
2141
|
-
return `<button type="button" class="designer-tab blueprint-library-rail-tab" id="designer-blueprint-library-${e}-tab" role="tab" aria-controls="designer-blueprint-library-${e}-panel" aria-selected="${String(e === t)}" tabindex="${e === t ? 0 : -1}" data-blueprint-library-tab="${e}" data-tip="${r}" aria-label="${r}"><span class="rail-tab-glyph" aria-hidden="true">${
|
|
2061
|
+
return `<button type="button" class="designer-tab blueprint-library-rail-tab" id="designer-blueprint-library-${e}-tab" role="tab" aria-controls="designer-blueprint-library-${e}-panel" aria-selected="${String(e === t)}" tabindex="${e === t ? 0 : -1}" data-blueprint-library-tab="${e}" data-tip="${r}" aria-label="${r}"><span class="rail-tab-glyph" aria-hidden="true">${O(e === "components" ? "layers" : e === "relations" ? "link" : "variable")}</span><span class="rail-tab-label">${n}</span></button>`;
|
|
2142
2062
|
}
|
|
2143
|
-
function
|
|
2063
|
+
function Ft(e, t) {
|
|
2144
2064
|
let n = e.id === t, r = x(e.id), i = T(e.label);
|
|
2145
|
-
return `<button type="button" class="designer-tab blueprint-library-rail-tab" id="${oe(e.id)}" role="tab" aria-controls="${ie(e.id)}" aria-selected="${String(n)}" tabindex="${n ? 0 : -1}" data-blueprint-library-tab="${r}" data-host-left-panel-group="${T(e.id)}" data-host-left-panel-mode="blueprint" data-tip="${i}" aria-label="${i}"><span class="rail-tab-glyph" aria-hidden="true">${
|
|
2065
|
+
return `<button type="button" class="designer-tab blueprint-library-rail-tab" id="${oe(e.id)}" role="tab" aria-controls="${ie(e.id)}" aria-selected="${String(n)}" tabindex="${n ? 0 : -1}" data-blueprint-library-tab="${r}" data-host-left-panel-group="${T(e.id)}" data-host-left-panel-mode="blueprint" data-tip="${i}" aria-label="${i}"><span class="rail-tab-glyph" aria-hidden="true">${O(e.icon ?? "shapes")}</span><span class="rail-tab-label">${_(e.label)}</span></button>`;
|
|
2146
2066
|
}
|
|
2147
|
-
function
|
|
2067
|
+
function It(e) {
|
|
2148
2068
|
return e === "components" || e === "relations" || e === "variables";
|
|
2149
2069
|
}
|
|
2150
2070
|
function Z(e) {
|
|
2151
|
-
return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${
|
|
2071
|
+
return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${O("search")}</span><p class="designer-empty-title">${e}</p></div>`;
|
|
2152
2072
|
}
|
|
2153
2073
|
//#endregion
|
|
2154
2074
|
//#region src/browser/controllers/blueprint/designer-blueprint-panel-tabs.ts
|
|
2155
|
-
function
|
|
2075
|
+
function Lt(e, t) {
|
|
2156
2076
|
if (e === void 0) return !1;
|
|
2157
|
-
if (
|
|
2077
|
+
if (It(e)) return !0;
|
|
2158
2078
|
let n = C(e);
|
|
2159
2079
|
return n !== void 0 && t?.some((e) => e.id === n && E(e, "blueprint")) === !0;
|
|
2160
2080
|
}
|
|
2161
|
-
function
|
|
2081
|
+
function Rt(e) {
|
|
2162
2082
|
return e === "configuration" || e === "problems" || e === "trace";
|
|
2163
2083
|
}
|
|
2164
2084
|
//#endregion
|
|
2165
2085
|
//#region src/browser/controllers/blueprint/designer-blueprint-panels-controller.ts
|
|
2166
|
-
var
|
|
2086
|
+
var zt = /* @__PURE__ */ new Set([
|
|
2167
2087
|
"eq",
|
|
2168
2088
|
"neq",
|
|
2169
2089
|
"gt",
|
|
@@ -2172,7 +2092,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2172
2092
|
"lte",
|
|
2173
2093
|
"contains",
|
|
2174
2094
|
"exists"
|
|
2175
|
-
]),
|
|
2095
|
+
]), Bt = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/, Vt = class {
|
|
2176
2096
|
callbacks;
|
|
2177
2097
|
#e;
|
|
2178
2098
|
#t;
|
|
@@ -2207,23 +2127,23 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2207
2127
|
render() {
|
|
2208
2128
|
let e = this.hasLibraryTabFocus();
|
|
2209
2129
|
this.reconcileLibraryTab();
|
|
2210
|
-
let t = this.callbacks.getDocument(), n = this.callbacks.getGraph(), r = this.callbacks.getSelection(), i = t === void 0 ? [] :
|
|
2211
|
-
|
|
2130
|
+
let t = this.callbacks.getDocument(), n = this.callbacks.getGraph(), r = this.callbacks.getSelection(), i = t === void 0 ? [] : we(t, this.callbacks.getCatalog(), this.callbacks.getRuntimeContributions());
|
|
2131
|
+
Ot(this.#e, {
|
|
2212
2132
|
document: t,
|
|
2213
2133
|
graph: n,
|
|
2214
2134
|
components: i,
|
|
2215
|
-
variables: t === void 0 ? [] :
|
|
2135
|
+
variables: t === void 0 ? [] : Te(t, k.blueprint),
|
|
2216
2136
|
selection: r,
|
|
2217
2137
|
query: this.#n,
|
|
2218
2138
|
activeTab: this.#r,
|
|
2219
2139
|
groups: this.callbacks.getLeftPanelGroups()
|
|
2220
|
-
}),
|
|
2140
|
+
}), bt(this.#t, t, n, r, this.#i, this.callbacks.getDiagnostics(), this.callbacks.getTrace(), this.callbacks.getCatalog()), this.#e !== void 0 && v(this.#e), this.#t !== void 0 && v(this.#t), this.callbacks.getMode() === "blueprint" && this.#e !== void 0 && (ot(this.#e.getRootNode(), this.blueprintHostGroup(this.selectedLeftPanelGroupId), n.nodes.length), this.callbacks.onActiveLeftPanelGroupChange()), e && this.#e?.querySelector(`[data-blueprint-library-tab="${this.#r}"]`)?.focus();
|
|
2221
2141
|
}
|
|
2222
2142
|
onClick(e) {
|
|
2223
2143
|
let t = e.closest("[data-blueprint-library-tab]")?.dataset.blueprintLibraryTab;
|
|
2224
|
-
if (
|
|
2144
|
+
if (Lt(t, this.callbacks.getLeftPanelGroups())) return this.#r = t, this.callbacks.expandLeftPanel(), this.render(), this.#e?.querySelector(`[data-blueprint-library-tab="${t}"]`)?.focus(), !0;
|
|
2225
2145
|
let n = e.closest("[data-blueprint-inspector-tab]")?.dataset.blueprintInspectorTab;
|
|
2226
|
-
if (
|
|
2146
|
+
if (Rt(n)) return this.#i = n, this.render(), this.#t?.querySelector(`[data-blueprint-inspector-tab="${n}"]`)?.focus(), !0;
|
|
2227
2147
|
let r = e.closest("[data-blueprint-select-node], [data-blueprint-select-edge], [data-blueprint-add-component], [data-blueprint-add-variable], [data-blueprint-add-canvas], [data-blueprint-insert-node], [data-blueprint-delete], [data-blueprint-nodes-enabled], [data-blueprint-edge-order], [data-blueprint-clear-trace]");
|
|
2228
2148
|
if (r === null) return !1;
|
|
2229
2149
|
let i = r.dataset;
|
|
@@ -2324,7 +2244,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2324
2244
|
severity: "error",
|
|
2325
2245
|
code: "AUTHORING_REQUEST_INVALID",
|
|
2326
2246
|
path: [],
|
|
2327
|
-
message:
|
|
2247
|
+
message: k.blueprint.invalidCommand
|
|
2328
2248
|
}]
|
|
2329
2249
|
});
|
|
2330
2250
|
return;
|
|
@@ -2355,7 +2275,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2355
2275
|
type: "interval",
|
|
2356
2276
|
intervalSeconds: Number(r)
|
|
2357
2277
|
});
|
|
2358
|
-
else if (n === "operator" && i.kind === "condition" &&
|
|
2278
|
+
else if (n === "operator" && i.kind === "condition" && zt.has(r)) {
|
|
2359
2279
|
let n = r, a = n === "exists" ? {
|
|
2360
2280
|
left: i.condition.left,
|
|
2361
2281
|
operator: n
|
|
@@ -2393,7 +2313,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2393
2313
|
type: "state",
|
|
2394
2314
|
stateId: a
|
|
2395
2315
|
});
|
|
2396
|
-
else if (i === "host-event" &&
|
|
2316
|
+
else if (i === "host-event" && Bt.test(a.trim())) s = r(e.blueprint, t, {
|
|
2397
2317
|
type: "target-port",
|
|
2398
2318
|
port: `event:${a.trim()}`
|
|
2399
2319
|
});
|
|
@@ -2440,7 +2360,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2440
2360
|
};
|
|
2441
2361
|
else if (t === "event-field") u = {
|
|
2442
2362
|
kind: "event-payload",
|
|
2443
|
-
path: (s === "edge" ?
|
|
2363
|
+
path: (s === "edge" ? it(e, c, this.callbacks.getCatalog()) : [])[0] ?? ["value"]
|
|
2444
2364
|
};
|
|
2445
2365
|
else if (t === "variable") {
|
|
2446
2366
|
let t = A(e)[0];
|
|
@@ -2459,7 +2379,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2459
2379
|
u = void 0;
|
|
2460
2380
|
}
|
|
2461
2381
|
else if (l === "field") {
|
|
2462
|
-
let e =
|
|
2382
|
+
let e = nt(n.value);
|
|
2463
2383
|
e !== null && (u = {
|
|
2464
2384
|
kind: "event-payload",
|
|
2465
2385
|
path: e
|
|
@@ -2475,7 +2395,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2475
2395
|
severity: "error",
|
|
2476
2396
|
code: "AUTHORING_REQUEST_INVALID",
|
|
2477
2397
|
path: [],
|
|
2478
|
-
message: l === "field" ?
|
|
2398
|
+
message: l === "field" ? k.blueprint.eventFieldInvalid : k.blueprint.graph.simulation.invalidPayload
|
|
2479
2399
|
}]
|
|
2480
2400
|
}), this.render();
|
|
2481
2401
|
return;
|
|
@@ -2521,10 +2441,10 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2521
2441
|
blueprintHostGroup(e) {
|
|
2522
2442
|
if (e !== void 0) return this.callbacks.getLeftPanelGroups()?.find((t) => t.id === e && E(t, "blueprint"));
|
|
2523
2443
|
}
|
|
2524
|
-
},
|
|
2444
|
+
}, Ht = Object.freeze({
|
|
2525
2445
|
nodes: Object.freeze([]),
|
|
2526
2446
|
edges: Object.freeze([])
|
|
2527
|
-
}),
|
|
2447
|
+
}), Ut = class {
|
|
2528
2448
|
callbacks;
|
|
2529
2449
|
#e;
|
|
2530
2450
|
#t;
|
|
@@ -2540,7 +2460,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2540
2460
|
#d;
|
|
2541
2461
|
#f = () => this.resolveCanvas();
|
|
2542
2462
|
constructor(e) {
|
|
2543
|
-
this.callbacks = e, this.#u = new
|
|
2463
|
+
this.callbacks = e, this.#u = new Ze({
|
|
2544
2464
|
getDocument: e.getDocument,
|
|
2545
2465
|
getGraph: () => this.graph,
|
|
2546
2466
|
getMode: () => this.#i,
|
|
@@ -2560,7 +2480,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2560
2480
|
render: () => this.render(),
|
|
2561
2481
|
emitDiagnostics: e.emitDiagnostics,
|
|
2562
2482
|
onSimulated: () => this.#d.showTrace()
|
|
2563
|
-
}), this.#d = new
|
|
2483
|
+
}), this.#d = new Vt({
|
|
2564
2484
|
getDocument: e.getDocument,
|
|
2565
2485
|
getGraph: () => this.graph,
|
|
2566
2486
|
getCatalog: e.getCatalog,
|
|
@@ -2653,12 +2573,12 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2653
2573
|
setMode(e, t = {}, n = "api") {
|
|
2654
2574
|
let r = re(e, t);
|
|
2655
2575
|
if (!r.ok) return r;
|
|
2656
|
-
if (e === "blueprint" && !this.available) return $("BLUEPRINT_CAPABILITY_UNAVAILABLE",
|
|
2576
|
+
if (e === "blueprint" && !this.available) return $("BLUEPRINT_CAPABILITY_UNAVAILABLE", k.blueprint.noHostCanvas);
|
|
2657
2577
|
if (t.focus !== void 0) {
|
|
2658
2578
|
let e = this.ensureFocusNode(t.focus);
|
|
2659
2579
|
if (!e.ok) return e;
|
|
2660
2580
|
let n = this.resolveFocus(t.focus);
|
|
2661
|
-
if (n === void 0) return $("AUTHORING_REQUEST_INVALID",
|
|
2581
|
+
if (n === void 0) return $("AUTHORING_REQUEST_INVALID", k.blueprint.invalidSelection);
|
|
2662
2582
|
this.#a = this.graphHasEdge(n) ? {
|
|
2663
2583
|
nodes: [],
|
|
2664
2584
|
edges: [n]
|
|
@@ -2693,7 +2613,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2693
2613
|
}
|
|
2694
2614
|
let n = e.closest("[data-blueprint-search-id]")?.dataset.blueprintSearchId;
|
|
2695
2615
|
if (n !== void 0) {
|
|
2696
|
-
let e =
|
|
2616
|
+
let e = Gt(n), t = e === void 0 ? $("AUTHORING_REQUEST_INVALID", k.blueprint.invalidSelection) : this.focusOrInsert(e);
|
|
2697
2617
|
return t.ok || this.callbacks.emitDiagnostics(t.diagnostics), !0;
|
|
2698
2618
|
}
|
|
2699
2619
|
return this.#d.onClick(e);
|
|
@@ -2724,10 +2644,10 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2724
2644
|
}
|
|
2725
2645
|
get graph() {
|
|
2726
2646
|
let e = this.callbacks.getDocument();
|
|
2727
|
-
if (e === void 0) return
|
|
2647
|
+
if (e === void 0) return Ht;
|
|
2728
2648
|
let t = this.callbacks.getCatalog(), n = this.callbacks.getRuntimeContributions(), r = this.#l;
|
|
2729
2649
|
if (r !== void 0 && r.document === e && r.catalog === t && r.contributions === n) return r.graph;
|
|
2730
|
-
let i =
|
|
2650
|
+
let i = Ee(e, t, n, k.blueprint);
|
|
2731
2651
|
return this.#l = {
|
|
2732
2652
|
document: e,
|
|
2733
2653
|
catalog: t,
|
|
@@ -2763,7 +2683,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2763
2683
|
}
|
|
2764
2684
|
mountDefaultCanvas() {
|
|
2765
2685
|
if (this.#r !== void 0 || this.#n === void 0) return;
|
|
2766
|
-
let e =
|
|
2686
|
+
let e = Re(this.#n.ownerDocument);
|
|
2767
2687
|
this.#n.append(e.element), this.#r = e;
|
|
2768
2688
|
}
|
|
2769
2689
|
resolveCanvas() {
|
|
@@ -2782,11 +2702,11 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2782
2702
|
}
|
|
2783
2703
|
fallbackToCanvas(e) {
|
|
2784
2704
|
let t = this.#i;
|
|
2785
|
-
this.#i = "canvas", this.render(), this.emitModeChange(t, "canvas", "fallback"), e && this.callbacks.emitDiagnostics([
|
|
2705
|
+
this.#i = "canvas", this.render(), this.emitModeChange(t, "canvas", "fallback"), e && this.callbacks.emitDiagnostics([Wt("BLUEPRINT_CAPABILITY_UNAVAILABLE", k.blueprint.noHostCanvas)]);
|
|
2786
2706
|
}
|
|
2787
2707
|
select(e, t) {
|
|
2788
2708
|
let n = this.graph, r = new Set(n.nodes.map((e) => e.id)), i = new Set(n.edges.map((e) => e.id));
|
|
2789
|
-
if (e.nodes.some((e) => !r.has(e)) || e.edges.some((e) => !i.has(e))) return $("AUTHORING_REQUEST_INVALID",
|
|
2709
|
+
if (e.nodes.some((e) => !r.has(e)) || e.edges.some((e) => !i.has(e))) return $("AUTHORING_REQUEST_INVALID", k.blueprint.invalidSelection);
|
|
2790
2710
|
this.#a = {
|
|
2791
2711
|
nodes: [...e.nodes],
|
|
2792
2712
|
edges: [...e.edges]
|
|
@@ -2816,7 +2736,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2816
2736
|
let e = this.#e;
|
|
2817
2737
|
if (e === void 0) return;
|
|
2818
2738
|
let t = this.callbacks.getDocument(), n = this.#u.stateDiagnostics().filter((e) => e.severity === "error").length, r = t?.blueprint.edges ?? [];
|
|
2819
|
-
|
|
2739
|
+
Ue(e, this.#i, this.available, {
|
|
2820
2740
|
nodes: t?.blueprint.nodes.length ?? 0,
|
|
2821
2741
|
relations: r.filter((e) => e.kind === "flow").length,
|
|
2822
2742
|
semantic: r.filter((e) => e.kind === "semantic").length,
|
|
@@ -2836,7 +2756,7 @@ var Vt = /* @__PURE__ */ new Set([
|
|
|
2836
2756
|
}));
|
|
2837
2757
|
}
|
|
2838
2758
|
};
|
|
2839
|
-
function
|
|
2759
|
+
function Wt(e, t) {
|
|
2840
2760
|
return {
|
|
2841
2761
|
severity: "error",
|
|
2842
2762
|
code: e,
|
|
@@ -2854,10 +2774,10 @@ function Q(e) {
|
|
|
2854
2774
|
function $(e, t) {
|
|
2855
2775
|
return {
|
|
2856
2776
|
ok: !1,
|
|
2857
|
-
diagnostics: [
|
|
2777
|
+
diagnostics: [Wt(e, t)]
|
|
2858
2778
|
};
|
|
2859
2779
|
}
|
|
2860
|
-
function
|
|
2780
|
+
function Gt(e) {
|
|
2861
2781
|
let t = e.indexOf(":");
|
|
2862
2782
|
if (t <= 0) return;
|
|
2863
2783
|
let n = e.slice(0, t), r = e.slice(t + 1);
|
|
@@ -2867,6 +2787,6 @@ function qt(e) {
|
|
|
2867
2787
|
} : void 0;
|
|
2868
2788
|
}
|
|
2869
2789
|
//#endregion
|
|
2870
|
-
export {
|
|
2790
|
+
export { Ut as DesignerBlueprintWorkbenchPanel };
|
|
2871
2791
|
|
|
2872
|
-
//# sourceMappingURL=designer-blueprint-workbench-panel-
|
|
2792
|
+
//# sourceMappingURL=designer-blueprint-workbench-panel-DVvKcSvJ.js.map
|