base-screen 0.1.2 → 0.3.0
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 +15 -17
- package/dist/_internal/contracts/document/blueprint-capabilities.d.ts +9 -1
- package/dist/_internal/contracts/document/blueprint-capabilities.js +16 -0
- package/dist/_internal/contracts/document/blueprint-graph.d.ts +68 -0
- package/dist/_internal/contracts/document/blueprint-graph.js +424 -0
- package/dist/_internal/contracts/document/blueprint-strict.d.ts +3 -1
- package/dist/_internal/contracts/document/blueprint-strict.js +77 -91
- package/dist/_internal/contracts/document/component-states.d.ts +54 -0
- package/dist/_internal/contracts/document/component-states.js +171 -0
- package/dist/_internal/contracts/document/json-schema.js +49 -17
- package/dist/_internal/contracts/document/limits.d.ts +40 -8
- package/dist/_internal/contracts/document/limits.js +40 -8
- package/dist/_internal/contracts/document/parse-parts.d.ts +12 -0
- package/dist/_internal/contracts/document/parse-parts.js +56 -0
- package/dist/_internal/contracts/document/parse.js +1 -1
- package/dist/_internal/contracts/document/references.js +108 -41
- package/dist/_internal/contracts/document/schema.d.ts +525 -186
- package/dist/_internal/contracts/document/schema.js +234 -95
- package/dist/_internal/contracts/document/sub-canvas.d.ts +27 -0
- package/dist/_internal/contracts/document/sub-canvas.js +38 -0
- package/dist/_internal/contracts/document/theme.d.ts +22 -0
- package/dist/_internal/contracts/document/theme.js +65 -0
- package/dist/_internal/contracts/document/validate-blueprint.d.ts +7 -0
- package/dist/_internal/contracts/document/validate-blueprint.js +223 -25
- package/dist/_internal/contracts/document/validate-component.d.ts +2 -0
- package/dist/_internal/contracts/document/validate-component.js +111 -54
- package/dist/_internal/contracts/document/validate-data-source.js +84 -9
- package/dist/_internal/contracts/document/validate-sub-canvas.d.ts +9 -0
- package/dist/_internal/contracts/document/validate-sub-canvas.js +92 -0
- package/dist/_internal/contracts/document/validate-theme.d.ts +4 -0
- package/dist/_internal/contracts/document/validate-theme.js +20 -0
- package/dist/_internal/contracts/document/validate.js +19 -2
- package/dist/_internal/contracts/index.d.ts +11 -4
- package/dist/_internal/contracts/index.js +8 -2
- package/dist/_internal/contracts/migration/blueprint-graph-migration.d.ts +21 -0
- package/dist/_internal/contracts/migration/blueprint-graph-migration.js +328 -0
- package/dist/_internal/contracts/migration/migrate-document.d.ts +2 -1
- package/dist/_internal/contracts/migration/migrate-document.js +11 -3
- package/dist/_internal/contracts/push/delivery.d.ts +16 -0
- package/dist/_internal/contracts/push/delivery.js +70 -0
- package/dist/_internal/contracts/push/level-scale.d.ts +7 -0
- package/dist/_internal/contracts/push/level-scale.js +91 -0
- package/dist/_internal/contracts/screen-document.schema.json +1056 -383
- package/dist/_internal/contracts/types/document.d.ts +277 -76
- package/dist/_internal/contracts/types/execution.d.ts +12 -2
- package/dist/_internal/contracts/types/execution.js +0 -5
- package/dist/_internal/contracts/types/host.d.ts +35 -1
- package/dist/_internal/contracts/types/host.js +7 -1
- package/dist/_internal/contracts/types/push.d.ts +86 -0
- package/dist/_internal/contracts/types/push.js +1 -0
- package/dist/_internal/contracts/types/variable.d.ts +5 -0
- package/dist/_internal/contracts/variable/parse.js +30 -1
- package/dist/_internal/core/blueprint/runtime-compile.d.ts +4 -0
- package/dist/_internal/core/blueprint/runtime-compile.js +45 -21
- package/dist/_internal/core/blueprint/runtime-dispatch.js +270 -156
- package/dist/_internal/core/blueprint/runtime-types.d.ts +112 -6
- package/dist/_internal/core/blueprint/runtime.d.ts +1 -1
- package/dist/_internal/core/commands/apply-component-commands.d.ts +5 -0
- package/dist/_internal/core/commands/apply-component-commands.js +74 -2
- package/dist/_internal/core/commands/apply.js +63 -3
- package/dist/_internal/core/commands/parse-command.js +12 -0
- package/dist/_internal/core/commands/types.d.ts +28 -3
- package/dist/_internal/core/diff/screen-diff.js +1 -1
- package/dist/_internal/core/index.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-canvas-bridge-helpers.d.ts +1 -1
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-canvas-bridge.d.ts +11 -1
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-panels-controller.d.ts +18 -4
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-timer-scheduler.d.ts +21 -0
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-callbacks.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-controller.d.ts +73 -16
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-panel.d.ts +48 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-data-source-authoring.d.ts +25 -1
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-controller-context.d.ts +6 -2
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-draft-controller.d.ts +8 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-panel-controller.d.ts +62 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-surface-controller.d.ts +14 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-update-policy-authoring.d.ts +52 -0
- package/dist/_internal/engine/browser/controllers/designer-artboard-controller.d.ts +80 -0
- package/dist/_internal/engine/browser/controllers/designer-canvas-runtime-controller.d.ts +21 -3
- package/dist/_internal/engine/browser/controllers/designer-change-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/designer-command-palette-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/designer-notification-controller.d.ts +7 -0
- package/dist/_internal/engine/browser/controllers/designer-page-preview-controller.d.ts +34 -0
- package/dist/_internal/engine/browser/controllers/designer-popup-preview-controller.d.ts +40 -0
- package/dist/_internal/engine/browser/controllers/designer-preview-controller.d.ts +1 -3
- package/dist/_internal/engine/browser/controllers/designer-reference-layer-controller.d.ts +45 -0
- package/dist/_internal/engine/browser/controllers/designer-size-tier-controller.d.ts +60 -0
- package/dist/_internal/engine/browser/controllers/designer-viewport-controller.d.ts +10 -0
- package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-callbacks.d.ts +5 -1
- package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-environment.d.ts +18 -7
- package/dist/_internal/engine/browser/controllers/gesture/designer-group-editing-controller.d.ts +8 -1
- package/dist/_internal/engine/browser/controllers/layers/designer-layers-controller.d.ts +11 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-component-states-controller.d.ts +26 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-inspector-focus.d.ts +30 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-material-group-navigation-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller-callbacks.d.ts +23 -6
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller.d.ts +4 -2
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-inspector-controller.d.ts +6 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-material-controller.d.ts +5 -0
- package/dist/_internal/engine/browser/controllers/panel/designer-panel-property-controller.d.ts +2 -0
- package/dist/_internal/engine/browser/controllers/workbench/designer-panel-layout-controller.d.ts +22 -1
- package/dist/_internal/engine/browser/controllers/workbench/designer-snap-controller.d.ts +5 -1
- package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-controller.d.ts +12 -1
- package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-tabs-controller.d.ts +1 -0
- package/dist/_internal/engine/browser/dom/blueprint/designer-blueprint-inspector-configuration.d.ts +12 -0
- package/dist/_internal/engine/browser/dom/blueprint/designer-blueprint-library-dom.d.ts +18 -2
- package/dist/_internal/engine/browser/dom/change/designer-change-dom.d.ts +1 -0
- package/dist/_internal/engine/browser/dom/color/designer-color-palette-dom.d.ts +1 -0
- package/dist/_internal/engine/browser/dom/color/designer-color-palette-theme.d.ts +10 -0
- package/dist/_internal/engine/browser/dom/color/designer-color-palette-types.d.ts +13 -0
- package/dist/_internal/engine/browser/dom/color/designer-color-theme-slots.d.ts +10 -0
- package/dist/_internal/engine/browser/dom/dataset/designer-dataset-types.d.ts +17 -6
- package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-control-dom.d.ts +17 -1
- package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-model.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/designer-field-primitives.d.ts +43 -1
- package/dist/_internal/engine/browser/dom/designer-icons.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/designer-select-dom.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/designer-ui-primitives.d.ts +5 -0
- package/dist/_internal/engine/browser/dom/layers/designer-layers-model.d.ts +28 -0
- package/dist/_internal/engine/browser/dom/material-library/designer-material-library-dom.d.ts +18 -2
- package/dist/_internal/engine/browser/dom/material-library/designer-material-library-group-view.d.ts +1 -0
- package/dist/_internal/engine/browser/dom/menu/designer-menu-model.d.ts +4 -2
- package/dist/_internal/engine/browser/dom/panel/designer-canvas-properties-dom.d.ts +10 -2
- package/dist/_internal/engine/browser/dom/panel/designer-canvas-transactions.d.ts +5 -1
- package/dist/_internal/engine/browser/dom/panel/designer-chrome-primitives.d.ts +12 -0
- package/dist/_internal/engine/browser/dom/panel/designer-color-group-dom.d.ts +45 -0
- package/dist/_internal/engine/browser/dom/panel/designer-component-properties-dom.d.ts +4 -3
- package/dist/_internal/engine/browser/dom/panel/designer-component-states-dom.d.ts +22 -0
- package/dist/_internal/engine/browser/dom/panel/designer-panel-primitives.d.ts +18 -2
- package/dist/_internal/engine/browser/dom/workspace/designer-workspace-markup.d.ts +2 -0
- package/dist/_internal/engine/browser/dom/workspace/designer-workspace-skeleton.d.ts +7 -0
- package/dist/_internal/engine/browser/dom/workspace/designer-workspace-template.d.ts +13 -0
- package/dist/_internal/engine/browser/dom/workspace/designer-workspace.d.ts +2 -1
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids-types.d.ts +8 -2
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids.d.ts +14 -4
- package/dist/_internal/engine/browser/viewport/designer-canvas-coordinates.d.ts +7 -0
- package/dist/_internal/engine/browser/viewport/designer-canvas-measurements.d.ts +12 -1
- package/dist/_internal/engine/browser/viewport/designer-canvas-snap-alignment-index.d.ts +27 -0
- package/dist/_internal/engine/browser/viewport/designer-canvas-snap-geometry.d.ts +13 -2
- package/dist/_internal/engine/browser/viewport/designer-canvas-snap-preview.d.ts +1 -1
- package/dist/_internal/engine/browser/viewport/designer-canvas-snap-spacing.d.ts +12 -0
- package/dist/_internal/engine/browser/viewport/designer-guide-overlay-nodes.d.ts +2 -0
- package/dist/_internal/engine/common/observability/designer-metrics.d.ts +1 -1
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-geometry.d.ts +12 -0
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-graph.d.ts +203 -0
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-model-types.d.ts +6 -2
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-model.d.ts +58 -7
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-protocol-types.d.ts +131 -51
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-value-sources.d.ts +7 -3
- package/dist/_internal/engine/common/operations/catalog/designer-catalog-refresh.d.ts +13 -1
- package/dist/_internal/engine/common/operations/designer-operation-registry.d.ts +5 -1
- package/dist/_internal/engine/common/operations/designer-variable-operations.d.ts +8 -0
- package/dist/_internal/engine/common/operations/element/designer-element-operation-types.d.ts +8 -0
- package/dist/_internal/engine/common/operations/host-resource/host-resource-authoring.d.ts +1 -1
- package/dist/_internal/engine/common/operations/material-component/material-component-fragment-extract.d.ts +34 -0
- package/dist/_internal/engine/common/operations/material-component/material-component-fragment.d.ts +24 -41
- package/dist/_internal/engine/common/operations/material-component/material-component.d.ts +1 -1
- package/dist/_internal/engine/common/operations/material-library/material-library-fragments.d.ts +46 -0
- package/dist/_internal/engine/common/operations/material-library/material-library-grouping.d.ts +11 -0
- package/dist/_internal/engine/common/operations/selection/designer-group.d.ts +16 -4
- package/dist/_internal/engine/common/operations/selection/designer-multi-selection-operations.d.ts +4 -3
- package/dist/_internal/engine/common/operations/selection/designer-selection-actions.d.ts +6 -0
- package/dist/_internal/engine/common/operations/selection/designer-selection.d.ts +8 -0
- package/dist/_internal/engine/common/operations/style/designer-component-states.d.ts +62 -0
- package/dist/_internal/engine/common/operations/style/designer-material-appearance.d.ts +30 -0
- package/dist/_internal/engine/common/session/designer-artboard.d.ts +40 -0
- package/dist/_internal/engine/common/session/designer-session.d.ts +21 -0
- package/dist/_internal/engine/common/ui-text/designer-blueprint-ui-text.d.ts +170 -0
- package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +427 -89
- package/dist/_internal/engine/designer-blueprint-workbench-panel-CJ3iZo5v.js +2872 -0
- package/dist/_internal/engine/designer-dataset-controller-CrfOg2Ys.js +4683 -0
- package/dist/_internal/engine/designer-element/api/designer-element-catalog.d.ts +4 -3
- package/dist/_internal/engine/designer-element/api/designer-element-configuration-types.d.ts +11 -8
- package/dist/_internal/engine/designer-element/api/designer-element-fragment-save.d.ts +16 -0
- package/dist/_internal/engine/designer-element/api/designer-element-host-properties.d.ts +0 -5
- package/dist/_internal/engine/designer-element/api/designer-element-insert-component-fragment.d.ts +9 -2
- package/dist/_internal/engine/designer-element/api/designer-element-material-library-fragments.d.ts +17 -0
- package/dist/_internal/engine/designer-element/api/designer-element-project.d.ts +0 -1
- package/dist/_internal/engine/designer-element/base-screen-designer-element.d.ts +24 -24
- package/dist/_internal/engine/designer-element/designer-element-public-api.d.ts +5 -5
- package/dist/_internal/engine/designer-element/runtime/designer-element-guards.d.ts +0 -2
- package/dist/_internal/engine/designer-element/runtime/designer-element-host.d.ts +6 -7
- package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +18 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-runtime.d.ts +15 -14
- package/dist/_internal/engine/designer-element/runtime/designer-element-skeleton.d.ts +14 -0
- package/dist/_internal/engine/designer-element/runtime/designer-element-state.d.ts +41 -12
- package/dist/_internal/engine/designer-field-primitives-KBZuWN_D.js +2685 -0
- package/dist/_internal/engine/designer-left-panel-groups-dom-N2OHOWjl.js +1282 -0
- package/dist/_internal/engine/host-resource-selection-xo2mLCD4.js +2482 -0
- package/dist/_internal/engine/host-tokens.css +12 -12
- package/dist/_internal/engine/index.js +9177 -18839
- package/dist/_internal/host-kit/index.d.ts +2 -0
- package/dist/_internal/host-kit/index.js +2 -0
- package/dist/_internal/host-kit/push-result.d.ts +5 -0
- package/dist/_internal/host-kit/push-result.js +8 -0
- package/dist/_internal/host-kit/sse-subscribe.d.ts +59 -0
- package/dist/_internal/host-kit/sse-subscribe.js +253 -0
- package/dist/_internal/host-kit/subscription-hub.d.ts +41 -0
- package/dist/_internal/host-kit/subscription-hub.js +179 -0
- package/dist/_internal/material/base-material.d.ts +1 -0
- package/dist/_internal/material/chart.d.ts +4 -0
- package/dist/_internal/material/chart.js +101 -58
- package/dist/_internal/material/container.js +19 -33
- package/dist/_internal/material/{base-material-BArgjOeL.js → editor-descriptor-DJZYygOa.js} +49 -20
- package/dist/_internal/material/editor-descriptor.d.ts +18 -0
- package/dist/_internal/material/image.js +30 -34
- package/dist/_internal/material/rule.js +29 -42
- package/dist/_internal/material/shapes.js +57 -74
- package/dist/_internal/material/table.d.ts +4 -0
- package/dist/_internal/material/table.js +118 -71
- package/dist/_internal/material/text.js +40 -68
- package/dist/_internal/plugin-core/contracts.d.ts +38 -49
- package/dist/_internal/plugin-core/contribution-kind.js +47 -2
- package/dist/_internal/plugin-core/editor/editor-ai-description.d.ts +3 -0
- package/dist/_internal/plugin-core/editor/editor-ai-description.js +124 -0
- package/dist/_internal/plugin-core/editor/editor-descriptor-conditions.js +5 -0
- package/dist/_internal/plugin-core/editor/editor-descriptor-inference.d.ts +32 -0
- package/dist/_internal/plugin-core/editor/editor-descriptor-inference.js +83 -0
- package/dist/_internal/plugin-core/editor/editor-descriptor-items.d.ts +6 -0
- package/dist/_internal/plugin-core/editor/editor-descriptor-items.js +41 -12
- package/dist/_internal/plugin-core/editor/editor-descriptor-model.d.ts +24 -1
- package/dist/_internal/plugin-core/editor/editor-descriptor-model.js +6 -1
- package/dist/_internal/plugin-core/editor/editor-descriptor-schema.js +21 -0
- package/dist/_internal/plugin-core/editor/editor-descriptor-sections.js +5 -7
- package/dist/_internal/plugin-core/editor/editor-descriptor.d.ts +1 -0
- package/dist/_internal/plugin-core/editor/editor-descriptor.js +55 -2
- package/dist/_internal/plugin-core/fragment/fragment.d.ts +96 -0
- package/dist/_internal/plugin-core/fragment/fragment.js +535 -0
- package/dist/_internal/plugin-core/index.d.ts +7 -4
- package/dist/_internal/plugin-core/index.js +5 -2
- package/dist/_internal/plugin-core/material/material-manifest.js +14 -2
- package/dist/_internal/plugin-core/material/material-schema.d.ts +9 -0
- package/dist/_internal/plugin-core/material/material-schema.js +31 -1
- package/dist/_internal/plugin-core/material/material-theme.d.ts +25 -0
- package/dist/_internal/plugin-core/material/material-theme.js +77 -0
- package/dist/_internal/plugin-core/material/material-validation-constants.js +2 -0
- package/dist/_internal/plugin-core/material/material.d.ts +1 -1
- package/dist/_internal/plugin-core/material/material.js +1 -1
- package/dist/_internal/plugin-manager/contribution-kind-plan.d.ts +2 -1
- package/dist/_internal/plugin-manager/contribution-kind-plan.js +6 -0
- package/dist/_internal/plugin-manager/contributions.js +10 -0
- package/dist/_internal/plugin-sdk/authoring-finding.d.ts +19 -0
- package/dist/_internal/plugin-sdk/authoring-finding.js +12 -0
- package/dist/_internal/plugin-sdk/fragment-audit.d.ts +14 -0
- package/dist/_internal/plugin-sdk/fragment-audit.js +170 -0
- package/dist/_internal/plugin-sdk/fragment-definition.d.ts +11 -0
- package/dist/_internal/plugin-sdk/fragment-definition.js +16 -0
- package/dist/_internal/plugin-sdk/index.d.ts +9 -0
- package/dist/_internal/plugin-sdk/index.js +9 -0
- package/dist/_internal/plugin-sdk/material-config-groups.d.ts +44 -0
- package/dist/_internal/plugin-sdk/material-config-groups.js +80 -0
- package/dist/_internal/plugin-sdk/material-editor-audit.d.ts +24 -0
- package/dist/_internal/plugin-sdk/material-editor-audit.js +160 -0
- package/dist/_internal/plugin-sdk/material-rendered-element.d.ts +69 -0
- package/dist/_internal/plugin-sdk/material-rendered-element.js +165 -0
- package/dist/_internal/plugin-sdk/material-spec-audit.d.ts +22 -0
- package/dist/_internal/plugin-sdk/material-spec-audit.js +184 -0
- package/dist/_internal/plugin-sdk/material-spec.d.ts +114 -0
- package/dist/_internal/plugin-sdk/material-spec.js +635 -0
- package/dist/_internal/plugin-sdk/material-style-keys.d.ts +17 -0
- package/dist/_internal/plugin-sdk/material-style-keys.js +82 -0
- package/dist/_internal/renderer/index.d.ts +2 -0
- package/dist/_internal/renderer/index.js +1789 -610
- package/dist/_internal/renderer/renderer/renderer-component-states.d.ts +34 -0
- package/dist/_internal/renderer/renderer/renderer-effective-style.d.ts +12 -6
- package/dist/_internal/renderer/renderer/renderer-material-dom.d.ts +19 -3
- package/dist/_internal/renderer/renderer/renderer-mounted-material.d.ts +11 -10
- package/dist/_internal/renderer/renderer/renderer-state.d.ts +17 -1
- package/dist/_internal/renderer/renderer/renderer-theme.d.ts +11 -0
- package/dist/_internal/renderer/renderer/renderer-types.d.ts +15 -5
- package/dist/_internal/renderer/renderer/renderer.d.ts +30 -9
- package/dist/_internal/renderer/resource/data-source-runtime.d.ts +25 -2
- package/dist/_internal/renderer/resource/push-window.d.ts +43 -0
- package/dist/_internal/renderer/resource/source-query-port.d.ts +8 -1
- package/dist/_internal/renderer/sub-canvas-layer.d.ts +83 -0
- package/dist/_internal/renderer/viewer/viewer-blueprint-timer-scheduler.d.ts +23 -0
- package/dist/_internal/renderer/viewer/viewer-configuration-guards.d.ts +0 -1
- package/dist/_internal/renderer/viewer/viewer-configuration.d.ts +6 -3
- package/dist/_internal/renderer/viewer/viewer-skeleton.d.ts +10 -0
- package/dist/_internal/renderer/viewer/viewer-stale-style.d.ts +3 -0
- package/dist/_internal/renderer/viewer/viewer-variable-controller.d.ts +4 -0
- package/dist/_internal/renderer/viewer/viewer.d.ts +26 -7
- package/dist/_internal/sdk/auto-register.js +7 -7
- package/dist/_internal/sdk/designer-auto-register.js +3 -3
- package/dist/_internal/sdk/designer.d.ts +7 -1
- package/dist/_internal/sdk/designer.js +15 -5
- package/dist/_internal/sdk/host-tokens.css +12 -12
- package/dist/_internal/sdk/index.d.ts +1 -1
- package/dist/_internal/sdk/index.js +6 -6
- package/dist/authoring-EcyK2YVN.js +103 -0
- package/dist/authoring-EcyK2YVN.js.map +1 -0
- package/dist/auto-register.js +12 -10
- package/dist/auto-register.js.map +1 -1
- package/dist/contracts.js +73 -42
- package/dist/contracts.js.map +1 -1
- package/dist/core.js +151 -21
- package/dist/core.js.map +1 -1
- package/dist/{data-contracts-BFld0hw_.js → data-contracts-CnnB5KC9.js} +2 -2
- package/dist/{data-contracts-BFld0hw_.js.map → data-contracts-CnnB5KC9.js.map} +1 -1
- package/dist/dataset-port-D993nOlT.js +182 -0
- package/dist/dataset-port-D993nOlT.js.map +1 -0
- package/dist/designer-3Tb0EIDV.js +21 -0
- package/dist/designer-3Tb0EIDV.js.map +1 -0
- package/dist/designer-auto-register.js +6 -4
- package/dist/designer-auto-register.js.map +1 -1
- package/dist/designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js +2852 -0
- package/dist/designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js.map +1 -0
- package/dist/designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js +4609 -0
- package/dist/designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js.map +1 -0
- package/dist/designer-field-primitives-KBZuWN_D-B3h4jpYe.js +2674 -0
- package/dist/designer-field-primitives-KBZuWN_D-B3h4jpYe.js.map +1 -0
- package/dist/designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js +1265 -0
- package/dist/designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js.map +1 -0
- package/dist/designer.js +5 -3
- package/dist/dist-6GRboBs-.js +3305 -0
- package/dist/dist-6GRboBs-.js.map +1 -0
- package/dist/dist-BjLjFUy1.js +23245 -0
- package/dist/dist-BjLjFUy1.js.map +1 -0
- package/dist/engine.js +5 -2
- package/dist/fragment-Y6YnW6wy.js +393 -0
- package/dist/fragment-Y6YnW6wy.js.map +1 -0
- package/dist/hierarchy-BQZrZWbC.js +86 -0
- package/dist/hierarchy-BQZrZWbC.js.map +1 -0
- package/dist/host-kit.js +297 -3
- package/dist/host-kit.js.map +1 -1
- package/dist/host-resource-selection-xo2mLCD4-BR5XCcim.js +2437 -0
- package/dist/host-resource-selection-xo2mLCD4-BR5XCcim.js.map +1 -0
- package/dist/host-tokens.css +12 -12
- package/dist/index.js +11 -9
- package/dist/level-scale-BzUjE31V.js +139 -0
- package/dist/level-scale-BzUjE31V.js.map +1 -0
- package/dist/{manager-Bhqi_KmD.js → manager-Ch0RTu_i.js} +20 -10
- package/dist/manager-Ch0RTu_i.js.map +1 -0
- package/dist/material-UbSfiuZq.js +12 -0
- package/dist/material-UbSfiuZq.js.map +1 -0
- package/dist/material-auto-register.d.ts +1 -0
- package/dist/material-auto-register.js +16 -0
- package/dist/material-auto-register.js.map +1 -0
- package/dist/{material-definition-BJ4ujhuj.js → material-definition-BeW34dJr.js} +2 -2
- package/dist/{material-definition-BJ4ujhuj.js.map → material-definition-BeW34dJr.js.map} +1 -1
- package/dist/{material-manifest-LdgIkzgH.js → material-manifest-B1XatGPx.js} +232 -333
- package/dist/material-manifest-B1XatGPx.js.map +1 -0
- package/dist/material-schema-CLoDx-Tl.js +203 -0
- package/dist/material-schema-CLoDx-Tl.js.map +1 -0
- package/dist/material-theme-C91eus78.js +252 -0
- package/dist/material-theme-C91eus78.js.map +1 -0
- package/dist/material-validation-utils-ku_6Xxk2.js +125 -0
- package/dist/material-validation-utils-ku_6Xxk2.js.map +1 -0
- package/dist/material.js +3 -2
- package/dist/migrate-document-D3HhCVlZ.js +768 -0
- package/dist/migrate-document-D3HhCVlZ.js.map +1 -0
- package/dist/parse-AOTE9WnD.js +2308 -0
- package/dist/parse-AOTE9WnD.js.map +1 -0
- package/dist/parse-B1OD1teS.js +272 -0
- package/dist/parse-B1OD1teS.js.map +1 -0
- package/dist/parse-parts-BNrpdG5o.js +42 -0
- package/dist/parse-parts-BNrpdG5o.js.map +1 -0
- package/dist/{plugin-B9Xxtw7G.js → plugin-DHgh9uHh.js} +140 -94
- package/dist/plugin-DHgh9uHh.js.map +1 -0
- package/dist/plugin-core.js +93 -7
- package/dist/plugin-core.js.map +1 -0
- package/dist/plugin-manager.js +1 -1
- package/dist/plugin-package-Dr5ro6h6.js +1221 -0
- package/dist/plugin-package-Dr5ro6h6.js.map +1 -0
- package/dist/{plugin-registration-CYtTqIxF.js → plugin-registration-rsmb4GvS.js} +4 -4
- package/dist/{plugin-registration-CYtTqIxF.js.map → plugin-registration-rsmb4GvS.js.map} +1 -1
- package/dist/plugin-sdk.js +6 -6
- package/dist/{plugins-DRaykV9c.js → plugins-DGRHgREK.js} +2 -2
- package/dist/{plugins-DRaykV9c.js.map → plugins-DGRHgREK.js.map} +1 -1
- package/dist/plugins.js +8 -8
- package/dist/renderer.js +1 -1
- package/dist/runtime-dispatch-BfnRDtMe.js +479 -0
- package/dist/runtime-dispatch-BfnRDtMe.js.map +1 -0
- package/dist/{src-Bm7u11mN-BPS5TRsq.js → src-Bm7u11mN-_0u6cMEw.js} +65 -64
- package/dist/{src-Bm7u11mN-BPS5TRsq.js.map → src-Bm7u11mN-_0u6cMEw.js.map} +1 -1
- package/dist/{material-2XmHe-aH.js → text-BNksUr5J.js} +405 -372
- package/dist/text-BNksUr5J.js.map +1 -0
- package/dist/theme-CcBXf4Ay.js +48 -0
- package/dist/theme-CcBXf4Ay.js.map +1 -0
- package/dist/value-ref-BG_MV9C-.js +278 -0
- package/dist/value-ref-BG_MV9C-.js.map +1 -0
- package/dist/{viewer-CrJupI8I-D2BtwLsA.js → viewer-CrJupI8I-D9dVcNw4.js} +5 -5
- package/dist/{viewer-CrJupI8I-D2BtwLsA.js.map → viewer-CrJupI8I-D9dVcNw4.js.map} +1 -1
- package/dist/viewer-auto-register.js +2 -2
- package/dist/viewer.js +2 -2
- package/dist/{contrast-B4TH-dvm.js → viewport-CiCKeAQH.js} +367 -409
- package/dist/viewport-CiCKeAQH.js.map +1 -0
- package/package.json +16 -21
- package/dist/_internal/contracts/document/blueprint-relations.d.ts +0 -16
- package/dist/_internal/contracts/document/blueprint-relations.js +0 -196
- package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-panel-mutations.d.ts +0 -5
- package/dist/_internal/engine/browser/controllers/designer-guard-controller.d.ts +0 -27
- package/dist/_internal/engine/browser/controllers/designer-scene-controller.d.ts +0 -47
- package/dist/_internal/engine/browser/controllers/panel/designer-style-rules-controller.d.ts +0 -12
- package/dist/_internal/engine/browser/dom/guard/designer-contrast-measure.d.ts +0 -24
- package/dist/_internal/engine/browser/dom/guard/designer-guard-dom.d.ts +0 -15
- package/dist/_internal/engine/browser/dom/workspace/designer-canvas-hint-dom.d.ts +0 -6
- package/dist/_internal/engine/browser/viewport/designer-canvas-snap-index.d.ts +0 -9
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-connection.d.ts +0 -14
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-mutation-helpers.d.ts +0 -20
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-mutations.d.ts +0 -15
- package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-node-ids.d.ts +0 -12
- package/dist/_internal/engine/common/operations/designer-name-validation.d.ts +0 -2
- package/dist/_internal/engine/common/operations/scene/designer-scene.d.ts +0 -55
- package/dist/_internal/engine/common/operations/style/designer-host-conditional-style.d.ts +0 -21
- package/dist/_internal/engine/common/operations/style/designer-style-rules.d.ts +0 -25
- package/dist/_internal/engine/common/validation/designer-guard.d.ts +0 -49
- package/dist/_internal/engine/designer-element/api/designer-element-guard.d.ts +0 -13
- package/dist/_internal/engine/designer-element/api/designer-element-scene.d.ts +0 -14
- package/dist/_internal/react/components.d.ts +0 -32
- package/dist/_internal/react/index.d.ts +0 -14
- package/dist/_internal/react/index.js +0 -215
- package/dist/_internal/renderer/style-rules.d.ts +0 -9
- package/dist/_internal/vue/components.d.ts +0 -36
- package/dist/_internal/vue/global-styles.d.ts +0 -10
- package/dist/_internal/vue/index.d.ts +0 -14
- package/dist/_internal/vue/index.js +0 -290
- package/dist/contrast-B4TH-dvm.js.map +0 -1
- package/dist/dataset-port-CUsMmX2x.js +0 -65
- package/dist/dataset-port-CUsMmX2x.js.map +0 -1
- package/dist/designer-xtN0h7PL.js +0 -11
- package/dist/designer-xtN0h7PL.js.map +0 -1
- package/dist/dist-CAdGDmU3.js +0 -2135
- package/dist/dist-CAdGDmU3.js.map +0 -1
- package/dist/dist-CR13A2Yb.js +0 -32734
- package/dist/dist-CR13A2Yb.js.map +0 -1
- package/dist/manager-Bhqi_KmD.js.map +0 -1
- package/dist/material-2XmHe-aH.js.map +0 -1
- package/dist/material-manifest-LdgIkzgH.js.map +0 -1
- package/dist/material-schema-CtxTkCP2.js +0 -267
- package/dist/material-schema-CtxTkCP2.js.map +0 -1
- package/dist/migrate-document-BJUN7NPv.js +0 -436
- package/dist/migrate-document-BJUN7NPv.js.map +0 -1
- package/dist/parse-BQw3u9_4.js +0 -1126
- package/dist/parse-BQw3u9_4.js.map +0 -1
- package/dist/parse-CYwxTDJU.js +0 -364
- package/dist/parse-CYwxTDJU.js.map +0 -1
- package/dist/plugin-B9Xxtw7G.js.map +0 -1
- package/dist/plugin-package-BfZLl3ru.js +0 -174
- package/dist/plugin-package-BfZLl3ru.js.map +0 -1
- package/dist/react.d.ts +0 -1
- package/dist/react.js +0 -213
- package/dist/react.js.map +0 -1
- package/dist/schema-C38FI_z2.js +0 -541
- package/dist/schema-C38FI_z2.js.map +0 -1
- package/dist/value-ref-Z0o70Vy6.js +0 -716
- package/dist/value-ref-Z0o70Vy6.js.map +0 -1
- package/dist/vue.d.ts +0 -1
- package/dist/vue.js +0 -288
- package/dist/vue.js.map +0 -1
|
@@ -10,6 +10,19 @@ export declare const SHORTCUT_HELP_SECTIONS: readonly [{
|
|
|
10
10
|
readonly title: "画布与视图";
|
|
11
11
|
readonly operationIds: readonly ['zoom-in', 'zoom-out', 'zoom-fit', 'toggle-guides', 'toggle-border-guides', 'toggle-workbench', 'show-help'];
|
|
12
12
|
}];
|
|
13
|
+
export declare const MARQUEE_HELP_ENTRIES: readonly [{
|
|
14
|
+
readonly id: 'intersect';
|
|
15
|
+
readonly label: "选中相交组件";
|
|
16
|
+
readonly keys: "拖拽空白";
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: 'contain';
|
|
19
|
+
readonly label: "只选完整包含";
|
|
20
|
+
readonly keys: "Alt+拖拽";
|
|
21
|
+
}, {
|
|
22
|
+
readonly id: 'union';
|
|
23
|
+
readonly label: "并入已选";
|
|
24
|
+
readonly keys: "Ctrl+拖拽";
|
|
25
|
+
}];
|
|
13
26
|
export declare function coordinateEntryField(axis: 'x' | 'y'): string;
|
|
14
27
|
export declare function sizeEntryField(axis: 'width' | 'height'): string;
|
|
15
28
|
export declare function actionButton(action: keyof typeof DESIGNER_OPERATION_TEXT, glyph: string): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BaseScreenMaterialCatalogEntry } from '../../../../plugin-core/index.js';
|
|
2
|
+
import type { BaseScreenResolvedFragmentLibraryItem } from '../../../common/operations/material-library/material-library-fragments.js';
|
|
2
3
|
import type { BaseScreenMaterialLibraryGrouping } from '../../../common/operations/material-library/material-library-grouping.js';
|
|
3
4
|
import type { BaseScreenResolvedMaterialLibraryItem } from '../../../common/operations/material-library/material-library-items.js';
|
|
4
5
|
import type { BaseScreenMaterialLibraryState } from '../../../common/operations/material-library/material-library-state.js';
|
|
@@ -6,7 +7,7 @@ import type { BaseScreenDesignerLeftPanelGroup } from '../../../common/operation
|
|
|
6
7
|
import { type DesignerToolMaterialTypes } from '../../../common/tools/designer-tools.js';
|
|
7
8
|
import { designerToolGlyph } from '../../dom/designer-icons.js';
|
|
8
9
|
export { designerToolGlyph };
|
|
9
|
-
export declare function createDesignerWorkspace(ownerDocument: Document, materials: readonly (BaseScreenMaterialCatalogEntry | BaseScreenResolvedMaterialLibraryItem)[], toolMaterialTypes: DesignerToolMaterialTypes | undefined, materialLibraryState?: BaseScreenMaterialLibraryState, materialLibraryGrouping?: BaseScreenMaterialLibraryGrouping, leftPanelGroups?: readonly BaseScreenDesignerLeftPanelGroup[]): HTMLElement;
|
|
10
|
+
export declare function createDesignerWorkspace(ownerDocument: Document, materials: readonly (BaseScreenMaterialCatalogEntry | BaseScreenResolvedMaterialLibraryItem)[], toolMaterialTypes: DesignerToolMaterialTypes | undefined, materialLibraryState?: BaseScreenMaterialLibraryState, materialLibraryGrouping?: BaseScreenMaterialLibraryGrouping, leftPanelGroups?: readonly BaseScreenDesignerLeftPanelGroup[], deferMaterialLibrary?: boolean, fragments?: readonly BaseScreenResolvedFragmentLibraryItem[]): HTMLElement;
|
|
10
11
|
export { materialCategoryHue, materialCategoryIcon, materialLibraryActions, materialLibraryCategories, orderedMaterialLibraryMaterials, populateMaterialLibrary, renderMaterialLibraryState, visibleLibraryMaterials, } from '../material-library/designer-material-library-dom.js';
|
|
11
12
|
export type { DesignerContextMenuAction, DesignerMenuEntry, } from './designer-workspace-template.js';
|
|
12
13
|
export { contextMenuHtml, contextMenuSummaryHtml, downloadDesignerDocument, } from './designer-workspace-template.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export declare const DESIGNER_SMART_GUIDE_THRESHOLD =
|
|
1
|
+
export declare const DESIGNER_SMART_GUIDE_THRESHOLD = 6;
|
|
2
2
|
export declare const DESIGNER_SNAP_RELEASE_MULTIPLIER = 1;
|
|
3
|
+
export declare const DESIGNER_SNAP_REACH = 180;
|
|
3
4
|
export declare const DESIGNER_SNAP_RENDER_THRESHOLD = 1;
|
|
5
|
+
export declare const DESIGNER_SNAP_ALIGNMENT_TOLERANCE = 0.5;
|
|
4
6
|
export interface DesignerCanvasAidsState {
|
|
5
7
|
readonly gridEnabled: boolean;
|
|
6
8
|
readonly smartGuidesEnabled: boolean;
|
|
@@ -23,6 +25,8 @@ export interface DesignerCanvasMeasurement {
|
|
|
23
25
|
readonly from: number;
|
|
24
26
|
readonly position: number;
|
|
25
27
|
readonly to: number;
|
|
28
|
+
/** `equal`:与同排其它间距精确相等的等间距标注;缺省为对齐轨道上的普通间距。 */
|
|
29
|
+
readonly kind?: 'equal' | undefined;
|
|
26
30
|
}
|
|
27
31
|
export type DesignerSnapPreview = DesignerSnapPoint & Pick<DesignerSnapTranslation, 'guides' | 'measurements'>;
|
|
28
32
|
/** 单条智能对齐线(画布坐标):供预览层绘制参考线与吸附目标指示。 */
|
|
@@ -33,6 +37,8 @@ export interface DesignerSnapGuideLine {
|
|
|
33
37
|
readonly start?: number | undefined;
|
|
34
38
|
/** 参考线长度(可选):undefined 表示全画布线。 */
|
|
35
39
|
readonly size?: number | undefined;
|
|
40
|
+
/** 线上各吸附点的正交坐标(目标与被拖几何),供绘制 × 标记。 */
|
|
41
|
+
readonly points?: readonly number[] | undefined;
|
|
36
42
|
}
|
|
37
43
|
export interface DesignerSnapGuides {
|
|
38
44
|
readonly x?: readonly DesignerSnapGuideLine[] | undefined;
|
|
@@ -43,7 +49,7 @@ export interface DesignerSnapTranslation {
|
|
|
43
49
|
readonly y: number;
|
|
44
50
|
readonly snappedX?: number | undefined;
|
|
45
51
|
readonly snappedY?: number | undefined;
|
|
46
|
-
/**
|
|
52
|
+
/** 吸附后与最终几何精确重合的对齐线(每个坐标一条)。 */
|
|
47
53
|
readonly guides?: DesignerSnapGuides | undefined;
|
|
48
54
|
/** 选区对齐轨道上的相邻组件间距,仅作为覆盖层视觉反馈。 */
|
|
49
55
|
readonly measurements?: readonly DesignerCanvasMeasurement[] | undefined;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import { type DesignerCanvasAidsState, type DesignerSelectionSnapBounds, type DesignerSnapPoint, type DesignerSnapSession, type DesignerSnapTranslation } from './designer-canvas-aids-types.js';
|
|
1
|
+
import { type DesignerCanvasAidsState, type DesignerSelectionSnapBounds, type DesignerSnapGuides, type DesignerSnapPoint, type DesignerSnapSession, type DesignerSnapTranslation } from './designer-canvas-aids-types.js';
|
|
2
|
+
import { DesignerAlignmentIndex } from './designer-canvas-snap-alignment-index.js';
|
|
2
3
|
import type { DesignerSnapCandidates } from './designer-canvas-snap-candidates.js';
|
|
3
|
-
import {
|
|
4
|
+
import type { DesignerSpacingIndex } from './designer-canvas-snap-spacing.js';
|
|
4
5
|
export * from './designer-canvas-aids-types.js';
|
|
5
6
|
export { type DesignerRulerMark, type DesignerRulerOptions, getDesignerRulerMarks, } from './designer-canvas-ruler.js';
|
|
7
|
+
export { DesignerAlignmentIndex } from './designer-canvas-snap-alignment-index.js';
|
|
6
8
|
export { collectDesignerSnapCandidates, type DesignerSnapCandidate, type DesignerSnapCandidates, } from './designer-canvas-snap-candidates.js';
|
|
7
|
-
|
|
9
|
+
export { DesignerSpacingIndex } from './designer-canvas-snap-spacing.js';
|
|
10
|
+
type DesignerSnapTargets = DesignerSnapCandidates | DesignerAlignmentIndex;
|
|
8
11
|
type DesignerSnapCoordinates = {
|
|
9
12
|
readonly x: number;
|
|
10
13
|
readonly y: number;
|
|
11
14
|
};
|
|
12
15
|
export declare function snapDesignerCanvasPoint(point: DesignerSnapCoordinates, state: DesignerCanvasAidsState, candidates?: DesignerSnapTargets, zoom?: number, session?: DesignerSnapSession): DesignerSnapPoint;
|
|
13
|
-
export declare function snapDesignerSelectionTranslation(bounds: DesignerSelectionSnapBounds, translation: DesignerSnapCoordinates, state: DesignerCanvasAidsState, candidates?: DesignerSnapTargets, zoom?: number, session?: DesignerSnapSession): DesignerSnapTranslation;
|
|
16
|
+
export declare function snapDesignerSelectionTranslation(bounds: DesignerSelectionSnapBounds, translation: DesignerSnapCoordinates, state: DesignerCanvasAidsState, candidates?: DesignerSnapTargets, zoom?: number, session?: DesignerSnapSession, spacing?: DesignerSpacingIndex): DesignerSnapTranslation;
|
|
17
|
+
/** Phase two alone, for geometry another step produced (resize, drawing a new component). */
|
|
18
|
+
export declare function collectDesignerAlignmentGuides(bounds: DesignerSelectionSnapBounds, state: DesignerCanvasAidsState, candidates?: DesignerSnapTargets, zoom?: number): DesignerSnapGuides | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Reach for guides and marks on the final geometry: snapping may move it by up to the threshold,
|
|
21
|
+
* so allow that much more, or a target that won the snap could lose its guide.
|
|
22
|
+
*/
|
|
23
|
+
export declare function designerSnapGuideReach(zoom: number): number;
|
|
14
24
|
//# sourceMappingURL=designer-canvas-aids.d.ts.map
|
|
@@ -17,4 +17,11 @@ export declare function clientPointToDesignerCanvasPoint(point: DesignerClientPo
|
|
|
17
17
|
readonly x: number;
|
|
18
18
|
readonly y: number;
|
|
19
19
|
};
|
|
20
|
+
/** Canvas region currently visible inside the viewport, in document coordinates. */
|
|
21
|
+
export declare function getDesignerVisibleCanvasRegion(viewport: HTMLElement, canvas: HTMLElement, zoom: number): {
|
|
22
|
+
readonly bottom: number;
|
|
23
|
+
readonly left: number;
|
|
24
|
+
readonly right: number;
|
|
25
|
+
readonly top: number;
|
|
26
|
+
} | undefined;
|
|
20
27
|
//# sourceMappingURL=designer-canvas-coordinates.d.ts.map
|
|
@@ -9,6 +9,17 @@ import { type DesignerCanvasMeasurement, type DesignerSelectionSnapBounds } from
|
|
|
9
9
|
* 变成测量或吸附目标。
|
|
10
10
|
*/
|
|
11
11
|
export declare function collectDesignerCanvasMeasurements(document: ScreenDocument, selection: DesignerSelectionSnapBounds, selectedComponentIds: readonly string[], zoom?: number): readonly DesignerCanvasMeasurement[];
|
|
12
|
-
/**
|
|
12
|
+
/** One-off path: indexes the given geometry for a single measurement. */
|
|
13
13
|
export declare function measureDesignerCanvasBounds(components: readonly DesignerSelectionSnapBounds[], selection: DesignerSelectionSnapBounds, zoom?: number): readonly DesignerCanvasMeasurement[];
|
|
14
|
+
/**
|
|
15
|
+
* Gesture path: built once per geometry snapshot. Each rail only visits components whose
|
|
16
|
+
* start / center / end lies inside the tolerance window (binary search over sorted anchors),
|
|
17
|
+
* so a frame costs O(log N + matches) instead of scanning every component per rail.
|
|
18
|
+
*/
|
|
19
|
+
export declare class DesignerCanvasMeasurementIndex {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(components: readonly DesignerSelectionSnapBounds[]);
|
|
22
|
+
/** `reach` (document units) drops rail components farther than it from the selection. */
|
|
23
|
+
measure(selection: DesignerSelectionSnapBounds, zoom?: number, reach?: number): readonly DesignerCanvasMeasurement[];
|
|
24
|
+
}
|
|
14
25
|
//# sourceMappingURL=designer-canvas-measurements.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ScreenDocument } from '../../../contracts/index.js';
|
|
2
|
+
import type { SnapGuideline } from '../../common/vendor/moveable/types.js';
|
|
3
|
+
import type { DesignerSelectionSnapBounds, DesignerSnapGuides } from './designer-canvas-aids-types.js';
|
|
4
|
+
import type { DesignerSnapCandidates } from './designer-canvas-snap-candidates.js';
|
|
5
|
+
import type { DesignerSnapComponentBounds } from './designer-canvas-snap-geometry.js';
|
|
6
|
+
export declare class DesignerAlignmentIndex {
|
|
7
|
+
#private;
|
|
8
|
+
private constructor();
|
|
9
|
+
/** 画布边、用户 guide 与组件视觉包围盒(已排除选区与隐藏组件)。 */
|
|
10
|
+
static fromScene(canvas: ScreenDocument['canvas'] | undefined, guides: {
|
|
11
|
+
readonly x: readonly number[];
|
|
12
|
+
readonly y: readonly number[];
|
|
13
|
+
}, components: readonly DesignerSnapComponentBounds[]): DesignerAlignmentIndex;
|
|
14
|
+
/** 直接给出的候选线(测试与无快照调用):两端视为吸附点。 */
|
|
15
|
+
static fromCandidates(candidates: DesignerSnapCandidates): DesignerAlignmentIndex;
|
|
16
|
+
/**
|
|
17
|
+
* 各锚点 ± threshold 窗口内的去重坐标,按坐标升序——Moveable 竞争的输入与平局序。
|
|
18
|
+
* 给出 focus 时,组件线须在 focus 的 reach 范围内(正交方向间距)。
|
|
19
|
+
*/
|
|
20
|
+
query(posesX: readonly number[], posesY: readonly number[], threshold: number, focus?: DesignerSelectionSnapBounds, reach?: number): readonly SnapGuideline[];
|
|
21
|
+
/**
|
|
22
|
+
* 与 bounds(点即退化矩形)在 tolerance 内精确重合的全部对齐,每个坐标一条参考线;
|
|
23
|
+
* 只收集与 bounds 在正交方向间距 ≤ reach 的组件。
|
|
24
|
+
*/
|
|
25
|
+
guides(bounds: DesignerSelectionSnapBounds, tolerance: number, reach?: number): DesignerSnapGuides | undefined;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=designer-canvas-snap-alignment-index.d.ts.map
|
|
@@ -4,6 +4,17 @@ export interface DesignerSnapComponentBounds extends DesignerSelectionSnapBounds
|
|
|
4
4
|
readonly centerX: number;
|
|
5
5
|
readonly centerY: number;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Snap scope (tldraw `getCurrentCommonAncestor`, Penpot same-board rule): the common parent of
|
|
9
|
+
* the dragged selection's roots. Selections spanning several parents, and gestures with no
|
|
10
|
+
* selection (drawing, dropping), use the canvas root (`null`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveDesignerSnapScope(document: ScreenDocument, excluded: ReadonlySet<string>): string | null;
|
|
13
|
+
/**
|
|
14
|
+
* One geometry projection shared by snap targets and alignment-rail measurements.
|
|
15
|
+
*
|
|
16
|
+
* With a `scope`, only that parent's direct children and the parent container itself are
|
|
17
|
+
* targets: a container at that level snaps as a whole and its descendants do not.
|
|
18
|
+
*/
|
|
19
|
+
export declare function collectDesignerSnapComponentBounds(document: ScreenDocument, excluded: ReadonlySet<string>, scope?: string | null): readonly DesignerSnapComponentBounds[];
|
|
9
20
|
//# sourceMappingURL=designer-canvas-snap-geometry.d.ts.map
|
|
@@ -6,7 +6,7 @@ export interface DesignerGuideSnapPreview {
|
|
|
6
6
|
readonly activeY: number | undefined;
|
|
7
7
|
readonly measurements: readonly DesignerCanvasMeasurement[] | undefined;
|
|
8
8
|
}
|
|
9
|
-
/** Coordinates alone never imply a visible guide: the solver
|
|
9
|
+
/** Coordinates alone never imply a visible guide: the solver decides which axes are marked. */
|
|
10
10
|
export declare function projectDesignerSnapPreview(point: DesignerSnapPreview | undefined): DesignerGuideSnapPreview | undefined;
|
|
11
11
|
export declare function equalDesignerSnapPreviews(previous: DesignerGuideSnapPreview | undefined, next: DesignerGuideSnapPreview | undefined): boolean;
|
|
12
12
|
//# sourceMappingURL=designer-canvas-snap-preview.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DesignerCanvasMeasurement, DesignerSelectionSnapBounds } from './designer-canvas-aids-types.js';
|
|
2
|
+
type SpacingAxis = 'x' | 'y';
|
|
3
|
+
export declare class DesignerSpacingIndex {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(components: readonly DesignerSelectionSnapBounds[]);
|
|
6
|
+
/** 该轴上阈值内最近的等间距修正量(正值向右 / 向下),没有则 undefined。 */
|
|
7
|
+
snap(axis: SpacingAxis, bounds: DesignerSelectionSnapBounds, threshold: number, reach?: number): number | undefined;
|
|
8
|
+
/** 最终几何上精确相等的间距(两轴),作为“等间距”标注;没有则为空。 */
|
|
9
|
+
measurements(bounds: DesignerSelectionSnapBounds, tolerance: number, reach?: number): readonly DesignerCanvasMeasurement[];
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=designer-canvas-snap-spacing.d.ts.map
|
|
@@ -16,6 +16,8 @@ export type DesignerGuideOverlayItem = {
|
|
|
16
16
|
export interface DesignerGuideOverlayNode {
|
|
17
17
|
readonly element: HTMLElement;
|
|
18
18
|
readonly label: HTMLElement | undefined;
|
|
19
|
+
/** × markers on the snap points of a smart guide, reused across frames. */
|
|
20
|
+
readonly markers: HTMLElement[];
|
|
19
21
|
}
|
|
20
22
|
export declare function createDesignerGuideOverlayNode(document: Document, item: DesignerGuideOverlayItem): DesignerGuideOverlayNode;
|
|
21
23
|
/** Read inline state only; unchanged geometry, classes and labels perform no DOM writes. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 宿主按名字聚合即可,不需要解析 DOM 或猜测用户行为。
|
|
6
6
|
*/
|
|
7
7
|
export declare const BASE_SCREEN_METRIC_EVENT = "base-screen-metric";
|
|
8
|
-
export type DesignerMetricName = 'intent_submit' | 'clarify_open' | 'parameter_route' | 'direct_edit' | 'draft_created' | 'draft_discarded' | 'change_adopt' | 'change_reject' | '
|
|
8
|
+
export type DesignerMetricName = 'intent_submit' | 'clarify_open' | 'parameter_route' | 'direct_edit' | 'draft_created' | 'draft_discarded' | 'change_adopt' | 'change_reject' | 'revert' | 'patch_record';
|
|
9
9
|
export interface DesignerMetricPayload {
|
|
10
10
|
readonly source?: 'manual' | 'host' | 'agent';
|
|
11
11
|
readonly componentId?: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const DESIGNER_BLUEPRINT_NODE_WIDTH = 164;
|
|
2
|
+
export declare const DESIGNER_BLUEPRINT_NODE_HEADER_HEIGHT = 44;
|
|
3
|
+
export declare const DESIGNER_BLUEPRINT_NODE_BODY_TOP = 12;
|
|
4
|
+
export declare const DESIGNER_BLUEPRINT_NODE_BODY_BOTTOM = 13;
|
|
5
|
+
export declare const DESIGNER_BLUEPRINT_NODE_ROW_HEIGHT = 27;
|
|
6
|
+
export declare const DESIGNER_BLUEPRINT_NODE_MIN_HEIGHT = 108;
|
|
7
|
+
export declare const DESIGNER_BLUEPRINT_NODE_GAP = 28;
|
|
8
|
+
export declare const DESIGNER_BLUEPRINT_NODE_SNAP_DISTANCE = 28;
|
|
9
|
+
/** 卡片上下 1px 描边之和:画布实测高度与模型估算高度都必须计入,否则自动堆叠间距会差 2px。 */
|
|
10
|
+
export declare const DESIGNER_BLUEPRINT_NODE_BORDER = 2;
|
|
11
|
+
export declare const DESIGNER_BLUEPRINT_NODE_PADDING: number;
|
|
12
|
+
//# sourceMappingURL=designer-blueprint-geometry.d.ts.map
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { type ScreenBlueprint, type ScreenBlueprintCondition, type ScreenBlueprintEdge, type ScreenBlueprintLayoutNode, type ScreenBlueprintLayoutViewport, type ScreenBlueprintNode, type ScreenBlueprintNodeKind, type ScreenBlueprintSemanticRole, type ScreenBlueprintValueExpression, type ScreenBlueprintVisibilityTransition, type ScreenDocument } from '../../../../contracts/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* 蓝图节点图的作者期操作(ADR-0107 §2.1、§2.6)。
|
|
4
|
+
*
|
|
5
|
+
* 全部是纯函数:输入当前蓝图(必要时连同文档),输出新蓝图或 `null`(拒绝)。结构合法性的最终裁决仍是
|
|
6
|
+
* contracts 的文档解析;这里提前拒绝作者面能识别的非法操作(锚点不属于节点、重复连线、条件成环),
|
|
7
|
+
* 并为新连线补齐目标锚点要求的附加字段默认值。
|
|
8
|
+
*/
|
|
9
|
+
export interface DesignerBlueprintNodePosition {
|
|
10
|
+
readonly x: number;
|
|
11
|
+
readonly y: number;
|
|
12
|
+
}
|
|
13
|
+
/** 单例节点 id:宿主(业务系统)与实例就绪。 */
|
|
14
|
+
export declare const HOST_BLUEPRINT_NODE_ID = "host";
|
|
15
|
+
export declare const LIFECYCLE_BLUEPRINT_NODE_ID = "lifecycle";
|
|
16
|
+
/** 语义连线在画布上的锚点:组件节点右侧的独立圆点,不进入文档。 */
|
|
17
|
+
export declare const SEMANTIC_BLUEPRINT_PORT = "semantic";
|
|
18
|
+
export declare const DEFAULT_BLUEPRINT_TIMER_SECONDS = 5;
|
|
19
|
+
export declare const DEFAULT_BLUEPRINT_TRANSITION: ScreenBlueprintVisibilityTransition;
|
|
20
|
+
export declare const DEFAULT_BLUEPRINT_CONDITION: ScreenBlueprintCondition;
|
|
21
|
+
export declare function componentBlueprintNodeId(componentId: string): string;
|
|
22
|
+
export declare function variableBlueprintNodeId(variableId: string): string;
|
|
23
|
+
export declare function findBlueprintNode(blueprint: ScreenBlueprint, nodeId: string): ScreenBlueprintNode | undefined;
|
|
24
|
+
export declare function findBlueprintEdge(blueprint: ScreenBlueprint, edgeId: string): ScreenBlueprintEdge | undefined;
|
|
25
|
+
export declare function findComponentBlueprintNode(blueprint: ScreenBlueprint, componentId: string): ScreenBlueprintNode | undefined;
|
|
26
|
+
export declare function subCanvasBlueprintNodeId(canvasId: string): string;
|
|
27
|
+
export declare const MAIN_CANVAS_BLUEPRINT_NODE_ID = "main-canvas";
|
|
28
|
+
export declare function findSubCanvasBlueprintNode(blueprint: ScreenBlueprint, canvasId: string): ScreenBlueprintNode | undefined;
|
|
29
|
+
export declare function findVariableBlueprintNode(blueprint: ScreenBlueprint, variableId: string): ScreenBlueprintNode | undefined;
|
|
30
|
+
/** 在已用 id 之外分配 `<prefix>-<n>`;节点与连线共用一个 id 空间,便于选择与诊断定位。 */
|
|
31
|
+
export declare function allocateBlueprintId(blueprint: ScreenBlueprint, prefix: string): string;
|
|
32
|
+
export type DesignerBlueprintNodeSpec = {
|
|
33
|
+
readonly kind: 'component';
|
|
34
|
+
readonly componentId: string;
|
|
35
|
+
} | {
|
|
36
|
+
readonly kind: 'variable';
|
|
37
|
+
readonly variableId: string;
|
|
38
|
+
} | {
|
|
39
|
+
readonly kind: 'sub-canvas';
|
|
40
|
+
readonly canvasId: string;
|
|
41
|
+
} | {
|
|
42
|
+
readonly kind: 'host';
|
|
43
|
+
} | {
|
|
44
|
+
readonly kind: 'lifecycle';
|
|
45
|
+
} | {
|
|
46
|
+
readonly kind: 'main-canvas';
|
|
47
|
+
} | {
|
|
48
|
+
readonly kind: 'timer';
|
|
49
|
+
readonly intervalSeconds?: number;
|
|
50
|
+
readonly name?: string;
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: 'condition';
|
|
53
|
+
readonly condition?: ScreenBlueprintCondition;
|
|
54
|
+
readonly name?: string;
|
|
55
|
+
};
|
|
56
|
+
export interface DesignerBlueprintInsertResult {
|
|
57
|
+
readonly blueprint: ScreenBlueprint;
|
|
58
|
+
readonly nodeId: string;
|
|
59
|
+
/** 实体 / 单例节点已存在时为 false:返回已有节点,蓝图只在给了位置时移动它。 */
|
|
60
|
+
readonly created: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* 加入节点。组件 / 变量 / 宿主 / 实例就绪各自唯一:已有节点时不重复创建;定时器与条件每次新建。
|
|
64
|
+
* 引用的组件或变量不存在于文档时拒绝。
|
|
65
|
+
*/
|
|
66
|
+
export declare function insertDesignerBlueprintNode(document: ScreenDocument, spec: DesignerBlueprintNodeSpec, position?: DesignerBlueprintNodePosition): DesignerBlueprintInsertResult | null;
|
|
67
|
+
export type DesignerBlueprintConnectionFailureReason = 'invalid' | 'duplicate' | 'cycle' | 'unavailable';
|
|
68
|
+
export type DesignerBlueprintConnectionResult = {
|
|
69
|
+
readonly ok: true;
|
|
70
|
+
readonly blueprint: ScreenBlueprint;
|
|
71
|
+
readonly edgeId: string;
|
|
72
|
+
} | {
|
|
73
|
+
readonly ok: false;
|
|
74
|
+
readonly reason: DesignerBlueprintConnectionFailureReason;
|
|
75
|
+
};
|
|
76
|
+
export interface DesignerBlueprintConnectionContext {
|
|
77
|
+
/** 组件节点的事件锚点是否可连(manifest 声明且能力可用)。 */
|
|
78
|
+
readonly isEventAvailable: (componentId: string, eventName: string) => boolean;
|
|
79
|
+
/** 宿主动作锚点是否已声明;宿主事件锚点总可连(事件名由作者决定)。 */
|
|
80
|
+
readonly isHostActionAvailable: (actionId: string) => boolean;
|
|
81
|
+
/** 组件声明的状态 id(ADR-0110):没有状态时不能连状态锚点;`set-state` 默认取第一个。 */
|
|
82
|
+
readonly componentStateIds?: (componentId: string) => readonly string[];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 连线:输出锚点 → 输入锚点;两端都是组件节点且锚点为 `semantic` 时连语义线。
|
|
86
|
+
* 新连线按目标锚点补默认附加字段:变量 `set` 写入事件负载、宿主出口传递事件负载、组件显隐带淡入过渡。
|
|
87
|
+
*/
|
|
88
|
+
export declare function connectDesignerBlueprintPorts(blueprint: ScreenBlueprint, from: {
|
|
89
|
+
readonly node: string;
|
|
90
|
+
readonly port: string;
|
|
91
|
+
}, to: {
|
|
92
|
+
readonly node: string;
|
|
93
|
+
readonly port: string;
|
|
94
|
+
}, context: DesignerBlueprintConnectionContext): DesignerBlueprintConnectionResult;
|
|
95
|
+
/** 删除节点:一并删除其全部连线与布局位置。 */
|
|
96
|
+
export declare function removeDesignerBlueprintNodes(blueprint: ScreenBlueprint, nodeIds: ReadonlySet<string>): ScreenBlueprint;
|
|
97
|
+
export declare function removeDesignerBlueprintEdges(blueprint: ScreenBlueprint, edgeIds: ReadonlySet<string>): ScreenBlueprint;
|
|
98
|
+
/** 删除选区:节点(含连线)与连线混合;空选区或全部不存在时返回 `null`。 */
|
|
99
|
+
export declare function deleteDesignerBlueprintSelection(blueprint: ScreenBlueprint, selection: {
|
|
100
|
+
readonly nodes: readonly string[];
|
|
101
|
+
readonly edges: readonly string[];
|
|
102
|
+
}): ScreenBlueprint | null;
|
|
103
|
+
/** 文档删除了组件 / 变量:移除引用它们的实体节点(及连线、布局)。 */
|
|
104
|
+
export declare function pruneDesignerBlueprintEntities(blueprint: ScreenBlueprint, removed: {
|
|
105
|
+
readonly componentIds?: ReadonlySet<string>;
|
|
106
|
+
readonly variableIds?: ReadonlySet<string>;
|
|
107
|
+
readonly subCanvasIds?: ReadonlySet<string>;
|
|
108
|
+
}): ScreenBlueprint;
|
|
109
|
+
export type DesignerBlueprintNodePatch = {
|
|
110
|
+
readonly type: 'name';
|
|
111
|
+
readonly name: string | null;
|
|
112
|
+
} | {
|
|
113
|
+
readonly type: 'interval';
|
|
114
|
+
readonly intervalSeconds: number;
|
|
115
|
+
} | {
|
|
116
|
+
readonly type: 'condition';
|
|
117
|
+
readonly condition: ScreenBlueprintCondition;
|
|
118
|
+
} | {
|
|
119
|
+
readonly type: 'enabled';
|
|
120
|
+
readonly enabled: boolean;
|
|
121
|
+
};
|
|
122
|
+
export declare function updateDesignerBlueprintNode(blueprint: ScreenBlueprint, nodeId: string, patch: DesignerBlueprintNodePatch): ScreenBlueprint | null;
|
|
123
|
+
export declare function setDesignerBlueprintNodesEnabled(blueprint: ScreenBlueprint, nodeIds: ReadonlySet<string>, enabled: boolean): ScreenBlueprint;
|
|
124
|
+
export type DesignerBlueprintEdgePatch = {
|
|
125
|
+
readonly type: 'value';
|
|
126
|
+
readonly value: ScreenBlueprintValueExpression;
|
|
127
|
+
}
|
|
128
|
+
/** `null` 去掉参数:只对参数可选的锚点(弹框打开 / 切换)有效。 */
|
|
129
|
+
| {
|
|
130
|
+
readonly type: 'payload';
|
|
131
|
+
readonly payload: ScreenBlueprintValueExpression | null;
|
|
132
|
+
} | {
|
|
133
|
+
readonly type: 'transition';
|
|
134
|
+
readonly transition: ScreenBlueprintVisibilityTransition | null;
|
|
135
|
+
} | {
|
|
136
|
+
readonly type: 'role';
|
|
137
|
+
readonly role: ScreenBlueprintSemanticRole;
|
|
138
|
+
}
|
|
139
|
+
/** 改目标锚点(如显示 → 隐藏);附加字段按新锚点的要求保留、补齐或去掉。 */
|
|
140
|
+
| {
|
|
141
|
+
readonly type: 'target-port';
|
|
142
|
+
readonly port: string;
|
|
143
|
+
readonly stateId?: string;
|
|
144
|
+
}
|
|
145
|
+
/** 「设置状态」的目标状态(ADR-0110 §2.4)。 */
|
|
146
|
+
| {
|
|
147
|
+
readonly type: 'state';
|
|
148
|
+
readonly stateId: string;
|
|
149
|
+
};
|
|
150
|
+
export declare function updateDesignerBlueprintEdge(blueprint: ScreenBlueprint, edgeId: string, patch: DesignerBlueprintEdgePatch): ScreenBlueprint | null;
|
|
151
|
+
/**
|
|
152
|
+
* 调整同源连线的执行顺序(深度优先按 `edges` 顺序,ADR-0107 §2.3):与同一输出锚点的上一条 / 下一条
|
|
153
|
+
* 连线交换位置。已在端点时返回 `null`。
|
|
154
|
+
*/
|
|
155
|
+
export declare function reorderDesignerBlueprintEdge(blueprint: ScreenBlueprint, edgeId: string, direction: 'earlier' | 'later'): ScreenBlueprint | null;
|
|
156
|
+
/** 同源连线中的执行序号(从 1 起)与同源总数;不是 flow 连线时返回 `undefined`。 */
|
|
157
|
+
export declare function readDesignerBlueprintEdgeOrder(blueprint: ScreenBlueprint, edgeId: string): {
|
|
158
|
+
readonly order: number;
|
|
159
|
+
readonly count: number;
|
|
160
|
+
} | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* 复制节点:只复制可重复的定时器与条件节点,连同复制集合内部的连线;实体与单例节点不可复制。
|
|
163
|
+
* 新节点相对原节点平移 `offset`。没有可复制节点时返回 `null`。
|
|
164
|
+
*/
|
|
165
|
+
export declare function duplicateDesignerBlueprintNodes(blueprint: ScreenBlueprint, nodeIds: readonly string[], offset?: DesignerBlueprintNodePosition): {
|
|
166
|
+
readonly blueprint: ScreenBlueprint;
|
|
167
|
+
readonly nodeIds: readonly string[];
|
|
168
|
+
} | null;
|
|
169
|
+
/** 布局提交:只保留仍存在的节点的位置。 */
|
|
170
|
+
export declare function commitDesignerBlueprintLayout(blueprint: ScreenBlueprint, nodes: readonly ScreenBlueprintLayoutNode[], viewport?: ScreenBlueprintLayoutViewport): ScreenBlueprint;
|
|
171
|
+
export declare function commitDesignerBlueprintViewport(blueprint: ScreenBlueprint, viewport: ScreenBlueprintLayoutViewport): ScreenBlueprint;
|
|
172
|
+
/** 蓝图里引用该变量的位置:变量节点、条件表达式、连线写入值 / 负载。 */
|
|
173
|
+
export declare function designerBlueprintReferencesVariable(blueprint: ScreenBlueprint, variableId: string): boolean;
|
|
174
|
+
export declare function expressionReferencesVariable(expression: ScreenBlueprintValueExpression, variableId: string): boolean;
|
|
175
|
+
/** 连线上游最近的触发节点(跳过条件节点);用于判断写入值能否取事件字段。 */
|
|
176
|
+
export declare function designerBlueprintEdgeTriggers(blueprint: ScreenBlueprint, edgeId: string): readonly {
|
|
177
|
+
readonly node: ScreenBlueprintNode;
|
|
178
|
+
readonly port: string;
|
|
179
|
+
}[];
|
|
180
|
+
export declare function blueprintNodeKindOf(blueprint: ScreenBlueprint): (nodeId: string) => ScreenBlueprintNodeKind | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* 把分片节点图并入文档蓝图(ADR-0100 F5、ADR-0107):组件节点的 `componentId`(分片 key)改写为新组件 id,
|
|
183
|
+
* 节点 / 连线 id 在文档内去重;宿主与实例就绪并入文档已有单例;与已有连线重复的连线跳过。
|
|
184
|
+
*/
|
|
185
|
+
export declare function mergeDesignerBlueprintFragment(blueprint: ScreenBlueprint, fragment: {
|
|
186
|
+
readonly nodes: readonly ScreenBlueprintNode[];
|
|
187
|
+
readonly edges: readonly ScreenBlueprintEdge[];
|
|
188
|
+
}, componentIdsByKey: ReadonlyMap<string, string>): {
|
|
189
|
+
readonly blueprint: ScreenBlueprint;
|
|
190
|
+
readonly edgeIds: readonly string[];
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* 从文档蓝图取出只涉及所选组件的子图(「将选区存为分片」):组件节点的 `componentId` 改写为分片 key;
|
|
194
|
+
* 两端都在子图里的连线保留,连到子图外的连线与引用变量的连线计为舍弃。条件 / 定时器 / 宿主 /
|
|
195
|
+
* 实例就绪节点只在被保留的连线用到时带上。
|
|
196
|
+
*/
|
|
197
|
+
export declare function extractDesignerBlueprintFragment(blueprint: ScreenBlueprint, componentKeys: ReadonlyMap<string, string>): {
|
|
198
|
+
readonly nodes: readonly ScreenBlueprintNode[];
|
|
199
|
+
readonly edges: readonly ScreenBlueprintEdge[];
|
|
200
|
+
readonly dropped: number;
|
|
201
|
+
};
|
|
202
|
+
export declare function isTimerInterval(value: number): boolean;
|
|
203
|
+
//# sourceMappingURL=designer-blueprint-graph.d.ts.map
|
package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-model-types.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export interface DesignerBlueprintEventOption
|
|
1
|
+
/** 组件事件在作者面的可用性投影:manifest 声明 + 能力门禁。 */
|
|
2
|
+
export interface DesignerBlueprintEventOption {
|
|
3
3
|
readonly componentId: string;
|
|
4
4
|
readonly componentName: string;
|
|
5
5
|
readonly materialType: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly available: boolean;
|
|
9
|
+
readonly requiredCapability?: string;
|
|
6
10
|
}
|
|
7
11
|
//# sourceMappingURL=designer-blueprint-model-types.d.ts.map
|
|
@@ -1,12 +1,63 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ScreenBlueprintNode, type ScreenDocument } from '../../../../contracts/index.js';
|
|
2
2
|
import type { BaseScreenMaterialCatalog, BaseScreenRuntimeContributionIndex } from '../../../../plugin-core/index.js';
|
|
3
|
+
import { type DesignerBlueprintConnectionContext } from './designer-blueprint-graph.js';
|
|
3
4
|
import type { DesignerBlueprintEventOption } from './designer-blueprint-model-types.js';
|
|
4
|
-
import type { BaseScreenBlueprintCanvasGraph, BaseScreenBlueprintCanvasNode } from './designer-blueprint-protocol.js';
|
|
5
|
+
import type { BaseScreenBlueprintCanvasGraph, BaseScreenBlueprintCanvasNode, BaseScreenBlueprintCanvasSimulationTrigger } from './designer-blueprint-protocol.js';
|
|
6
|
+
export * from './designer-blueprint-graph.js';
|
|
5
7
|
export type { DesignerBlueprintEventOption } from './designer-blueprint-model-types.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* 投影所需的作者面文案。common/operations 不依赖 ui-text 子层(engine-import 门禁),
|
|
10
|
+
* 由浏览器层传入 `DESIGNER_UI_TEXT.blueprint`;这里只声明结构。
|
|
11
|
+
*/
|
|
12
|
+
export interface DesignerBlueprintProjectionText {
|
|
13
|
+
readonly graph: {
|
|
14
|
+
readonly nodeKinds: Readonly<Record<ScreenBlueprintNode['kind'], string>>;
|
|
15
|
+
readonly nodeKindHints: Readonly<Record<ScreenBlueprintNode['kind'], string>>;
|
|
16
|
+
readonly ports: Readonly<Record<string, string>>;
|
|
17
|
+
/** 从画布锚点文案按显示方式区分(锚点 id 相同):页面「进入 / 返回」,弹框「打开 / 关闭」。 */
|
|
18
|
+
readonly subCanvasPorts: Readonly<Record<'page' | 'popup', Readonly<Record<string, string>>>>;
|
|
19
|
+
readonly mainCanvasPorts: Readonly<Record<string, string>>;
|
|
20
|
+
readonly subCanvasKinds: Readonly<Record<'page' | 'popup', string>>;
|
|
21
|
+
readonly hostEventPort: (name: string) => string;
|
|
22
|
+
readonly hostActionPort: (name: string) => string;
|
|
23
|
+
readonly newHostEventPort: string;
|
|
24
|
+
readonly missingEventPort: (name: string) => string;
|
|
25
|
+
readonly unavailablePort: string;
|
|
26
|
+
readonly missingEntity: string;
|
|
27
|
+
readonly timerTitle: (seconds: number) => string;
|
|
28
|
+
readonly conditionTitle: string;
|
|
29
|
+
};
|
|
30
|
+
readonly variableKind: Readonly<Record<'static' | 'data-source' | 'url-query', string>>;
|
|
31
|
+
readonly semanticRoles: Readonly<Record<'related' | 'detail' | 'group' | 'drill-down', string>>;
|
|
32
|
+
readonly conditionOperator: (operator: string) => string;
|
|
33
|
+
readonly hostActionUndeclared: (actionId: string) => string;
|
|
34
|
+
}
|
|
8
35
|
export declare function buildDesignerBlueprintEventOptions(document: ScreenDocument, catalog: BaseScreenMaterialCatalog | undefined, runtimeContributions: BaseScreenRuntimeContributionIndex | undefined): readonly DesignerBlueprintEventOption[];
|
|
9
|
-
|
|
10
|
-
export declare function
|
|
11
|
-
|
|
36
|
+
/** 连线判定所需的可用性上下文:事件锚点看 manifest 与能力,动作锚点看插件声明。 */
|
|
37
|
+
export declare function buildDesignerBlueprintConnectionContext(document: ScreenDocument, catalog: BaseScreenMaterialCatalog | undefined, runtimeContributions: BaseScreenRuntimeContributionIndex | undefined): DesignerBlueprintConnectionContext;
|
|
38
|
+
/** 左侧节点库的一项:文档里的组件 / 变量,标出是否已在图中。 */
|
|
39
|
+
export interface DesignerBlueprintLibraryEntry {
|
|
40
|
+
readonly kind: 'component' | 'variable';
|
|
41
|
+
readonly entityId: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly subtitle: string;
|
|
44
|
+
readonly depth: number;
|
|
45
|
+
readonly nodeId?: string;
|
|
46
|
+
readonly eventCount: number;
|
|
47
|
+
}
|
|
48
|
+
export declare function buildDesignerBlueprintComponentLibrary(document: ScreenDocument, catalog: BaseScreenMaterialCatalog | undefined, runtimeContributions: BaseScreenRuntimeContributionIndex | undefined): readonly DesignerBlueprintLibraryEntry[];
|
|
49
|
+
export declare function buildDesignerBlueprintVariableLibrary(document: ScreenDocument, text: DesignerBlueprintProjectionText): readonly DesignerBlueprintLibraryEntry[];
|
|
50
|
+
/**
|
|
51
|
+
* 文档节点图 → 画布图。节点、连线一一对应文档,不再派生结构 / 依赖边(ADR-0107 D2)。
|
|
52
|
+
* 没有布局位置的节点按连线分层自动摆放:列 = 距最近触发源的最长路径,行 = 列内顺序。
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildDesignerBlueprintGraph(document: ScreenDocument, catalog: BaseScreenMaterialCatalog | undefined, runtimeContributions: BaseScreenRuntimeContributionIndex | undefined, text: DesignerBlueprintProjectionText): BaseScreenBlueprintCanvasGraph;
|
|
55
|
+
/** 可模拟的触发锚点:启用节点上已有连线的触发输出(事件、就绪、tick、值更新)。 */
|
|
56
|
+
export declare function buildDesignerBlueprintSimulationTriggers(graph: BaseScreenBlueprintCanvasGraph, document: ScreenDocument): readonly BaseScreenBlueprintCanvasSimulationTrigger[];
|
|
57
|
+
/**
|
|
58
|
+
* 卡片几何来自 `designer-blueprint-geometry.ts`(标题 44 + 上下内边距 25 + 描边 2 + 每行锚点 27,
|
|
59
|
+
* 最小 108),与画布 `height()` 同一公式。
|
|
60
|
+
* 自动摆放的节点按实际卡片高度在列内重新堆叠,避免高卡片互相压住;已保存位置的节点不动。
|
|
61
|
+
*/
|
|
62
|
+
export declare function estimateDesignerBlueprintNodeHeight(node: BaseScreenBlueprintCanvasNode): number;
|
|
12
63
|
//# sourceMappingURL=designer-blueprint-model.d.ts.map
|