base-screen 0.2.0 → 0.4.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.
Files changed (518) hide show
  1. package/README.md +3 -12
  2. package/dist/_internal/contracts/document/blueprint-capabilities.d.ts +9 -1
  3. package/dist/_internal/contracts/document/blueprint-capabilities.js +16 -0
  4. package/dist/_internal/contracts/document/blueprint-graph.d.ts +68 -0
  5. package/dist/_internal/contracts/document/blueprint-graph.js +424 -0
  6. package/dist/_internal/contracts/document/blueprint-strict.d.ts +3 -1
  7. package/dist/_internal/contracts/document/blueprint-strict.js +77 -91
  8. package/dist/_internal/contracts/document/component-states.d.ts +54 -0
  9. package/dist/_internal/contracts/document/component-states.js +171 -0
  10. package/dist/_internal/contracts/document/json-schema.js +49 -17
  11. package/dist/_internal/contracts/document/limits.d.ts +40 -8
  12. package/dist/_internal/contracts/document/limits.js +40 -8
  13. package/dist/_internal/contracts/document/parse-parts.d.ts +12 -0
  14. package/dist/_internal/contracts/document/parse-parts.js +56 -0
  15. package/dist/_internal/contracts/document/parse.js +1 -1
  16. package/dist/_internal/contracts/document/references.js +108 -41
  17. package/dist/_internal/contracts/document/schema.d.ts +532 -186
  18. package/dist/_internal/contracts/document/schema.js +235 -96
  19. package/dist/_internal/contracts/document/sub-canvas.d.ts +27 -0
  20. package/dist/_internal/contracts/document/sub-canvas.js +38 -0
  21. package/dist/_internal/contracts/document/theme.d.ts +22 -0
  22. package/dist/_internal/contracts/document/theme.js +65 -0
  23. package/dist/_internal/contracts/document/validate-blueprint.d.ts +7 -0
  24. package/dist/_internal/contracts/document/validate-blueprint.js +223 -25
  25. package/dist/_internal/contracts/document/validate-component.d.ts +2 -0
  26. package/dist/_internal/contracts/document/validate-component.js +111 -54
  27. package/dist/_internal/contracts/document/validate-data-source.js +84 -9
  28. package/dist/_internal/contracts/document/validate-sub-canvas.d.ts +9 -0
  29. package/dist/_internal/contracts/document/validate-sub-canvas.js +92 -0
  30. package/dist/_internal/contracts/document/validate-theme.d.ts +4 -0
  31. package/dist/_internal/contracts/document/validate-theme.js +20 -0
  32. package/dist/_internal/contracts/document/validate-value-ref.js +6 -1
  33. package/dist/_internal/contracts/document/validate.js +19 -2
  34. package/dist/_internal/contracts/index.d.ts +11 -4
  35. package/dist/_internal/contracts/index.js +8 -2
  36. package/dist/_internal/contracts/migration/blueprint-graph-migration.d.ts +21 -0
  37. package/dist/_internal/contracts/migration/blueprint-graph-migration.js +328 -0
  38. package/dist/_internal/contracts/migration/migrate-document.d.ts +2 -1
  39. package/dist/_internal/contracts/migration/migrate-document.js +11 -3
  40. package/dist/_internal/contracts/push/delivery.d.ts +16 -0
  41. package/dist/_internal/contracts/push/delivery.js +70 -0
  42. package/dist/_internal/contracts/push/level-scale.d.ts +7 -0
  43. package/dist/_internal/contracts/push/level-scale.js +91 -0
  44. package/dist/_internal/contracts/screen-document.schema.json +1071 -386
  45. package/dist/_internal/contracts/types/diagnostics.d.ts +1 -1
  46. package/dist/_internal/contracts/types/document.d.ts +280 -77
  47. package/dist/_internal/contracts/types/execution.d.ts +12 -2
  48. package/dist/_internal/contracts/types/execution.js +0 -5
  49. package/dist/_internal/contracts/types/host.d.ts +35 -1
  50. package/dist/_internal/contracts/types/host.js +7 -1
  51. package/dist/_internal/contracts/types/push.d.ts +86 -0
  52. package/dist/_internal/contracts/types/push.js +1 -0
  53. package/dist/_internal/contracts/types/variable.d.ts +5 -0
  54. package/dist/_internal/contracts/variable/parse.js +30 -1
  55. package/dist/_internal/core/blueprint/runtime-compile.d.ts +4 -0
  56. package/dist/_internal/core/blueprint/runtime-compile.js +45 -21
  57. package/dist/_internal/core/blueprint/runtime-dispatch.js +270 -156
  58. package/dist/_internal/core/blueprint/runtime-simulate.d.ts +57 -0
  59. package/dist/_internal/core/blueprint/runtime-simulate.js +177 -0
  60. package/dist/_internal/core/blueprint/runtime-types.d.ts +112 -6
  61. package/dist/_internal/core/blueprint/runtime.d.ts +2 -1
  62. package/dist/_internal/core/blueprint/runtime.js +1 -0
  63. package/dist/_internal/core/commands/apply-collection-commands.d.ts +32 -0
  64. package/dist/_internal/core/commands/apply-collection-commands.js +174 -0
  65. package/dist/_internal/core/commands/apply-component-commands.d.ts +5 -0
  66. package/dist/_internal/core/commands/apply-component-commands.js +74 -2
  67. package/dist/_internal/core/commands/apply.js +76 -3
  68. package/dist/_internal/core/commands/parse-command.js +24 -0
  69. package/dist/_internal/core/commands/types.d.ts +56 -3
  70. package/dist/_internal/core/data/data-candidates.d.ts +38 -0
  71. package/dist/_internal/core/data/data-candidates.js +186 -0
  72. package/dist/_internal/core/data/dataset-profile.d.ts +71 -0
  73. package/dist/_internal/core/data/dataset-profile.js +170 -0
  74. package/dist/_internal/core/data/sample-values.d.ts +25 -0
  75. package/dist/_internal/core/data/sample-values.js +45 -0
  76. package/dist/_internal/core/diff/screen-diff.js +7 -1
  77. package/dist/_internal/core/index.d.ts +7 -1
  78. package/dist/_internal/core/index.js +7 -1
  79. package/dist/_internal/core/state/state-preset.d.ts +32 -0
  80. package/dist/_internal/core/state/state-preset.js +37 -0
  81. package/dist/_internal/core/validation/layout-audit.d.ts +17 -0
  82. package/dist/_internal/core/validation/layout-audit.js +228 -0
  83. package/dist/_internal/core/validation/legibility.d.ts +9 -0
  84. package/dist/_internal/core/validation/legibility.js +33 -0
  85. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-canvas-bridge-helpers.d.ts +1 -1
  86. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-canvas-bridge.d.ts +11 -1
  87. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-panels-controller.d.ts +18 -4
  88. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-timer-scheduler.d.ts +21 -0
  89. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-panel.d.ts +8 -1
  90. package/dist/_internal/engine/browser/controllers/dataset/designer-data-source-authoring.d.ts +25 -1
  91. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-controller-context.d.ts +6 -2
  92. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-draft-controller.d.ts +14 -1
  93. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-surface-controller.d.ts +14 -0
  94. package/dist/_internal/engine/browser/controllers/dataset/designer-update-policy-authoring.d.ts +52 -0
  95. package/dist/_internal/engine/browser/controllers/designer-artboard-controller.d.ts +80 -0
  96. package/dist/_internal/engine/browser/controllers/designer-canvas-runtime-controller.d.ts +21 -3
  97. package/dist/_internal/engine/browser/controllers/designer-change-controller.d.ts +29 -0
  98. package/dist/_internal/engine/browser/controllers/designer-command-palette-controller.d.ts +2 -0
  99. package/dist/_internal/engine/browser/controllers/designer-notification-controller.d.ts +7 -0
  100. package/dist/_internal/engine/browser/controllers/designer-page-preview-controller.d.ts +34 -0
  101. package/dist/_internal/engine/browser/controllers/designer-popup-preview-controller.d.ts +40 -0
  102. package/dist/_internal/engine/browser/controllers/designer-preview-controller.d.ts +1 -3
  103. package/dist/_internal/engine/browser/controllers/designer-reference-layer-controller.d.ts +45 -0
  104. package/dist/_internal/engine/browser/controllers/designer-viewport-controller.d.ts +10 -0
  105. package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-callbacks.d.ts +5 -1
  106. package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-controller.d.ts +2 -0
  107. package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-environment.d.ts +18 -7
  108. package/dist/_internal/engine/browser/controllers/gesture/designer-group-editing-controller.d.ts +8 -1
  109. package/dist/_internal/engine/browser/controllers/layers/designer-layers-controller.d.ts +11 -0
  110. package/dist/_internal/engine/browser/controllers/panel/designer-component-states-controller.d.ts +26 -0
  111. package/dist/_internal/engine/browser/controllers/panel/designer-inspector-focus.d.ts +30 -0
  112. package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller-callbacks.d.ts +23 -6
  113. package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller.d.ts +2 -2
  114. package/dist/_internal/engine/browser/controllers/panel/designer-panel-material-controller.d.ts +4 -0
  115. package/dist/_internal/engine/browser/controllers/panel/designer-panel-property-controller.d.ts +2 -0
  116. package/dist/_internal/engine/browser/controllers/workbench/designer-snap-controller.d.ts +5 -1
  117. package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-controller.d.ts +7 -1
  118. package/dist/_internal/engine/browser/dom/blueprint/designer-blueprint-inspector-configuration.d.ts +12 -0
  119. package/dist/_internal/engine/browser/dom/blueprint/designer-blueprint-library-dom.d.ts +18 -2
  120. package/dist/_internal/engine/browser/dom/change/designer-change-dom.d.ts +22 -5
  121. package/dist/_internal/engine/browser/dom/color/designer-color-palette-dom.d.ts +1 -0
  122. package/dist/_internal/engine/browser/dom/color/designer-color-palette-theme.d.ts +10 -0
  123. package/dist/_internal/engine/browser/dom/color/designer-color-palette-types.d.ts +13 -0
  124. package/dist/_internal/engine/browser/dom/color/designer-color-theme-slots.d.ts +10 -0
  125. package/dist/_internal/engine/browser/dom/dataset/designer-data-section-diff.d.ts +4 -6
  126. package/dist/_internal/engine/browser/dom/dataset/designer-dataset-types.d.ts +17 -6
  127. package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-control-dom.d.ts +17 -1
  128. package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-model.d.ts +2 -0
  129. package/dist/_internal/engine/browser/dom/designer-field-primitives.d.ts +43 -1
  130. package/dist/_internal/engine/browser/dom/designer-icons.d.ts +2 -0
  131. package/dist/_internal/engine/browser/dom/designer-select-dom.d.ts +2 -0
  132. package/dist/_internal/engine/browser/dom/designer-ui-primitives.d.ts +5 -0
  133. package/dist/_internal/engine/browser/dom/layers/designer-layers-model.d.ts +28 -0
  134. package/dist/_internal/engine/browser/dom/material-library/designer-material-library-dom.d.ts +18 -2
  135. package/dist/_internal/engine/browser/dom/material-library/designer-material-library-group-view.d.ts +1 -0
  136. package/dist/_internal/engine/browser/dom/menu/designer-menu-model.d.ts +4 -2
  137. package/dist/_internal/engine/browser/dom/panel/designer-canvas-properties-dom.d.ts +10 -2
  138. package/dist/_internal/engine/browser/dom/panel/designer-canvas-transactions.d.ts +5 -1
  139. package/dist/_internal/engine/browser/dom/panel/designer-chrome-primitives.d.ts +12 -0
  140. package/dist/_internal/engine/browser/dom/panel/designer-color-group-dom.d.ts +45 -0
  141. package/dist/_internal/engine/browser/dom/panel/designer-component-properties-dom.d.ts +4 -3
  142. package/dist/_internal/engine/browser/dom/panel/designer-component-states-dom.d.ts +22 -0
  143. package/dist/_internal/engine/browser/dom/panel/designer-panel-primitives.d.ts +18 -2
  144. package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-types.d.ts +2 -0
  145. package/dist/_internal/engine/browser/dom/workspace/designer-workspace-template.d.ts +13 -0
  146. package/dist/_internal/engine/browser/dom/workspace/designer-workspace.d.ts +2 -1
  147. package/dist/_internal/engine/browser/viewport/designer-canvas-aids-types.d.ts +10 -4
  148. package/dist/_internal/engine/browser/viewport/designer-canvas-aids.d.ts +17 -5
  149. package/dist/_internal/engine/browser/viewport/designer-canvas-coordinates.d.ts +7 -0
  150. package/dist/_internal/engine/browser/viewport/designer-canvas-measurements.d.ts +8 -9
  151. package/dist/_internal/engine/browser/viewport/designer-canvas-snap-alignment-index.d.ts +27 -0
  152. package/dist/_internal/engine/browser/viewport/designer-canvas-snap-geometry.d.ts +13 -2
  153. package/dist/_internal/engine/browser/viewport/designer-canvas-snap-preview.d.ts +1 -1
  154. package/dist/_internal/engine/browser/viewport/designer-canvas-snap-spacing.d.ts +12 -0
  155. package/dist/_internal/engine/browser/viewport/designer-guide-overlay-nodes.d.ts +4 -0
  156. package/dist/_internal/engine/browser/viewport/designer-snap-tuning.d.ts +14 -0
  157. package/dist/_internal/engine/common/observability/designer-metrics.d.ts +1 -1
  158. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-geometry.d.ts +12 -0
  159. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-graph.d.ts +203 -0
  160. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-model-types.d.ts +6 -2
  161. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-model.d.ts +58 -7
  162. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-protocol-types.d.ts +131 -51
  163. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-value-sources.d.ts +7 -3
  164. package/dist/_internal/engine/common/operations/catalog/designer-catalog-refresh.d.ts +13 -1
  165. package/dist/_internal/engine/common/operations/change/designer-change-events.d.ts +2 -0
  166. package/dist/_internal/engine/common/operations/change/designer-change-proposal.d.ts +35 -2
  167. package/dist/_internal/engine/common/operations/designer-operation-registry.d.ts +5 -1
  168. package/dist/_internal/engine/common/operations/designer-variable-operations.d.ts +8 -0
  169. package/dist/_internal/engine/common/operations/display/designer-target-display.d.ts +2 -2
  170. package/dist/_internal/engine/common/operations/element/designer-element-operation-types.d.ts +8 -0
  171. package/dist/_internal/engine/common/operations/host-resource/host-resource-authoring.d.ts +1 -1
  172. package/dist/_internal/engine/common/operations/material-component/material-component-fragment-extract.d.ts +34 -0
  173. package/dist/_internal/engine/common/operations/material-component/material-component-fragment.d.ts +24 -41
  174. package/dist/_internal/engine/common/operations/material-component/material-component.d.ts +1 -1
  175. package/dist/_internal/engine/common/operations/material-library/material-library-fragments.d.ts +46 -0
  176. package/dist/_internal/engine/common/operations/material-library/material-library-grouping.d.ts +11 -0
  177. package/dist/_internal/engine/common/operations/selection/designer-group.d.ts +16 -4
  178. package/dist/_internal/engine/common/operations/selection/designer-multi-selection-operations.d.ts +4 -3
  179. package/dist/_internal/engine/common/operations/selection/designer-selection-actions.d.ts +6 -0
  180. package/dist/_internal/engine/common/operations/selection/designer-selection.d.ts +8 -0
  181. package/dist/_internal/engine/common/operations/style/designer-component-states.d.ts +67 -0
  182. package/dist/_internal/engine/common/operations/style/designer-material-appearance.d.ts +30 -0
  183. package/dist/_internal/engine/common/session/designer-artboard.d.ts +40 -0
  184. package/dist/_internal/engine/common/session/designer-session.d.ts +21 -0
  185. package/dist/_internal/engine/common/ui-text/designer-blueprint-ui-text.d.ts +169 -0
  186. package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +464 -90
  187. package/dist/_internal/engine/designer-blueprint-workbench-panel-BWSglfAb.js +2792 -0
  188. package/dist/_internal/engine/{designer-dataset-controller-CPytVNBK.js → designer-dataset-controller-DdbY4ILC.js} +1919 -1604
  189. package/dist/_internal/engine/designer-element/api/designer-element-catalog.d.ts +4 -3
  190. package/dist/_internal/engine/designer-element/api/designer-element-change.d.ts +24 -0
  191. package/dist/_internal/engine/designer-element/api/designer-element-configuration-types.d.ts +11 -8
  192. package/dist/_internal/engine/designer-element/api/designer-element-fragment-save.d.ts +16 -0
  193. package/dist/_internal/engine/designer-element/api/designer-element-host-properties.d.ts +0 -5
  194. package/dist/_internal/engine/designer-element/api/designer-element-insert-component-fragment.d.ts +9 -2
  195. package/dist/_internal/engine/designer-element/api/designer-element-material-library-fragments.d.ts +17 -0
  196. package/dist/_internal/engine/designer-element/api/designer-element-project.d.ts +0 -1
  197. package/dist/_internal/engine/designer-element/base-screen-designer-element.d.ts +36 -24
  198. package/dist/_internal/engine/designer-element/designer-element-public-api.d.ts +7 -6
  199. package/dist/_internal/engine/designer-element/runtime/designer-element-guards.d.ts +0 -2
  200. package/dist/_internal/engine/designer-element/runtime/designer-element-host.d.ts +6 -7
  201. package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +12 -2
  202. package/dist/_internal/engine/designer-element/runtime/designer-element-runtime.d.ts +19 -15
  203. package/dist/_internal/engine/designer-element/runtime/designer-element-sample-data.d.ts +23 -0
  204. package/dist/_internal/engine/designer-element/runtime/designer-element-state.d.ts +29 -10
  205. package/dist/_internal/engine/{designer-ui-primitives-CH4RNiMa.js → designer-field-primitives-Crn464Qg.js} +919 -348
  206. package/dist/_internal/engine/designer-left-panel-groups-dom-DFdLWxxY.js +1282 -0
  207. package/dist/_internal/engine/host-resource-selection-CWrPLVOc.js +2482 -0
  208. package/dist/_internal/engine/host-tokens.css +12 -12
  209. package/dist/_internal/engine/index.js +9202 -6279
  210. package/dist/_internal/host-kit/index.d.ts +3 -0
  211. package/dist/_internal/host-kit/index.js +3 -0
  212. package/dist/_internal/host-kit/intent/index.d.ts +16 -0
  213. package/dist/_internal/host-kit/intent/index.js +13 -0
  214. package/dist/_internal/host-kit/intent/intent-behavior.d.ts +59 -0
  215. package/dist/_internal/host-kit/intent/intent-behavior.js +812 -0
  216. package/dist/_internal/host-kit/intent/intent-block.d.ts +59 -0
  217. package/dist/_internal/host-kit/intent/intent-block.js +359 -0
  218. package/dist/_internal/host-kit/intent/intent-catalog.d.ts +105 -0
  219. package/dist/_internal/host-kit/intent/intent-catalog.js +60 -0
  220. package/dist/_internal/host-kit/intent/intent-compile-types.d.ts +222 -0
  221. package/dist/_internal/host-kit/intent/intent-compile-types.js +10 -0
  222. package/dist/_internal/host-kit/intent/intent-compile.d.ts +35 -0
  223. package/dist/_internal/host-kit/intent/intent-compile.js +465 -0
  224. package/dist/_internal/host-kit/intent/intent-data-check.d.ts +50 -0
  225. package/dist/_internal/host-kit/intent/intent-data-check.js +163 -0
  226. package/dist/_internal/host-kit/intent/intent-data-context.d.ts +53 -0
  227. package/dist/_internal/host-kit/intent/intent-data-context.js +200 -0
  228. package/dist/_internal/host-kit/intent/intent-dataset.d.ts +52 -0
  229. package/dist/_internal/host-kit/intent/intent-dataset.js +125 -0
  230. package/dist/_internal/host-kit/intent/intent-format.d.ts +33 -0
  231. package/dist/_internal/host-kit/intent/intent-format.js +94 -0
  232. package/dist/_internal/host-kit/intent/intent-kpi-bind.d.ts +29 -0
  233. package/dist/_internal/host-kit/intent/intent-kpi-bind.js +59 -0
  234. package/dist/_internal/host-kit/intent/intent-layout.d.ts +102 -0
  235. package/dist/_internal/host-kit/intent/intent-layout.js +264 -0
  236. package/dist/_internal/host-kit/intent/intent-parse.d.ts +39 -0
  237. package/dist/_internal/host-kit/intent/intent-parse.js +930 -0
  238. package/dist/_internal/host-kit/intent/intent-prepare.d.ts +52 -0
  239. package/dist/_internal/host-kit/intent/intent-prepare.js +104 -0
  240. package/dist/_internal/host-kit/intent/intent-session.d.ts +202 -0
  241. package/dist/_internal/host-kit/intent/intent-session.js +1001 -0
  242. package/dist/_internal/host-kit/intent/intent-stream.d.ts +28 -0
  243. package/dist/_internal/host-kit/intent/intent-stream.js +183 -0
  244. package/dist/_internal/host-kit/intent/intent-style.d.ts +37 -0
  245. package/dist/_internal/host-kit/intent/intent-style.js +77 -0
  246. package/dist/_internal/host-kit/intent/intent-types.d.ts +234 -0
  247. package/dist/_internal/host-kit/intent/intent-types.js +10 -0
  248. package/dist/_internal/host-kit/push-result.d.ts +5 -0
  249. package/dist/_internal/host-kit/push-result.js +8 -0
  250. package/dist/_internal/host-kit/sse-subscribe.d.ts +59 -0
  251. package/dist/_internal/host-kit/sse-subscribe.js +253 -0
  252. package/dist/_internal/host-kit/subscription-hub.d.ts +41 -0
  253. package/dist/_internal/host-kit/subscription-hub.js +179 -0
  254. package/dist/_internal/material/base-material.d.ts +1 -0
  255. package/dist/_internal/material/chart.d.ts +4 -0
  256. package/dist/_internal/material/chart.js +123 -58
  257. package/dist/_internal/material/container.js +19 -33
  258. package/dist/_internal/material/{base-material-BArgjOeL.js → editor-descriptor-DJZYygOa.js} +49 -20
  259. package/dist/_internal/material/editor-descriptor.d.ts +18 -0
  260. package/dist/_internal/material/image.js +30 -34
  261. package/dist/_internal/material/rule.js +29 -42
  262. package/dist/_internal/material/shapes.js +57 -74
  263. package/dist/_internal/material/table.d.ts +4 -0
  264. package/dist/_internal/material/table.js +149 -71
  265. package/dist/_internal/material/text.js +40 -68
  266. package/dist/_internal/plugin-core/contracts.d.ts +38 -49
  267. package/dist/_internal/plugin-core/contribution-kind.js +47 -2
  268. package/dist/_internal/plugin-core/editor/editor-ai-description.d.ts +3 -0
  269. package/dist/_internal/plugin-core/editor/editor-ai-description.js +124 -0
  270. package/dist/_internal/plugin-core/editor/editor-descriptor-conditions.js +5 -0
  271. package/dist/_internal/plugin-core/editor/editor-descriptor-inference.d.ts +32 -0
  272. package/dist/_internal/plugin-core/editor/editor-descriptor-inference.js +83 -0
  273. package/dist/_internal/plugin-core/editor/editor-descriptor-items.d.ts +6 -0
  274. package/dist/_internal/plugin-core/editor/editor-descriptor-items.js +41 -12
  275. package/dist/_internal/plugin-core/editor/editor-descriptor-model.d.ts +24 -1
  276. package/dist/_internal/plugin-core/editor/editor-descriptor-model.js +6 -1
  277. package/dist/_internal/plugin-core/editor/editor-descriptor-schema.js +21 -0
  278. package/dist/_internal/plugin-core/editor/editor-descriptor-sections.js +5 -7
  279. package/dist/_internal/plugin-core/editor/editor-descriptor.d.ts +1 -0
  280. package/dist/_internal/plugin-core/editor/editor-descriptor.js +55 -2
  281. package/dist/_internal/plugin-core/fragment/fragment.d.ts +96 -0
  282. package/dist/_internal/plugin-core/fragment/fragment.js +535 -0
  283. package/dist/_internal/plugin-core/index.d.ts +7 -4
  284. package/dist/_internal/plugin-core/index.js +5 -2
  285. package/dist/_internal/plugin-core/material/material-manifest.js +14 -2
  286. package/dist/_internal/plugin-core/material/material-schema.d.ts +9 -0
  287. package/dist/_internal/plugin-core/material/material-schema.js +31 -1
  288. package/dist/_internal/plugin-core/material/material-theme.d.ts +25 -0
  289. package/dist/_internal/plugin-core/material/material-theme.js +77 -0
  290. package/dist/_internal/plugin-core/material/material-validation-constants.js +2 -0
  291. package/dist/_internal/plugin-core/material/material.d.ts +1 -1
  292. package/dist/_internal/plugin-core/material/material.js +1 -1
  293. package/dist/_internal/plugin-manager/contribution-kind-plan.d.ts +2 -1
  294. package/dist/_internal/plugin-manager/contribution-kind-plan.js +6 -0
  295. package/dist/_internal/plugin-manager/contributions.js +10 -0
  296. package/dist/_internal/plugin-sdk/authoring-finding.d.ts +19 -0
  297. package/dist/_internal/plugin-sdk/authoring-finding.js +12 -0
  298. package/dist/_internal/plugin-sdk/fragment-audit.d.ts +14 -0
  299. package/dist/_internal/plugin-sdk/fragment-audit.js +170 -0
  300. package/dist/_internal/plugin-sdk/fragment-definition.d.ts +11 -0
  301. package/dist/_internal/plugin-sdk/fragment-definition.js +16 -0
  302. package/dist/_internal/plugin-sdk/index.d.ts +15 -0
  303. package/dist/_internal/plugin-sdk/index.js +15 -0
  304. package/dist/_internal/plugin-sdk/material-config-groups.d.ts +44 -0
  305. package/dist/_internal/plugin-sdk/material-config-groups.js +80 -0
  306. package/dist/_internal/plugin-sdk/material-editor-audit.d.ts +24 -0
  307. package/dist/_internal/plugin-sdk/material-editor-audit.js +160 -0
  308. package/dist/_internal/plugin-sdk/material-isolated-csp.d.ts +38 -0
  309. package/dist/_internal/plugin-sdk/material-isolated-csp.js +67 -0
  310. package/dist/_internal/plugin-sdk/material-isolated-runtime.d.ts +22 -0
  311. package/dist/_internal/plugin-sdk/material-isolated-runtime.js +262 -0
  312. package/dist/_internal/plugin-sdk/material-isolated.d.ts +94 -0
  313. package/dist/_internal/plugin-sdk/material-isolated.js +1024 -0
  314. package/dist/_internal/plugin-sdk/material-rendered-element.d.ts +77 -0
  315. package/dist/_internal/plugin-sdk/material-rendered-element.js +229 -0
  316. package/dist/_internal/plugin-sdk/material-spec-audit.d.ts +24 -0
  317. package/dist/_internal/plugin-sdk/material-spec-audit.js +204 -0
  318. package/dist/_internal/plugin-sdk/material-spec.d.ts +134 -0
  319. package/dist/_internal/plugin-sdk/material-spec.js +710 -0
  320. package/dist/_internal/plugin-sdk/material-style-keys.d.ts +17 -0
  321. package/dist/_internal/plugin-sdk/material-style-keys.js +82 -0
  322. package/dist/_internal/plugin-sdk/material-template-audit.d.ts +12 -0
  323. package/dist/_internal/plugin-sdk/material-template-audit.js +302 -0
  324. package/dist/_internal/plugin-sdk/material-template-expression.d.ts +98 -0
  325. package/dist/_internal/plugin-sdk/material-template-expression.js +549 -0
  326. package/dist/_internal/plugin-sdk/material-template-render.d.ts +32 -0
  327. package/dist/_internal/plugin-sdk/material-template-render.js +579 -0
  328. package/dist/_internal/plugin-sdk/material-template.d.ts +185 -0
  329. package/dist/_internal/plugin-sdk/material-template.js +879 -0
  330. package/dist/_internal/renderer/index.d.ts +2 -0
  331. package/dist/_internal/renderer/index.js +1745 -616
  332. package/dist/_internal/renderer/renderer/renderer-component-states.d.ts +34 -0
  333. package/dist/_internal/renderer/renderer/renderer-effective-style.d.ts +12 -6
  334. package/dist/_internal/renderer/renderer/renderer-material-dom.d.ts +19 -3
  335. package/dist/_internal/renderer/renderer/renderer-mounted-material.d.ts +11 -10
  336. package/dist/_internal/renderer/renderer/renderer-state.d.ts +17 -1
  337. package/dist/_internal/renderer/renderer/renderer-theme.d.ts +11 -0
  338. package/dist/_internal/renderer/renderer/renderer-types.d.ts +15 -5
  339. package/dist/_internal/renderer/renderer/renderer.d.ts +30 -9
  340. package/dist/_internal/renderer/resource/data-source-runtime.d.ts +25 -2
  341. package/dist/_internal/renderer/resource/push-window.d.ts +43 -0
  342. package/dist/_internal/renderer/resource/source-query-port.d.ts +8 -1
  343. package/dist/_internal/renderer/sub-canvas-layer.d.ts +83 -0
  344. package/dist/_internal/renderer/viewer/viewer-blueprint-timer-scheduler.d.ts +23 -0
  345. package/dist/_internal/renderer/viewer/viewer-configuration-guards.d.ts +0 -1
  346. package/dist/_internal/renderer/viewer/viewer-configuration.d.ts +6 -3
  347. package/dist/_internal/renderer/viewer/viewer-stale-style.d.ts +3 -0
  348. package/dist/_internal/renderer/viewer/viewer-variable-controller.d.ts +2 -0
  349. package/dist/_internal/renderer/viewer/viewer.d.ts +18 -7
  350. package/dist/_internal/sdk/auto-register.js +7 -7
  351. package/dist/_internal/sdk/designer-auto-register.js +3 -3
  352. package/dist/_internal/sdk/designer.d.ts +1 -1
  353. package/dist/_internal/sdk/designer.js +8 -8
  354. package/dist/_internal/sdk/host-tokens.css +12 -12
  355. package/dist/_internal/sdk/index.d.ts +1 -1
  356. package/dist/_internal/sdk/index.js +6 -6
  357. package/dist/auto-register.js +11 -11
  358. package/dist/auto-register.js.map +1 -1
  359. package/dist/contracts.js +73 -43
  360. package/dist/contracts.js.map +1 -1
  361. package/dist/contrast-DRPezUIl.js +131 -0
  362. package/dist/contrast-DRPezUIl.js.map +1 -0
  363. package/dist/core.js +169 -21
  364. package/dist/core.js.map +1 -1
  365. package/dist/{data-contracts-BFld0hw_.js → data-contracts-CnnB5KC9.js} +2 -2
  366. package/dist/{data-contracts-BFld0hw_.js.map → data-contracts-CnnB5KC9.js.map} +1 -1
  367. package/dist/dataset-port-D993nOlT.js +182 -0
  368. package/dist/dataset-port-D993nOlT.js.map +1 -0
  369. package/dist/dataset-profile-Dk6xdtsM.js +261 -0
  370. package/dist/dataset-profile-Dk6xdtsM.js.map +1 -0
  371. package/dist/{designer-Byw45cUM.js → designer-CFOvOmLn.js} +3 -3
  372. package/dist/designer-CFOvOmLn.js.map +1 -0
  373. package/dist/designer-auto-register.js +6 -6
  374. package/dist/designer-auto-register.js.map +1 -1
  375. package/dist/designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js +2773 -0
  376. package/dist/designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js.map +1 -0
  377. package/dist/{designer-dataset-controller-CPytVNBK-DWL3SRTP.js → designer-dataset-controller-DdbY4ILC-CMdGdGbr.js} +1471 -1158
  378. package/dist/designer-dataset-controller-DdbY4ILC-CMdGdGbr.js.map +1 -0
  379. package/dist/{designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js → designer-field-primitives-Crn464Qg-Bi7q8s5J.js} +914 -345
  380. package/dist/designer-field-primitives-Crn464Qg-Bi7q8s5J.js.map +1 -0
  381. package/dist/designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js +1265 -0
  382. package/dist/designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js.map +1 -0
  383. package/dist/designer.js +5 -5
  384. package/dist/dist-B2bW2Tru.js +3305 -0
  385. package/dist/dist-B2bW2Tru.js.map +1 -0
  386. package/dist/{dist-BHTClwId.js → dist-CHK9BTXX.js} +9148 -6234
  387. package/dist/dist-CHK9BTXX.js.map +1 -0
  388. package/dist/engine.js +5 -4
  389. package/dist/fragment-B-oP0Fru.js +393 -0
  390. package/dist/fragment-B-oP0Fru.js.map +1 -0
  391. package/dist/host-kit.js +4172 -102
  392. package/dist/host-kit.js.map +1 -1
  393. package/dist/{host-resource-selection-5Cf_gclK-Sv4Z8UXS.js → host-resource-selection-CWrPLVOc-DPDq3jau.js} +1233 -937
  394. package/dist/host-resource-selection-CWrPLVOc-DPDq3jau.js.map +1 -0
  395. package/dist/host-tokens.css +12 -12
  396. package/dist/index.js +10 -10
  397. package/dist/legibility-CS28ivEz.js +12 -0
  398. package/dist/legibility-CS28ivEz.js.map +1 -0
  399. package/dist/level-scale-CwHqFEVd.js +139 -0
  400. package/dist/level-scale-CwHqFEVd.js.map +1 -0
  401. package/dist/{manager-B2CZ2b5I.js → manager-CeB4Jnr9.js} +20 -10
  402. package/dist/manager-CeB4Jnr9.js.map +1 -0
  403. package/dist/material-DeVkzSoT.js +12 -0
  404. package/dist/{material-BPlvEmDi.js.map → material-DeVkzSoT.js.map} +1 -1
  405. package/dist/material-auto-register.js +6 -6
  406. package/dist/material-auto-register.js.map +1 -1
  407. package/dist/{material-definition-B9xCZcD-.js → material-definition-BeW34dJr.js} +2 -2
  408. package/dist/{material-definition-B9xCZcD-.js.map → material-definition-BeW34dJr.js.map} +1 -1
  409. package/dist/{material-manifest-bsGl6vZZ.js → material-manifest-B1XatGPx.js} +222 -137
  410. package/dist/material-manifest-B1XatGPx.js.map +1 -0
  411. package/dist/material-schema-CLoDx-Tl.js +203 -0
  412. package/dist/material-schema-CLoDx-Tl.js.map +1 -0
  413. package/dist/{editor-descriptor-schema-Be30Wv8w.js → material-theme-C91eus78.js} +90 -28
  414. package/dist/material-theme-C91eus78.js.map +1 -0
  415. package/dist/material-validation-utils-ku_6Xxk2.js +125 -0
  416. package/dist/material-validation-utils-ku_6Xxk2.js.map +1 -0
  417. package/dist/material.js +3 -3
  418. package/dist/migrate-document-BM888PtC.js +768 -0
  419. package/dist/migrate-document-BM888PtC.js.map +1 -0
  420. package/dist/parse-Ji7kE9ZT.js +2313 -0
  421. package/dist/parse-Ji7kE9ZT.js.map +1 -0
  422. package/dist/{parse-B0hwp_yj.js → parse-aZat9tAS.js} +69 -61
  423. package/dist/{parse-B0hwp_yj.js.map → parse-aZat9tAS.js.map} +1 -1
  424. package/dist/parse-parts-qzl4suzk.js +42 -0
  425. package/dist/parse-parts-qzl4suzk.js.map +1 -0
  426. package/dist/{plugin-B9Xxtw7G.js → plugin-CstHQ5ws.js} +140 -94
  427. package/dist/plugin-CstHQ5ws.js.map +1 -0
  428. package/dist/plugin-core.js +93 -8
  429. package/dist/plugin-core.js.map +1 -0
  430. package/dist/plugin-manager.js +1 -1
  431. package/dist/plugin-package-DWifuHi1.js +4206 -0
  432. package/dist/plugin-package-DWifuHi1.js.map +1 -0
  433. package/dist/{plugin-registration-BjS_CXJU.js → plugin-registration-DTwBvnHX.js} +4 -4
  434. package/dist/{plugin-registration-BjS_CXJU.js.map → plugin-registration-DTwBvnHX.js.map} +1 -1
  435. package/dist/plugin-sdk.js +6 -6
  436. package/dist/{plugins-B9bwk-t6.js → plugins-QDL0yIql.js} +2 -2
  437. package/dist/{plugins-B9bwk-t6.js.map → plugins-QDL0yIql.js.map} +1 -1
  438. package/dist/plugins.js +8 -8
  439. package/dist/renderer.js +1 -1
  440. package/dist/runtime-dispatch-C0gyIrTv.js +479 -0
  441. package/dist/runtime-dispatch-C0gyIrTv.js.map +1 -0
  442. package/dist/runtime-simulate-aSYO9yDX.js +147 -0
  443. package/dist/runtime-simulate-aSYO9yDX.js.map +1 -0
  444. package/dist/{src-Bm7u11mN-BMeb9fvV.js → src-Bm7u11mN-Bi1hDVkh.js} +30 -30
  445. package/dist/{src-Bm7u11mN-BMeb9fvV.js.map → src-Bm7u11mN-Bi1hDVkh.js.map} +1 -1
  446. package/dist/state-preset-DtpygJOH.js +22 -0
  447. package/dist/state-preset-DtpygJOH.js.map +1 -0
  448. package/dist/{text-BVzTcUas.js → text-BSTz0pFQ.js} +454 -360
  449. package/dist/text-BSTz0pFQ.js.map +1 -0
  450. package/dist/theme-CcBXf4Ay.js +48 -0
  451. package/dist/theme-CcBXf4Ay.js.map +1 -0
  452. package/dist/{value-ref-y4_YKUP5.js → value-ref-XkLuckGV.js} +2 -2
  453. package/dist/{value-ref-y4_YKUP5.js.map → value-ref-XkLuckGV.js.map} +1 -1
  454. package/dist/{viewer-CrJupI8I-DZZfdHXr.js → viewer-CrJupI8I-BJiz1cvW.js} +5 -5
  455. package/dist/{viewer-CrJupI8I-DZZfdHXr.js.map → viewer-CrJupI8I-BJiz1cvW.js.map} +1 -1
  456. package/dist/viewer-auto-register.js +2 -2
  457. package/dist/viewer.js +2 -2
  458. package/dist/viewport-BNIRWjiT.js +1207 -0
  459. package/dist/viewport-BNIRWjiT.js.map +1 -0
  460. package/package.json +12 -12
  461. package/dist/_internal/contracts/document/blueprint-relations.d.ts +0 -16
  462. package/dist/_internal/contracts/document/blueprint-relations.js +0 -196
  463. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-panel-mutations.d.ts +0 -5
  464. package/dist/_internal/engine/browser/controllers/designer-guard-controller.d.ts +0 -27
  465. package/dist/_internal/engine/browser/controllers/designer-scene-controller.d.ts +0 -47
  466. package/dist/_internal/engine/browser/controllers/panel/designer-style-rules-controller.d.ts +0 -12
  467. package/dist/_internal/engine/browser/dom/guard/designer-contrast-measure.d.ts +0 -24
  468. package/dist/_internal/engine/browser/dom/guard/designer-guard-dom.d.ts +0 -15
  469. package/dist/_internal/engine/browser/dom/workspace/designer-canvas-hint-dom.d.ts +0 -6
  470. package/dist/_internal/engine/browser/viewport/designer-canvas-snap-index.d.ts +0 -9
  471. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-connection.d.ts +0 -14
  472. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-mutation-helpers.d.ts +0 -20
  473. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-mutations.d.ts +0 -15
  474. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-node-ids.d.ts +0 -12
  475. package/dist/_internal/engine/common/operations/designer-name-validation.d.ts +0 -2
  476. package/dist/_internal/engine/common/operations/scene/designer-scene.d.ts +0 -55
  477. package/dist/_internal/engine/common/operations/style/designer-host-conditional-style.d.ts +0 -21
  478. package/dist/_internal/engine/common/operations/style/designer-style-rules.d.ts +0 -25
  479. package/dist/_internal/engine/common/validation/designer-guard.d.ts +0 -49
  480. package/dist/_internal/engine/designer-blueprint-workbench-panel-C2MoZwKA.js +0 -3548
  481. package/dist/_internal/engine/designer-element/api/designer-element-guard.d.ts +0 -13
  482. package/dist/_internal/engine/designer-element/api/designer-element-scene.d.ts +0 -14
  483. package/dist/_internal/engine/designer-left-panel-groups-dom-WMsH33zw.js +0 -573
  484. package/dist/_internal/engine/host-resource-selection-5Cf_gclK.js +0 -2188
  485. package/dist/_internal/renderer/style-rules.d.ts +0 -9
  486. package/dist/contrast-CZFqj1I5.js +0 -1050
  487. package/dist/contrast-CZFqj1I5.js.map +0 -1
  488. package/dist/dataset-port-CUsMmX2x.js +0 -65
  489. package/dist/dataset-port-CUsMmX2x.js.map +0 -1
  490. package/dist/designer-Byw45cUM.js.map +0 -1
  491. package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js +0 -3517
  492. package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js.map +0 -1
  493. package/dist/designer-dataset-controller-CPytVNBK-DWL3SRTP.js.map +0 -1
  494. package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js +0 -557
  495. package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js.map +0 -1
  496. package/dist/designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js.map +0 -1
  497. package/dist/dist-BHTClwId.js.map +0 -1
  498. package/dist/dist-DfAV2jGI.js +0 -2185
  499. package/dist/dist-DfAV2jGI.js.map +0 -1
  500. package/dist/editor-descriptor-schema-Be30Wv8w.js.map +0 -1
  501. package/dist/host-resource-selection-5Cf_gclK-Sv4Z8UXS.js.map +0 -1
  502. package/dist/manager-B2CZ2b5I.js.map +0 -1
  503. package/dist/material-BPlvEmDi.js +0 -12
  504. package/dist/material-manifest-bsGl6vZZ.js.map +0 -1
  505. package/dist/material-schema-CtxTkCP2.js +0 -267
  506. package/dist/material-schema-CtxTkCP2.js.map +0 -1
  507. package/dist/migrate-document-BJUN7NPv.js +0 -436
  508. package/dist/migrate-document-BJUN7NPv.js.map +0 -1
  509. package/dist/parse-BQw3u9_4.js +0 -1126
  510. package/dist/parse-BQw3u9_4.js.map +0 -1
  511. package/dist/plugin-B9Xxtw7G.js.map +0 -1
  512. package/dist/plugin-package-BT-pCoTt.js +0 -174
  513. package/dist/plugin-package-BT-pCoTt.js.map +0 -1
  514. package/dist/runtime-dispatch-Dt9fhcI5.js +0 -360
  515. package/dist/runtime-dispatch-Dt9fhcI5.js.map +0 -1
  516. package/dist/schema-C38FI_z2.js +0 -541
  517. package/dist/schema-C38FI_z2.js.map +0 -1
  518. package/dist/text-BVzTcUas.js.map +0 -1
