base-screen 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/README.md +5 -2
  2. package/dist/_internal/contracts/diagnostics/material-error.d.ts +1 -1
  3. package/dist/_internal/contracts/diagnostics/material-error.js +1 -1
  4. package/dist/_internal/contracts/document/blueprint-graph.d.ts +3 -3
  5. package/dist/_internal/contracts/document/blueprint-graph.js +4 -4
  6. package/dist/_internal/contracts/document/component-states.d.ts +1 -1
  7. package/dist/_internal/contracts/document/component-states.js +1 -1
  8. package/dist/_internal/contracts/document/image-url.js +1 -1
  9. package/dist/_internal/contracts/document/json-schema.js +1 -1
  10. package/dist/_internal/contracts/document/limits.d.ts +5 -5
  11. package/dist/_internal/contracts/document/limits.js +5 -5
  12. package/dist/_internal/contracts/document/references.js +3 -3
  13. package/dist/_internal/contracts/document/schema.d.ts +2 -2
  14. package/dist/_internal/contracts/document/schema.js +3 -3
  15. package/dist/_internal/contracts/document/sub-canvas.d.ts +2 -2
  16. package/dist/_internal/contracts/document/sub-canvas.js +2 -2
  17. package/dist/_internal/contracts/document/theme.d.ts +2 -2
  18. package/dist/_internal/contracts/document/theme.js +2 -2
  19. package/dist/_internal/contracts/document/validate-blueprint.d.ts +1 -1
  20. package/dist/_internal/contracts/document/validate-blueprint.js +1 -1
  21. package/dist/_internal/contracts/document/validate-component.js +2 -2
  22. package/dist/_internal/contracts/document/validate-data-source.js +2 -2
  23. package/dist/_internal/contracts/document/validate-sub-canvas.d.ts +1 -1
  24. package/dist/_internal/contracts/document/validate-sub-canvas.js +1 -1
  25. package/dist/_internal/contracts/document/validate-value-ref.js +1 -1
  26. package/dist/_internal/contracts/index.d.ts +1 -1
  27. package/dist/_internal/contracts/migration/blueprint-graph-migration.d.ts +1 -1
  28. package/dist/_internal/contracts/migration/migrate-document.js +2 -2
  29. package/dist/_internal/contracts/push/delivery.d.ts +1 -1
  30. package/dist/_internal/contracts/push/delivery.js +1 -1
  31. package/dist/_internal/contracts/push/level-scale.d.ts +1 -1
  32. package/dist/_internal/contracts/push/level-scale.js +1 -1
  33. package/dist/_internal/contracts/types/document.d.ts +19 -19
  34. package/dist/_internal/contracts/types/execution.d.ts +3 -3
  35. package/dist/_internal/contracts/types/host.d.ts +23 -5
  36. package/dist/_internal/contracts/types/host.js +1 -1
  37. package/dist/_internal/contracts/types/push.d.ts +3 -3
  38. package/dist/_internal/contracts/types/variable.d.ts +3 -3
  39. package/dist/_internal/contracts/variable/parse.js +5 -1
  40. package/dist/_internal/core/blueprint/runtime-compile.d.ts +1 -1
  41. package/dist/_internal/core/blueprint/runtime-compile.js +1 -1
  42. package/dist/_internal/core/blueprint/runtime-dispatch.js +1 -1
  43. package/dist/_internal/core/blueprint/runtime-simulate.d.ts +1 -1
  44. package/dist/_internal/core/blueprint/runtime-simulate.js +1 -1
  45. package/dist/_internal/core/blueprint/runtime-types.d.ts +4 -4
  46. package/dist/_internal/core/commands/apply-collection-commands.d.ts +1 -1
  47. package/dist/_internal/core/commands/apply-collection-commands.js +1 -1
  48. package/dist/_internal/core/commands/apply-component-commands.d.ts +1 -1
  49. package/dist/_internal/core/commands/apply-component-commands.js +2 -2
  50. package/dist/_internal/core/commands/apply.js +2 -2
  51. package/dist/_internal/core/commands/types.d.ts +5 -5
  52. package/dist/_internal/core/data/data-candidates.d.ts +1 -1
  53. package/dist/_internal/core/data/data-candidates.js +1 -1
  54. package/dist/_internal/core/data/data-source-dependents.d.ts +1 -1
  55. package/dist/_internal/core/data/data-source-dependents.js +1 -1
  56. package/dist/_internal/core/data/dataset-profile.d.ts +2 -2
  57. package/dist/_internal/core/data/dataset-profile.js +2 -2
  58. package/dist/_internal/core/data/host-dataset.d.ts +2 -2
  59. package/dist/_internal/core/data/host-dataset.js +2 -2
  60. package/dist/_internal/core/data/sample-values.d.ts +1 -1
  61. package/dist/_internal/core/data/sample-values.js +1 -1
  62. package/dist/_internal/core/data/value-ref.d.ts +2 -2
  63. package/dist/_internal/core/data/value-ref.js +1 -1
  64. package/dist/_internal/core/state/state-preset.d.ts +1 -1
  65. package/dist/_internal/core/validation/layout-audit.d.ts +2 -2
  66. package/dist/_internal/core/validation/layout-audit.js +1 -1
  67. package/dist/_internal/core/validation/legibility.js +1 -1
  68. package/dist/_internal/core/validation/validate-semantics.js +1 -1
  69. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-canvas-bridge.d.ts +1 -1
  70. package/dist/_internal/engine/browser/controllers/dataset/designer-data-source-authoring.d.ts +1 -1
  71. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-catalog-controller.d.ts +21 -0
  72. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-controller-context.d.ts +7 -2
  73. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-draft-controller.d.ts +1 -1
  74. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-effective-value.d.ts +1 -1
  75. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-surface-controller.d.ts +1 -1
  76. package/dist/_internal/engine/browser/controllers/dataset/designer-update-policy-authoring.d.ts +1 -1
  77. package/dist/_internal/engine/browser/controllers/designer-artboard-controller.d.ts +1 -1
  78. package/dist/_internal/engine/browser/controllers/designer-canvas-runtime-controller.d.ts +2 -2
  79. package/dist/_internal/engine/browser/controllers/designer-change-controller.d.ts +3 -3
  80. package/dist/_internal/engine/browser/controllers/designer-command-palette-controller.d.ts +1 -1
  81. package/dist/_internal/engine/browser/controllers/designer-intent-controller.d.ts +5 -0
  82. package/dist/_internal/engine/browser/controllers/designer-page-preview-controller.d.ts +1 -1
  83. package/dist/_internal/engine/browser/controllers/designer-popup-preview-controller.d.ts +1 -1
  84. package/dist/_internal/engine/browser/controllers/designer-reference-layer-controller.d.ts +1 -1
  85. package/dist/_internal/engine/browser/controllers/designer-text-edit-controller.d.ts +2 -2
  86. package/dist/_internal/engine/browser/controllers/designer-viewport-controller.d.ts +7 -1
  87. package/dist/_internal/engine/browser/controllers/gesture/designer-drag-gesture.d.ts +6 -1
  88. package/dist/_internal/engine/browser/controllers/gesture/designer-gesture-callbacks.d.ts +1 -1
  89. package/dist/_internal/engine/browser/controllers/panel/designer-component-states-controller.d.ts +1 -1
  90. package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller-callbacks.d.ts +6 -6
  91. package/dist/_internal/engine/browser/controllers/panel/designer-panel-property-controller.d.ts +7 -0
  92. package/dist/_internal/engine/browser/controllers/variables/designer-variable-catalog-controller.d.ts +9 -1
  93. package/dist/_internal/engine/browser/controllers/variables/designer-variable-editor-controller.d.ts +6 -1
  94. package/dist/_internal/engine/browser/controllers/variables/designer-variables-controller.d.ts +16 -1
  95. package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-controller.d.ts +2 -0
  96. package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-tabs-controller.d.ts +2 -0
  97. package/dist/_internal/engine/browser/dom/blueprint/designer-blueprint-inspector-configuration.d.ts +1 -1
  98. package/dist/_internal/engine/browser/dom/change/designer-change-dom.d.ts +1 -1
  99. package/dist/_internal/engine/browser/dom/color/designer-color-palette-model.d.ts +3 -3
  100. package/dist/_internal/engine/browser/dom/color/designer-color-palette-types.d.ts +2 -2
  101. package/dist/_internal/engine/browser/dom/color/designer-color-theme-slots.d.ts +1 -1
  102. package/dist/_internal/engine/browser/dom/dataset/designer-data-group-dom.d.ts +1 -1
  103. package/dist/_internal/engine/browser/dom/dataset/designer-data-panel-notice.d.ts +1 -1
  104. package/dist/_internal/engine/browser/dom/dataset/designer-data-state.d.ts +1 -1
  105. package/dist/_internal/engine/browser/dom/dataset/designer-dataset-authoring-dom.d.ts +1 -1
  106. package/dist/_internal/engine/browser/dom/dataset/designer-dataset-catalog-dom.d.ts +1 -1
  107. package/dist/_internal/engine/browser/dom/dataset/designer-dataset-sections.d.ts +1 -1
  108. package/dist/_internal/engine/browser/dom/dataset/designer-dataset-types.d.ts +11 -4
  109. package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-control-dom.d.ts +1 -1
  110. package/dist/_internal/engine/browser/dom/descriptor/designer-descriptor-model.d.ts +1 -1
  111. package/dist/_internal/engine/browser/dom/designer-field-primitives.d.ts +1 -1
  112. package/dist/_internal/engine/browser/dom/designer-icons.d.ts +2 -0
  113. package/dist/_internal/engine/browser/dom/designer-text-edit-dom.d.ts +2 -2
  114. package/dist/_internal/engine/browser/dom/designer-variable-inspector-dom.d.ts +7 -0
  115. package/dist/_internal/engine/browser/dom/designer-variables-dom.d.ts +5 -1
  116. package/dist/_internal/engine/browser/dom/designer-variables-editor-dom.d.ts +30 -1
  117. package/dist/_internal/engine/browser/dom/designer-variables-toolbar-dom.d.ts +4 -2
  118. package/dist/_internal/engine/browser/dom/intent/designer-intent-reference-picker-dom.d.ts +2 -0
  119. package/dist/_internal/engine/browser/dom/material-library/designer-material-library-dom.d.ts +1 -1
  120. package/dist/_internal/engine/browser/dom/menu/designer-menu-model.d.ts +3 -3
  121. package/dist/_internal/engine/browser/dom/menu/designer-plugin-command-menu.d.ts +5 -2
  122. package/dist/_internal/engine/browser/dom/panel/designer-canvas-transactions.d.ts +1 -1
  123. package/dist/_internal/engine/browser/dom/panel/designer-component-states-dom.d.ts +2 -2
  124. package/dist/_internal/engine/browser/dom/panel/designer-multi-selection-dom.d.ts +1 -1
  125. package/dist/_internal/engine/browser/dom/panel/designer-panel-primitives.d.ts +2 -2
  126. package/dist/_internal/engine/browser/dom/panel/designer-property-transactions.d.ts +1 -1
  127. package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-picker-dom.d.ts +1 -1
  128. package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-picker-mount.d.ts +1 -1
  129. package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-summary-dom.d.ts +1 -1
  130. package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-types.d.ts +4 -4
  131. package/dist/_internal/engine/common/observability/designer-metrics.d.ts +1 -1
  132. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-capabilities.d.ts +1 -1
  133. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-graph.d.ts +5 -5
  134. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-model.d.ts +1 -1
  135. package/dist/_internal/engine/common/operations/blueprint/designer-blueprint-protocol-types.d.ts +2 -2
  136. package/dist/_internal/engine/common/operations/canvas/canvas-background-image.d.ts +1 -1
  137. package/dist/_internal/engine/common/operations/catalog/designer-catalog-refresh.d.ts +1 -1
  138. package/dist/_internal/engine/common/operations/change/designer-change-events.d.ts +1 -1
  139. package/dist/_internal/engine/common/operations/change/designer-change-proposal.d.ts +4 -4
  140. package/dist/_internal/engine/common/operations/designer-clipboard.d.ts +5 -1
  141. package/dist/_internal/engine/common/operations/designer-text-edit-operations.d.ts +1 -1
  142. package/dist/_internal/engine/common/operations/designer-variable-operations.d.ts +3 -3
  143. package/dist/_internal/engine/common/operations/element/designer-element-operation-types.d.ts +1 -1
  144. package/dist/_internal/engine/common/operations/intent/designer-parameter-intent.d.ts +1 -1
  145. package/dist/_internal/engine/common/operations/material-component/material-component-fragment-extract.d.ts +2 -2
  146. package/dist/_internal/engine/common/operations/material-library/material-library-fragments.d.ts +1 -1
  147. package/dist/_internal/engine/common/operations/material-library/material-library-grouping.d.ts +1 -1
  148. package/dist/_internal/engine/common/operations/plugin/designer-plugin-commands.d.ts +2 -0
  149. package/dist/_internal/engine/common/operations/selection/designer-multi-selection-operations.d.ts +9 -9
  150. package/dist/_internal/engine/common/operations/style/designer-component-states.d.ts +6 -6
  151. package/dist/_internal/engine/common/operations/style/designer-material-appearance.d.ts +1 -1
  152. package/dist/_internal/engine/common/session/designer-artboard.d.ts +1 -1
  153. package/dist/_internal/engine/common/session/designer-session.d.ts +1 -1
  154. package/dist/_internal/engine/common/ui-text/designer-blueprint-ui-text.d.ts +3 -3
  155. package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +85 -68
  156. package/dist/_internal/engine/{designer-blueprint-workbench-panel-BWSglfAb.js → designer-blueprint-workbench-panel-DVvKcSvJ.js} +70 -70
  157. package/dist/_internal/engine/{designer-dataset-controller-DdbY4ILC.js → designer-dataset-controller-bSR5OB6n.js} +1461 -1355
  158. package/dist/_internal/engine/designer-element/api/designer-element-catalog.d.ts +2 -2
  159. package/dist/_internal/engine/designer-element/api/designer-element-change.d.ts +2 -2
  160. package/dist/_internal/engine/designer-element/api/designer-element-configuration-types.d.ts +4 -4
  161. package/dist/_internal/engine/designer-element/api/designer-element-fragment-save.d.ts +2 -2
  162. package/dist/_internal/engine/designer-element/api/designer-element-host-resource-selection.d.ts +1 -1
  163. package/dist/_internal/engine/designer-element/base-screen-designer-element.d.ts +10 -10
  164. package/dist/_internal/engine/designer-element/runtime/designer-element-plugin-commands.d.ts +3 -3
  165. package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +2 -2
  166. package/dist/_internal/engine/designer-element/runtime/designer-element-sample-data.d.ts +1 -1
  167. package/dist/_internal/engine/designer-element/runtime/designer-element-state.d.ts +7 -7
  168. package/dist/_internal/engine/{designer-field-primitives-Crn464Qg.js → designer-field-primitives-C_StzrUa.js} +197 -178
  169. package/dist/_internal/engine/{designer-left-panel-groups-dom-DFdLWxxY.js → designer-left-panel-groups-dom-DBpI3Nc2.js} +19 -19
  170. package/dist/_internal/engine/{host-resource-selection-CWrPLVOc.js → host-resource-selection-BCRU23WQ.js} +446 -446
  171. package/dist/_internal/engine/index.js +3665 -3247
  172. package/dist/_internal/host-kit/index.d.ts +1 -1
  173. package/dist/_internal/host-kit/index.js +1 -1
  174. package/dist/_internal/host-kit/intent/index.d.ts +2 -1
  175. package/dist/_internal/host-kit/intent/index.js +1 -0
  176. package/dist/_internal/host-kit/intent/intent-behavior.d.ts +5 -5
  177. package/dist/_internal/host-kit/intent/intent-behavior.js +7 -7
  178. package/dist/_internal/host-kit/intent/intent-block.d.ts +11 -4
  179. package/dist/_internal/host-kit/intent/intent-block.js +87 -8
  180. package/dist/_internal/host-kit/intent/intent-catalog.d.ts +9 -6
  181. package/dist/_internal/host-kit/intent/intent-catalog.js +1 -1
  182. package/dist/_internal/host-kit/intent/intent-compile-types.d.ts +10 -10
  183. package/dist/_internal/host-kit/intent/intent-compile.d.ts +1 -1
  184. package/dist/_internal/host-kit/intent/intent-compile.js +4 -4
  185. package/dist/_internal/host-kit/intent/intent-data-check.d.ts +4 -4
  186. package/dist/_internal/host-kit/intent/intent-data-context.d.ts +7 -7
  187. package/dist/_internal/host-kit/intent/intent-data-context.js +2 -2
  188. package/dist/_internal/host-kit/intent/intent-dataset.d.ts +4 -4
  189. package/dist/_internal/host-kit/intent/intent-dataset.js +2 -2
  190. package/dist/_internal/host-kit/intent/intent-format.d.ts +2 -2
  191. package/dist/_internal/host-kit/intent/intent-format.js +2 -2
  192. package/dist/_internal/host-kit/intent/intent-freeform.d.ts +48 -0
  193. package/dist/_internal/host-kit/intent/intent-freeform.js +412 -0
  194. package/dist/_internal/host-kit/intent/intent-kpi-bind.d.ts +2 -2
  195. package/dist/_internal/host-kit/intent/intent-layout.d.ts +2 -2
  196. package/dist/_internal/host-kit/intent/intent-layout.js +2 -2
  197. package/dist/_internal/host-kit/intent/intent-parse.d.ts +2 -0
  198. package/dist/_internal/host-kit/intent/intent-parse.js +13 -12
  199. package/dist/_internal/host-kit/intent/intent-prepare.d.ts +7 -4
  200. package/dist/_internal/host-kit/intent/intent-prepare.js +54 -2
  201. package/dist/_internal/host-kit/intent/intent-session.d.ts +6 -6
  202. package/dist/_internal/host-kit/intent/intent-session.js +4 -4
  203. package/dist/_internal/host-kit/intent/intent-stream.js +2 -2
  204. package/dist/_internal/host-kit/intent/intent-style.d.ts +1 -1
  205. package/dist/_internal/host-kit/intent/intent-style.js +1 -1
  206. package/dist/_internal/host-kit/intent/intent-types.d.ts +55 -12
  207. package/dist/_internal/host-kit/intent/intent-types.js +1 -1
  208. package/dist/_internal/host-kit/push-result.d.ts +1 -1
  209. package/dist/_internal/host-kit/push-result.js +1 -1
  210. package/dist/_internal/host-kit/sse-subscribe.d.ts +1 -1
  211. package/dist/_internal/host-kit/sse-subscribe.js +1 -1
  212. package/dist/_internal/host-kit/subscription-hub.d.ts +3 -3
  213. package/dist/_internal/host-kit/subscription-hub.js +1 -1
  214. package/dist/_internal/material/base-material.d.ts +3 -3
  215. package/dist/_internal/material/editor-descriptor.d.ts +3 -3
  216. package/dist/_internal/plugin-core/contracts.d.ts +18 -16
  217. package/dist/_internal/plugin-core/contracts.js +1 -0
  218. package/dist/_internal/plugin-core/contribution-kind.d.ts +5 -5
  219. package/dist/_internal/plugin-core/contribution-kind.js +14 -6
  220. package/dist/_internal/plugin-core/editor/editor-descriptor-inference.d.ts +1 -1
  221. package/dist/_internal/plugin-core/editor/editor-descriptor-inference.js +2 -2
  222. package/dist/_internal/plugin-core/editor/editor-descriptor-items.d.ts +1 -1
  223. package/dist/_internal/plugin-core/editor/editor-descriptor-items.js +1 -1
  224. package/dist/_internal/plugin-core/editor/editor-descriptor-model.d.ts +2 -2
  225. package/dist/_internal/plugin-core/editor/editor-descriptor.js +1 -1
  226. package/dist/_internal/plugin-core/fragment/fragment.d.ts +4 -4
  227. package/dist/_internal/plugin-core/fragment/fragment.js +1 -1
  228. package/dist/_internal/plugin-core/material/material-manifest-fields.js +1 -1
  229. package/dist/_internal/plugin-core/material/material-manifest.js +1 -1
  230. package/dist/_internal/plugin-core/material/material-theme.d.ts +2 -2
  231. package/dist/_internal/plugin-core/material/material-theme.js +2 -2
  232. package/dist/_internal/plugin-manager/contribution-kind-plan.d.ts +5 -1
  233. package/dist/_internal/plugin-manager/contribution-kind-plan.js +20 -12
  234. package/dist/_internal/plugin-manager/manager.js +47 -30
  235. package/dist/_internal/plugin-manager/resolver.js +7 -13
  236. package/dist/_internal/plugin-manager/types.d.ts +2 -2
  237. package/dist/_internal/plugin-sdk/authoring-finding.d.ts +3 -3
  238. package/dist/_internal/plugin-sdk/fragment-audit.d.ts +6 -6
  239. package/dist/_internal/plugin-sdk/fragment-audit.js +8 -8
  240. package/dist/_internal/plugin-sdk/fragment-definition.d.ts +3 -3
  241. package/dist/_internal/plugin-sdk/fragment-definition.js +3 -3
  242. package/dist/_internal/plugin-sdk/material-config-groups.d.ts +2 -2
  243. package/dist/_internal/plugin-sdk/material-definition.d.ts +5 -1
  244. package/dist/_internal/plugin-sdk/material-definition.js +3 -3
  245. package/dist/_internal/plugin-sdk/material-editor-audit.d.ts +9 -8
  246. package/dist/_internal/plugin-sdk/material-editor-audit.js +19 -11
  247. package/dist/_internal/plugin-sdk/material-isolated-csp.d.ts +1 -1
  248. package/dist/_internal/plugin-sdk/material-isolated-csp.js +1 -1
  249. package/dist/_internal/plugin-sdk/material-isolated-runtime.d.ts +3 -3
  250. package/dist/_internal/plugin-sdk/material-isolated-runtime.js +3 -3
  251. package/dist/_internal/plugin-sdk/material-isolated.d.ts +9 -9
  252. package/dist/_internal/plugin-sdk/material-isolated.js +28 -8
  253. package/dist/_internal/plugin-sdk/material-package.d.ts +3 -3
  254. package/dist/_internal/plugin-sdk/material-package.js +7 -7
  255. package/dist/_internal/plugin-sdk/material-rendered-element.d.ts +13 -6
  256. package/dist/_internal/plugin-sdk/material-rendered-element.js +36 -7
  257. package/dist/_internal/plugin-sdk/material-spec-audit.d.ts +19 -11
  258. package/dist/_internal/plugin-sdk/material-spec-audit.js +85 -19
  259. package/dist/_internal/plugin-sdk/material-spec.d.ts +66 -21
  260. package/dist/_internal/plugin-sdk/material-spec.js +166 -42
  261. package/dist/_internal/plugin-sdk/material-style-keys.d.ts +6 -6
  262. package/dist/_internal/plugin-sdk/material-style-keys.js +7 -7
  263. package/dist/_internal/plugin-sdk/material-template-audit.d.ts +1 -1
  264. package/dist/_internal/plugin-sdk/material-template-audit.js +3 -3
  265. package/dist/_internal/plugin-sdk/material-template-expression.d.ts +3 -3
  266. package/dist/_internal/plugin-sdk/material-template-expression.js +2 -2
  267. package/dist/_internal/plugin-sdk/material-template-render.d.ts +1 -1
  268. package/dist/_internal/plugin-sdk/material-template.d.ts +6 -6
  269. package/dist/_internal/plugin-sdk/material-template.js +2 -2
  270. package/dist/_internal/plugin-sdk/plugin-package.d.ts +2 -2
  271. package/dist/_internal/plugin-sdk/plugin-package.js +3 -3
  272. package/dist/_internal/plugin-sdk/plugin-registration.d.ts +2 -5
  273. package/dist/_internal/plugin-sdk/plugin-registration.js +3 -3
  274. package/dist/_internal/renderer/renderer/renderer-candidates.d.ts +1 -1
  275. package/dist/_internal/renderer/renderer/renderer-component-states.d.ts +1 -1
  276. package/dist/_internal/renderer/renderer/renderer-effective-style.d.ts +1 -1
  277. package/dist/_internal/renderer/renderer/renderer-material-dom.d.ts +1 -1
  278. package/dist/_internal/renderer/renderer/renderer-state.d.ts +2 -2
  279. package/dist/_internal/renderer/renderer/renderer-theme.d.ts +1 -1
  280. package/dist/_internal/renderer/renderer/renderer-types.d.ts +1 -1
  281. package/dist/_internal/renderer/renderer/renderer.d.ts +5 -5
  282. package/dist/_internal/renderer/resource/data-source-runtime.d.ts +3 -3
  283. package/dist/_internal/renderer/resource/push-window.d.ts +1 -1
  284. package/dist/_internal/renderer/resource/request-coordinator.d.ts +1 -1
  285. package/dist/_internal/renderer/resource/source-query-port.d.ts +3 -3
  286. package/dist/_internal/renderer/sub-canvas-layer.d.ts +2 -2
  287. package/dist/_internal/renderer/viewer/viewer-configuration.d.ts +1 -1
  288. package/dist/_internal/renderer/viewer/viewer.d.ts +3 -3
  289. package/dist/auto-register.js +9 -9
  290. package/dist/contracts.js +1 -1
  291. package/dist/contracts.js.map +1 -1
  292. package/dist/core.js.map +1 -1
  293. package/dist/dataset-port-D993nOlT.js.map +1 -1
  294. package/dist/dataset-profile-Dk6xdtsM.js.map +1 -1
  295. package/dist/{designer-CFOvOmLn.js → designer-DzBm8tXS.js} +2 -2
  296. package/dist/{designer-CFOvOmLn.js.map → designer-DzBm8tXS.js.map} +1 -1
  297. package/dist/designer-auto-register.js +5 -5
  298. package/dist/{designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js → designer-blueprint-workbench-panel-DVvKcSvJ-CkRMBKZA.js} +111 -111
  299. package/dist/designer-blueprint-workbench-panel-DVvKcSvJ-CkRMBKZA.js.map +1 -0
  300. package/dist/{designer-dataset-controller-DdbY4ILC-CMdGdGbr.js → designer-dataset-controller-bSR5OB6n-DfUP24S6.js} +1052 -946
  301. package/dist/designer-dataset-controller-bSR5OB6n-DfUP24S6.js.map +1 -0
  302. package/dist/{designer-field-primitives-Crn464Qg-Bi7q8s5J.js → designer-field-primitives-C_StzrUa-QZpcn0yX.js} +198 -179
  303. package/dist/designer-field-primitives-C_StzrUa-QZpcn0yX.js.map +1 -0
  304. package/dist/{designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js → designer-left-panel-groups-dom-DBpI3Nc2-D8kYJLCg.js} +17 -17
  305. package/dist/{designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js.map → designer-left-panel-groups-dom-DBpI3Nc2-D8kYJLCg.js.map} +1 -1
  306. package/dist/designer.js +5 -5
  307. package/dist/{dist-CHK9BTXX.js → dist-YCmniYuO.js} +4801 -4383
  308. package/dist/dist-YCmniYuO.js.map +1 -0
  309. package/dist/engine.js +4 -4
  310. package/dist/fragment-B-oP0Fru.js.map +1 -1
  311. package/dist/host-kit.js +979 -554
  312. package/dist/host-kit.js.map +1 -1
  313. package/dist/{host-resource-selection-CWrPLVOc-DPDq3jau.js → host-resource-selection-BCRU23WQ-Cedz0d14.js} +206 -206
  314. package/dist/host-resource-selection-BCRU23WQ-Cedz0d14.js.map +1 -0
  315. package/dist/image-url-D6mUcjY1.js.map +1 -1
  316. package/dist/index.js +9 -9
  317. package/dist/legibility-CS28ivEz.js.map +1 -1
  318. package/dist/level-scale-CwHqFEVd.js.map +1 -1
  319. package/dist/{manager-CeB4Jnr9.js → manager-BcvdcZjM.js} +230 -210
  320. package/dist/manager-BcvdcZjM.js.map +1 -0
  321. package/dist/{material-DeVkzSoT.js → material-ReRzBIbb.js} +2 -2
  322. package/dist/{material-DeVkzSoT.js.map → material-ReRzBIbb.js.map} +1 -1
  323. package/dist/material-auto-register.js +1 -1
  324. package/dist/{material-definition-BeW34dJr.js → material-definition-BcjFM-B-.js} +9 -9
  325. package/dist/material-definition-BcjFM-B-.js.map +1 -0
  326. package/dist/material-manifest-B1XatGPx.js.map +1 -1
  327. package/dist/material-theme-C91eus78.js.map +1 -1
  328. package/dist/material.js +2 -2
  329. package/dist/migrate-document-BM888PtC.js.map +1 -1
  330. package/dist/{parse-aZat9tAS.js → parse-1U_-Qtn4.js} +2 -2
  331. package/dist/parse-1U_-Qtn4.js.map +1 -0
  332. package/dist/parse-Ji7kE9ZT.js.map +1 -1
  333. package/dist/{plugin-CstHQ5ws.js → plugin-BH-4oNvT.js} +60 -52
  334. package/dist/plugin-BH-4oNvT.js.map +1 -0
  335. package/dist/plugin-core.js +1 -1
  336. package/dist/plugin-manager.js +1 -1
  337. package/dist/{plugin-package-DWifuHi1.js → plugin-package-Cj-3iLv3.js} +2068 -1905
  338. package/dist/plugin-package-Cj-3iLv3.js.map +1 -0
  339. package/dist/{plugin-registration-DTwBvnHX.js → plugin-registration-C9_IxTxc.js} +9 -9
  340. package/dist/{plugin-registration-DTwBvnHX.js.map → plugin-registration-C9_IxTxc.js.map} +1 -1
  341. package/dist/plugin-sdk.js +6 -6
  342. package/dist/{plugins-QDL0yIql.js → plugins-CwATlfr0.js} +2 -2
  343. package/dist/{plugins-QDL0yIql.js.map → plugins-CwATlfr0.js.map} +1 -1
  344. package/dist/plugins.js +8 -8
  345. package/dist/runtime-dispatch-C0gyIrTv.js.map +1 -1
  346. package/dist/runtime-simulate-aSYO9yDX.js.map +1 -1
  347. package/dist/{src-Bm7u11mN-Bi1hDVkh.js → src-Bm7u11mN-DFLnFQSk.js} +19 -19
  348. package/dist/{src-Bm7u11mN-Bi1hDVkh.js.map → src-Bm7u11mN-DFLnFQSk.js.map} +1 -1
  349. package/dist/{text-BSTz0pFQ.js → text-DfKom8EG.js} +2 -2
  350. package/dist/{text-BSTz0pFQ.js.map → text-DfKom8EG.js.map} +1 -1
  351. package/dist/theme-CcBXf4Ay.js.map +1 -1
  352. package/dist/value-ref-XkLuckGV.js.map +1 -1
  353. package/dist/{viewer-CrJupI8I-BJiz1cvW.js → viewer-CrJupI8I-CeQS58mA.js} +4 -4
  354. package/dist/{viewer-CrJupI8I-BJiz1cvW.js.map → viewer-CrJupI8I-CeQS58mA.js.map} +1 -1
  355. package/dist/viewer-auto-register.js +1 -1
  356. package/dist/viewer.js +1 -1
  357. package/dist/viewport-BNIRWjiT.js.map +1 -1
  358. package/package.json +13 -13
  359. package/dist/designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js.map +0 -1
  360. package/dist/designer-dataset-controller-DdbY4ILC-CMdGdGbr.js.map +0 -1
  361. package/dist/designer-field-primitives-Crn464Qg-Bi7q8s5J.js.map +0 -1
  362. package/dist/dist-CHK9BTXX.js.map +0 -1
  363. package/dist/host-resource-selection-CWrPLVOc-DPDq3jau.js.map +0 -1
  364. package/dist/manager-CeB4Jnr9.js.map +0 -1
  365. package/dist/material-definition-BeW34dJr.js.map +0 -1
  366. package/dist/parse-aZat9tAS.js.map +0 -1
  367. package/dist/plugin-CstHQ5ws.js.map +0 -1
  368. package/dist/plugin-package-DWifuHi1.js.map +0 -1
