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
package/dist/_internal/engine/browser/controllers/panel/designer-style-rules-controller.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ScreenDiagnostic, ScreenDocument, ScreenParseResult } from '../../../../contracts/index.js';
|
|
2
|
-
import type { ScreenDocumentTransaction } from '../../../../core/index.js';
|
|
3
|
-
import type { BaseScreenMaterialCatalog } from '../../../../plugin-core/index.js';
|
|
4
|
-
export interface DesignerStyleRulesCallbacks {
|
|
5
|
-
readonly getDocument: () => ScreenDocument | undefined;
|
|
6
|
-
readonly getCatalog: () => BaseScreenMaterialCatalog | undefined;
|
|
7
|
-
readonly executeTransaction: (transaction: ScreenDocumentTransaction) => ScreenParseResult<ScreenDocument>;
|
|
8
|
-
readonly emitDiagnostics: (diagnostics: readonly ScreenDiagnostic[]) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function handleDesignerStyleRuleClick(target: Element, callbacks: DesignerStyleRulesCallbacks): boolean;
|
|
11
|
-
export declare function handleDesignerStyleRuleChange(target: Element, callbacks: DesignerStyleRulesCallbacks): boolean;
|
|
12
|
-
//# sourceMappingURL=designer-style-rules-controller.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ScreenComponentNode } from '../../../../contracts/index.js';
|
|
2
|
-
import { type RgbColor } from '../../../../core/index.js';
|
|
3
|
-
import type { DesignerContrastSample } from '../../../common/validation/designer-guard.js';
|
|
4
|
-
export interface DesignerContrastMeasurement {
|
|
5
|
-
readonly samples: readonly DesignerContrastSample[];
|
|
6
|
-
/** 参与测量的文本元素,按组件聚合:修复预览只改这些节点的渲染。 */
|
|
7
|
-
readonly textElements: ReadonlyMap<string, readonly HTMLElement[]>;
|
|
8
|
-
readonly truncated: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface DesignerContrastMeasureInput {
|
|
11
|
-
/** 画布内容层:物料宿主元素带 `data-base-screen-component-id`。 */
|
|
12
|
-
readonly content: HTMLElement;
|
|
13
|
-
/** 画布底色(已合成到不透明),用作背景合成的起点。 */
|
|
14
|
-
readonly baseBackground: RgbColor;
|
|
15
|
-
readonly components: ReadonlyMap<string, ScreenComponentNode>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* 从真实渲染测量文本颜色与有效背景。
|
|
19
|
-
*
|
|
20
|
-
* 只测量「颜色确实由文档样式驱动」的组件:measured 文本色与 `style.color` 不一致时
|
|
21
|
-
* (条件样式、物料内部硬编码、渐变文字),样本仍参与判定,但标记为不可自动修复。
|
|
22
|
-
*/
|
|
23
|
-
export declare function measureCanvasContrast(input: DesignerContrastMeasureInput): DesignerContrastMeasurement;
|
|
24
|
-
//# sourceMappingURL=designer-contrast-measure.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { DesignerContrastIssue } from '../../../common/validation/designer-guard.js';
|
|
2
|
-
export interface DesignerGuardView {
|
|
3
|
-
readonly checked: number;
|
|
4
|
-
readonly truncated: boolean;
|
|
5
|
-
readonly issues: readonly DesignerContrastIssue[];
|
|
6
|
-
/** 正在预览修复的组件;`null` = 没有预览态。 */
|
|
7
|
-
readonly previewComponentId: string | null;
|
|
8
|
-
}
|
|
9
|
-
/** 底栏守卫条目:常驻显示,失败时带红色计数。 */
|
|
10
|
-
export declare function guardStripMarkup(view: DesignerGuardView): string;
|
|
11
|
-
/** 写入守卫详情并就地增强其中的控件(设计系统要求动态控件渲染后必须 adopt)。 */
|
|
12
|
-
export declare function renderGuardPopover(popover: HTMLElement, view: DesignerGuardView): void;
|
|
13
|
-
/** 守卫详情:每条违规给比值、色块、修复入口;预览与失败由同一状态派生。 */
|
|
14
|
-
export declare function guardPopoverMarkup(view: DesignerGuardView): string;
|
|
15
|
-
//# sourceMappingURL=designer-guard-dom.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SnapGuideline } from '../../common/vendor/moveable/types.js';
|
|
2
|
-
import type { DesignerSnapCandidates } from './designer-canvas-snap-candidates.js';
|
|
3
|
-
/** Prepared once per gesture; window queries preserve Moveable's original tie-breaking order. */
|
|
4
|
-
export declare class DesignerSnapIndex {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(candidates: DesignerSnapCandidates);
|
|
7
|
-
query(posesX: readonly number[], posesY: readonly number[], threshold: number): readonly SnapGuideline[];
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=designer-canvas-snap-index.d.ts.map
|
package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-connection.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ScreenBlueprint, ScreenDocument } from '../../../../contracts/index.js';
|
|
2
|
-
import type { DesignerBlueprintEventOption } from './designer-blueprint-model-types.js';
|
|
3
|
-
import type { BaseScreenBlueprintCanvasSelection } from './designer-blueprint-protocol.js';
|
|
4
|
-
export type DesignerBlueprintConnectionFailureReason = 'duplicate' | 'invalid' | 'source-unconnected' | 'unconfigured';
|
|
5
|
-
export type DesignerBlueprintConnectionResult = {
|
|
6
|
-
readonly ok: true;
|
|
7
|
-
readonly blueprint: ScreenBlueprint;
|
|
8
|
-
readonly selection: Exclude<BaseScreenBlueprintCanvasSelection, null>;
|
|
9
|
-
} | {
|
|
10
|
-
readonly ok: false;
|
|
11
|
-
readonly reason: DesignerBlueprintConnectionFailureReason;
|
|
12
|
-
};
|
|
13
|
-
export declare function connectDesignerBlueprintNodes(document: ScreenDocument, sourceNodeId: string, sourceHandle: string, targetNodeId: string, targetHandle: string, events: readonly DesignerBlueprintEventOption[]): DesignerBlueprintConnectionResult;
|
|
14
|
-
//# sourceMappingURL=designer-blueprint-connection.d.ts.map
|
package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-mutation-helpers.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ScreenBlueprint, ScreenBlueprintCondition, ScreenBlueprintRelation, ScreenBlueprintRelationEffect, ScreenBlueprintSemanticRelationRole } from '../../../../contracts/index.js';
|
|
2
|
-
import type { DesignerBlueprintNodePosition } from './designer-blueprint-node-ids.js';
|
|
3
|
-
export declare function updateRelation(blueprint: ScreenBlueprint, relationId: string, update: (relation: ScreenBlueprintRelation) => ScreenBlueprintRelation): ScreenBlueprint | null;
|
|
4
|
-
export declare function removeRelation(blueprint: ScreenBlueprint, relationId: string): ScreenBlueprint;
|
|
5
|
-
export declare function updateRelationCondition(blueprint: ScreenBlueprint, relationId: string, condition: ScreenBlueprintCondition): ScreenBlueprint | null;
|
|
6
|
-
export declare function removeRelationCondition(blueprint: ScreenBlueprint, relationId: string): ScreenBlueprint | null;
|
|
7
|
-
export declare function updateRelationEffect(blueprint: ScreenBlueprint, relationId: string, effect: ScreenBlueprintRelationEffect): ScreenBlueprint | null;
|
|
8
|
-
export declare function updateRelationSourceEvent(blueprint: ScreenBlueprint, relationId: string, eventName: string): ScreenBlueprint | null;
|
|
9
|
-
export declare function updateSemanticRole(blueprint: ScreenBlueprint, relationId: string, role: ScreenBlueprintSemanticRelationRole): ScreenBlueprint | null;
|
|
10
|
-
export declare function parseRelationEdgeId(edgeId: string): {
|
|
11
|
-
readonly kind: 'relation' | 'semantic';
|
|
12
|
-
readonly relationId: string;
|
|
13
|
-
} | null;
|
|
14
|
-
export declare function relationReferencesComponent(relation: ScreenBlueprintRelation, componentId: string): boolean;
|
|
15
|
-
export declare function relationReferencesVariable(relation: ScreenBlueprintRelation, variableId: string): boolean;
|
|
16
|
-
export declare function relationReferencesHost(relation: ScreenBlueprintRelation): boolean;
|
|
17
|
-
export declare function insertLayoutNode(blueprint: ScreenBlueprint, id: string, position: DesignerBlueprintNodePosition | undefined): ScreenBlueprint;
|
|
18
|
-
export declare function removeLayoutNodes(blueprint: ScreenBlueprint, ids: ReadonlySet<string>): ScreenBlueprint;
|
|
19
|
-
export declare function nextRelationId(blueprint: ScreenBlueprint, value: string): string;
|
|
20
|
-
//# sourceMappingURL=designer-blueprint-mutation-helpers.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ScreenBlueprint, ScreenBlueprintCondition, ScreenBlueprintLayoutNode, ScreenBlueprintLayoutViewport, ScreenBlueprintRelationEffect, ScreenBlueprintSemanticRelationRole, ScreenDocument } from '../../../../contracts/index.js';
|
|
2
|
-
import { type DesignerBlueprintNodePosition } from './designer-blueprint-node-ids.js';
|
|
3
|
-
import type { BaseScreenBlueprintCanvasSelection } from './designer-blueprint-protocol.js';
|
|
4
|
-
export declare function insertDesignerBlueprintComponentNode(document: ScreenDocument, componentId: string, position?: DesignerBlueprintNodePosition): ScreenBlueprint | null;
|
|
5
|
-
export declare function insertDesignerBlueprintVariableNode(document: ScreenDocument, variableId: string, position?: DesignerBlueprintNodePosition): ScreenBlueprint | null;
|
|
6
|
-
export declare function insertDesignerBlueprintHostNode(blueprint: ScreenBlueprint, position?: DesignerBlueprintNodePosition): ScreenBlueprint;
|
|
7
|
-
export declare function deleteDesignerBlueprintSelection(blueprint: ScreenBlueprint, selection: Exclude<BaseScreenBlueprintCanvasSelection, null>): ScreenBlueprint | null;
|
|
8
|
-
export declare function commitDesignerBlueprintLayout(blueprint: ScreenBlueprint, nodes: readonly ScreenBlueprintLayoutNode[], viewport?: ScreenBlueprintLayoutViewport): ScreenBlueprint;
|
|
9
|
-
export declare function commitDesignerBlueprintViewport(blueprint: ScreenBlueprint, viewport: ScreenBlueprintLayoutViewport): ScreenBlueprint;
|
|
10
|
-
export declare function updateDesignerBlueprintCondition(blueprint: ScreenBlueprint, relationId: string, condition: ScreenBlueprintCondition): ScreenBlueprint | null;
|
|
11
|
-
export declare function removeDesignerBlueprintCondition(blueprint: ScreenBlueprint, relationId: string): ScreenBlueprint | null;
|
|
12
|
-
export declare function updateDesignerBlueprintEffect(blueprint: ScreenBlueprint, relationId: string, effect: ScreenBlueprintRelationEffect): ScreenBlueprint | null;
|
|
13
|
-
export declare function updateDesignerBlueprintSourceEvent(blueprint: ScreenBlueprint, relationId: string, eventName: string): ScreenBlueprint | null;
|
|
14
|
-
export declare function updateDesignerBlueprintSemanticRole(blueprint: ScreenBlueprint, relationId: string, role: ScreenBlueprintSemanticRelationRole): ScreenBlueprint | null;
|
|
15
|
-
//# sourceMappingURL=designer-blueprint-mutations.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ScreenDocument } from '../../../../contracts/index.js';
|
|
2
|
-
export interface DesignerBlueprintNodePosition {
|
|
3
|
-
readonly x: number;
|
|
4
|
-
readonly y: number;
|
|
5
|
-
}
|
|
6
|
-
/** 业务系统是单例汇点;它不是文档组件,只出现在蓝图投影中。 */
|
|
7
|
-
export declare const HOST_BLUEPRINT_NODE_ID = "host";
|
|
8
|
-
export declare function componentBlueprintNodeId(componentId: string): string;
|
|
9
|
-
export declare function variableBlueprintNodeId(variableId: string): string;
|
|
10
|
-
export declare function componentIdFromBlueprintNodeId(document: ScreenDocument, nodeId: string): string | undefined;
|
|
11
|
-
export declare function variableIdFromBlueprintNodeId(document: ScreenDocument, nodeId: string): string | undefined;
|
|
12
|
-
//# sourceMappingURL=designer-blueprint-node-ids.d.ts.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { ScreenDiagnostic, ScreenDocument, ScreenParseResult } from '../../../../contracts/index.js';
|
|
2
|
-
import { type ScreenDocumentCommand, type ScreenTransactionProvenance } from '../../../../core/index.js';
|
|
3
|
-
/** 场景应用成功后广播给宿主:引擎不等宿主轮询,也不把场景写进 Screen Document。 */
|
|
4
|
-
export declare const BASE_SCREEN_SCENE_CHANGE_EVENT = "base-screen-scene-change";
|
|
5
|
-
export interface BaseScreenSceneChangeDetail {
|
|
6
|
-
readonly sceneId: string;
|
|
7
|
-
readonly label: string;
|
|
8
|
-
}
|
|
9
|
-
/** 宿主提供的场景:只描述身份与展示名,内容由宿主的场景处理器产出。 */
|
|
10
|
-
export interface DesignerSceneDescriptor {
|
|
11
|
-
readonly id: string;
|
|
12
|
-
readonly label: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* 一次场景切换请求。`document` 是当前 canonical 文档,宿主据此把目标场景翻译成命令;
|
|
16
|
-
* 引擎不保存场景定义,也不推断场景内容。
|
|
17
|
-
*/
|
|
18
|
-
export interface DesignerSceneRequest {
|
|
19
|
-
readonly instanceId: string;
|
|
20
|
-
readonly sceneId: string;
|
|
21
|
-
readonly document: ScreenDocument;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 场景处理器产出的一批命令。场景切换是整套布局与数据绑定的替换,因此 commands 必须
|
|
25
|
-
* 让文档产生差异;空命令或零差异按失败关闭处理,不生成预览。
|
|
26
|
-
*/
|
|
27
|
-
export interface DesignerScenePlan {
|
|
28
|
-
readonly commands: readonly ScreenDocumentCommand[];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* 宿主实现的场景处理器:异步准备命令,失败时返回诊断。引擎不会调用模型,
|
|
32
|
-
* 也不按场景名猜测内容。
|
|
33
|
-
*/
|
|
34
|
-
export type DesignerSceneHandler = (request: DesignerSceneRequest) => Promise<ScreenParseResult<DesignerScenePlan>>;
|
|
35
|
-
export interface DesignerScenePreview {
|
|
36
|
-
readonly sceneId: string;
|
|
37
|
-
readonly label: string;
|
|
38
|
-
readonly commands: readonly ScreenDocumentCommand[];
|
|
39
|
-
readonly candidate: ScreenDocument;
|
|
40
|
-
readonly provenance: ScreenTransactionProvenance;
|
|
41
|
-
}
|
|
42
|
-
export type DesignerScenePrepareResult = {
|
|
43
|
-
readonly ok: true;
|
|
44
|
-
readonly value: DesignerScenePreview;
|
|
45
|
-
} | {
|
|
46
|
-
readonly ok: false;
|
|
47
|
-
readonly diagnostics: readonly ScreenDiagnostic[];
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* 把宿主产出的场景命令编译成候选文档:整批命令在副本上试算,全部成功且确有差异才产出
|
|
51
|
-
* 预览;任何一步失败都不返回半成品,预览层因此永远等于一次可提交的事务。
|
|
52
|
-
*/
|
|
53
|
-
export declare function prepareDesignerScenePreview(document: ScreenDocument, scene: DesignerSceneDescriptor, plan: DesignerScenePlan): DesignerScenePrepareResult;
|
|
54
|
-
export declare function sceneLabel(label: string): string;
|
|
55
|
-
//# sourceMappingURL=designer-scene.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ScreenJsonValue } from '../../../../contracts/index.js';
|
|
2
|
-
import type { BaseScreenHostConditionalStyleBinding, BaseScreenMaterialManifest } from '../../../../plugin-core/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* 宿主条件样式作者面的纯逻辑:字段推导与绑定增删。
|
|
5
|
-
*
|
|
6
|
-
* 与文档级 `styleRules` 刻意分开:这里只操作宿主持有的绑定列表,不产生文档事务。
|
|
7
|
-
* 渲染层负责把列表交给宿主保存,并在成功后重算条件样式。
|
|
8
|
-
*/
|
|
9
|
-
export interface DesignerHostStyleField {
|
|
10
|
-
readonly key: string;
|
|
11
|
-
readonly label: string;
|
|
12
|
-
readonly control: 'color' | 'select' | 'text';
|
|
13
|
-
readonly values?: readonly string[];
|
|
14
|
-
}
|
|
15
|
-
/** 可被宿主覆盖的样式字段 = stylePanel 中 schema 为 string 或 enum(字符串值)的字段。 */
|
|
16
|
-
export declare function designerHostStyleFields(manifest: BaseScreenMaterialManifest): readonly DesignerHostStyleField[];
|
|
17
|
-
/** 写入一条覆盖;同源同条件合并样式,其余绑定保持原顺序。 */
|
|
18
|
-
export declare function withHostConditionalStyleBinding(bindings: readonly BaseScreenHostConditionalStyleBinding[], sourceId: string, conditionId: string, styleKey: string, value: ScreenJsonValue): readonly BaseScreenHostConditionalStyleBinding[];
|
|
19
|
-
/** 删除一条覆盖;样式清空后整条绑定一起移除。 */
|
|
20
|
-
export declare function withoutHostConditionalStyleBinding(bindings: readonly BaseScreenHostConditionalStyleBinding[], sourceId: string, conditionId: string, styleKey: string): readonly BaseScreenHostConditionalStyleBinding[];
|
|
21
|
-
//# sourceMappingURL=designer-host-conditional-style.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type ScreenComponentStyleRule, type ScreenDocument, type ScreenJsonValue, type ScreenParseResult } from '../../../../contracts/index.js';
|
|
2
|
-
import type { ScreenDocumentTransaction } from '../../../../core/index.js';
|
|
3
|
-
import { type BaseScreenMaterialCatalog } from '../../../../plugin-core/index.js';
|
|
4
|
-
export declare const DESIGNER_STYLE_RULE_OPERATORS: readonly ['eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'contains', 'exists'];
|
|
5
|
-
export type DesignerStyleRuleOperator = (typeof DESIGNER_STYLE_RULE_OPERATORS)[number];
|
|
6
|
-
/** 条件样式只能覆盖物料 styleSchema 里的颜色字段(首期范围,color/fillColor/...)。 */
|
|
7
|
-
export declare function designerStyleRuleColorKeys(catalog: BaseScreenMaterialCatalog | undefined, materialType: string): readonly string[];
|
|
8
|
-
export declare function parseDesignerStyleRulePath(input: string): readonly string[] | null;
|
|
9
|
-
export interface DesignerStyleRuleMessages {
|
|
10
|
-
readonly invalid: string;
|
|
11
|
-
readonly limit: (limit: number) => string;
|
|
12
|
-
}
|
|
13
|
-
/** 比较值:先按 JSON 解析(数字/布尔/null/对象),失败则当字符串。 */
|
|
14
|
-
export declare function parseDesignerStyleRuleValue(input: string): ScreenJsonValue;
|
|
15
|
-
export declare function formatDesignerStyleRuleValue(value: ScreenJsonValue | undefined): string;
|
|
16
|
-
export declare function nextDesignerStyleRuleId(rules: readonly ScreenComponentStyleRule[]): string;
|
|
17
|
-
export declare function moveDesignerStyleRule(rules: readonly ScreenComponentStyleRule[], ruleId: string, offset: -1 | 1): readonly ScreenComponentStyleRule[] | null;
|
|
18
|
-
/**
|
|
19
|
-
* 条件样式整体替换事务。
|
|
20
|
-
*
|
|
21
|
-
* 规则数组必须保持 canonical 形状;合并后的完整 style 会过一次物料的 styleSchema,
|
|
22
|
-
* 避免写进一个物料根本不认识的样式键(规则在渲染期才失败会表现为"改了没反应")。
|
|
23
|
-
*/
|
|
24
|
-
export declare function createDesignerStyleRulesTransaction(document: ScreenDocument, componentId: string, rules: readonly ScreenComponentStyleRule[], catalog: BaseScreenMaterialCatalog | undefined, messages?: DesignerStyleRuleMessages): ScreenParseResult<ScreenDocumentTransaction>;
|
|
25
|
-
//# sourceMappingURL=designer-style-rules.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type RgbColor } from '../../../core/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* 守卫的输入是**已测量**的样本,不是文档字段:对比度只有在真实渲染后才有意义
|
|
4
|
-
* (继承、令牌、条件样式都会改变最终颜色)。测量由浏览器层完成,这里只做判定。
|
|
5
|
-
*/
|
|
6
|
-
export interface DesignerContrastSample {
|
|
7
|
-
readonly componentId: string;
|
|
8
|
-
readonly componentName: string;
|
|
9
|
-
readonly textColor: RgbColor;
|
|
10
|
-
readonly backgroundColor: RgbColor;
|
|
11
|
-
readonly fontSizePx: number;
|
|
12
|
-
readonly fontWeight: number;
|
|
13
|
-
/** 文档中驱动该文本色的样式值;`null` 表示颜色不来自文档样式,无法自动修复。 */
|
|
14
|
-
readonly declaredColor: string | null;
|
|
15
|
-
}
|
|
16
|
-
export interface DesignerContrastIssue {
|
|
17
|
-
readonly componentId: string;
|
|
18
|
-
readonly componentName: string;
|
|
19
|
-
readonly ratio: number;
|
|
20
|
-
readonly requiredRatio: number;
|
|
21
|
-
readonly textColor: string;
|
|
22
|
-
readonly backgroundColor: string;
|
|
23
|
-
/** 可应用的建议色;`null` = 该背景上无解或颜色不来自文档样式。 */
|
|
24
|
-
readonly suggestedColor: string | null;
|
|
25
|
-
/** 建议色的对比度;`null` 同 `suggestedColor`。 */
|
|
26
|
-
readonly suggestedRatio: number | null;
|
|
27
|
-
}
|
|
28
|
-
export interface DesignerContrastGuardResult {
|
|
29
|
-
readonly checked: number;
|
|
30
|
-
readonly issues: readonly DesignerContrastIssue[];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* 判定对比度守卫。同一组件有多段文本时只保留最差的一段——守卫回答的是
|
|
34
|
-
* 「这个组件现在能不能读」,而不是逐节点列清单。
|
|
35
|
-
*/
|
|
36
|
-
export declare function evaluateContrastGuard(samples: readonly DesignerContrastSample[]): DesignerContrastGuardResult;
|
|
37
|
-
/**
|
|
38
|
-
* 守卫的对外快照:宿主、评审页与工具面读同一份,不解析 DOM。
|
|
39
|
-
* `checked: 0` 表示还没测过,不等于通过。
|
|
40
|
-
*/
|
|
41
|
-
export interface DesignerGuardSnapshot {
|
|
42
|
-
readonly enabled: boolean;
|
|
43
|
-
readonly checked: number;
|
|
44
|
-
readonly truncated: boolean;
|
|
45
|
-
readonly issues: readonly DesignerContrastIssue[];
|
|
46
|
-
}
|
|
47
|
-
/** 守卫结果变化(测量完成、预览、应用、开关)。 */
|
|
48
|
-
export declare const BASE_SCREEN_GUARD_CHANGE_EVENT = "base-screen-guard-change";
|
|
49
|
-
//# sourceMappingURL=designer-guard.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { DesignerGuardSnapshot } from '../../common/validation/designer-guard.js';
|
|
2
|
-
import type { DesignerElementHost } from '../runtime/designer-element-state.js';
|
|
3
|
-
export type { DesignerGuardSnapshot };
|
|
4
|
-
/**
|
|
5
|
-
* 对比度守卫的只读结果:检查数、是否截断、逐项问题与建议色。
|
|
6
|
-
*
|
|
7
|
-
* 守卫只走确定性代码,读的是最近一次真实渲染的测量结果;没有结果时返回
|
|
8
|
-
* `checked: 0`,不代表通过。
|
|
9
|
-
*/
|
|
10
|
-
export declare function readContrastGuard(element: DesignerElementHost): DesignerGuardSnapshot;
|
|
11
|
-
/** 关掉守卫只停止测量与展示;不会关闭任何校验或写入文档。 */
|
|
12
|
-
export declare function setContrastGuardEnabled(element: DesignerElementHost, enabled: boolean): void;
|
|
13
|
-
//# sourceMappingURL=designer-element-guard.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ScreenParseResult } from '../../../contracts/index.js';
|
|
2
|
-
import { type DesignerSceneDescriptor, type DesignerSceneHandler } from '../../common/operations/scene/designer-scene.js';
|
|
3
|
-
import { type DesignerElementHost } from '../runtime/designer-element-state.js';
|
|
4
|
-
/**
|
|
5
|
-
* 设置宿主提供的场景目录与当前场景。场景内容不在引擎里:点击场景时引擎调用
|
|
6
|
-
* `setSceneHandler` 绑定的处理器,拿到命令后先在副本上试算,再以幽灵层预览。
|
|
7
|
-
* 传 `undefined` 清除目录,左栏场景区随之隐藏。
|
|
8
|
-
*/
|
|
9
|
-
export declare function setSceneCatalog(element: DesignerElementHost, scenes: readonly DesignerSceneDescriptor[] | undefined, activeSceneId?: string): ScreenParseResult<null>;
|
|
10
|
-
export declare function setActiveScene(element: DesignerElementHost, sceneId: string | undefined): void;
|
|
11
|
-
export declare function readActiveSceneId(element: DesignerElementHost): string | undefined;
|
|
12
|
-
export declare function setSceneHandler(element: DesignerElementHost, handler: DesignerSceneHandler | undefined): void;
|
|
13
|
-
export declare function readSceneAvailable(element: DesignerElementHost): boolean;
|
|
14
|
-
//# sourceMappingURL=designer-element-scene.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ScreenDiagnostic } from 'base-screen/contracts';
|
|
2
|
-
import { type BaseScreenDesignerElement, type BaseScreenDesignerMountOptions, type BaseScreenMountControllerReady, type BaseScreenMountDiagnosticContext, type BaseScreenMountDiagnosticsCallback, type BaseScreenRuntime, type BaseScreenViewerElement, type BaseScreenViewerMountOptions, type BaseScreenViewerRuntime, type ScreenProjectState } from 'base-screen';
|
|
3
|
-
import { type CSSProperties, type ReactElement, type ReactNode } from 'react';
|
|
4
|
-
export interface BaseScreenDesignerProps {
|
|
5
|
-
/** `null` 表示尚未就绪:不挂载、不保留诊断,等它变为非空后再挂载。 */
|
|
6
|
-
readonly runtime: BaseScreenRuntime | null;
|
|
7
|
-
/** 初始化快照;`null` 表示尚未就绪。文档/项目身份变化重挂载,catalog 新引用热刷新。 */
|
|
8
|
-
readonly mountOptions: BaseScreenDesignerMountOptions | null;
|
|
9
|
-
/** 强制重挂载;catalog 新引用热刷新,其余非身份配置只保存为后续挂载的初始化快照。 */
|
|
10
|
-
readonly remountKey?: string | number;
|
|
11
|
-
readonly onMounted?: BaseScreenMountControllerReady<BaseScreenDesignerElement>;
|
|
12
|
-
readonly onProjectState?: (state: ScreenProjectState) => void;
|
|
13
|
-
readonly onDiagnostics?: BaseScreenMountDiagnosticsCallback;
|
|
14
|
-
readonly renderFallback?: (diagnostics: readonly ScreenDiagnostic[], context: BaseScreenMountDiagnosticContext | undefined) => ReactNode;
|
|
15
|
-
readonly className?: string;
|
|
16
|
-
readonly style?: CSSProperties;
|
|
17
|
-
}
|
|
18
|
-
export interface BaseScreenViewerProps {
|
|
19
|
-
/** `null` 表示尚未就绪:不挂载、不保留诊断,等它变为非空后再挂载。 */
|
|
20
|
-
readonly runtime: BaseScreenViewerRuntime | null;
|
|
21
|
-
/** 初始化快照;`null` 表示尚未就绪。文档/项目身份变化重挂载,catalog 新引用热刷新。 */
|
|
22
|
-
readonly mountOptions: BaseScreenViewerMountOptions | null;
|
|
23
|
-
readonly remountKey?: string | number;
|
|
24
|
-
readonly onMounted?: BaseScreenMountControllerReady<BaseScreenViewerElement>;
|
|
25
|
-
readonly onDiagnostics?: BaseScreenMountDiagnosticsCallback;
|
|
26
|
-
readonly renderFallback?: (diagnostics: readonly ScreenDiagnostic[], context: BaseScreenMountDiagnosticContext | undefined) => ReactNode;
|
|
27
|
-
readonly className?: string;
|
|
28
|
-
readonly style?: CSSProperties;
|
|
29
|
-
}
|
|
30
|
-
export declare function BaseScreenDesigner(props: BaseScreenDesignerProps): ReactElement;
|
|
31
|
-
export declare function BaseScreenViewer(props: BaseScreenViewerProps): ReactElement;
|
|
32
|
-
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type ScreenParseResult } from 'base-screen/contracts';
|
|
2
|
-
import type { BaseScreenMaterialCatalogEntry, BaseScreenMaterialManifest, BaseScreenMaterialModel } from 'base-screen/plugin-core';
|
|
3
|
-
import { type ComponentType, type ReactNode } from 'react';
|
|
4
|
-
export * from './components.js';
|
|
5
|
-
export interface CreateReactMaterialDefinitionOptions<Props extends object> {
|
|
6
|
-
readonly manifest: BaseScreenMaterialManifest;
|
|
7
|
-
readonly component: ComponentType<Props>;
|
|
8
|
-
readonly mapModel?: (model: BaseScreenMaterialModel) => Props;
|
|
9
|
-
readonly eventProps?: Readonly<Record<string, string>>;
|
|
10
|
-
/** 每次渲染时包装物料根节点;Provider 和宿主 Store 由调用方持有。 */
|
|
11
|
-
readonly wrapRoot?: (node: ReactNode, model: BaseScreenMaterialModel) => ReactNode;
|
|
12
|
-
}
|
|
13
|
-
export declare function createReactMaterialDefinition<Props extends object>(options: CreateReactMaterialDefinitionOptions<Props>): ScreenParseResult<BaseScreenMaterialCatalogEntry>;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { parseScreenJsonValue as e } from "base-screen/contracts";
|
|
2
|
-
import { createMaterialDefinition as t } from "base-screen/plugin-sdk";
|
|
3
|
-
import { createElement as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
|
-
import { createRoot as o } from "react-dom/client";
|
|
5
|
-
import { createBaseScreenDesignerMountController as s, createBaseScreenViewerMountController as c } from "base-screen";
|
|
6
|
-
//#region src/components.ts
|
|
7
|
-
var l = Object.freeze([]);
|
|
8
|
-
function u(e) {
|
|
9
|
-
let t = i(null), [n, o] = a({
|
|
10
|
-
diagnostics: l,
|
|
11
|
-
context: void 0
|
|
12
|
-
}), s = i({
|
|
13
|
-
onMounted: e.onMounted,
|
|
14
|
-
onDiagnostics: e.onDiagnostics,
|
|
15
|
-
onProjectState: e.onProjectState
|
|
16
|
-
});
|
|
17
|
-
s.current = {
|
|
18
|
-
onMounted: e.onMounted,
|
|
19
|
-
onDiagnostics: e.onDiagnostics,
|
|
20
|
-
onProjectState: e.onProjectState
|
|
21
|
-
};
|
|
22
|
-
let c = i(e.createController);
|
|
23
|
-
c.current = e.createController;
|
|
24
|
-
let u = i(null), d = i(Promise.resolve());
|
|
25
|
-
return r(() => {
|
|
26
|
-
let n = t.current, r = e.runtime, i = e.mountOptions;
|
|
27
|
-
if (n === null || r === null || i === null) {
|
|
28
|
-
o({
|
|
29
|
-
diagnostics: l,
|
|
30
|
-
context: void 0
|
|
31
|
-
});
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
let a = !1, f = c.current({
|
|
35
|
-
runtime: r,
|
|
36
|
-
options: i,
|
|
37
|
-
onMounted: (e) => {
|
|
38
|
-
if (!a) return s.current.onMounted?.(e);
|
|
39
|
-
},
|
|
40
|
-
onProjectState: e.onProjectState === void 0 ? void 0 : (e) => {
|
|
41
|
-
a || s.current.onProjectState?.(e);
|
|
42
|
-
},
|
|
43
|
-
onDiagnostics: (e, t) => {
|
|
44
|
-
a || (o({
|
|
45
|
-
diagnostics: e,
|
|
46
|
-
context: t
|
|
47
|
-
}), s.current.onDiagnostics?.(e, t));
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return u.current = f, d.current.then(() => {
|
|
51
|
-
if (!a) return f.attach(n);
|
|
52
|
-
}), () => {
|
|
53
|
-
a = !0, u.current = null, o({
|
|
54
|
-
diagnostics: l,
|
|
55
|
-
context: void 0
|
|
56
|
-
});
|
|
57
|
-
let e = d.current, t = f.detach();
|
|
58
|
-
d.current = Promise.all([e, t]);
|
|
59
|
-
};
|
|
60
|
-
}, [
|
|
61
|
-
e.runtime,
|
|
62
|
-
e.mountOptions === null,
|
|
63
|
-
e.remountKey,
|
|
64
|
-
...e.identity
|
|
65
|
-
]), r(() => {
|
|
66
|
-
let t = e.mountOptions;
|
|
67
|
-
t !== null && u.current?.updateOptions(t);
|
|
68
|
-
}, [e.mountOptions, e.mountOptions?.catalog]), {
|
|
69
|
-
containerRef: t,
|
|
70
|
-
diagnostics: n.diagnostics,
|
|
71
|
-
diagnosticContext: n.context
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function d(e, t, r) {
|
|
75
|
-
return e.length === 0 ? null : r === void 0 ? n("div", { role: "alert" }, e.map((e) => e.message).join("; ")) : r(e, t);
|
|
76
|
-
}
|
|
77
|
-
function f(e) {
|
|
78
|
-
let { runtime: t, mountOptions: r, remountKey: i, onMounted: a, onDiagnostics: o, renderFallback: c, className: l, style: f } = e, p = u({
|
|
79
|
-
runtime: t,
|
|
80
|
-
mountOptions: r,
|
|
81
|
-
remountKey: i,
|
|
82
|
-
onMounted: a,
|
|
83
|
-
onDiagnostics: o,
|
|
84
|
-
identity: [
|
|
85
|
-
r?.projectId,
|
|
86
|
-
r?.document,
|
|
87
|
-
r?.element
|
|
88
|
-
],
|
|
89
|
-
onProjectState: e.onProjectState,
|
|
90
|
-
createController: (e) => s({
|
|
91
|
-
runtime: e.runtime,
|
|
92
|
-
options: e.options,
|
|
93
|
-
onMounted: e.onMounted,
|
|
94
|
-
...e.onProjectState === void 0 ? {} : { onProjectState: e.onProjectState },
|
|
95
|
-
onDiagnostics: e.onDiagnostics
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
return n("div", {
|
|
99
|
-
ref: p.containerRef,
|
|
100
|
-
className: l,
|
|
101
|
-
style: f
|
|
102
|
-
}, d(p.diagnostics, p.diagnosticContext, c));
|
|
103
|
-
}
|
|
104
|
-
function p(e) {
|
|
105
|
-
let { runtime: t, mountOptions: r, remountKey: i, onMounted: a, onDiagnostics: o, renderFallback: s, className: l, style: f } = e, p = u({
|
|
106
|
-
runtime: t,
|
|
107
|
-
mountOptions: r,
|
|
108
|
-
remountKey: i,
|
|
109
|
-
onMounted: a,
|
|
110
|
-
onDiagnostics: o,
|
|
111
|
-
identity: [
|
|
112
|
-
r?.projectId,
|
|
113
|
-
r?.document,
|
|
114
|
-
r?.documentRevision,
|
|
115
|
-
r?.element
|
|
116
|
-
],
|
|
117
|
-
createController: (e) => c({
|
|
118
|
-
runtime: e.runtime,
|
|
119
|
-
options: e.options,
|
|
120
|
-
onMounted: e.onMounted,
|
|
121
|
-
onDiagnostics: e.onDiagnostics
|
|
122
|
-
})
|
|
123
|
-
});
|
|
124
|
-
return n("div", {
|
|
125
|
-
ref: p.containerRef,
|
|
126
|
-
className: l,
|
|
127
|
-
style: f
|
|
128
|
-
}, d(p.diagnostics, p.diagnosticContext, s));
|
|
129
|
-
}
|
|
130
|
-
//#endregion
|
|
131
|
-
//#region src/index.ts
|
|
132
|
-
var m = "base-screen-bridge-interactive-styles", h = "[data-base-screen-interactive=\"false\"] * { pointer-events: none; }";
|
|
133
|
-
function g(e) {
|
|
134
|
-
let r = globalThis.HTMLElement ?? class {}, i = e.eventProps ?? {};
|
|
135
|
-
class a extends r {
|
|
136
|
-
static manifest = e.manifest;
|
|
137
|
-
#e;
|
|
138
|
-
#t;
|
|
139
|
-
#n = !1;
|
|
140
|
-
get model() {
|
|
141
|
-
if (this.#e === void 0) throw Error("Material model has not been set.");
|
|
142
|
-
return this.#e;
|
|
143
|
-
}
|
|
144
|
-
set model(e) {
|
|
145
|
-
this.#e = e, this.dataset.baseScreenInteractive = String(e.interactive), this.render();
|
|
146
|
-
}
|
|
147
|
-
connectedCallback() {
|
|
148
|
-
this.#n = !1, this.#t === void 0 && (this.#t = o(this)), this.render();
|
|
149
|
-
}
|
|
150
|
-
disconnectedCallback() {
|
|
151
|
-
this.#n || (this.#n = !0, queueMicrotask(() => {
|
|
152
|
-
this.#n = !1, !this.isConnected && this.#t !== void 0 && (this.#t.unmount(), this.#t = void 0);
|
|
153
|
-
}));
|
|
154
|
-
}
|
|
155
|
-
render() {
|
|
156
|
-
if (this.#t === void 0 || this.#e === void 0) return;
|
|
157
|
-
this.ensureInteractiveStyleSheet();
|
|
158
|
-
let t = {
|
|
159
|
-
...e.mapModel === void 0 ? this.#e.props : e.mapModel(this.#e),
|
|
160
|
-
...this.createEventProps()
|
|
161
|
-
}, r = n(e.component, t);
|
|
162
|
-
this.#t.render(e.wrapRoot === void 0 ? r : e.wrapRoot(r, this.#e));
|
|
163
|
-
}
|
|
164
|
-
ensureInteractiveStyleSheet() {
|
|
165
|
-
let e = this.getRootNode();
|
|
166
|
-
if (e instanceof ShadowRoot) {
|
|
167
|
-
if (e.querySelector(`style[data-bridge-style-key="${m}"]`) !== null) return;
|
|
168
|
-
let t = this.ownerDocument.createElement("style");
|
|
169
|
-
t.dataset.bridgeStyleKey = m, t.textContent = h, e.appendChild(t);
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
if (e instanceof Document && e.getElementById(m) === null) {
|
|
173
|
-
let t = this.ownerDocument.createElement("style");
|
|
174
|
-
t.id = m, t.textContent = h, e.head.appendChild(t);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
createEventProps() {
|
|
178
|
-
let e = {};
|
|
179
|
-
for (let [t, n] of Object.entries(i)) e[n] = (e) => this.dispatchMaterialEvent(t, e);
|
|
180
|
-
return e;
|
|
181
|
-
}
|
|
182
|
-
dispatchMaterialEvent(t, n) {
|
|
183
|
-
if (this.#e?.interactive !== !0 || !e.manifest.events.includes(t)) return;
|
|
184
|
-
let r = _(n);
|
|
185
|
-
r !== void 0 && this.dispatchEvent(new CustomEvent("base-screen-material-event", {
|
|
186
|
-
bubbles: !0,
|
|
187
|
-
composed: !0,
|
|
188
|
-
detail: {
|
|
189
|
-
name: t,
|
|
190
|
-
payload: r
|
|
191
|
-
}
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
let s = t({
|
|
196
|
-
manifest: e.manifest,
|
|
197
|
-
element: a
|
|
198
|
-
});
|
|
199
|
-
return s.ok ? {
|
|
200
|
-
ok: !0,
|
|
201
|
-
value: {
|
|
202
|
-
manifest: s.value.manifest,
|
|
203
|
-
constructor: s.value.element
|
|
204
|
-
},
|
|
205
|
-
diagnostics: []
|
|
206
|
-
} : s;
|
|
207
|
-
}
|
|
208
|
-
function _(t) {
|
|
209
|
-
let n = e(t, { maxBytes: 65536 });
|
|
210
|
-
return n.ok ? n.value : void 0;
|
|
211
|
-
}
|
|
212
|
-
//#endregion
|
|
213
|
-
export { f as BaseScreenDesigner, p as BaseScreenViewer, g as createReactMaterialDefinition };
|
|
214
|
-
|
|
215
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ScreenComponentStyleRule, type ScreenJsonObject } from '../contracts/index.js';
|
|
2
|
-
import type { BaseScreenMaterialDataState } from '../plugin-core/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* 组件条件样式规则求值(ADR-0058):以组件自身 `dataState.value` 为唯一条件源。
|
|
5
|
-
* 非 `ready` 状态、路径不可解析、类型不匹配均视为不命中而不是错误;
|
|
6
|
-
* 命中规则按数组顺序逐键合并,同键后写覆盖先写。
|
|
7
|
-
*/
|
|
8
|
-
export declare function evaluateScreenComponentStyleRules(rules: readonly ScreenComponentStyleRule[] | undefined, dataState: BaseScreenMaterialDataState): ScreenJsonObject | undefined;
|
|
9
|
-
//# sourceMappingURL=style-rules.d.ts.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ScreenDiagnostic } from 'base-screen/contracts';
|
|
2
|
-
import { type BaseScreenDesignerElement, type BaseScreenDesignerMountOptions, type BaseScreenMountControllerReady, type BaseScreenMountDiagnosticContext, type BaseScreenMountDiagnosticsCallback, type BaseScreenRuntime, type BaseScreenViewerElement, type BaseScreenViewerMountOptions, type BaseScreenViewerRuntime, type ScreenProjectState } from 'base-screen';
|
|
3
|
-
import { type SlotsType } from 'vue';
|
|
4
|
-
export interface BaseScreenDesignerProps {
|
|
5
|
-
/** `null` 表示尚未就绪:不挂载、不保留诊断,等它变为非空后再挂载。 */
|
|
6
|
-
readonly runtime: BaseScreenRuntime | null;
|
|
7
|
-
/** 初始化快照;`null` 表示尚未就绪。文档/项目身份变化重挂载,catalog 新引用热刷新。 */
|
|
8
|
-
readonly mountOptions: BaseScreenDesignerMountOptions | null;
|
|
9
|
-
/** 强制重挂载;catalog 新引用热刷新,其余非身份配置只保存为后续挂载的初始化快照。 */
|
|
10
|
-
readonly remountKey?: string | number;
|
|
11
|
-
readonly onMounted?: BaseScreenMountControllerReady<BaseScreenDesignerElement>;
|
|
12
|
-
readonly onProjectState?: (state: ScreenProjectState) => void;
|
|
13
|
-
readonly onDiagnostics?: BaseScreenMountDiagnosticsCallback;
|
|
14
|
-
}
|
|
15
|
-
export interface BaseScreenViewerProps {
|
|
16
|
-
/** `null` 表示尚未就绪:不挂载、不保留诊断,等它变为非空后再挂载。 */
|
|
17
|
-
readonly runtime: BaseScreenViewerRuntime | null;
|
|
18
|
-
/** 初始化快照;`null` 表示尚未就绪。文档/项目身份变化重挂载,catalog 新引用热刷新。 */
|
|
19
|
-
readonly mountOptions: BaseScreenViewerMountOptions | null;
|
|
20
|
-
readonly remountKey?: string | number;
|
|
21
|
-
readonly onMounted?: BaseScreenMountControllerReady<BaseScreenViewerElement>;
|
|
22
|
-
readonly onDiagnostics?: BaseScreenMountDiagnosticsCallback;
|
|
23
|
-
}
|
|
24
|
-
export declare const BaseScreenDesigner: import("vue").DefineSetupFnComponent<BaseScreenDesignerProps, {}, SlotsType<{
|
|
25
|
-
fallback: {
|
|
26
|
-
diagnostics: readonly ScreenDiagnostic[];
|
|
27
|
-
context: BaseScreenMountDiagnosticContext | undefined;
|
|
28
|
-
};
|
|
29
|
-
}>, BaseScreenDesignerProps & {}, import("vue").PublicProps>;
|
|
30
|
-
export declare const BaseScreenViewer: import("vue").DefineSetupFnComponent<BaseScreenViewerProps, {}, SlotsType<{
|
|
31
|
-
fallback: {
|
|
32
|
-
diagnostics: readonly ScreenDiagnostic[];
|
|
33
|
-
context: BaseScreenMountDiagnosticContext | undefined;
|
|
34
|
-
};
|
|
35
|
-
}>, BaseScreenViewerProps & {}, import("vue").PublicProps>;
|
|
36
|
-
//# sourceMappingURL=components.d.ts.map
|