@@ -0,0 +1,1282 @@
1
+ import { A as e, C as t, O as n, T as r, m as i, x as a, y as o } from "./designer-field-primitives-Crn464Qg.js";
2
+ import { MAX_BLUEPRINT_NODE_NAME_CODE_POINTS as s, SCREEN_BLUEPRINT_PORT_PATTERN as c, isScreenBlueprintInputPort as l, isScreenBlueprintOutputPort as u, parseScreenJsonValue as d, readScreenBlueprintActionPort as f, screenBlueprintEdgeFieldRule as p } from "@base-screen/contracts";
3
+ //#region src/common/tools/designer-json-snapshot.ts
4
+ function m(e) {
5
+ return h(JSON.parse(JSON.stringify(e)));
6
+ }
7
+ function h(e) {
8
+ if (typeof e == "object" && e && !Object.isFrozen(e)) {
9
+ for (let t of Object.values(e)) h(t);
10
+ Object.freeze(e);
11
+ }
12
+ return e;
13
+ }
14
+ //#endregion
15
+ //#region src/common/operations/blueprint/designer-blueprint-graph.ts
16
+ var ee = "host", te = "lifecycle", ne = {
17
+ effect: "fade",
18
+ durationMs: 200,
19
+ easing: "ease-in-out-quad"
20
+ }, re = {
21
+ left: {
22
+ kind: "event-payload",
23
+ path: []
24
+ },
25
+ operator: "exists"
26
+ };
27
+ function ie(e) {
28
+ return `component:${e}`;
29
+ }
30
+ function ae(e) {
31
+ return `variable:${e}`;
32
+ }
33
+ function g(e, t) {
34
+ return e.nodes.find((e) => e.id === t);
35
+ }
36
+ function _(e, t) {
37
+ return e.edges.find((e) => e.id === t);
38
+ }
39
+ function v(e, t) {
40
+ return e.nodes.find((e) => e.kind === "component" && e.componentId === t);
41
+ }
42
+ function oe(e) {
43
+ return `canvas:${e}`;
44
+ }
45
+ var se = "main-canvas";
46
+ function ce(e, t) {
47
+ return e.nodes.find((e) => e.kind === "sub-canvas" && e.canvasId === t);
48
+ }
49
+ function y(e, t) {
50
+ return e.nodes.find((e) => e.kind === "variable" && e.variableId === t);
51
+ }
52
+ function b(e, t) {
53
+ let n = /* @__PURE__ */ new Set();
54
+ for (let t of e.nodes) n.add(t.id);
55
+ for (let t of e.edges) n.add(t.id);
56
+ for (let e = 1;; e++) {
57
+ let r = `${t}-${e}`;
58
+ if (!n.has(r)) return r;
59
+ }
60
+ }
61
+ function x(e, t, n) {
62
+ return e.nodes.some((e) => e.id === t) || e.edges.some((e) => e.id === t) ? b(e, n) : t;
63
+ }
64
+ function le(e, t, n) {
65
+ let r = e.blueprint, i, a;
66
+ switch (t.kind) {
67
+ case "component":
68
+ if (!e.components.some((e) => e.id === t.componentId)) return null;
69
+ i = v(r, t.componentId), a = {
70
+ kind: "component",
71
+ id: x(r, ie(t.componentId), "component"),
72
+ componentId: t.componentId
73
+ };
74
+ break;
75
+ case "variable":
76
+ if (!e.variables.some((e) => e.id === t.variableId)) return null;
77
+ i = y(r, t.variableId), a = {
78
+ kind: "variable",
79
+ id: x(r, ae(t.variableId), "variable"),
80
+ variableId: t.variableId
81
+ };
82
+ break;
83
+ case "sub-canvas":
84
+ if (!(e.subCanvases ?? []).some((e) => e.id === t.canvasId)) return null;
85
+ i = ce(r, t.canvasId), a = {
86
+ kind: "sub-canvas",
87
+ id: x(r, oe(t.canvasId), "canvas"),
88
+ canvasId: t.canvasId
89
+ };
90
+ break;
91
+ case "host":
92
+ case "lifecycle":
93
+ case "main-canvas":
94
+ i = r.nodes.find((e) => e.kind === t.kind), a = {
95
+ kind: t.kind,
96
+ id: x(r, t.kind === "host" ? ee : t.kind === "lifecycle" ? te : se, t.kind)
97
+ };
98
+ break;
99
+ case "timer": {
100
+ let e = t.intervalSeconds ?? 5;
101
+ if (!E(e)) return null;
102
+ a = {
103
+ kind: "timer",
104
+ id: b(r, "timer"),
105
+ intervalSeconds: e,
106
+ ...t.name === void 0 ? {} : { name: t.name }
107
+ };
108
+ break;
109
+ }
110
+ case "condition": a = {
111
+ kind: "condition",
112
+ id: b(r, "condition"),
113
+ condition: t.condition ?? re,
114
+ ...t.name === void 0 ? {} : { name: t.name }
115
+ };
116
+ }
117
+ if (i !== void 0) return {
118
+ blueprint: n === void 0 ? r : O(r, i.id, n),
119
+ nodeId: i.id,
120
+ created: !1
121
+ };
122
+ let o = {
123
+ ...r,
124
+ nodes: [...r.nodes, a]
125
+ };
126
+ return {
127
+ blueprint: n === void 0 ? o : O(o, a.id, n),
128
+ nodeId: a.id,
129
+ created: !0
130
+ };
131
+ }
132
+ function ue(e, t, n, r) {
133
+ let i = g(e, t.node), a = g(e, n.node);
134
+ if (i === void 0 || a === void 0 || i.id === a.id) return {
135
+ ok: !1,
136
+ reason: "invalid"
137
+ };
138
+ if (t.port === "semantic" || n.port === "semantic") {
139
+ if (i.kind !== "component" || a.kind !== "component" || t.port !== "semantic" || n.port !== "semantic") return {
140
+ ok: !1,
141
+ reason: "invalid"
142
+ };
143
+ if (e.edges.some((e) => e.kind === "semantic" && e.from.node === i.id && e.to.node === a.id)) return {
144
+ ok: !1,
145
+ reason: "duplicate"
146
+ };
147
+ let r = b(e, "semantic");
148
+ return {
149
+ ok: !0,
150
+ edgeId: r,
151
+ blueprint: {
152
+ ...e,
153
+ edges: [...e.edges, {
154
+ kind: "semantic",
155
+ id: r,
156
+ from: { node: i.id },
157
+ to: { node: a.id },
158
+ role: "related"
159
+ }]
160
+ }
161
+ };
162
+ }
163
+ if (!u(i.kind, t.port) || !l(a.kind, n.port)) return {
164
+ ok: !1,
165
+ reason: "invalid"
166
+ };
167
+ let o = i.kind === "component" ? r.componentStateIds?.(i.componentId) ?? [] : [], s = a.kind === "component" ? r.componentStateIds?.(a.componentId) ?? [] : [];
168
+ if (i.kind === "component") {
169
+ if (t.port === "state-changed") {
170
+ if (o.length === 0) return {
171
+ ok: !1,
172
+ reason: "unavailable"
173
+ };
174
+ } else if (!r.isEventAvailable(i.componentId, t.port.slice(6))) return {
175
+ ok: !1,
176
+ reason: "unavailable"
177
+ };
178
+ }
179
+ if (a.kind === "component" && (n.port === "set-state" || n.port === "reset-state") && s.length === 0) return {
180
+ ok: !1,
181
+ reason: "unavailable"
182
+ };
183
+ let c = f(n.port);
184
+ if (a.kind === "host" && c !== void 0 && !r.isHostActionAvailable(c)) return {
185
+ ok: !1,
186
+ reason: "unavailable"
187
+ };
188
+ if (e.edges.some((e) => e.kind === "flow" && e.from.node === i.id && e.from.port === t.port && e.to.node === a.id && e.to.port === n.port)) return {
189
+ ok: !1,
190
+ reason: "duplicate"
191
+ };
192
+ if (i.kind === "condition" && a.kind === "condition" && de(e, a.id, i.id)) return {
193
+ ok: !1,
194
+ reason: "cycle"
195
+ };
196
+ let d = p(a.kind, n.port), m = b(e, "edge"), h = {
197
+ kind: "flow",
198
+ id: m,
199
+ from: {
200
+ node: i.id,
201
+ port: t.port
202
+ },
203
+ to: {
204
+ node: a.id,
205
+ port: n.port
206
+ },
207
+ ...d.value === "required" ? { value: {
208
+ kind: "event-payload",
209
+ path: []
210
+ } } : {},
211
+ ...d.payload === "required" ? { payload: {
212
+ kind: "event-payload",
213
+ path: []
214
+ } } : {},
215
+ ...d.transition === "optional" ? { transition: ne } : {},
216
+ ...d.stateId === "required" ? { stateId: s[0] } : {}
217
+ };
218
+ return {
219
+ ok: !0,
220
+ edgeId: m,
221
+ blueprint: {
222
+ ...e,
223
+ edges: [...e.edges, h]
224
+ }
225
+ };
226
+ }
227
+ function de(e, t, n) {
228
+ let r = new Map(e.nodes.map((e) => [e.id, e.kind])), i = [t], a = /* @__PURE__ */ new Set();
229
+ for (; i.length > 0;) {
230
+ let t = i.pop();
231
+ if (t === n) return !0;
232
+ if (!a.has(t)) {
233
+ a.add(t);
234
+ for (let n of e.edges) n.kind === "flow" && n.from.node === t && r.get(n.to.node) === "condition" && i.push(n.to.node);
235
+ }
236
+ }
237
+ return !1;
238
+ }
239
+ function S(e, t) {
240
+ return e.nodes.some((e) => t.has(e.id)) ? k({
241
+ ...e,
242
+ nodes: e.nodes.filter((e) => !t.has(e.id)),
243
+ edges: e.edges.filter((e) => !t.has(e.from.node) && !t.has(e.to.node))
244
+ }, e.layout?.nodes.filter((e) => !t.has(e.id))) : e;
245
+ }
246
+ function fe(e, t) {
247
+ return e.edges.some((e) => t.has(e.id)) ? {
248
+ ...e,
249
+ edges: e.edges.filter((e) => !t.has(e.id))
250
+ } : e;
251
+ }
252
+ function pe(e, t) {
253
+ let n = new Set(t.nodes), r = new Set(t.edges), i = fe(S(e, n), r);
254
+ return i === e ? null : i;
255
+ }
256
+ function me(e, t) {
257
+ let n = /* @__PURE__ */ new Set();
258
+ for (let r of e.nodes) r.kind === "component" && t.componentIds?.has(r.componentId) && n.add(r.id), r.kind === "sub-canvas" && t.subCanvasIds?.has(r.canvasId) && n.add(r.id), r.kind === "variable" && t.variableIds?.has(r.variableId) && n.add(r.id);
259
+ return n.size === 0 ? e : S(e, n);
260
+ }
261
+ function C(e, t, n) {
262
+ let r = g(e, t);
263
+ if (r === void 0) return null;
264
+ let i;
265
+ switch (n.type) {
266
+ case "name": {
267
+ if (r.kind !== "timer" && r.kind !== "condition") return null;
268
+ let { name: e, ...t } = r, a = n.name?.trim() ?? "";
269
+ i = a === "" ? t : {
270
+ ...t,
271
+ name: a
272
+ };
273
+ break;
274
+ }
275
+ case "interval":
276
+ if (r.kind !== "timer" || !E(n.intervalSeconds)) return null;
277
+ i = {
278
+ ...r,
279
+ intervalSeconds: n.intervalSeconds
280
+ };
281
+ break;
282
+ case "condition":
283
+ if (r.kind !== "condition") return null;
284
+ i = {
285
+ ...r,
286
+ condition: n.condition
287
+ };
288
+ break;
289
+ case "enabled": {
290
+ let { enabled: e, ...t } = r;
291
+ i = n.enabled ? t : {
292
+ ...t,
293
+ enabled: !1
294
+ };
295
+ break;
296
+ }
297
+ }
298
+ return Ee(e, i);
299
+ }
300
+ function he(e, t, n) {
301
+ let r = e;
302
+ for (let e of t) r = C(r, e, {
303
+ type: "enabled",
304
+ enabled: n
305
+ }) ?? r;
306
+ return r;
307
+ }
308
+ function ge(e, t, n) {
309
+ let r = _(e, t);
310
+ if (r === void 0) return null;
311
+ if (n.type === "role") return r.kind === "semantic" ? D(e, {
312
+ ...r,
313
+ role: n.role
314
+ }) : null;
315
+ if (r.kind !== "flow") return null;
316
+ let i = g(e, r.to.node);
317
+ if (i === void 0) return null;
318
+ let a = p(i.kind, r.to.port);
319
+ switch (n.type) {
320
+ case "value": return a.value === "required" ? D(e, {
321
+ ...r,
322
+ value: n.value
323
+ }) : null;
324
+ case "payload": {
325
+ if (a.payload === "forbidden") return null;
326
+ if (n.payload !== null) return D(e, {
327
+ ...r,
328
+ payload: n.payload
329
+ });
330
+ if (a.payload !== "optional") return null;
331
+ let { payload: t, ...i } = r;
332
+ return D(e, i);
333
+ }
334
+ case "transition": {
335
+ if (a.transition !== "optional") return null;
336
+ let { transition: t, ...i } = r;
337
+ return D(e, n.transition === null ? i : {
338
+ ...i,
339
+ transition: n.transition
340
+ });
341
+ }
342
+ case "state": return a.stateId === "required" ? D(e, {
343
+ ...r,
344
+ stateId: n.stateId
345
+ }) : null;
346
+ case "target-port": {
347
+ if (!l(i.kind, n.port) || e.edges.some((e) => e.kind === "flow" && e.id !== r.id && e.from.node === r.from.node && e.from.port === r.from.port && e.to.node === r.to.node && e.to.port === n.port)) return null;
348
+ let t = p(i.kind, n.port), { value: a, payload: o, transition: s, stateId: c, ...u } = r, d = c ?? n.stateId;
349
+ return t.stateId === "required" && d === void 0 ? null : D(e, {
350
+ ...u,
351
+ to: {
352
+ node: r.to.node,
353
+ port: n.port
354
+ },
355
+ ...t.value === "required" ? { value: a ?? {
356
+ kind: "event-payload",
357
+ path: []
358
+ } } : {},
359
+ ...t.payload === "required" ? { payload: o ?? {
360
+ kind: "event-payload",
361
+ path: []
362
+ } } : t.payload === "optional" && o !== void 0 ? { payload: o } : {},
363
+ ...t.transition === "optional" && s !== void 0 ? { transition: s } : {},
364
+ ...t.stateId === "required" ? { stateId: d } : {}
365
+ });
366
+ }
367
+ }
368
+ }
369
+ function _e(e, t, n) {
370
+ let r = e.edges.findIndex((e) => e.id === t), i = e.edges[r];
371
+ if (i === void 0 || i.kind !== "flow") return null;
372
+ let a = e.edges.map((e, t) => ({
373
+ candidate: e,
374
+ position: t
375
+ })).filter(({ candidate: e }) => e.kind === "flow" && e.from.node === i.from.node && e.from.port === i.from.port), o = a.findIndex(({ position: e }) => e === r), s = a[n === "earlier" ? o - 1 : o + 1];
376
+ if (s === void 0) return null;
377
+ let c = [...e.edges];
378
+ return c[r] = s.candidate, c[s.position] = i, {
379
+ ...e,
380
+ edges: c
381
+ };
382
+ }
383
+ function ve(e, t) {
384
+ let n = _(e, t);
385
+ if (n === void 0 || n.kind !== "flow") return;
386
+ let r = e.edges.filter((e) => e.kind === "flow" && e.from.node === n.from.node && e.from.port === n.from.port);
387
+ return {
388
+ order: r.indexOf(n) + 1,
389
+ count: r.length
390
+ };
391
+ }
392
+ function ye(e, t, n = {
393
+ x: 32,
394
+ y: 32
395
+ }) {
396
+ let r = e.nodes.filter((e) => t.includes(e.id) && (e.kind === "timer" || e.kind === "condition"));
397
+ if (r.length === 0) return null;
398
+ let i = e, a = /* @__PURE__ */ new Map();
399
+ for (let t of r) {
400
+ let r = b(i, t.kind);
401
+ a.set(t.id, r), i = {
402
+ ...i,
403
+ nodes: [...i.nodes, {
404
+ ...t,
405
+ id: r
406
+ }]
407
+ };
408
+ let o = e.layout?.nodes.find((e) => e.id === t.id);
409
+ o !== void 0 && (i = O(i, r, {
410
+ x: o.x + n.x,
411
+ y: o.y + n.y
412
+ }));
413
+ }
414
+ for (let t of e.edges) {
415
+ if (t.kind !== "flow") continue;
416
+ let e = a.get(t.from.node), n = a.get(t.to.node);
417
+ e !== void 0 && n !== void 0 && (i = {
418
+ ...i,
419
+ edges: [...i.edges, {
420
+ ...t,
421
+ id: b(i, "edge"),
422
+ from: {
423
+ node: e,
424
+ port: t.from.port
425
+ },
426
+ to: {
427
+ node: n,
428
+ port: t.to.port
429
+ }
430
+ }]
431
+ });
432
+ }
433
+ return {
434
+ blueprint: i,
435
+ nodeIds: [...a.values()]
436
+ };
437
+ }
438
+ function be(e, t, n) {
439
+ let r = new Set(e.nodes.map((e) => e.id)), i = n ?? e.layout?.viewport;
440
+ return {
441
+ ...e,
442
+ layout: {
443
+ nodes: t.filter((e) => r.has(e.id)),
444
+ ...i === void 0 ? {} : { viewport: i }
445
+ }
446
+ };
447
+ }
448
+ function xe(e, t) {
449
+ return {
450
+ ...e,
451
+ layout: {
452
+ nodes: e.layout?.nodes ?? [],
453
+ viewport: t
454
+ }
455
+ };
456
+ }
457
+ function Se(e, t) {
458
+ let n = _(e, t);
459
+ if (n === void 0 || n.kind !== "flow") return [];
460
+ let r = [], i = /* @__PURE__ */ new Set(), a = (t, n) => {
461
+ let o = g(e, t);
462
+ if (o !== void 0) {
463
+ if (o.kind !== "condition") {
464
+ r.some((e) => e.node.id === o.id && e.port === n) || r.push({
465
+ node: o,
466
+ port: n
467
+ });
468
+ return;
469
+ }
470
+ if (!i.has(o.id)) {
471
+ i.add(o.id);
472
+ for (let t of e.edges) t.kind === "flow" && t.to.node === o.id && a(t.from.node, t.from.port);
473
+ }
474
+ }
475
+ };
476
+ return a(n.from.node, n.from.port), r;
477
+ }
478
+ function Ce(e) {
479
+ let t = new Map(e.nodes.map((e) => [e.id, e.kind]));
480
+ return (e) => t.get(e);
481
+ }
482
+ function we(e, t, n) {
483
+ let r = e, i = /* @__PURE__ */ new Map();
484
+ for (let e of t.nodes) {
485
+ if (e.kind === "host" || e.kind === "lifecycle") {
486
+ let t = r.nodes.find((t) => t.kind === e.kind);
487
+ if (t !== void 0) {
488
+ i.set(e.id, t.id);
489
+ continue;
490
+ }
491
+ }
492
+ let t = T(r, e.id);
493
+ i.set(e.id, t);
494
+ let a = e.kind === "component" ? {
495
+ ...e,
496
+ id: t,
497
+ componentId: n.get(e.componentId) ?? e.componentId
498
+ } : {
499
+ ...e,
500
+ id: t
501
+ };
502
+ r = {
503
+ ...r,
504
+ nodes: [...r.nodes, a]
505
+ };
506
+ }
507
+ let a = [];
508
+ for (let e of t.edges) {
509
+ let t = i.get(e.from.node), n = i.get(e.to.node);
510
+ if (t === void 0 || n === void 0 || r.edges.some((r) => r.kind === e.kind && r.from.node === t && r.to.node === n && (r.kind === "semantic" || e.kind === "flow" && r.from.port === e.from.port && r.to.port === e.to.port))) continue;
511
+ let o = T(r, e.id);
512
+ a.push(o);
513
+ let s = e.kind === "semantic" ? {
514
+ ...e,
515
+ id: o,
516
+ from: { node: t },
517
+ to: { node: n }
518
+ } : {
519
+ ...e,
520
+ id: o,
521
+ from: {
522
+ node: t,
523
+ port: e.from.port
524
+ },
525
+ to: {
526
+ node: n,
527
+ port: e.to.port
528
+ }
529
+ };
530
+ r = {
531
+ ...r,
532
+ edges: [...r.edges, s]
533
+ };
534
+ }
535
+ return {
536
+ blueprint: r,
537
+ edgeIds: a
538
+ };
539
+ }
540
+ function Te(e, t) {
541
+ let n = new Map(e.nodes.map((e) => [e.id, e])), r = (e) => e !== void 0 && e.kind !== "variable" && e.kind !== "sub-canvas" && e.kind !== "main-canvas" && (e.kind !== "component" || t.has(e.componentId)), i = (e) => e?.kind === "component" && t.has(e.componentId), a = [], o = 0;
542
+ for (let t of e.edges) {
543
+ let e = n.get(t.from.node), s = n.get(t.to.node);
544
+ if (!i(e) && !i(s) && !(r(e) && r(s))) continue;
545
+ let c = t.kind === "flow" && (t.value !== void 0 && w(t.value) || t.payload !== void 0 && w(t.payload));
546
+ if (!r(e) || !r(s) || c) {
547
+ (i(e) || i(s)) && o++;
548
+ continue;
549
+ }
550
+ a.push(t);
551
+ }
552
+ let s = /* @__PURE__ */ new Set(), c = !0;
553
+ for (let t of e.nodes) i(t) && s.add(t.id);
554
+ for (; c;) {
555
+ c = !1;
556
+ for (let e of a) s.has(e.from.node) !== s.has(e.to.node) && (s.add(e.from.node), s.add(e.to.node), c = !0);
557
+ }
558
+ let l = a.filter((e) => s.has(e.from.node) && s.has(e.to.node)), u = new Set(e.nodes.filter((e) => e.kind === "condition" && (w(e.condition.left) || e.condition.right !== void 0 && w(e.condition.right))).map((e) => e.id)), d = l.filter((e) => !u.has(e.from.node) && !u.has(e.to.node));
559
+ o += l.length - d.length;
560
+ let f = /* @__PURE__ */ new Set();
561
+ for (let t of e.nodes) i(t) && f.add(t.id);
562
+ for (let e of d) f.add(e.from.node), f.add(e.to.node);
563
+ return {
564
+ nodes: e.nodes.filter((e) => f.has(e.id) && !u.has(e.id)).map((e) => e.kind === "component" ? {
565
+ ...e,
566
+ componentId: t.get(e.componentId) ?? e.componentId
567
+ } : e),
568
+ edges: d,
569
+ dropped: o
570
+ };
571
+ }
572
+ function w(e) {
573
+ return e.kind === "variable" ? !0 : e.kind === "array" ? e.items.some(w) : e.kind === "object" && Object.values(e.properties).some(w);
574
+ }
575
+ function T(e, t) {
576
+ let n = (t) => e.nodes.some((e) => e.id === t) || e.edges.some((e) => e.id === t);
577
+ if (!n(t)) return t;
578
+ for (let r = 2;; r++) {
579
+ let i = `${t}-${r}`;
580
+ if (i.length <= 128 && !n(i)) return i;
581
+ if (i.length > 128) return b(e, "node");
582
+ }
583
+ }
584
+ function E(e) {
585
+ return Number.isInteger(e) && e >= 1 && e <= 86400;
586
+ }
587
+ function Ee(e, t) {
588
+ return {
589
+ ...e,
590
+ nodes: e.nodes.map((e) => e.id === t.id ? t : e)
591
+ };
592
+ }
593
+ function D(e, t) {
594
+ return {
595
+ ...e,
596
+ edges: e.edges.map((e) => e.id === t.id ? t : e)
597
+ };
598
+ }
599
+ function O(e, t, n) {
600
+ let r = e.layout?.nodes ?? [], i = {
601
+ id: t,
602
+ x: Math.round(n.x),
603
+ y: Math.round(n.y)
604
+ };
605
+ return k(e, r.some((e) => e.id === t) ? r.map((e) => e.id === t ? {
606
+ ...e,
607
+ ...i
608
+ } : e) : [...r, i]);
609
+ }
610
+ function k(e, t) {
611
+ return t === void 0 ? e : {
612
+ ...e,
613
+ layout: {
614
+ nodes: t,
615
+ ...e.layout?.viewport === void 0 ? {} : { viewport: e.layout.viewport }
616
+ }
617
+ };
618
+ }
619
+ //#endregion
620
+ //#region src/common/operations/workbench/designer-left-panel-groups.ts
621
+ var De = "base-screen-designer-left-panel-group-change", A = "base-screen-designer-left-panel-", Oe = [
622
+ "chart-bar",
623
+ "cube",
624
+ "grid",
625
+ "image",
626
+ "map",
627
+ "rect",
628
+ "shapes",
629
+ "sparkle",
630
+ "table",
631
+ "terminal",
632
+ "type",
633
+ "variable"
634
+ ], ke = /* @__PURE__ */ new Set([
635
+ "id",
636
+ "label",
637
+ "icon",
638
+ "workbenchModes"
639
+ ]), Ae = new Set(Oe), je = /* @__PURE__ */ new Set(["canvas", "blueprint"]), Me = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/, Ne = /[\u0000-\u001f\u007f-\u009f]/u, Pe = /* @__PURE__ */ new Set([
640
+ "layers",
641
+ "materials",
642
+ "variables"
643
+ ]), j = 6, Fe = 64, Ie = 48;
644
+ function Le(e) {
645
+ let t = d(e);
646
+ if (!t.ok) return t;
647
+ if (!Array.isArray(t.value)) return P([], "Designer left panel groups must be an array.");
648
+ if (t.value.length > j) return P([], `Designer left panel groups support at most ${j} entries.`);
649
+ let n = [], r = /* @__PURE__ */ new Set(), i = [];
650
+ for (let [e, a] of t.value.entries()) {
651
+ let t = Re(a, e, r, n);
652
+ t !== void 0 && i.push(t);
653
+ }
654
+ return n.length === 0 ? {
655
+ ok: !0,
656
+ value: Object.freeze(i),
657
+ diagnostics: []
658
+ } : {
659
+ ok: !1,
660
+ diagnostics: n
661
+ };
662
+ }
663
+ function M(e) {
664
+ return `${A}${e}`;
665
+ }
666
+ function N(e, t) {
667
+ return e.workbenchModes?.includes(t) ?? t === "canvas";
668
+ }
669
+ function Re(e, t, n, r) {
670
+ let i = [t];
671
+ if (!Ue(e)) {
672
+ r.push(F(i, "Designer left panel group must be an object."));
673
+ return;
674
+ }
675
+ for (let t of Object.keys(e)) ke.has(t) || r.push(F([...i, t], "Designer left panel group contains an unknown field."));
676
+ let a = ze(e.id, [...i, "id"], n, r), o = Be(e.label, [...i, "label"], r), s = Ve(e.icon, [...i, "icon"], r), c = He(e.workbenchModes, [...i, "workbenchModes"], r);
677
+ if (!(a === void 0 || o === void 0 || e.icon !== void 0 && s === void 0 || e.workbenchModes !== void 0 && c === void 0)) return Object.freeze({
678
+ id: a,
679
+ label: o,
680
+ ...s === void 0 ? {} : { icon: s },
681
+ ...c === void 0 ? {} : { workbenchModes: c }
682
+ });
683
+ }
684
+ function ze(e, t, n, r) {
685
+ if (typeof e != "string" || [...e].length > Fe || !Me.test(e) || Pe.has(e)) {
686
+ r.push(F(t, "Designer left panel group id is invalid or reserved."));
687
+ return;
688
+ }
689
+ if (n.has(e)) {
690
+ r.push(F(t, "Designer left panel group id must be unique."));
691
+ return;
692
+ }
693
+ return n.add(e), e;
694
+ }
695
+ function Be(e, t, n) {
696
+ if (typeof e != "string" || e.trim() !== e || e.length === 0 || Ne.test(e) || [...e].length > Ie) {
697
+ n.push(F(t, "Designer left panel group label is invalid."));
698
+ return;
699
+ }
700
+ return e;
701
+ }
702
+ function Ve(e, t, n) {
703
+ if (e !== void 0) {
704
+ if (typeof e != "string" || !Ae.has(e)) {
705
+ n.push(F(t, "Designer left panel group icon is invalid."));
706
+ return;
707
+ }
708
+ return e;
709
+ }
710
+ }
711
+ function He(e, t, n) {
712
+ if (e === void 0) return;
713
+ if (!Array.isArray(e) || e.length === 0 || e.length > je.size) {
714
+ n.push(F(t, "Designer left panel workbench modes are invalid."));
715
+ return;
716
+ }
717
+ let r = /* @__PURE__ */ new Set();
718
+ for (let [i, a] of e.entries()) {
719
+ if (typeof a != "string" || !je.has(a)) {
720
+ n.push(F([...t, i], "Designer left panel workbench mode is invalid."));
721
+ return;
722
+ }
723
+ if (r.has(a)) {
724
+ n.push(F([...t, i], "Designer left panel workbench mode must be unique."));
725
+ return;
726
+ }
727
+ r.add(a);
728
+ }
729
+ return Object.freeze([...r]);
730
+ }
731
+ function Ue(e) {
732
+ return typeof e == "object" && !!e && !Array.isArray(e);
733
+ }
734
+ function P(e, t) {
735
+ return {
736
+ ok: !1,
737
+ diagnostics: [F(e, t)]
738
+ };
739
+ }
740
+ function F(e, t) {
741
+ return {
742
+ severity: "error",
743
+ code: "PLUGIN_CORE_LIFECYCLE_INVALID",
744
+ path: e,
745
+ message: t
746
+ };
747
+ }
748
+ //#endregion
749
+ //#region src/common/operations/blueprint/designer-blueprint-protocol-guards.ts
750
+ var We = 256, Ge = 1e6;
751
+ function I(e) {
752
+ return typeof e == "object" && !!e && !Array.isArray(e);
753
+ }
754
+ function L(e) {
755
+ return R(e, We);
756
+ }
757
+ function R(e, t) {
758
+ return typeof e == "string" && e.length > 0 && e.length <= t;
759
+ }
760
+ function z(e) {
761
+ return typeof e == "number" && Number.isInteger(e) && e >= 0;
762
+ }
763
+ function B(e) {
764
+ return typeof e == "number" && Number.isFinite(e) && Math.abs(e) <= Ge;
765
+ }
766
+ function V(e, t) {
767
+ return Object.keys(e).find((e) => !t.has(e));
768
+ }
769
+ function H(e) {
770
+ return Math.round(e * 100) / 100;
771
+ }
772
+ function U(e) {
773
+ return {
774
+ ok: !0,
775
+ value: e,
776
+ diagnostics: []
777
+ };
778
+ }
779
+ function W(e, t, n = !1) {
780
+ return {
781
+ ok: !1,
782
+ diagnostics: [{
783
+ severity: "error",
784
+ code: n ? "AUTHORING_LIMIT_EXCEEDED" : "AUTHORING_REQUEST_INVALID",
785
+ path: e,
786
+ message: t
787
+ }]
788
+ };
789
+ }
790
+ //#endregion
791
+ //#region src/common/operations/blueprint/designer-blueprint-protocol-types.ts
792
+ var Ke = "base-screen-designer-blueprint-canvas", qe = "base-screen-blueprint-canvas-state", Je = "base-screen-blueprint-canvas-command", Ye = "application/x-base-screen-blueprint-node", Xe = "base-screen-designer-workbench-mode-change", Ze = {
793
+ nodes: [],
794
+ edges: []
795
+ }, Qe = 128, $e = 4096, et = 262144, tt = s * 2, G = /* @__PURE__ */ new Set([
796
+ "type",
797
+ "commandId",
798
+ "generation",
799
+ "documentRevision"
800
+ ]);
801
+ function nt(e) {
802
+ if (!I(e)) return W([], "Blueprint canvas command must be an object.");
803
+ if (!R(e.commandId, Qe)) return W(["commandId"], "Blueprint canvas command id is invalid.");
804
+ if (!z(e.generation)) return W(["generation"], "Blueprint canvas generation is invalid.");
805
+ if (!z(e.documentRevision)) return W(["documentRevision"], "Blueprint document revision is invalid.");
806
+ let t = {
807
+ commandId: e.commandId,
808
+ generation: e.generation,
809
+ documentRevision: e.documentRevision
810
+ };
811
+ switch (e.type) {
812
+ case "ready":
813
+ case "history-undo":
814
+ case "history-redo":
815
+ case "clear-simulation": {
816
+ let n = V(e, G);
817
+ return n === void 0 ? U({
818
+ ...t,
819
+ type: e.type
820
+ }) : W([n], "Unknown Blueprint canvas command field.");
821
+ }
822
+ case "select":
823
+ case "delete-selection": {
824
+ let n = V(e, /* @__PURE__ */ new Set([...G, "selection"]));
825
+ if (n !== void 0) return W([n], "Unknown selection command field.");
826
+ let r = st(e.selection);
827
+ return r.ok ? e.type === "delete-selection" && r.value.nodes.length === 0 && r.value.edges.length === 0 ? W(["selection"], "Selection is required.") : U({
828
+ ...t,
829
+ type: e.type,
830
+ selection: r.value
831
+ }) : r;
832
+ }
833
+ case "connect": {
834
+ let n = V(e, /* @__PURE__ */ new Set([
835
+ ...G,
836
+ "from",
837
+ "to"
838
+ ]));
839
+ if (n !== void 0) return W([n], "Unknown connection command field.");
840
+ let r = at(e.from), i = at(e.to);
841
+ return r === void 0 || i === void 0 ? W([], "Blueprint connection command is invalid.") : U({
842
+ ...t,
843
+ type: e.type,
844
+ from: r,
845
+ to: i
846
+ });
847
+ }
848
+ case "insert-node": {
849
+ let n = {
850
+ component: ["componentId"],
851
+ variable: ["variableId"],
852
+ "sub-canvas": ["canvasId"],
853
+ "main-canvas": [],
854
+ host: [],
855
+ lifecycle: [],
856
+ timer: ["intervalSeconds"],
857
+ condition: []
858
+ }, r = typeof e.kind == "string" ? e.kind : "", i = n[r];
859
+ if (i === void 0) return W(["kind"], "Blueprint insert command is invalid.");
860
+ let a = V(e, /* @__PURE__ */ new Set([
861
+ ...G,
862
+ "kind",
863
+ "position",
864
+ ...i
865
+ ]));
866
+ if (a !== void 0) return W([a], "Unknown insert command field.");
867
+ let o = ut(e.position);
868
+ if (!o.ok) return o;
869
+ let s = o.value === void 0 ? {} : { position: o.value };
870
+ if (r === "component") return L(e.componentId) ? U({
871
+ ...t,
872
+ type: "insert-node",
873
+ kind: r,
874
+ componentId: e.componentId,
875
+ ...s
876
+ }) : W([], "Blueprint insert command is invalid.");
877
+ if (r === "variable") return L(e.variableId) ? U({
878
+ ...t,
879
+ type: "insert-node",
880
+ kind: r,
881
+ variableId: e.variableId,
882
+ ...s
883
+ }) : W([], "Blueprint insert command is invalid.");
884
+ if (r === "sub-canvas") return L(e.canvasId) ? U({
885
+ ...t,
886
+ type: "insert-node",
887
+ kind: r,
888
+ canvasId: e.canvasId,
889
+ ...s
890
+ }) : W([], "Blueprint insert command is invalid.");
891
+ if (r === "timer") {
892
+ let n = e.intervalSeconds;
893
+ return n !== void 0 && !q(n) ? W(["intervalSeconds"], "Blueprint insert command is invalid.") : U({
894
+ ...t,
895
+ type: "insert-node",
896
+ kind: r,
897
+ ...n === void 0 ? {} : { intervalSeconds: n },
898
+ ...s
899
+ });
900
+ }
901
+ return U({
902
+ ...t,
903
+ type: "insert-node",
904
+ kind: r,
905
+ ...s
906
+ });
907
+ }
908
+ case "update-node": {
909
+ let n = V(e, /* @__PURE__ */ new Set([
910
+ ...G,
911
+ "nodeIds",
912
+ "update"
913
+ ]));
914
+ if (n !== void 0) return W([n], "Unknown node update field.");
915
+ let r = J(e.nodeIds), i = ot(e.update);
916
+ return r === void 0 || r.length === 0 || i === void 0 ? W([], "Blueprint node update is invalid.") : U({
917
+ ...t,
918
+ type: e.type,
919
+ nodeIds: r,
920
+ update: i
921
+ });
922
+ }
923
+ case "reorder-edge": {
924
+ let n = V(e, /* @__PURE__ */ new Set([
925
+ ...G,
926
+ "edgeId",
927
+ "direction"
928
+ ]));
929
+ return n === void 0 ? !L(e.edgeId) || e.direction !== "earlier" && e.direction !== "later" ? W([], "Blueprint edge reorder is invalid.") : U({
930
+ ...t,
931
+ type: e.type,
932
+ edgeId: e.edgeId,
933
+ direction: e.direction
934
+ }) : W([n], "Unknown reorder field.");
935
+ }
936
+ case "duplicate-nodes": {
937
+ let n = V(e, /* @__PURE__ */ new Set([...G, "nodeIds"]));
938
+ if (n !== void 0) return W([n], "Unknown duplicate field.");
939
+ let r = J(e.nodeIds);
940
+ return r === void 0 || r.length === 0 ? W(["nodeIds"], "Blueprint duplicate command is invalid.") : U({
941
+ ...t,
942
+ type: e.type,
943
+ nodeIds: r
944
+ });
945
+ }
946
+ case "commit-layout": {
947
+ let n = V(e, /* @__PURE__ */ new Set([
948
+ ...G,
949
+ "nodes",
950
+ "viewport"
951
+ ]));
952
+ if (n !== void 0) return W([n], "Unknown layout command field.");
953
+ let r = ct(e.nodes);
954
+ if (!r.ok) return r;
955
+ let i = e.viewport === void 0 ? U(void 0) : lt(e.viewport);
956
+ return i.ok ? U({
957
+ ...t,
958
+ type: e.type,
959
+ nodes: r.value,
960
+ ...i.value === void 0 ? {} : { viewport: i.value }
961
+ }) : i;
962
+ }
963
+ case "commit-viewport": {
964
+ let n = V(e, /* @__PURE__ */ new Set([...G, "viewport"]));
965
+ if (n !== void 0) return W([n], "Unknown viewport command field.");
966
+ let r = lt(e.viewport);
967
+ return r.ok ? U({
968
+ ...t,
969
+ type: e.type,
970
+ viewport: r.value
971
+ }) : r;
972
+ }
973
+ case "run-simulation": {
974
+ let n = V(e, /* @__PURE__ */ new Set([
975
+ ...G,
976
+ "nodeId",
977
+ "port",
978
+ "payload"
979
+ ]));
980
+ if (n !== void 0) return W([n], "Unknown simulation command field.");
981
+ if (!L(e.nodeId) || !K(e.port)) return W([], "Simulation trigger is invalid.");
982
+ let r = d(e.payload, { maxBytes: et });
983
+ return r.ok ? U({
984
+ ...t,
985
+ type: e.type,
986
+ nodeId: e.nodeId,
987
+ port: e.port,
988
+ payload: r.value
989
+ }) : W(["payload"], "Simulation payload is invalid.", !0);
990
+ }
991
+ default: return W(["type"], "Blueprint canvas command type is unsupported.");
992
+ }
993
+ }
994
+ var rt = new RegExp(c), it = 4096;
995
+ function K(e) {
996
+ return typeof e == "string" && rt.test(e);
997
+ }
998
+ function q(e) {
999
+ return typeof e == "number" && Number.isInteger(e) && e >= 1 && e <= 86400;
1000
+ }
1001
+ function at(e) {
1002
+ if (!(!I(e) || V(e, /* @__PURE__ */ new Set(["node", "port"])) !== void 0)) return L(e.node) && K(e.port) ? {
1003
+ node: e.node,
1004
+ port: e.port
1005
+ } : void 0;
1006
+ }
1007
+ function J(e) {
1008
+ if (!Array.isArray(e) || e.length > it) return;
1009
+ let t = [];
1010
+ for (let n of e) {
1011
+ if (!L(n)) return;
1012
+ t.includes(n) || t.push(n);
1013
+ }
1014
+ return t;
1015
+ }
1016
+ function ot(e) {
1017
+ if (I(e)) {
1018
+ if (e.type === "name") return V(e, /* @__PURE__ */ new Set(["type", "name"])) === void 0 ? e.name === null ? {
1019
+ type: "name",
1020
+ name: null
1021
+ } : R(e.name, tt) ? {
1022
+ type: "name",
1023
+ name: e.name
1024
+ } : void 0 : void 0;
1025
+ if (e.type === "interval") return V(e, /* @__PURE__ */ new Set(["type", "intervalSeconds"])) === void 0 && q(e.intervalSeconds) ? {
1026
+ type: "interval",
1027
+ intervalSeconds: e.intervalSeconds
1028
+ } : void 0;
1029
+ if (e.type === "enabled") return V(e, /* @__PURE__ */ new Set(["type", "enabled"])) === void 0 && typeof e.enabled == "boolean" ? {
1030
+ type: "enabled",
1031
+ enabled: e.enabled
1032
+ } : void 0;
1033
+ }
1034
+ }
1035
+ function st(e) {
1036
+ if (!I(e) || V(e, /* @__PURE__ */ new Set(["nodes", "edges"])) !== void 0) return W(["selection"], "Blueprint selection is invalid.");
1037
+ let t = J(e.nodes), n = J(e.edges);
1038
+ return t === void 0 || n === void 0 ? W(["selection"], "Blueprint selection is invalid.") : U({
1039
+ nodes: t,
1040
+ edges: n
1041
+ });
1042
+ }
1043
+ function ct(e) {
1044
+ if (!Array.isArray(e) || e.length > $e) return W(["nodes"], "Blueprint layout nodes exceed their limit.", !0);
1045
+ let t = /* @__PURE__ */ new Set(), n = [];
1046
+ for (let r = 0; r < e.length; r++) {
1047
+ let i = e[r];
1048
+ if (!I(i) || V(i, /* @__PURE__ */ new Set([
1049
+ "id",
1050
+ "x",
1051
+ "y",
1052
+ "collapsed"
1053
+ ])) !== void 0 || !L(i.id) || t.has(i.id) || !B(i.x) || !B(i.y) || i.collapsed !== void 0 && typeof i.collapsed != "boolean") return W(["nodes", r], "Blueprint layout node is invalid.");
1054
+ t.add(i.id), n.push({
1055
+ id: i.id,
1056
+ x: H(i.x),
1057
+ y: H(i.y),
1058
+ ...i.collapsed === !0 ? { collapsed: !0 } : {}
1059
+ });
1060
+ }
1061
+ return U(n);
1062
+ }
1063
+ function lt(e) {
1064
+ return !I(e) || V(e, /* @__PURE__ */ new Set([
1065
+ "x",
1066
+ "y",
1067
+ "zoom"
1068
+ ])) !== void 0 || !B(e.x) || !B(e.y) || typeof e.zoom != "number" || !Number.isFinite(e.zoom) || e.zoom < .1 || e.zoom > 8 ? W(["viewport"], "Blueprint viewport is invalid.") : U({
1069
+ x: H(e.x),
1070
+ y: H(e.y),
1071
+ zoom: H(e.zoom)
1072
+ });
1073
+ }
1074
+ function ut(e) {
1075
+ return e === void 0 ? U(void 0) : !I(e) || V(e, /* @__PURE__ */ new Set(["x", "y"])) !== void 0 || !B(e.x) || !B(e.y) ? W(["position"], "Blueprint node position is invalid.") : U({
1076
+ x: H(e.x),
1077
+ y: H(e.y)
1078
+ });
1079
+ }
1080
+ //#endregion
1081
+ //#region src/common/operations/workbench/designer-workbench-mode.ts
1082
+ function dt(e, t) {
1083
+ return e !== "canvas" && e !== "blueprint" ? Y("Workbench mode is invalid.") : !ft(t) || Object.keys(t).some((e) => e !== "focus") ? Y("Workbench mode options are invalid.") : t.focus === void 0 ? {
1084
+ ok: !0,
1085
+ value: {},
1086
+ diagnostics: []
1087
+ } : !ft(t.focus) || Object.keys(t.focus).some((e) => e !== "kind" && e !== "id") || t.focus.kind !== "component" && t.focus.kind !== "variable" && t.focus.kind !== "node" && t.focus.kind !== "edge" || typeof t.focus.id != "string" || t.focus.id.length === 0 || t.focus.id.length > 256 ? Y("Workbench focus is invalid.") : {
1088
+ ok: !0,
1089
+ value: { focus: {
1090
+ kind: t.focus.kind,
1091
+ id: t.focus.id
1092
+ } },
1093
+ diagnostics: []
1094
+ };
1095
+ }
1096
+ function ft(e) {
1097
+ return typeof e == "object" && !!e && !Array.isArray(e);
1098
+ }
1099
+ function Y(e) {
1100
+ return {
1101
+ ok: !1,
1102
+ diagnostics: [{
1103
+ severity: "error",
1104
+ code: "AUTHORING_REQUEST_INVALID",
1105
+ path: [],
1106
+ message: e
1107
+ }]
1108
+ };
1109
+ }
1110
+ //#endregion
1111
+ //#region src/browser/dom/designer-form-controls-dom.ts
1112
+ var pt = [
1113
+ "input.designer-input",
1114
+ "select.designer-select",
1115
+ "textarea.designer-textarea",
1116
+ "input.designer-checkbox",
1117
+ "input.designer-switch",
1118
+ "button.designer-button"
1119
+ ].join(", ");
1120
+ function mt(e) {
1121
+ for (let t of Array.from(e.querySelectorAll(pt))) {
1122
+ if (t.closest(".designer-select-control") !== null) continue;
1123
+ let e = t.tagName.toLowerCase();
1124
+ if (e === "input") {
1125
+ let e = t;
1126
+ X(e, "designer-switch") || X(e, "designer-checkbox") ? ht(e) : _t(e);
1127
+ } else e === "select" ? yt(t) : e === "textarea" ? vt(t) : e === "button" && gt(t);
1128
+ }
1129
+ }
1130
+ function ht(e) {
1131
+ let t = X(e, "designer-switch");
1132
+ Z(e, t ? "designer-switch" : "designer-checkbox"), e.type !== "checkbox" && (e.type = "checkbox"), t && e.getAttribute("role") === null && e.setAttribute("role", "switch"), e.getAttribute("aria-checked") === null && e.setAttribute("aria-checked", String(e.checked)), t && e.addEventListener("change", () => {
1133
+ e.setAttribute("aria-checked", String(e.checked));
1134
+ });
1135
+ }
1136
+ function gt(e) {
1137
+ Z(e, "designer-control"), Z(e, "designer-button"), e.type !== "button" && (e.type = "button");
1138
+ }
1139
+ function X(e, t) {
1140
+ return e.className.split(/\s+/).includes(t);
1141
+ }
1142
+ function Z(e, t) {
1143
+ X(e, t) || (e.className = `${e.className} ${t}`.trim());
1144
+ }
1145
+ function _t(e) {
1146
+ let t = o(e.ownerDocument, {
1147
+ appearance: bt(e.type),
1148
+ type: e.type,
1149
+ value: e.value
1150
+ });
1151
+ Q(e, t), e.replaceWith(t);
1152
+ }
1153
+ function vt(e) {
1154
+ let t = r(e.ownerDocument, { value: e.value });
1155
+ Q(e, t), e.replaceWith(t);
1156
+ }
1157
+ function yt(e) {
1158
+ let t = a(e.ownerDocument, { options: Array.from(e.options).map((e) => ({
1159
+ disabled: e.disabled,
1160
+ label: e.textContent ?? "",
1161
+ selected: e.selected,
1162
+ value: e.value
1163
+ })) });
1164
+ Q(e, t), t.value = e.value;
1165
+ let n = i(t);
1166
+ e.replaceWith(n.element);
1167
+ }
1168
+ function Q(e, t) {
1169
+ for (let n of Array.from(e.attributes)) n.name !== "class" && n.name !== "style" && n.name !== "type" && n.name !== "value" && t.setAttribute(n.name, n.value);
1170
+ for (let n of e.className.split(/\s+/)) n !== "" && !t.classList.contains(n) && t.classList.add(n);
1171
+ }
1172
+ function bt(e) {
1173
+ return e === "number" ? "number" : e === "range" ? "range" : e === "color" ? "color" : "text";
1174
+ }
1175
+ //#endregion
1176
+ //#region src/browser/dom/designer-html-escape.ts
1177
+ function xt(e) {
1178
+ return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&#39;");
1179
+ }
1180
+ function St(e) {
1181
+ return xt(e);
1182
+ }
1183
+ //#endregion
1184
+ //#region src/common/operations/blueprint/designer-blueprint-capabilities.ts
1185
+ function Ct(e, t) {
1186
+ try {
1187
+ return e?.hasBlueprintCapability(t) === !0;
1188
+ } catch {
1189
+ return !1;
1190
+ }
1191
+ }
1192
+ function wt(e) {
1193
+ try {
1194
+ return e?.listBlueprintActions?.().map((e) => ({
1195
+ actionId: e.id,
1196
+ name: e.name,
1197
+ available: !0
1198
+ })) ?? [];
1199
+ } catch {
1200
+ return [];
1201
+ }
1202
+ }
1203
+ function Tt(e, t) {
1204
+ try {
1205
+ return e?.getBlueprintAction?.(t) !== void 0;
1206
+ } catch {
1207
+ return !1;
1208
+ }
1209
+ }
1210
+ //#endregion
1211
+ //#region src/browser/dom/designer-left-panel-groups-dom.ts
1212
+ var $ = "host:";
1213
+ function Et(r, i) {
1214
+ let a = r.querySelector(".rail-tabs"), o = r.querySelector("[data-left-panel]");
1215
+ if (a === null || o === null) return;
1216
+ let s = kt(r);
1217
+ for (let e of r.querySelectorAll("[data-host-left-panel-rendered]")) e.remove();
1218
+ for (let s of i ?? []) {
1219
+ let i = Mt(s.id), c = Nt(s.id);
1220
+ if (N(s, "canvas")) {
1221
+ let e = t(r.ownerDocument, {
1222
+ label: "",
1223
+ tip: s.label,
1224
+ value: s.id
1225
+ });
1226
+ e.id = i, e.setAttribute("aria-controls", c), e.dataset.panelTab = `${$}${s.id}`, e.dataset.panelLabel = s.label, e.dataset.hostLeftPanelGroup = s.id, e.dataset.hostLeftPanelMode = "canvas", e.dataset.hostLeftPanelRendered = "";
1227
+ let o = r.ownerDocument.createElement("span");
1228
+ o.className = "rail-tab-glyph", o.setAttribute("aria-hidden", "true"), o.innerHTML = n(s.icon ?? "shapes");
1229
+ let l = r.ownerDocument.createElement("span");
1230
+ l.className = "rail-tab-label", l.textContent = s.label, e.append(o, l), a.append(e);
1231
+ }
1232
+ let l = r.ownerDocument.createElement("div");
1233
+ l.className = "rail-view host-left-panel-view", l.id = c, l.setAttribute("role", "tabpanel"), l.setAttribute("aria-labelledby", N(s, "canvas") ? i : jt(s.id)), l.dataset.hostLeftPanelGroup = s.id, l.dataset.hostLeftPanelRendered = "", l.hidden = !0;
1234
+ let u = r.ownerDocument.createElement("div");
1235
+ u.className = "host-left-panel-content";
1236
+ let d = r.ownerDocument.createElement("slot");
1237
+ d.name = M(s.id), d.dataset.hostLeftPanelSlot = s.id;
1238
+ let f = r.ownerDocument.createElement("p");
1239
+ f.className = "designer-empty-state", f.textContent = e.hostLeftPanelEmpty, d.append(f), u.append(d), l.append(u), o.append(l);
1240
+ }
1241
+ At(r, i, s);
1242
+ }
1243
+ function Dt(e) {
1244
+ return `${$}${e}`;
1245
+ }
1246
+ function Ot(e) {
1247
+ return e.startsWith($) ? e.slice(5) : void 0;
1248
+ }
1249
+ function kt(e) {
1250
+ let t = e.getRootNode(), n = t.activeElement?.closest("[role=\"tab\"][data-host-left-panel-mode=\"canvas\"]");
1251
+ if (n?.dataset.hostLeftPanelGroup !== void 0) return {
1252
+ groupId: n.dataset.hostLeftPanelGroup,
1253
+ location: "tab"
1254
+ };
1255
+ let r = t.host, i = e.ownerDocument.activeElement, a = e.ownerDocument.defaultView;
1256
+ if (!(a === null || !(r instanceof a.HTMLElement) || !(i instanceof a.Element))) {
1257
+ for (let e of r.children) if (e instanceof a.HTMLElement && e.slot.startsWith("base-screen-designer-left-panel-") && !(e !== i && !e.contains(i))) return {
1258
+ groupId: e.slot.slice(A.length),
1259
+ location: "content"
1260
+ };
1261
+ }
1262
+ }
1263
+ function At(e, t, n) {
1264
+ if (n === void 0) return;
1265
+ let r = t?.find((e) => e.id === n.groupId);
1266
+ if (n.location === "content" && r !== void 0) return;
1267
+ let i = r !== void 0 && N(r, "canvas");
1268
+ Array.from(e.querySelectorAll("[data-panel-tab]")).find((e) => e.dataset.panelTab === (i ? Dt(n.groupId) : "materials"))?.focus();
1269
+ }
1270
+ function jt(e) {
1271
+ return `designer-blueprint-host-${e}-tab`;
1272
+ }
1273
+ function Mt(e) {
1274
+ return `designer-host-${e}-tab`;
1275
+ }
1276
+ function Nt(e) {
1277
+ return `designer-host-${e}-panel`;
1278
+ }
1279
+ //#endregion
1280
+ export { ue as A, we as B, A as C, Ce as D, Le as E, _ as F, ge as G, ve as H, g as I, C as K, v as L, Se as M, ye as N, be as O, Te as P, y as R, Oe as S, M as T, _e as U, me as V, he as W, Ye as _, Mt as a, Ze as b, Tt as c, xt as d, mt as f, qe as g, Je as h, Dt as i, pe as j, xe as k, wt as l, nt as m, Ot as n, Et as o, dt as p, m as q, Nt as r, Ct as s, jt as t, St as u, Ke as v, N as w, De as x, Xe as y, le as z };
1281
+
1282
+ //# sourceMappingURL=designer-left-panel-groups-dom-DFdLWxxY.js.map