package/dist/engine.js CHANGED
@@ -1,5 +1,5 @@
1
- import { I as e, R as t, S as n, a as r, c as i, d as a, h as o, l as s, t as c, u as l, x as u } from "./designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js";
1
+ import { I as e, R as t, S as n, a as r, c as i, d as a, h as o, l as s, t as c, u as l, x as u } from "./designer-left-panel-groups-dom-DBpI3Nc2-D8kYJLCg.js";
2
2
  import { n as d } from "./fragment-B-oP0Fru.js";
3
- import { N as f, a as p, k as m, m as h, t as g } from "./host-resource-selection-CWrPLVOc-DPDq3jau.js";
4
- import { _, a as v, c as y, d as b, f as x, g as S, h as C, i as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N } from "./dist-CHK9BTXX.js";
5
- export { i as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, v as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, T as BASE_SCREEN_CHANGE_STATE_EVENT, O as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, s as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, r as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, o as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, b as BASE_SCREEN_FRAGMENT_SAVE_REQUEST_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, E as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, j as BASE_SCREEN_METRIC_EVENT, D as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, N as BaseScreenDesignerElement, x as ScreenProjectController, a as baseScreenDesignerLeftPanelSlotName, w as createBaseScreenCorePluginCommandPort, k as createBaseScreenCorePluginDesignReadPort, y as createDesignerMetric, e as parseBaseScreenBlueprintCanvasCommand, d as parseBaseScreenComponentFragmentInsertionIntent, f as parseBaseScreenComponentInsertionIntent, l as parseBaseScreenDesignerLeftPanelGroups, h as parseBaseScreenHostResourceAuthoringIntent, S as parseBaseScreenMaterialLibraryFragments, A as parseBaseScreenMaterialLibraryGrouping, M as parseBaseScreenMaterialLibraryItems, C as parseBaseScreenMaterialLibraryState, _ as readDesignerStatePresetSource, g as writeBaseScreenHostResourceDragData };
3
+ import { N as f, a as p, k as m, m as h, t as g } from "./host-resource-selection-BCRU23WQ-Cedz0d14.js";
4
+ import { _, a as v, c as y, d as b, f as x, g as S, h as C, i as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N } from "./dist-YCmniYuO.js";
5
+ export { i as BASE_SCREEN_BLUEPRINT_CANVAS_COMMAND_EVENT, t as BASE_SCREEN_BLUEPRINT_CANVAS_STATE_EVENT, n as BASE_SCREEN_BLUEPRINT_NODE_DRAG_MIME, S as BASE_SCREEN_CANVAS_PRESENTATION_CHANGE_EVENT, j as BASE_SCREEN_CHANGE_STATE_EVENT, E as BASE_SCREEN_DESIGNER_BACK_REQUEST_EVENT, s as BASE_SCREEN_DESIGNER_BLUEPRINT_CANVAS_SLOT, r as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_CHANGE_EVENT, o as BASE_SCREEN_DESIGNER_LEFT_PANEL_GROUP_ICONS, c as BASE_SCREEN_DESIGNER_LEFT_PANEL_SLOT_PREFIX, u as BASE_SCREEN_DESIGNER_WORKBENCH_MODE_CHANGE_EVENT, b as BASE_SCREEN_FRAGMENT_SAVE_REQUEST_EVENT, p as BASE_SCREEN_HOST_RESOURCE_DRAG_MIME, m as BASE_SCREEN_HOST_RESOURCE_SELECTION_REQUEST_EVENT, k as BASE_SCREEN_MATERIAL_LIBRARY_ACTION_EVENT, D as BASE_SCREEN_METRIC_EVENT, A as BASE_SCREEN_PROJECT_STATE_CHANGE_EVENT, N as BaseScreenDesignerElement, y as ScreenProjectController, a as baseScreenDesignerLeftPanelSlotName, O as createBaseScreenCorePluginCommandPort, x as createBaseScreenCorePluginDesignReadPort, T as createDesignerMetric, e as parseBaseScreenBlueprintCanvasCommand, d as parseBaseScreenComponentFragmentInsertionIntent, f as parseBaseScreenComponentInsertionIntent, l as parseBaseScreenDesignerLeftPanelGroups, h as parseBaseScreenHostResourceAuthoringIntent, v as parseBaseScreenMaterialLibraryFragments, w as parseBaseScreenMaterialLibraryGrouping, M as parseBaseScreenMaterialLibraryItems, C as parseBaseScreenMaterialLibraryState, _ as readDesignerStatePresetSource, g as writeBaseScreenHostResourceDragData };
@@ -1 +1 @@
1
- {"version":3,"file":"fragment-B-oP0Fru.js","names":[],"sources":["../../plugin-core/dist/fragment/fragment.js"],"sourcesContent":["import { isBoundedScreenImageUrl, isScreenMaterialType, parseScreenBlueprintGraph, parseScreenDataBinding, parseScreenDataSource, parseScreenDataSourceInstance, parseScreenValueRef, } from '@base-screen/contracts';\nimport { isDisplayString, isFiniteNumber } from '../material/material-validation-utils.js';\nconst BODY_FIELDS = ['shell', 'nodes', 'dataSources', 'blueprint'];\nconst INTENT_FIELDS = new Set(['anchor', ...BODY_FIELDS]);\nconst DEFINITION_FIELDS = new Set(['id', 'name', 'category', 'keywords', 'cover', ...BODY_FIELDS]);\nconst SHELL_FIELDS = new Set([\n 'key',\n 'materialType',\n 'name',\n 'offset',\n 'size',\n 'rotation',\n 'props',\n 'style',\n]);\nconst NODE_FIELDS = new Set([...SHELL_FIELDS, 'parent', 'dataSource', 'dataValue', 'dataBinding']);\nconst DATA_SOURCE_FIELDS = new Set([\n 'key',\n 'name',\n 'source',\n 'params',\n 'updatePolicy',\n 'processorId',\n]);\n/** 分片自带的文档级数据源与蓝图节点 / 连线上限:分片是一张卡片级的组合,不是页面模板(F6)。 */\nconst MAX_FRAGMENT_DATA_SOURCES = 16;\nconst MAX_FRAGMENT_BLUEPRINT_NODES = 32;\nconst MAX_FRAGMENT_BLUEPRINT_EDGES = 32;\nconst FRAGMENT_BLUEPRINT_FIELDS = new Set(['nodes', 'edges']);\nconst POSITION_FIELDS = new Set(['x', 'y']);\nconst SIZE_FIELDS = new Set(['width', 'height']);\nconst FRAGMENT_KEY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/;\n/** 与物料库条目 id 同一词法:分片在物料库里以 id 区分收藏、最近使用与拖放。 */\nconst FRAGMENT_ID_PATTERN = /^[A-Za-z][A-Za-z0-9._:-]{0,127}$/;\nconst MAX_FRAGMENT_NODES = 64;\nconst MAX_FRAGMENT_JSON_CHARS = 64 * 1024;\nconst MAX_FRAGMENT_NAME_CODE_POINTS = 256;\n/** 元数据上限与物料 manifest 一致(name/category 256、keywords 64 × 64、cover 2048)。 */\nconst MAX_FRAGMENT_DISPLAY_CODE_POINTS = 256;\nconst MAX_FRAGMENT_KEYWORDS = 64;\nconst MAX_FRAGMENT_KEYWORD_CODE_POINTS = 64;\nconst MAX_FRAGMENT_COVER_LENGTH = 2048;\n/**\n * 「受长度约束的名称」的唯一校验规则:至少一个非空白字符、不含 C0/C1 控制字符、码点数不超过上限。\n *\n * 组件名、宿主资源名与分片条目名共用这一条;Engine 经公共导出消费,不另写一份。\n */\nexport function isBaseScreenBoundedName(value, limit) {\n return (typeof value === 'string' &&\n /\\S/.test(value) &&\n !/[\\u0000-\\u001f\\u007f-\\u009f]/u.test(value) &&\n [...value].length <= limit);\n}\n/** 插入意图:分片组合 + 可选落点。诊断码沿用作者面(`AUTHORING_*`)。 */\nexport function parseBaseScreenComponentFragmentInsertionIntent(input) {\n if (!isRecord(input) || !hasExactKeys(input, INTENT_FIELDS)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment intent must be a strict object.');\n }\n if (!withinJsonBudget(input)) {\n return failure('AUTHORING_LIMIT_EXCEEDED', `Fragment must be JSON-safe and fit within ${MAX_FRAGMENT_JSON_CHARS} characters.`);\n }\n const anchor = parsePosition(input.anchor, ['anchor']);\n if (!anchor.ok)\n return anchor;\n const body = parseFragmentBody(input);\n if (!body.ok)\n return body;\n return {\n ok: true,\n value: {\n ...(anchor.value === undefined ? {} : { anchor: anchor.value }),\n ...body.value,\n },\n diagnostics: [],\n };\n}\n/**\n * 分片定义:插件 `fragment` 贡献与宿主物料库条目共用。它属于清单类契约,\n * 诊断码统一为 `PLUGIN_CORE_*`(组合部分的作者面诊断按同一路径重新归类)。\n */\nexport function parseBaseScreenFragmentDefinition(input) {\n if (!isRecord(input) || !hasExactKeys(input, DEFINITION_FIELDS)) {\n return failure('PLUGIN_CORE_MANIFEST_FIELD_INVALID', 'Fragment definition must be a strict object.');\n }\n if (!withinJsonBudget(input)) {\n return failure('PLUGIN_CORE_LIMIT_EXCEEDED', `Fragment must be JSON-safe and fit within ${MAX_FRAGMENT_JSON_CHARS} characters.`);\n }\n const diagnostics = [];\n const field = (path, message) => diagnostics.push(fieldDiagnostic(message, [path]));\n if (typeof input.id !== 'string' || !FRAGMENT_ID_PATTERN.test(input.id)) {\n field('id', 'Fragment id must match ^[A-Za-z][A-Za-z0-9._:-]{0,127}$.');\n }\n for (const key of ['name', 'category']) {\n if (!isDisplayString(input[key], MAX_FRAGMENT_DISPLAY_CODE_POINTS)) {\n field(key, `Fragment ${key} must be a display string.`);\n }\n }\n diagnostics.push(...validateKeywords(input.keywords));\n if (input.cover !== undefined &&\n !isBoundedScreenImageUrl(input.cover, MAX_FRAGMENT_COVER_LENGTH)) {\n field('cover', 'Fragment cover must be a bounded HTTP(S) or relative URL string.');\n }\n const body = parseFragmentBody(input);\n if (!body.ok)\n diagnostics.push(...body.diagnostics.map(asManifestDiagnostic));\n if (diagnostics.length > 0 || !body.ok)\n return { ok: false, diagnostics };\n return {\n ok: true,\n value: {\n id: input.id,\n name: input.name,\n category: input.category,\n keywords: [...input.keywords],\n ...(input.cover === undefined ? {} : { cover: input.cover }),\n ...body.value,\n },\n diagnostics: [],\n };\n}\nfunction parseFragmentBody(input) {\n if (!Array.isArray(input.nodes)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment nodes must be an array.', ['nodes']);\n }\n if (input.nodes.length === 0 || input.nodes.length > MAX_FRAGMENT_NODES) {\n return failure('AUTHORING_LIMIT_EXCEEDED', `Fragment must declare between 1 and ${MAX_FRAGMENT_NODES} nodes.`, ['nodes']);\n }\n const diagnostics = [];\n // 数据源先解析:节点的 dataValue 只能引用已声明的分片数据源 key。\n const dataSources = parseFragmentDataSources(input.dataSources, diagnostics);\n const dataSourceKeys = new Set((dataSources ?? []).map((source) => source.key));\n const keys = new Set();\n let shell;\n if (input.shell !== undefined) {\n if (!isRecord(input.shell)) {\n diagnostics.push(...payloadFailure('Fragment shell must be an object.', ['shell']));\n }\n else {\n const parsed = parseFragmentEntry(input.shell, SHELL_FIELDS, keys, ['shell']);\n if (!parsed.ok) {\n diagnostics.push(...parsed.diagnostics);\n }\n else {\n shell = parsed.value;\n }\n }\n }\n const nodes = [];\n for (const [index, candidate] of input.nodes.entries()) {\n const path = ['nodes', index];\n if (!isRecord(candidate)) {\n diagnostics.push(...payloadFailure('Fragment node must be an object.', path));\n continue;\n }\n const parsed = parseFragmentEntry(candidate, NODE_FIELDS, keys, path);\n if (!parsed.ok) {\n diagnostics.push(...parsed.diagnostics);\n continue;\n }\n const data = parseFragmentNodeData(candidate, dataSourceKeys, path);\n if (!data.ok) {\n diagnostics.push(...data.diagnostics);\n continue;\n }\n nodes.push({ ...parsed.value, ...data.value });\n }\n const blueprint = parseFragmentBlueprint(input.blueprint, keys, diagnostics);\n if (diagnostics.length > 0)\n return { ok: false, diagnostics };\n return {\n ok: true,\n value: {\n ...(shell === undefined ? {} : { shell }),\n nodes,\n ...(dataSources === undefined ? {} : { dataSources }),\n ...(blueprint === undefined ? {} : { blueprint }),\n },\n diagnostics: [],\n };\n}\n/** 节点的数据写入口:legacy `dataSource` 与 `dataValue` 二选一(沿用文档契约的互斥规则)。 */\nfunction parseFragmentNodeData(candidate, dataSourceKeys, path) {\n if (candidate.dataSource !== undefined && candidate.dataValue !== undefined) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node must not declare dataSource together with dataValue.', [...path, 'dataValue']);\n }\n if (candidate.dataSource !== undefined) {\n const source = parseScreenDataSource(candidate.dataSource);\n if (!source.ok) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node dataSource is not canonical.', [\n ...path,\n 'dataSource',\n ]);\n }\n if (candidate.dataBinding !== undefined) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node dataBinding requires a data-source-field dataValue.', [...path, 'dataBinding']);\n }\n return { ok: true, value: { dataSource: source.value }, diagnostics: [] };\n }\n let dataValue;\n if (candidate.dataValue === null) {\n dataValue = null;\n }\n else if (candidate.dataValue !== undefined) {\n const parsed = parseScreenValueRef(candidate.dataValue);\n if (!parsed.ok)\n return repathFailure(parsed.diagnostics, [...path, 'dataValue']);\n const reference = checkValueRef(parsed.value, dataSourceKeys, [...path, 'dataValue']);\n if (reference !== undefined)\n return { ok: false, diagnostics: [reference] };\n dataValue = parsed.value;\n }\n let dataBinding;\n if (candidate.dataBinding === null) {\n dataBinding = null;\n }\n else if (candidate.dataBinding !== undefined) {\n if (dataValue?.kind !== 'data-source-field') {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node dataBinding requires a data-source-field dataValue.', [...path, 'dataBinding']);\n }\n const parsed = parseScreenDataBinding(candidate.dataBinding);\n if (!parsed.ok)\n return repathFailure(parsed.diagnostics, [...path, 'dataBinding']);\n dataBinding = parsed.value;\n }\n return {\n ok: true,\n value: {\n ...(dataValue === undefined ? {} : { dataValue }),\n ...(dataBinding === undefined ? {} : { dataBinding }),\n },\n diagnostics: [],\n };\n}\nfunction parseFragmentDataSources(input, diagnostics) {\n if (input === undefined)\n return undefined;\n if (!Array.isArray(input)) {\n diagnostics.push(...payloadFailure('Fragment dataSources must be an array.', ['dataSources']));\n return undefined;\n }\n if (input.length > MAX_FRAGMENT_DATA_SOURCES) {\n diagnostics.push(...failure('AUTHORING_LIMIT_EXCEEDED', `Fragment must declare at most ${MAX_FRAGMENT_DATA_SOURCES} data sources.`, ['dataSources']).diagnostics);\n return undefined;\n }\n const declared = new Set();\n const sources = [];\n for (const [index, candidate] of input.entries()) {\n const path = ['dataSources', index];\n if (!isRecord(candidate) || !hasExactKeys(candidate, DATA_SOURCE_FIELDS)) {\n diagnostics.push(...payloadFailure('Fragment data source must be a strict object.', path));\n continue;\n }\n const key = candidate.key;\n if (typeof key !== 'string' || !FRAGMENT_KEY_PATTERN.test(key) || declared.has(key)) {\n diagnostics.push(...payloadFailure('Fragment data source key must be a unique fragment key.', [\n ...path,\n 'key',\n ]));\n continue;\n }\n const { key: _key, ...rest } = candidate;\n const parsed = parseScreenDataSourceInstance({ ...rest, id: key });\n if (!parsed.ok) {\n diagnostics.push(...parsed.diagnostics.map((item) => ({\n ...item,\n code: 'AUTHORING_PAYLOAD_INVALID',\n path: [...path, ...(item.path[0] === 'id' ? ['key', ...item.path.slice(1)] : item.path)],\n })));\n continue;\n }\n // 参数只能引用更早声明的分片数据源:声明顺序即求值顺序,不需要再做环判定。\n let clean = true;\n for (const [name, ref] of Object.entries(parsed.value.params)) {\n const problem = checkValueRef(ref, declared, [...path, 'params', name]);\n if (problem !== undefined) {\n diagnostics.push(problem);\n clean = false;\n }\n }\n declared.add(key);\n if (!clean)\n continue;\n const { id: _id, readOnly: _readOnly, ...source } = parsed.value;\n sources.push({ key, ...source });\n }\n return sources;\n}\nfunction parseFragmentBlueprint(input, entryKeys, diagnostics) {\n if (input === undefined)\n return undefined;\n if (!isRecord(input)) {\n diagnostics.push(...payloadFailure('Fragment blueprint must be an object.', ['blueprint']));\n return undefined;\n }\n for (const key of Object.keys(input)) {\n if (!FRAGMENT_BLUEPRINT_FIELDS.has(key)) {\n diagnostics.push(...payloadFailure(`Unknown fragment blueprint field \"${key}\".`, ['blueprint', key]));\n return undefined;\n }\n }\n const nodeCount = Array.isArray(input.nodes) ? input.nodes.length : 0;\n const edgeCount = Array.isArray(input.edges) ? input.edges.length : 0;\n if (nodeCount > MAX_FRAGMENT_BLUEPRINT_NODES || edgeCount > MAX_FRAGMENT_BLUEPRINT_EDGES) {\n diagnostics.push(...failure('AUTHORING_LIMIT_EXCEEDED', `Fragment blueprint must declare at most ${MAX_FRAGMENT_BLUEPRINT_NODES} nodes and ${MAX_FRAGMENT_BLUEPRINT_EDGES} edges.`, ['blueprint']).diagnostics);\n return undefined;\n }\n const parsed = parseScreenBlueprintGraph(input);\n if (!parsed.ok) {\n diagnostics.push(...repathFailure(parsed.diagnostics, ['blueprint']).diagnostics);\n return undefined;\n }\n const graph = parsed.value;\n let clean = true;\n graph.nodes.forEach((node, index) => {\n const path = ['blueprint', 'nodes', index];\n if (node.kind === 'variable') {\n diagnostics.push(...payloadFailure('Fragment blueprint must not contain variable nodes.', [...path, 'kind']));\n clean = false;\n }\n else if (node.kind === 'component' && !entryKeys.has(node.componentId)) {\n diagnostics.push(...payloadFailure('Fragment blueprint node must reference a fragment entry key.', [\n ...path,\n 'componentId',\n ]));\n clean = false;\n }\n else if (node.kind === 'condition' &&\n (referencesVariable(node.condition.left) ||\n (node.condition.right !== undefined && referencesVariable(node.condition.right)))) {\n diagnostics.push(...payloadFailure('Fragment blueprint must not reference variables.', [\n ...path,\n 'condition',\n ]));\n clean = false;\n }\n });\n graph.edges.forEach((edge, index) => {\n if (edge.kind !== 'flow')\n return;\n for (const field of ['value', 'payload']) {\n const expression = edge[field];\n if (expression !== undefined && referencesVariable(expression)) {\n diagnostics.push(...payloadFailure('Fragment blueprint must not reference variables.', [\n 'blueprint',\n 'edges',\n index,\n field,\n ]));\n clean = false;\n }\n }\n });\n return clean ? { nodes: graph.nodes, edges: graph.edges } : undefined;\n}\nfunction referencesVariable(expression) {\n if (expression.kind === 'variable')\n return true;\n if (expression.kind === 'array')\n return expression.items.some(referencesVariable);\n if (expression.kind === 'object') {\n return Object.values(expression.properties).some(referencesVariable);\n }\n return false;\n}\n/** 分片里的取值引用:不得引用变量;数据源字段只能指向已声明的分片数据源 key。 */\nfunction checkValueRef(ref, dataSourceKeys, path) {\n if (ref.kind === 'variable') {\n return payloadFailure('Fragment value references must not reference variables.', path)[0];\n }\n if (ref.kind === 'data-source-field' && !dataSourceKeys.has(ref.dataSourceId)) {\n return payloadFailure('Fragment value reference must point to an earlier declared fragment data source key.', [...path, 'dataSourceId'])[0];\n }\n return undefined;\n}\nfunction repathFailure(diagnostics, prefix) {\n return {\n ok: false,\n diagnostics: diagnostics.map((item) => ({\n ...item,\n code: item.code === 'DOCUMENT_LIMIT_EXCEEDED'\n ? 'AUTHORING_LIMIT_EXCEEDED'\n : 'AUTHORING_PAYLOAD_INVALID',\n path: [...prefix, ...item.path],\n })),\n };\n}\nfunction parseFragmentEntry(candidate, allowed, keys, path) {\n if (!hasExactKeys(candidate, allowed)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry declares an unsupported field.', path);\n }\n if (typeof candidate.key !== 'string' || !FRAGMENT_KEY_PATTERN.test(candidate.key)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry key must match ^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$.', [...path, 'key']);\n }\n if (keys.has(candidate.key)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry key must be unique.', [\n ...path,\n 'key',\n ]);\n }\n if (!isScreenMaterialType(candidate.materialType)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry materialType must be a canonical material type.', [...path, 'materialType']);\n }\n if (candidate.name !== undefined &&\n !isBaseScreenBoundedName(candidate.name, MAX_FRAGMENT_NAME_CODE_POINTS)) {\n return failure('AUTHORING_PAYLOAD_INVALID', `Fragment entry name must contain 1 to ${MAX_FRAGMENT_NAME_CODE_POINTS} code points without control characters.`, [...path, 'name']);\n }\n if ('parent' in candidate && typeof candidate.parent !== 'string') {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node parent must be a string.', [\n ...path,\n 'parent',\n ]);\n }\n for (const field of ['props', 'style']) {\n if (candidate[field] !== undefined && !isRecord(candidate[field])) {\n return failure('AUTHORING_PAYLOAD_INVALID', `Fragment entry ${field} must be an object.`, [\n ...path,\n field,\n ]);\n }\n }\n if (candidate.rotation !== undefined &&\n (!isFiniteNumber(candidate.rotation) || candidate.rotation < -180 || candidate.rotation >= 180)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry rotation must be a finite angle in [-180, 180).', [...path, 'rotation']);\n }\n const offset = parsePosition(candidate.offset, [...path, 'offset']);\n if (!offset.ok)\n return offset;\n const size = parseSize(candidate.size, [...path, 'size']);\n if (!size.ok)\n return size;\n keys.add(candidate.key);\n return {\n ok: true,\n value: {\n key: candidate.key,\n materialType: candidate.materialType,\n ...(candidate.name === undefined ? {} : { name: candidate.name }),\n ...(offset.value === undefined ? {} : { offset: offset.value }),\n ...(size.value === undefined ? {} : { size: size.value }),\n ...(candidate.props === undefined ? {} : { props: candidate.props }),\n ...(candidate.style === undefined ? {} : { style: candidate.style }),\n ...(candidate.rotation === undefined ? {} : { rotation: candidate.rotation }),\n ...(typeof candidate.parent === 'string' ? { parent: candidate.parent } : {}),\n },\n diagnostics: [],\n };\n}\nfunction parsePosition(value, path) {\n if (value === undefined)\n return { ok: true, value: undefined, diagnostics: [] };\n if (!isRecord(value) ||\n !hasExactKeys(value, POSITION_FIELDS) ||\n !isFiniteNumber(value.x) ||\n !isFiniteNumber(value.y)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment position must be finite coordinates.', path);\n }\n return { ok: true, value: { x: value.x, y: value.y }, diagnostics: [] };\n}\nfunction parseSize(value, path) {\n if (value === undefined)\n return { ok: true, value: undefined, diagnostics: [] };\n if (!isRecord(value) ||\n !hasExactKeys(value, SIZE_FIELDS) ||\n !isFiniteNumber(value.width) ||\n !isFiniteNumber(value.height) ||\n value.width <= 0 ||\n value.height <= 0) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment size must be positive finite width and height.', path);\n }\n return { ok: true, value: { width: value.width, height: value.height }, diagnostics: [] };\n}\n/** 整个分片的 JSON 体积守卫;循环引用在此失败而不是在序列化时抛出。 */\nfunction withinJsonBudget(input) {\n try {\n return JSON.stringify(input).length <= MAX_FRAGMENT_JSON_CHARS;\n }\n catch {\n return false;\n }\n}\nfunction payloadFailure(message, path) {\n return failure('AUTHORING_PAYLOAD_INVALID', message, path).diagnostics;\n}\nfunction isRecord(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nfunction hasExactKeys(value, allowed) {\n return Object.keys(value).every((key) => allowed.has(key));\n}\nfunction failure(code, message, path = []) {\n return { ok: false, diagnostics: [{ severity: 'error', code, path, message }] };\n}\nfunction validateKeywords(value) {\n if (!Array.isArray(value)) {\n return [fieldDiagnostic('Fragment keywords must be an array of strings.', ['keywords'])];\n }\n if (value.length > MAX_FRAGMENT_KEYWORDS) {\n return [\n {\n ...fieldDiagnostic('Fragment keywords exceed their maximum item count.', ['keywords']),\n code: 'PLUGIN_CORE_LIMIT_EXCEEDED',\n },\n ];\n }\n const diagnostics = [];\n const seen = new Set();\n for (const [index, keyword] of value.entries()) {\n if (!isDisplayString(keyword, MAX_FRAGMENT_KEYWORD_CODE_POINTS)) {\n diagnostics.push(fieldDiagnostic('Fragment keyword is invalid.', ['keywords', index]));\n }\n else if (seen.has(keyword)) {\n diagnostics.push({\n ...fieldDiagnostic('Fragment keyword is duplicated.', ['keywords', index]),\n code: 'PLUGIN_CORE_CONTRIBUTION_DUPLICATE',\n });\n }\n else {\n seen.add(keyword);\n }\n }\n return diagnostics;\n}\n/** 作者面诊断归入清单类:超限仍是超限,其余一律字段无效;路径与文案不变。 */\nfunction asManifestDiagnostic(diagnostic) {\n return {\n ...diagnostic,\n code: diagnostic.code === 'AUTHORING_LIMIT_EXCEEDED'\n ? 'PLUGIN_CORE_LIMIT_EXCEEDED'\n : 'PLUGIN_CORE_MANIFEST_FIELD_INVALID',\n };\n}\nfunction fieldDiagnostic(message, path) {\n return { severity: 'error', code: 'PLUGIN_CORE_MANIFEST_FIELD_INVALID', path, message };\n}\n//# sourceMappingURL=fragment.js.map"],"mappings":";;;;;AAEA,IAAM,IAAc;CAAC;CAAS;CAAS;CAAe;AAAW,GAC3D,oBAAgB,IAAI,IAAI,CAAC,UAAU,GAAG,CAAW,CAAC,GAClD,oBAAoB,IAAI,IAAI;CAAC;CAAM;CAAQ;CAAY;CAAY;CAAS,GAAG;AAAW,CAAC,GAC3F,oBAAe,IAAI,IAAI;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC,GACK,oBAAc,IAAI,IA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EAAiB,GAAO;CAC7B,IAAI,CAAC,MAAM,QAAQ,CAAK,GACpB,OAAO,CAAC,EAAgB,kDAAkD,CAAC,UAAU,CAAC,CAAC;CAE3F,IAAI,EAAM,SAAS,GACf,OAAO,CACH;EACI,GAAG,EAAgB,sDAAsD,CAAC,UAAU,CAAC;EACrF,MAAM;CACV,CACJ;CAEJ,IAAM,IAAc,CAAC,GACf,oBAAO,IAAI,IAAI;CACrB,KAAK,IAAM,CAAC,GAAO,MAAY,EAAM,QAAQ,GACzC,AAAK,EAAgB,GAAS,CAAgC,IAGrD,EAAK,IAAI,CAAO,IACrB,EAAY,KAAK;EACb,GAAG,EAAgB,mCAAmC,CAAC,YAAY,CAAK,CAAC;EACzE,MAAM;CACV,CAAC,IAGD,EAAK,IAAI,CAAO,IAThB,EAAY,KAAK,EAAgB,gCAAgC,CAAC,YAAY,CAAK,CAAC,CAAC;CAY7F,OAAO;AACX;AAEA,SAAS,EAAqB,GAAY;CACtC,OAAO;EACH,GAAG;EACH,MAAM,EAAW,SAAS,6BACpB,+BACA;CACV;AACJ;AACA,SAAS,EAAgB,GAAS,GAAM;CACpC,OAAO;EAAE,UAAU;EAAS,MAAM;EAAsC;EAAM;CAAQ;AAC1F"}
1
+ {"version":3,"file":"fragment-B-oP0Fru.js","names":[],"sources":["../../plugin-core/dist/fragment/fragment.js"],"sourcesContent":["import { isBoundedScreenImageUrl, isScreenMaterialType, parseScreenBlueprintGraph, parseScreenDataBinding, parseScreenDataSource, parseScreenDataSourceInstance, parseScreenValueRef, } from '@base-screen/contracts';\nimport { isDisplayString, isFiniteNumber } from '../material/material-validation-utils.js';\nconst BODY_FIELDS = ['shell', 'nodes', 'dataSources', 'blueprint'];\nconst INTENT_FIELDS = new Set(['anchor', ...BODY_FIELDS]);\nconst DEFINITION_FIELDS = new Set(['id', 'name', 'category', 'keywords', 'cover', ...BODY_FIELDS]);\nconst SHELL_FIELDS = new Set([\n 'key',\n 'materialType',\n 'name',\n 'offset',\n 'size',\n 'rotation',\n 'props',\n 'style',\n]);\nconst NODE_FIELDS = new Set([...SHELL_FIELDS, 'parent', 'dataSource', 'dataValue', 'dataBinding']);\nconst DATA_SOURCE_FIELDS = new Set([\n 'key',\n 'name',\n 'source',\n 'params',\n 'updatePolicy',\n 'processorId',\n]);\n/** 分片自带的文档级数据源与蓝图节点 / 连线上限:分片是一张卡片级的组合,不是页面模板。 */\nconst MAX_FRAGMENT_DATA_SOURCES = 16;\nconst MAX_FRAGMENT_BLUEPRINT_NODES = 32;\nconst MAX_FRAGMENT_BLUEPRINT_EDGES = 32;\nconst FRAGMENT_BLUEPRINT_FIELDS = new Set(['nodes', 'edges']);\nconst POSITION_FIELDS = new Set(['x', 'y']);\nconst SIZE_FIELDS = new Set(['width', 'height']);\nconst FRAGMENT_KEY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/;\n/** 与物料库条目 id 同一词法:分片在物料库里以 id 区分收藏、最近使用与拖放。 */\nconst FRAGMENT_ID_PATTERN = /^[A-Za-z][A-Za-z0-9._:-]{0,127}$/;\nconst MAX_FRAGMENT_NODES = 64;\nconst MAX_FRAGMENT_JSON_CHARS = 64 * 1024;\nconst MAX_FRAGMENT_NAME_CODE_POINTS = 256;\n/** 元数据上限与物料 manifest 一致(name/category 256、keywords 64 × 64、cover 2048)。 */\nconst MAX_FRAGMENT_DISPLAY_CODE_POINTS = 256;\nconst MAX_FRAGMENT_KEYWORDS = 64;\nconst MAX_FRAGMENT_KEYWORD_CODE_POINTS = 64;\nconst MAX_FRAGMENT_COVER_LENGTH = 2048;\n/**\n * 「受长度约束的名称」的唯一校验规则:至少一个非空白字符、不含 C0/C1 控制字符、码点数不超过上限。\n *\n * 组件名、宿主资源名与分片条目名共用这一条;Engine 经公共导出消费,不另写一份。\n */\nexport function isBaseScreenBoundedName(value, limit) {\n return (typeof value === 'string' &&\n /\\S/.test(value) &&\n !/[\\u0000-\\u001f\\u007f-\\u009f]/u.test(value) &&\n [...value].length <= limit);\n}\n/** 插入意图:分片组合 + 可选落点。诊断码沿用作者面(`AUTHORING_*`)。 */\nexport function parseBaseScreenComponentFragmentInsertionIntent(input) {\n if (!isRecord(input) || !hasExactKeys(input, INTENT_FIELDS)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment intent must be a strict object.');\n }\n if (!withinJsonBudget(input)) {\n return failure('AUTHORING_LIMIT_EXCEEDED', `Fragment must be JSON-safe and fit within ${MAX_FRAGMENT_JSON_CHARS} characters.`);\n }\n const anchor = parsePosition(input.anchor, ['anchor']);\n if (!anchor.ok)\n return anchor;\n const body = parseFragmentBody(input);\n if (!body.ok)\n return body;\n return {\n ok: true,\n value: {\n ...(anchor.value === undefined ? {} : { anchor: anchor.value }),\n ...body.value,\n },\n diagnostics: [],\n };\n}\n/**\n * 分片定义:插件 `fragment` 贡献与宿主物料库条目共用。它属于清单类契约,\n * 诊断码统一为 `PLUGIN_CORE_*`(组合部分的作者面诊断按同一路径重新归类)。\n */\nexport function parseBaseScreenFragmentDefinition(input) {\n if (!isRecord(input) || !hasExactKeys(input, DEFINITION_FIELDS)) {\n return failure('PLUGIN_CORE_MANIFEST_FIELD_INVALID', 'Fragment definition must be a strict object.');\n }\n if (!withinJsonBudget(input)) {\n return failure('PLUGIN_CORE_LIMIT_EXCEEDED', `Fragment must be JSON-safe and fit within ${MAX_FRAGMENT_JSON_CHARS} characters.`);\n }\n const diagnostics = [];\n const field = (path, message) => diagnostics.push(fieldDiagnostic(message, [path]));\n if (typeof input.id !== 'string' || !FRAGMENT_ID_PATTERN.test(input.id)) {\n field('id', 'Fragment id must match ^[A-Za-z][A-Za-z0-9._:-]{0,127}$.');\n }\n for (const key of ['name', 'category']) {\n if (!isDisplayString(input[key], MAX_FRAGMENT_DISPLAY_CODE_POINTS)) {\n field(key, `Fragment ${key} must be a display string.`);\n }\n }\n diagnostics.push(...validateKeywords(input.keywords));\n if (input.cover !== undefined &&\n !isBoundedScreenImageUrl(input.cover, MAX_FRAGMENT_COVER_LENGTH)) {\n field('cover', 'Fragment cover must be a bounded HTTP(S) or relative URL string.');\n }\n const body = parseFragmentBody(input);\n if (!body.ok)\n diagnostics.push(...body.diagnostics.map(asManifestDiagnostic));\n if (diagnostics.length > 0 || !body.ok)\n return { ok: false, diagnostics };\n return {\n ok: true,\n value: {\n id: input.id,\n name: input.name,\n category: input.category,\n keywords: [...input.keywords],\n ...(input.cover === undefined ? {} : { cover: input.cover }),\n ...body.value,\n },\n diagnostics: [],\n };\n}\nfunction parseFragmentBody(input) {\n if (!Array.isArray(input.nodes)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment nodes must be an array.', ['nodes']);\n }\n if (input.nodes.length === 0 || input.nodes.length > MAX_FRAGMENT_NODES) {\n return failure('AUTHORING_LIMIT_EXCEEDED', `Fragment must declare between 1 and ${MAX_FRAGMENT_NODES} nodes.`, ['nodes']);\n }\n const diagnostics = [];\n // 数据源先解析:节点的 dataValue 只能引用已声明的分片数据源 key。\n const dataSources = parseFragmentDataSources(input.dataSources, diagnostics);\n const dataSourceKeys = new Set((dataSources ?? []).map((source) => source.key));\n const keys = new Set();\n let shell;\n if (input.shell !== undefined) {\n if (!isRecord(input.shell)) {\n diagnostics.push(...payloadFailure('Fragment shell must be an object.', ['shell']));\n }\n else {\n const parsed = parseFragmentEntry(input.shell, SHELL_FIELDS, keys, ['shell']);\n if (!parsed.ok) {\n diagnostics.push(...parsed.diagnostics);\n }\n else {\n shell = parsed.value;\n }\n }\n }\n const nodes = [];\n for (const [index, candidate] of input.nodes.entries()) {\n const path = ['nodes', index];\n if (!isRecord(candidate)) {\n diagnostics.push(...payloadFailure('Fragment node must be an object.', path));\n continue;\n }\n const parsed = parseFragmentEntry(candidate, NODE_FIELDS, keys, path);\n if (!parsed.ok) {\n diagnostics.push(...parsed.diagnostics);\n continue;\n }\n const data = parseFragmentNodeData(candidate, dataSourceKeys, path);\n if (!data.ok) {\n diagnostics.push(...data.diagnostics);\n continue;\n }\n nodes.push({ ...parsed.value, ...data.value });\n }\n const blueprint = parseFragmentBlueprint(input.blueprint, keys, diagnostics);\n if (diagnostics.length > 0)\n return { ok: false, diagnostics };\n return {\n ok: true,\n value: {\n ...(shell === undefined ? {} : { shell }),\n nodes,\n ...(dataSources === undefined ? {} : { dataSources }),\n ...(blueprint === undefined ? {} : { blueprint }),\n },\n diagnostics: [],\n };\n}\n/** 节点的数据写入口:legacy `dataSource` 与 `dataValue` 二选一(沿用文档契约的互斥规则)。 */\nfunction parseFragmentNodeData(candidate, dataSourceKeys, path) {\n if (candidate.dataSource !== undefined && candidate.dataValue !== undefined) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node must not declare dataSource together with dataValue.', [...path, 'dataValue']);\n }\n if (candidate.dataSource !== undefined) {\n const source = parseScreenDataSource(candidate.dataSource);\n if (!source.ok) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node dataSource is not canonical.', [\n ...path,\n 'dataSource',\n ]);\n }\n if (candidate.dataBinding !== undefined) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node dataBinding requires a data-source-field dataValue.', [...path, 'dataBinding']);\n }\n return { ok: true, value: { dataSource: source.value }, diagnostics: [] };\n }\n let dataValue;\n if (candidate.dataValue === null) {\n dataValue = null;\n }\n else if (candidate.dataValue !== undefined) {\n const parsed = parseScreenValueRef(candidate.dataValue);\n if (!parsed.ok)\n return repathFailure(parsed.diagnostics, [...path, 'dataValue']);\n const reference = checkValueRef(parsed.value, dataSourceKeys, [...path, 'dataValue']);\n if (reference !== undefined)\n return { ok: false, diagnostics: [reference] };\n dataValue = parsed.value;\n }\n let dataBinding;\n if (candidate.dataBinding === null) {\n dataBinding = null;\n }\n else if (candidate.dataBinding !== undefined) {\n if (dataValue?.kind !== 'data-source-field') {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node dataBinding requires a data-source-field dataValue.', [...path, 'dataBinding']);\n }\n const parsed = parseScreenDataBinding(candidate.dataBinding);\n if (!parsed.ok)\n return repathFailure(parsed.diagnostics, [...path, 'dataBinding']);\n dataBinding = parsed.value;\n }\n return {\n ok: true,\n value: {\n ...(dataValue === undefined ? {} : { dataValue }),\n ...(dataBinding === undefined ? {} : { dataBinding }),\n },\n diagnostics: [],\n };\n}\nfunction parseFragmentDataSources(input, diagnostics) {\n if (input === undefined)\n return undefined;\n if (!Array.isArray(input)) {\n diagnostics.push(...payloadFailure('Fragment dataSources must be an array.', ['dataSources']));\n return undefined;\n }\n if (input.length > MAX_FRAGMENT_DATA_SOURCES) {\n diagnostics.push(...failure('AUTHORING_LIMIT_EXCEEDED', `Fragment must declare at most ${MAX_FRAGMENT_DATA_SOURCES} data sources.`, ['dataSources']).diagnostics);\n return undefined;\n }\n const declared = new Set();\n const sources = [];\n for (const [index, candidate] of input.entries()) {\n const path = ['dataSources', index];\n if (!isRecord(candidate) || !hasExactKeys(candidate, DATA_SOURCE_FIELDS)) {\n diagnostics.push(...payloadFailure('Fragment data source must be a strict object.', path));\n continue;\n }\n const key = candidate.key;\n if (typeof key !== 'string' || !FRAGMENT_KEY_PATTERN.test(key) || declared.has(key)) {\n diagnostics.push(...payloadFailure('Fragment data source key must be a unique fragment key.', [\n ...path,\n 'key',\n ]));\n continue;\n }\n const { key: _key, ...rest } = candidate;\n const parsed = parseScreenDataSourceInstance({ ...rest, id: key });\n if (!parsed.ok) {\n diagnostics.push(...parsed.diagnostics.map((item) => ({\n ...item,\n code: 'AUTHORING_PAYLOAD_INVALID',\n path: [...path, ...(item.path[0] === 'id' ? ['key', ...item.path.slice(1)] : item.path)],\n })));\n continue;\n }\n // 参数只能引用更早声明的分片数据源:声明顺序即求值顺序,不需要再做环判定。\n let clean = true;\n for (const [name, ref] of Object.entries(parsed.value.params)) {\n const problem = checkValueRef(ref, declared, [...path, 'params', name]);\n if (problem !== undefined) {\n diagnostics.push(problem);\n clean = false;\n }\n }\n declared.add(key);\n if (!clean)\n continue;\n const { id: _id, readOnly: _readOnly, ...source } = parsed.value;\n sources.push({ key, ...source });\n }\n return sources;\n}\nfunction parseFragmentBlueprint(input, entryKeys, diagnostics) {\n if (input === undefined)\n return undefined;\n if (!isRecord(input)) {\n diagnostics.push(...payloadFailure('Fragment blueprint must be an object.', ['blueprint']));\n return undefined;\n }\n for (const key of Object.keys(input)) {\n if (!FRAGMENT_BLUEPRINT_FIELDS.has(key)) {\n diagnostics.push(...payloadFailure(`Unknown fragment blueprint field \"${key}\".`, ['blueprint', key]));\n return undefined;\n }\n }\n const nodeCount = Array.isArray(input.nodes) ? input.nodes.length : 0;\n const edgeCount = Array.isArray(input.edges) ? input.edges.length : 0;\n if (nodeCount > MAX_FRAGMENT_BLUEPRINT_NODES || edgeCount > MAX_FRAGMENT_BLUEPRINT_EDGES) {\n diagnostics.push(...failure('AUTHORING_LIMIT_EXCEEDED', `Fragment blueprint must declare at most ${MAX_FRAGMENT_BLUEPRINT_NODES} nodes and ${MAX_FRAGMENT_BLUEPRINT_EDGES} edges.`, ['blueprint']).diagnostics);\n return undefined;\n }\n const parsed = parseScreenBlueprintGraph(input);\n if (!parsed.ok) {\n diagnostics.push(...repathFailure(parsed.diagnostics, ['blueprint']).diagnostics);\n return undefined;\n }\n const graph = parsed.value;\n let clean = true;\n graph.nodes.forEach((node, index) => {\n const path = ['blueprint', 'nodes', index];\n if (node.kind === 'variable') {\n diagnostics.push(...payloadFailure('Fragment blueprint must not contain variable nodes.', [...path, 'kind']));\n clean = false;\n }\n else if (node.kind === 'component' && !entryKeys.has(node.componentId)) {\n diagnostics.push(...payloadFailure('Fragment blueprint node must reference a fragment entry key.', [\n ...path,\n 'componentId',\n ]));\n clean = false;\n }\n else if (node.kind === 'condition' &&\n (referencesVariable(node.condition.left) ||\n (node.condition.right !== undefined && referencesVariable(node.condition.right)))) {\n diagnostics.push(...payloadFailure('Fragment blueprint must not reference variables.', [\n ...path,\n 'condition',\n ]));\n clean = false;\n }\n });\n graph.edges.forEach((edge, index) => {\n if (edge.kind !== 'flow')\n return;\n for (const field of ['value', 'payload']) {\n const expression = edge[field];\n if (expression !== undefined && referencesVariable(expression)) {\n diagnostics.push(...payloadFailure('Fragment blueprint must not reference variables.', [\n 'blueprint',\n 'edges',\n index,\n field,\n ]));\n clean = false;\n }\n }\n });\n return clean ? { nodes: graph.nodes, edges: graph.edges } : undefined;\n}\nfunction referencesVariable(expression) {\n if (expression.kind === 'variable')\n return true;\n if (expression.kind === 'array')\n return expression.items.some(referencesVariable);\n if (expression.kind === 'object') {\n return Object.values(expression.properties).some(referencesVariable);\n }\n return false;\n}\n/** 分片里的取值引用:不得引用变量;数据源字段只能指向已声明的分片数据源 key。 */\nfunction checkValueRef(ref, dataSourceKeys, path) {\n if (ref.kind === 'variable') {\n return payloadFailure('Fragment value references must not reference variables.', path)[0];\n }\n if (ref.kind === 'data-source-field' && !dataSourceKeys.has(ref.dataSourceId)) {\n return payloadFailure('Fragment value reference must point to an earlier declared fragment data source key.', [...path, 'dataSourceId'])[0];\n }\n return undefined;\n}\nfunction repathFailure(diagnostics, prefix) {\n return {\n ok: false,\n diagnostics: diagnostics.map((item) => ({\n ...item,\n code: item.code === 'DOCUMENT_LIMIT_EXCEEDED'\n ? 'AUTHORING_LIMIT_EXCEEDED'\n : 'AUTHORING_PAYLOAD_INVALID',\n path: [...prefix, ...item.path],\n })),\n };\n}\nfunction parseFragmentEntry(candidate, allowed, keys, path) {\n if (!hasExactKeys(candidate, allowed)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry declares an unsupported field.', path);\n }\n if (typeof candidate.key !== 'string' || !FRAGMENT_KEY_PATTERN.test(candidate.key)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry key must match ^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$.', [...path, 'key']);\n }\n if (keys.has(candidate.key)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry key must be unique.', [\n ...path,\n 'key',\n ]);\n }\n if (!isScreenMaterialType(candidate.materialType)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry materialType must be a canonical material type.', [...path, 'materialType']);\n }\n if (candidate.name !== undefined &&\n !isBaseScreenBoundedName(candidate.name, MAX_FRAGMENT_NAME_CODE_POINTS)) {\n return failure('AUTHORING_PAYLOAD_INVALID', `Fragment entry name must contain 1 to ${MAX_FRAGMENT_NAME_CODE_POINTS} code points without control characters.`, [...path, 'name']);\n }\n if ('parent' in candidate && typeof candidate.parent !== 'string') {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment node parent must be a string.', [\n ...path,\n 'parent',\n ]);\n }\n for (const field of ['props', 'style']) {\n if (candidate[field] !== undefined && !isRecord(candidate[field])) {\n return failure('AUTHORING_PAYLOAD_INVALID', `Fragment entry ${field} must be an object.`, [\n ...path,\n field,\n ]);\n }\n }\n if (candidate.rotation !== undefined &&\n (!isFiniteNumber(candidate.rotation) || candidate.rotation < -180 || candidate.rotation >= 180)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment entry rotation must be a finite angle in [-180, 180).', [...path, 'rotation']);\n }\n const offset = parsePosition(candidate.offset, [...path, 'offset']);\n if (!offset.ok)\n return offset;\n const size = parseSize(candidate.size, [...path, 'size']);\n if (!size.ok)\n return size;\n keys.add(candidate.key);\n return {\n ok: true,\n value: {\n key: candidate.key,\n materialType: candidate.materialType,\n ...(candidate.name === undefined ? {} : { name: candidate.name }),\n ...(offset.value === undefined ? {} : { offset: offset.value }),\n ...(size.value === undefined ? {} : { size: size.value }),\n ...(candidate.props === undefined ? {} : { props: candidate.props }),\n ...(candidate.style === undefined ? {} : { style: candidate.style }),\n ...(candidate.rotation === undefined ? {} : { rotation: candidate.rotation }),\n ...(typeof candidate.parent === 'string' ? { parent: candidate.parent } : {}),\n },\n diagnostics: [],\n };\n}\nfunction parsePosition(value, path) {\n if (value === undefined)\n return { ok: true, value: undefined, diagnostics: [] };\n if (!isRecord(value) ||\n !hasExactKeys(value, POSITION_FIELDS) ||\n !isFiniteNumber(value.x) ||\n !isFiniteNumber(value.y)) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment position must be finite coordinates.', path);\n }\n return { ok: true, value: { x: value.x, y: value.y }, diagnostics: [] };\n}\nfunction parseSize(value, path) {\n if (value === undefined)\n return { ok: true, value: undefined, diagnostics: [] };\n if (!isRecord(value) ||\n !hasExactKeys(value, SIZE_FIELDS) ||\n !isFiniteNumber(value.width) ||\n !isFiniteNumber(value.height) ||\n value.width <= 0 ||\n value.height <= 0) {\n return failure('AUTHORING_PAYLOAD_INVALID', 'Fragment size must be positive finite width and height.', path);\n }\n return { ok: true, value: { width: value.width, height: value.height }, diagnostics: [] };\n}\n/** 整个分片的 JSON 体积守卫;循环引用在此失败而不是在序列化时抛出。 */\nfunction withinJsonBudget(input) {\n try {\n return JSON.stringify(input).length <= MAX_FRAGMENT_JSON_CHARS;\n }\n catch {\n return false;\n }\n}\nfunction payloadFailure(message, path) {\n return failure('AUTHORING_PAYLOAD_INVALID', message, path).diagnostics;\n}\nfunction isRecord(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nfunction hasExactKeys(value, allowed) {\n return Object.keys(value).every((key) => allowed.has(key));\n}\nfunction failure(code, message, path = []) {\n return { ok: false, diagnostics: [{ severity: 'error', code, path, message }] };\n}\nfunction validateKeywords(value) {\n if (!Array.isArray(value)) {\n return [fieldDiagnostic('Fragment keywords must be an array of strings.', ['keywords'])];\n }\n if (value.length > MAX_FRAGMENT_KEYWORDS) {\n return [\n {\n ...fieldDiagnostic('Fragment keywords exceed their maximum item count.', ['keywords']),\n code: 'PLUGIN_CORE_LIMIT_EXCEEDED',\n },\n ];\n }\n const diagnostics = [];\n const seen = new Set();\n for (const [index, keyword] of value.entries()) {\n if (!isDisplayString(keyword, MAX_FRAGMENT_KEYWORD_CODE_POINTS)) {\n diagnostics.push(fieldDiagnostic('Fragment keyword is invalid.', ['keywords', index]));\n }\n else if (seen.has(keyword)) {\n diagnostics.push({\n ...fieldDiagnostic('Fragment keyword is duplicated.', ['keywords', index]),\n code: 'PLUGIN_CORE_CONTRIBUTION_DUPLICATE',\n });\n }\n else {\n seen.add(keyword);\n }\n }\n return diagnostics;\n}\n/** 作者面诊断归入清单类:超限仍是超限,其余一律字段无效;路径与文案不变。 */\nfunction asManifestDiagnostic(diagnostic) {\n return {\n ...diagnostic,\n code: diagnostic.code === 'AUTHORING_LIMIT_EXCEEDED'\n ? 'PLUGIN_CORE_LIMIT_EXCEEDED'\n : 'PLUGIN_CORE_MANIFEST_FIELD_INVALID',\n };\n}\nfunction fieldDiagnostic(message, path) {\n return { severity: 'error', code: 'PLUGIN_CORE_MANIFEST_FIELD_INVALID', path, message };\n}\n//# sourceMappingURL=fragment.js.map"],"mappings":";;;;;AAEA,IAAM,IAAc;CAAC;CAAS;CAAS;CAAe;AAAW,GAC3D,oBAAgB,IAAI,IAAI,CAAC,UAAU,GAAG,CAAW,CAAC,GAClD,oBAAoB,IAAI,IAAI;CAAC;CAAM;CAAQ;CAAY;CAAY;CAAS,GAAG;AAAW,CAAC,GAC3F,oBAAe,IAAI,IAAI;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC,GACK,oBAAc,IAAI,IAAI;CAAC,GAAG;CAAc;CAAU;CAAc;CAAa;AAAa,CAAC,GAC3F,oBAAqB,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC,GAEK,IAA4B,IAC5B,IAA+B,IAC/B,IAA+B,IAC/B,oBAA4B,IAAI,IAAI,CAAC,SAAS,OAAO,CAAC,GACtD,oBAAkB,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,GACpC,oBAAc,IAAI,IAAI,CAAC,SAAS,QAAQ,CAAC,GACzC,IAAuB,sCAEvB,IAAsB,oCACtB,IAAqB,IACrB,IAA0B,OAC1B,IAAgC,KAEhC,IAAmC,KACnC,IAAwB,IACxB,IAAmC,IACnC,IAA4B;AAMlC,SAAgB,EAAwB,GAAO,GAAO;CAClD,OAAQ,OAAO,KAAU,YACrB,KAAK,K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