@aglyn/besigner-ui 1.0.0-beta.143

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 (486) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/package.json +73 -0
  4. package/src/besigner.d.ts +88 -0
  5. package/src/besigner.js +89 -0
  6. package/src/besigner.js.map +1 -0
  7. package/src/index.d.ts +17 -0
  8. package/src/index.js +18 -0
  9. package/src/index.js.map +1 -0
  10. package/src/lib/box-styler/box-styler.d.ts +57 -0
  11. package/src/lib/box-styler/box-styler.js +240 -0
  12. package/src/lib/box-styler/box-styler.js.map +1 -0
  13. package/src/lib/box-styler/components/box-diagram.d.ts +89 -0
  14. package/src/lib/box-styler/components/box-diagram.js +661 -0
  15. package/src/lib/box-styler/components/box-diagram.js.map +1 -0
  16. package/src/lib/box-styler/components/legend.d.ts +56 -0
  17. package/src/lib/box-styler/components/legend.js +130 -0
  18. package/src/lib/box-styler/components/legend.js.map +1 -0
  19. package/src/lib/box-styler/components/spacing-editor.d.ts +55 -0
  20. package/src/lib/box-styler/components/spacing-editor.js +347 -0
  21. package/src/lib/box-styler/components/spacing-editor.js.map +1 -0
  22. package/src/lib/box-styler/constants.d.ts +17 -0
  23. package/src/lib/box-styler/constants.js +30 -0
  24. package/src/lib/box-styler/constants.js.map +1 -0
  25. package/src/lib/box-styler/index.d.ts +2 -0
  26. package/src/lib/box-styler/index.js +4 -0
  27. package/src/lib/box-styler/index.js.map +1 -0
  28. package/src/lib/box-styler/region-fills.d.ts +107 -0
  29. package/src/lib/box-styler/region-fills.js +139 -0
  30. package/src/lib/box-styler/region-fills.js.map +1 -0
  31. package/src/lib/box-styler/spacing-value.d.ts +104 -0
  32. package/src/lib/box-styler/spacing-value.js +223 -0
  33. package/src/lib/box-styler/spacing-value.js.map +1 -0
  34. package/src/lib/box-styler/types.d.ts +29 -0
  35. package/src/lib/box-styler/types.js +18 -0
  36. package/src/lib/box-styler/types.js.map +1 -0
  37. package/src/lib/components/accordion-list.component.d.ts +50 -0
  38. package/src/lib/components/accordion-list.component.js +228 -0
  39. package/src/lib/components/accordion-list.component.js.map +1 -0
  40. package/src/lib/components/add-controls.component.d.ts +22 -0
  41. package/src/lib/components/add-controls.component.js +50 -0
  42. package/src/lib/components/add-controls.component.js.map +1 -0
  43. package/src/lib/components/app-bar-breadcrumbs.component.d.ts +29 -0
  44. package/src/lib/components/app-bar-breadcrumbs.component.js +279 -0
  45. package/src/lib/components/app-bar-breadcrumbs.component.js.map +1 -0
  46. package/src/lib/components/app-bar-primary.component.d.ts +21 -0
  47. package/src/lib/components/app-bar-primary.component.js +108 -0
  48. package/src/lib/components/app-bar-primary.component.js.map +1 -0
  49. package/src/lib/components/app-bar-secondary.component.d.ts +21 -0
  50. package/src/lib/components/app-bar-secondary.component.js +94 -0
  51. package/src/lib/components/app-bar-secondary.component.js.map +1 -0
  52. package/src/lib/components/aside-panel.component.d.ts +23 -0
  53. package/src/lib/components/aside-panel.component.js +505 -0
  54. package/src/lib/components/aside-panel.component.js.map +1 -0
  55. package/src/lib/components/besigner-conflict-alert.component.d.ts +36 -0
  56. package/src/lib/components/besigner-conflict-alert.component.js +51 -0
  57. package/src/lib/components/besigner-conflict-alert.component.js.map +1 -0
  58. package/src/lib/components/besigner-dnd-context.component.d.ts +32 -0
  59. package/src/lib/components/besigner-dnd-context.component.js +75 -0
  60. package/src/lib/components/besigner-dnd-context.component.js.map +1 -0
  61. package/src/lib/components/besigner-draft-alert.component.d.ts +70 -0
  62. package/src/lib/components/besigner-draft-alert.component.js +155 -0
  63. package/src/lib/components/besigner-draft-alert.component.js.map +1 -0
  64. package/src/lib/components/besigner-root-provider.component.d.ts +33 -0
  65. package/src/lib/components/besigner-root-provider.component.js +68 -0
  66. package/src/lib/components/besigner-root-provider.component.js.map +1 -0
  67. package/src/lib/components/binding-preview-controls.component.d.ts +28 -0
  68. package/src/lib/components/binding-preview-controls.component.js +63 -0
  69. package/src/lib/components/binding-preview-controls.component.js.map +1 -0
  70. package/src/lib/components/closeable-drawer.component.d.ts +32 -0
  71. package/src/lib/components/closeable-drawer.component.js +134 -0
  72. package/src/lib/components/closeable-drawer.component.js.map +1 -0
  73. package/src/lib/components/component-accordion-list.d.ts +28 -0
  74. package/src/lib/components/component-accordion-list.js +205 -0
  75. package/src/lib/components/component-accordion-list.js.map +1 -0
  76. package/src/lib/components/component-icon.component.d.ts +32 -0
  77. package/src/lib/components/component-icon.component.js +51 -0
  78. package/src/lib/components/component-icon.component.js.map +1 -0
  79. package/src/lib/components/component-picker.d.ts +27 -0
  80. package/src/lib/components/component-picker.js +368 -0
  81. package/src/lib/components/component-picker.js.map +1 -0
  82. package/src/lib/components/components-grid-list.component.d.ts +31 -0
  83. package/src/lib/components/components-grid-list.component.js +162 -0
  84. package/src/lib/components/components-grid-list.component.js.map +1 -0
  85. package/src/lib/components/custom-css-form.component.d.ts +115 -0
  86. package/src/lib/components/custom-css-form.component.js +699 -0
  87. package/src/lib/components/custom-css-form.component.js.map +1 -0
  88. package/src/lib/components/device-preview-controls.component.d.ts +22 -0
  89. package/src/lib/components/device-preview-controls.component.js +150 -0
  90. package/src/lib/components/device-preview-controls.component.js.map +1 -0
  91. package/src/lib/components/dnd/canvas-drop-indicator.d.ts +20 -0
  92. package/src/lib/components/dnd/canvas-drop-indicator.js +61 -0
  93. package/src/lib/components/dnd/canvas-drop-indicator.js.map +1 -0
  94. package/src/lib/components/dnd/draggable-droppable.d.ts +31 -0
  95. package/src/lib/components/dnd/draggable-droppable.js +383 -0
  96. package/src/lib/components/dnd/draggable-droppable.js.map +1 -0
  97. package/src/lib/components/dnd/draggable.d.ts +42 -0
  98. package/src/lib/components/dnd/draggable.js +66 -0
  99. package/src/lib/components/dnd/draggable.js.map +1 -0
  100. package/src/lib/components/dnd/drop-indicator.d.ts +31 -0
  101. package/src/lib/components/dnd/drop-indicator.js +139 -0
  102. package/src/lib/components/dnd/drop-indicator.js.map +1 -0
  103. package/src/lib/components/dnd/droppable.d.ts +43 -0
  104. package/src/lib/components/dnd/droppable.js +63 -0
  105. package/src/lib/components/dnd/droppable.js.map +1 -0
  106. package/src/lib/components/element-card.component.d.ts +23 -0
  107. package/src/lib/components/element-card.component.js +49 -0
  108. package/src/lib/components/element-card.component.js.map +1 -0
  109. package/src/lib/components/element-classes-field.component.d.ts +41 -0
  110. package/src/lib/components/element-classes-field.component.js +140 -0
  111. package/src/lib/components/element-classes-field.component.js.map +1 -0
  112. package/src/lib/components/element-detail-overlay.component.d.ts +55 -0
  113. package/src/lib/components/element-detail-overlay.component.js +157 -0
  114. package/src/lib/components/element-detail-overlay.component.js.map +1 -0
  115. package/src/lib/components/element-detail.component.d.ts +56 -0
  116. package/src/lib/components/element-detail.component.js +171 -0
  117. package/src/lib/components/element-detail.component.js.map +1 -0
  118. package/src/lib/components/element-info-details.component.d.ts +18 -0
  119. package/src/lib/components/element-info-details.component.js +169 -0
  120. package/src/lib/components/element-info-details.component.js.map +1 -0
  121. package/src/lib/components/element-interactions-form.component.d.ts +21 -0
  122. package/src/lib/components/element-interactions-form.component.js +199 -0
  123. package/src/lib/components/element-interactions-form.component.js.map +1 -0
  124. package/src/lib/components/element-preview.component.d.ts +75 -0
  125. package/src/lib/components/element-preview.component.js +346 -0
  126. package/src/lib/components/element-preview.component.js.map +1 -0
  127. package/src/lib/components/element-props-form.component.d.ts +565 -0
  128. package/src/lib/components/element-props-form.component.js +2392 -0
  129. package/src/lib/components/element-props-form.component.js.map +1 -0
  130. package/src/lib/components/element-styles-form-template.component.d.ts +27 -0
  131. package/src/lib/components/element-styles-form-template.component.js +89 -0
  132. package/src/lib/components/element-styles-form-template.component.js.map +1 -0
  133. package/src/lib/components/element-styles-form.component.d.ts +52 -0
  134. package/src/lib/components/element-styles-form.component.js +1350 -0
  135. package/src/lib/components/element-styles-form.component.js.map +1 -0
  136. package/src/lib/components/empty-document-slot.d.ts +39 -0
  137. package/src/lib/components/empty-document-slot.js +121 -0
  138. package/src/lib/components/empty-document-slot.js.map +1 -0
  139. package/src/lib/components/empty-results.d.ts +22 -0
  140. package/src/lib/components/empty-results.js +131 -0
  141. package/src/lib/components/empty-results.js.map +1 -0
  142. package/src/lib/components/history-controls.component.d.ts +21 -0
  143. package/src/lib/components/history-controls.component.js +67 -0
  144. package/src/lib/components/history-controls.component.js.map +1 -0
  145. package/src/lib/components/inline-markdown-editor.component.d.ts +17 -0
  146. package/src/lib/components/inline-markdown-editor.component.js +220 -0
  147. package/src/lib/components/inline-markdown-editor.component.js.map +1 -0
  148. package/src/lib/components/inline-text-editor.component.d.ts +48 -0
  149. package/src/lib/components/inline-text-editor.component.js +905 -0
  150. package/src/lib/components/inline-text-editor.component.js.map +1 -0
  151. package/src/lib/components/insert-token-menu.component.d.ts +86 -0
  152. package/src/lib/components/insert-token-menu.component.js +232 -0
  153. package/src/lib/components/insert-token-menu.component.js.map +1 -0
  154. package/src/lib/components/instance-attr-overrides.component.d.ts +50 -0
  155. package/src/lib/components/instance-attr-overrides.component.js +298 -0
  156. package/src/lib/components/instance-attr-overrides.component.js.map +1 -0
  157. package/src/lib/components/interact-controls.component.d.ts +22 -0
  158. package/src/lib/components/interact-controls.component.js +74 -0
  159. package/src/lib/components/interact-controls.component.js.map +1 -0
  160. package/src/lib/components/markdown-attribute-field.component.d.ts +40 -0
  161. package/src/lib/components/markdown-attribute-field.component.js +103 -0
  162. package/src/lib/components/markdown-attribute-field.component.js.map +1 -0
  163. package/src/lib/components/node-card.d.ts +24 -0
  164. package/src/lib/components/node-card.js +86 -0
  165. package/src/lib/components/node-card.js.map +1 -0
  166. package/src/lib/components/node-context-menu.d.ts +25 -0
  167. package/src/lib/components/node-context-menu.js +558 -0
  168. package/src/lib/components/node-context-menu.js.map +1 -0
  169. package/src/lib/components/node-leaf.d.ts +39 -0
  170. package/src/lib/components/node-leaf.js +628 -0
  171. package/src/lib/components/node-leaf.js.map +1 -0
  172. package/src/lib/components/node-outline.d.ts +24 -0
  173. package/src/lib/components/node-outline.js +156 -0
  174. package/src/lib/components/node-outline.js.map +1 -0
  175. package/src/lib/components/node-overlay.d.ts +23 -0
  176. package/src/lib/components/node-overlay.js +299 -0
  177. package/src/lib/components/node-overlay.js.map +1 -0
  178. package/src/lib/components/node-quick-actions.d.ts +24 -0
  179. package/src/lib/components/node-quick-actions.js +284 -0
  180. package/src/lib/components/node-quick-actions.js.map +1 -0
  181. package/src/lib/components/node-tree-view.d.ts +106 -0
  182. package/src/lib/components/node-tree-view.js +820 -0
  183. package/src/lib/components/node-tree-view.js.map +1 -0
  184. package/src/lib/components/panel-controls.component.d.ts +22 -0
  185. package/src/lib/components/panel-controls.component.js +76 -0
  186. package/src/lib/components/panel-controls.component.js.map +1 -0
  187. package/src/lib/components/picker-search-field.d.ts +38 -0
  188. package/src/lib/components/picker-search-field.js +79 -0
  189. package/src/lib/components/picker-search-field.js.map +1 -0
  190. package/src/lib/components/plugin-settings-field.component.d.ts +38 -0
  191. package/src/lib/components/plugin-settings-field.component.js +264 -0
  192. package/src/lib/components/plugin-settings-field.component.js.map +1 -0
  193. package/src/lib/components/properties-dialog.component.d.ts +22 -0
  194. package/src/lib/components/properties-dialog.component.js +40 -0
  195. package/src/lib/components/properties-dialog.component.js.map +1 -0
  196. package/src/lib/components/property-binding-field.component.d.ts +142 -0
  197. package/src/lib/components/property-binding-field.component.js +325 -0
  198. package/src/lib/components/property-binding-field.component.js.map +1 -0
  199. package/src/lib/components/property-values-form.component.d.ts +43 -0
  200. package/src/lib/components/property-values-form.component.js +223 -0
  201. package/src/lib/components/property-values-form.component.js.map +1 -0
  202. package/src/lib/components/scheme-preview-controls.component.d.ts +26 -0
  203. package/src/lib/components/scheme-preview-controls.component.js +56 -0
  204. package/src/lib/components/scheme-preview-controls.component.js.map +1 -0
  205. package/src/lib/components/screen-link-field.component.d.ts +118 -0
  206. package/src/lib/components/screen-link-field.component.js +282 -0
  207. package/src/lib/components/screen-link-field.component.js.map +1 -0
  208. package/src/lib/components/site-theme-color-tokens-provider.component.d.ts +33 -0
  209. package/src/lib/components/site-theme-color-tokens-provider.component.js +53 -0
  210. package/src/lib/components/site-theme-color-tokens-provider.component.js.map +1 -0
  211. package/src/lib/components/subtree-json-dialog.component.d.ts +46 -0
  212. package/src/lib/components/subtree-json-dialog.component.js +125 -0
  213. package/src/lib/components/subtree-json-dialog.component.js.map +1 -0
  214. package/src/lib/components/token-pill.component.d.ts +51 -0
  215. package/src/lib/components/token-pill.component.js +164 -0
  216. package/src/lib/components/token-pill.component.js.map +1 -0
  217. package/src/lib/components/token-text-field.component.d.ts +146 -0
  218. package/src/lib/components/token-text-field.component.js +603 -0
  219. package/src/lib/components/token-text-field.component.js.map +1 -0
  220. package/src/lib/components/tree/tree-list.d.ts +6 -0
  221. package/src/lib/components/tree/tree-list.js +108 -0
  222. package/src/lib/components/tree/tree-list.js.map +1 -0
  223. package/src/lib/components/viewport-canvas.component.d.ts +23 -0
  224. package/src/lib/components/viewport-canvas.component.js +128 -0
  225. package/src/lib/components/viewport-canvas.component.js.map +1 -0
  226. package/src/lib/components/viewport-frame.component.d.ts +47 -0
  227. package/src/lib/components/viewport-frame.component.js +332 -0
  228. package/src/lib/components/viewport-frame.component.js.map +1 -0
  229. package/src/lib/components/viewport-root.component.d.ts +22 -0
  230. package/src/lib/components/viewport-root.component.js +112 -0
  231. package/src/lib/components/viewport-root.component.js.map +1 -0
  232. package/src/lib/components/viewport-zoom-controls.d.ts +29 -0
  233. package/src/lib/components/viewport-zoom-controls.js +147 -0
  234. package/src/lib/components/viewport-zoom-controls.js.map +1 -0
  235. package/src/lib/components/workspace-editor.component.d.ts +23 -0
  236. package/src/lib/components/workspace-editor.component.js +191 -0
  237. package/src/lib/components/workspace-editor.component.js.map +1 -0
  238. package/src/lib/components/workspace-panel.component.d.ts +28 -0
  239. package/src/lib/components/workspace-panel.component.js +147 -0
  240. package/src/lib/components/workspace-panel.component.js.map +1 -0
  241. package/src/lib/constants/sample-data.d.ts +18 -0
  242. package/src/lib/constants/sample-data.js +106 -0
  243. package/src/lib/constants/sample-data.js.map +1 -0
  244. package/src/lib/constants/shared.d.ts +17 -0
  245. package/src/lib/constants/shared.js +18 -0
  246. package/src/lib/constants/shared.js.map +1 -0
  247. package/src/lib/contexts/besigner-app-context.d.ts +30 -0
  248. package/src/lib/contexts/besigner-app-context.js +41 -0
  249. package/src/lib/contexts/besigner-app-context.js.map +1 -0
  250. package/src/lib/contexts/binding-picker-context.d.ts +78 -0
  251. package/src/lib/contexts/binding-picker-context.js +21 -0
  252. package/src/lib/contexts/binding-picker-context.js.map +1 -0
  253. package/src/lib/contexts/canvas-host-tokens-context.d.ts +49 -0
  254. package/src/lib/contexts/canvas-host-tokens-context.js +63 -0
  255. package/src/lib/contexts/canvas-host-tokens-context.js.map +1 -0
  256. package/src/lib/contexts/canvas-reveal-context.d.ts +32 -0
  257. package/src/lib/contexts/canvas-reveal-context.js +34 -0
  258. package/src/lib/contexts/canvas-reveal-context.js.map +1 -0
  259. package/src/lib/contexts/component-promotion-context.d.ts +89 -0
  260. package/src/lib/contexts/component-promotion-context.js +21 -0
  261. package/src/lib/contexts/component-promotion-context.js.map +1 -0
  262. package/src/lib/contexts/components-drawer-context.provider.d.ts +32 -0
  263. package/src/lib/contexts/components-drawer-context.provider.js +80 -0
  264. package/src/lib/contexts/components-drawer-context.provider.js.map +1 -0
  265. package/src/lib/contexts/element-drawer-context.d.ts +1005 -0
  266. package/src/lib/contexts/element-drawer-context.js +45 -0
  267. package/src/lib/contexts/element-drawer-context.js.map +1 -0
  268. package/src/lib/contexts/inspected-selection.d.ts +32 -0
  269. package/src/lib/contexts/inspected-selection.js +38 -0
  270. package/src/lib/contexts/inspected-selection.js.map +1 -0
  271. package/src/lib/contexts/inspector-extras-context.d.ts +56 -0
  272. package/src/lib/contexts/inspector-extras-context.js +35 -0
  273. package/src/lib/contexts/inspector-extras-context.js.map +1 -0
  274. package/src/lib/contexts/interactions-context.d.ts +99 -0
  275. package/src/lib/contexts/interactions-context.js +22 -0
  276. package/src/lib/contexts/interactions-context.js.map +1 -0
  277. package/src/lib/contexts/layout-chrome-context.d.ts +37 -0
  278. package/src/lib/contexts/layout-chrome-context.js +75 -0
  279. package/src/lib/contexts/layout-chrome-context.js.map +1 -0
  280. package/src/lib/contexts/media-asset-facts-context.d.ts +74 -0
  281. package/src/lib/contexts/media-asset-facts-context.js +27 -0
  282. package/src/lib/contexts/media-asset-facts-context.js.map +1 -0
  283. package/src/lib/contexts/media-picker-context.d.ts +88 -0
  284. package/src/lib/contexts/media-picker-context.js +21 -0
  285. package/src/lib/contexts/media-picker-context.js.map +1 -0
  286. package/src/lib/contexts/rendered-canvas-elements.d.ts +42 -0
  287. package/src/lib/contexts/rendered-canvas-elements.js +79 -0
  288. package/src/lib/contexts/rendered-canvas-elements.js.map +1 -0
  289. package/src/lib/contexts/repeat-record-context.d.ts +38 -0
  290. package/src/lib/contexts/repeat-record-context.js +21 -0
  291. package/src/lib/contexts/repeat-record-context.js.map +1 -0
  292. package/src/lib/contexts/repeat-rows-context.d.ts +53 -0
  293. package/src/lib/contexts/repeat-rows-context.js +38 -0
  294. package/src/lib/contexts/repeat-rows-context.js.map +1 -0
  295. package/src/lib/contexts/toolbar-extras-context.d.ts +31 -0
  296. package/src/lib/contexts/toolbar-extras-context.js +33 -0
  297. package/src/lib/contexts/toolbar-extras-context.js.map +1 -0
  298. package/src/lib/drafts/besigner-draft-store.d.ts +110 -0
  299. package/src/lib/drafts/besigner-draft-store.js +125 -0
  300. package/src/lib/drafts/besigner-draft-store.js.map +1 -0
  301. package/src/lib/drafts/besigner-server-draft.d.ts +130 -0
  302. package/src/lib/drafts/besigner-server-draft.js +211 -0
  303. package/src/lib/drafts/besigner-server-draft.js.map +1 -0
  304. package/src/lib/form-fields/components/shared/inline-form-control.d.ts +32 -0
  305. package/src/lib/form-fields/components/shared/inline-form-control.js +85 -0
  306. package/src/lib/form-fields/components/shared/inline-form-control.js.map +1 -0
  307. package/src/lib/form-fields/components/shared/toggle-button-form-control.d.ts +33 -0
  308. package/src/lib/form-fields/components/shared/toggle-button-form-control.js +83 -0
  309. package/src/lib/form-fields/components/shared/toggle-button-form-control.js.map +1 -0
  310. package/src/lib/form-fields/form-fields.d.ts +20 -0
  311. package/src/lib/form-fields/form-fields.js +21 -0
  312. package/src/lib/form-fields/form-fields.js.map +1 -0
  313. package/src/lib/form-fields/index.d.ts +1 -0
  314. package/src/lib/form-fields/index.js +3 -0
  315. package/src/lib/form-fields/index.js.map +1 -0
  316. package/src/lib/hooks/use-add-element-drawer-callback.d.ts +28 -0
  317. package/src/lib/hooks/use-add-element-drawer-callback.js +112 -0
  318. package/src/lib/hooks/use-add-element-drawer-callback.js.map +1 -0
  319. package/src/lib/hooks/use-aglyn-besigner-flag.d.ts +23 -0
  320. package/src/lib/hooks/use-aglyn-besigner-flag.js +47 -0
  321. package/src/lib/hooks/use-aglyn-besigner-flag.js.map +1 -0
  322. package/src/lib/hooks/use-aglyn-besigner-panel-value.d.ts +23 -0
  323. package/src/lib/hooks/use-aglyn-besigner-panel-value.js +54 -0
  324. package/src/lib/hooks/use-aglyn-besigner-panel-value.js.map +1 -0
  325. package/src/lib/hooks/use-aglyn-besigner-panel.d.ts +23 -0
  326. package/src/lib/hooks/use-aglyn-besigner-panel.js +47 -0
  327. package/src/lib/hooks/use-aglyn-besigner-panel.js.map +1 -0
  328. package/src/lib/hooks/use-anchored-rect.d.ts +68 -0
  329. package/src/lib/hooks/use-anchored-rect.js +131 -0
  330. package/src/lib/hooks/use-anchored-rect.js.map +1 -0
  331. package/src/lib/hooks/use-besigner-app-context.d.ts +18 -0
  332. package/src/lib/hooks/use-besigner-app-context.js +19 -0
  333. package/src/lib/hooks/use-besigner-app-context.js.map +1 -0
  334. package/src/lib/hooks/use-besigner-document.d.ts +309 -0
  335. package/src/lib/hooks/use-besigner-document.js +500 -0
  336. package/src/lib/hooks/use-besigner-document.js.map +1 -0
  337. package/src/lib/hooks/use-besigner-draft.d.ts +209 -0
  338. package/src/lib/hooks/use-besigner-draft.js +429 -0
  339. package/src/lib/hooks/use-besigner-draft.js.map +1 -0
  340. package/src/lib/hooks/use-clipboard-callbacks.d.ts +29 -0
  341. package/src/lib/hooks/use-clipboard-callbacks.js +82 -0
  342. package/src/lib/hooks/use-clipboard-callbacks.js.map +1 -0
  343. package/src/lib/hooks/use-clipboard-shortcuts.d.ts +52 -0
  344. package/src/lib/hooks/use-clipboard-shortcuts.js +102 -0
  345. package/src/lib/hooks/use-clipboard-shortcuts.js.map +1 -0
  346. package/src/lib/hooks/use-component-propagation-notice.d.ts +96 -0
  347. package/src/lib/hooks/use-component-propagation-notice.js +177 -0
  348. package/src/lib/hooks/use-component-propagation-notice.js.map +1 -0
  349. package/src/lib/hooks/use-debounced-commit.d.ts +43 -0
  350. package/src/lib/hooks/use-debounced-commit.js +88 -0
  351. package/src/lib/hooks/use-debounced-commit.js.map +1 -0
  352. package/src/lib/hooks/use-delete-element-callback.d.ts +24 -0
  353. package/src/lib/hooks/use-delete-element-callback.js +82 -0
  354. package/src/lib/hooks/use-delete-element-callback.js.map +1 -0
  355. package/src/lib/hooks/use-detail-hover-intent.d.ts +76 -0
  356. package/src/lib/hooks/use-detail-hover-intent.js +123 -0
  357. package/src/lib/hooks/use-detail-hover-intent.js.map +1 -0
  358. package/src/lib/hooks/use-document-repair-callbacks.d.ts +50 -0
  359. package/src/lib/hooks/use-document-repair-callbacks.js +237 -0
  360. package/src/lib/hooks/use-document-repair-callbacks.js.map +1 -0
  361. package/src/lib/hooks/use-insert-token-options.d.ts +52 -0
  362. package/src/lib/hooks/use-insert-token-options.js +230 -0
  363. package/src/lib/hooks/use-insert-token-options.js.map +1 -0
  364. package/src/lib/hooks/use-leaf-drag.d.ts +24 -0
  365. package/src/lib/hooks/use-leaf-drag.js +28 -0
  366. package/src/lib/hooks/use-leaf-drag.js.map +1 -0
  367. package/src/lib/hooks/use-leaf-drop.d.ts +31 -0
  368. package/src/lib/hooks/use-leaf-drop.js +43 -0
  369. package/src/lib/hooks/use-leaf-drop.js.map +1 -0
  370. package/src/lib/hooks/use-markdown-media-picker.d.ts +63 -0
  371. package/src/lib/hooks/use-markdown-media-picker.js +110 -0
  372. package/src/lib/hooks/use-markdown-media-picker.js.map +1 -0
  373. package/src/lib/hooks/use-media-asset-facts-overlay.d.ts +43 -0
  374. package/src/lib/hooks/use-media-asset-facts-overlay.js +133 -0
  375. package/src/lib/hooks/use-media-asset-facts-overlay.js.map +1 -0
  376. package/src/lib/hooks/use-move-node-callbacks.d.ts +22 -0
  377. package/src/lib/hooks/use-move-node-callbacks.js +57 -0
  378. package/src/lib/hooks/use-move-node-callbacks.js.map +1 -0
  379. package/src/lib/hooks/use-node-with-host-tokens.d.ts +42 -0
  380. package/src/lib/hooks/use-node-with-host-tokens.js +59 -0
  381. package/src/lib/hooks/use-node-with-host-tokens.js.map +1 -0
  382. package/src/lib/hooks/use-picker-filter.d.ts +61 -0
  383. package/src/lib/hooks/use-picker-filter.js +122 -0
  384. package/src/lib/hooks/use-picker-filter.js.map +1 -0
  385. package/src/lib/hooks/use-repeat-preview.d.ts +64 -0
  386. package/src/lib/hooks/use-repeat-preview.js +214 -0
  387. package/src/lib/hooks/use-repeat-preview.js.map +1 -0
  388. package/src/lib/hooks/use-repeat-sources.d.ts +17 -0
  389. package/src/lib/hooks/use-repeat-sources.js +41 -0
  390. package/src/lib/hooks/use-repeat-sources.js.map +1 -0
  391. package/src/lib/hooks/use-visible-component-categories.d.ts +37 -0
  392. package/src/lib/hooks/use-visible-component-categories.js +79 -0
  393. package/src/lib/hooks/use-visible-component-categories.js.map +1 -0
  394. package/src/lib/utils/active-host-theme.d.ts +28 -0
  395. package/src/lib/utils/active-host-theme.js +77 -0
  396. package/src/lib/utils/active-host-theme.js.map +1 -0
  397. package/src/lib/utils/attr-target.d.ts +170 -0
  398. package/src/lib/utils/attr-target.js +229 -0
  399. package/src/lib/utils/attr-target.js.map +1 -0
  400. package/src/lib/utils/attribute-field-value.d.ts +21 -0
  401. package/src/lib/utils/attribute-field-value.js +28 -0
  402. package/src/lib/utils/attribute-field-value.js.map +1 -0
  403. package/src/lib/utils/canvas-context-menu.d.ts +28 -0
  404. package/src/lib/utils/canvas-context-menu.js +56 -0
  405. package/src/lib/utils/canvas-context-menu.js.map +1 -0
  406. package/src/lib/utils/canvas-reveal.d.ts +115 -0
  407. package/src/lib/utils/canvas-reveal.js +165 -0
  408. package/src/lib/utils/canvas-reveal.js.map +1 -0
  409. package/src/lib/utils/describe-element.d.ts +72 -0
  410. package/src/lib/utils/describe-element.js +159 -0
  411. package/src/lib/utils/describe-element.js.map +1 -0
  412. package/src/lib/utils/device-preview-styles.d.ts +89 -0
  413. package/src/lib/utils/device-preview-styles.js +228 -0
  414. package/src/lib/utils/device-preview-styles.js.map +1 -0
  415. package/src/lib/utils/docs-help.d.ts +22 -0
  416. package/src/lib/utils/docs-help.generated.d.ts +47 -0
  417. package/src/lib/utils/docs-help.generated.js +229 -0
  418. package/src/lib/utils/docs-help.generated.js.map +1 -0
  419. package/src/lib/utils/docs-help.js +37 -0
  420. package/src/lib/utils/docs-help.js.map +1 -0
  421. package/src/lib/utils/held-answers-store.d.ts +59 -0
  422. package/src/lib/utils/held-answers-store.js +94 -0
  423. package/src/lib/utils/held-answers-store.js.map +1 -0
  424. package/src/lib/utils/in-place-edit-surface.d.ts +118 -0
  425. package/src/lib/utils/in-place-edit-surface.js +164 -0
  426. package/src/lib/utils/in-place-edit-surface.js.map +1 -0
  427. package/src/lib/utils/inline-markdown-edit.store.d.ts +71 -0
  428. package/src/lib/utils/inline-markdown-edit.store.js +90 -0
  429. package/src/lib/utils/inline-markdown-edit.store.js.map +1 -0
  430. package/src/lib/utils/inline-text-edit.store.d.ts +85 -0
  431. package/src/lib/utils/inline-text-edit.store.js +78 -0
  432. package/src/lib/utils/inline-text-edit.store.js.map +1 -0
  433. package/src/lib/utils/instance-leaf-hit.d.ts +39 -0
  434. package/src/lib/utils/instance-leaf-hit.js +56 -0
  435. package/src/lib/utils/instance-leaf-hit.js.map +1 -0
  436. package/src/lib/utils/muted-classes.d.ts +76 -0
  437. package/src/lib/utils/muted-classes.js +108 -0
  438. package/src/lib/utils/muted-classes.js.map +1 -0
  439. package/src/lib/utils/muted-styles.d.ts +125 -0
  440. package/src/lib/utils/muted-styles.js +193 -0
  441. package/src/lib/utils/muted-styles.js.map +1 -0
  442. package/src/lib/utils/numeric-text-value.d.ts +42 -0
  443. package/src/lib/utils/numeric-text-value.js +47 -0
  444. package/src/lib/utils/numeric-text-value.js.map +1 -0
  445. package/src/lib/utils/preset-interactions.d.ts +37 -0
  446. package/src/lib/utils/preset-interactions.js +87 -0
  447. package/src/lib/utils/preset-interactions.js.map +1 -0
  448. package/src/lib/utils/publish-failure-message.d.ts +35 -0
  449. package/src/lib/utils/publish-failure-message.js +51 -0
  450. package/src/lib/utils/publish-failure-message.js.map +1 -0
  451. package/src/lib/utils/rank-picker-results.d.ts +45 -0
  452. package/src/lib/utils/rank-picker-results.js +136 -0
  453. package/src/lib/utils/rank-picker-results.js.map +1 -0
  454. package/src/lib/utils/responsive-sx.d.ts +65 -0
  455. package/src/lib/utils/responsive-sx.js +129 -0
  456. package/src/lib/utils/responsive-sx.js.map +1 -0
  457. package/src/lib/utils/rich-text-commands.d.ts +28 -0
  458. package/src/lib/utils/rich-text-commands.js +43 -0
  459. package/src/lib/utils/rich-text-commands.js.map +1 -0
  460. package/src/lib/utils/sanitize-rich-text.d.ts +52 -0
  461. package/src/lib/utils/sanitize-rich-text.js +173 -0
  462. package/src/lib/utils/sanitize-rich-text.js.map +1 -0
  463. package/src/lib/utils/state-sx.d.ts +255 -0
  464. package/src/lib/utils/state-sx.js +338 -0
  465. package/src/lib/utils/state-sx.js.map +1 -0
  466. package/src/lib/utils/style-field-groups.d.ts +136 -0
  467. package/src/lib/utils/style-field-groups.js +874 -0
  468. package/src/lib/utils/style-field-groups.js.map +1 -0
  469. package/src/lib/utils/style-field-search.d.ts +84 -0
  470. package/src/lib/utils/style-field-search.js +505 -0
  471. package/src/lib/utils/style-field-search.js.map +1 -0
  472. package/src/lib/utils/style-target.d.ts +69 -0
  473. package/src/lib/utils/style-target.js +203 -0
  474. package/src/lib/utils/style-target.js.map +1 -0
  475. package/src/lib/utils/theme-scale-options.d.ts +169 -0
  476. package/src/lib/utils/theme-scale-options.js +702 -0
  477. package/src/lib/utils/theme-scale-options.js.map +1 -0
  478. package/src/lib/utils/token-editable-dom.d.ts +82 -0
  479. package/src/lib/utils/token-editable-dom.js +280 -0
  480. package/src/lib/utils/token-editable-dom.js.map +1 -0
  481. package/src/lib/utils/token-segments.d.ts +111 -0
  482. package/src/lib/utils/token-segments.js +246 -0
  483. package/src/lib/utils/token-segments.js.map +1 -0
  484. package/src/lib/utils/visibility-styles.d.ts +38 -0
  485. package/src/lib/utils/visibility-styles.js +54 -0
  486. package/src/lib/utils/visibility-styles.js.map +1 -0
@@ -0,0 +1,170 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type * as Aglyn from '@aglyn/aglyn';
18
+ /**
19
+ * Props an instance override must never write (AGL-1899).
20
+ *
21
+ * `sx` is refused at the RENDER layer too (`ATTR_OVERRIDE_REFUSED_PROPS` in
22
+ * `compose-reusable-components.ts`) — styling an instance already has its own
23
+ * override field one level up, and honouring both would leave two writers
24
+ * racing for one rendered value with no rule to say which wins.
25
+ *
26
+ * `children` and `html` are refused HERE, by the writer, and deliberately not
27
+ * at the render layer. They are CONTENT, and content inside a component
28
+ * already has two routes with an owner each: a declared `{{prop.*}}` filled
29
+ * in per instance, and AGL-1304's double-click-to-edit on the canvas, which
30
+ * writes through that same binding. A third control writing `children` on the
31
+ * instance would be a third writer on one rendered string — the shape behind
32
+ * the unreproduced "Maximum update depth exceeded" report on this panel — and
33
+ * it would silently win over a binding the component author put there on
34
+ * purpose. Refusing it in the writer (rather than in the graft) keeps the
35
+ * storage layer's meaning unchanged, so a later issue can offer content
36
+ * overrides deliberately instead of inheriting them by accident.
37
+ */
38
+ export declare const ATTR_OVERRIDE_REFUSED_WRITE_PROPS: Set<string>;
39
+ /**
40
+ * Where the Attributes panel's per-instance ATTRIBUTE overrides land for the
41
+ * selected node (AGL-1899) — the attribute-side twin of
42
+ * {@link getNodeStyleTarget}.
43
+ *
44
+ * A reusable-component instance's overrides read and write one slice of
45
+ * `node.attrOverrides`: the root slice by default, or the slice keyed by a
46
+ * DEFINITION-internal node id when the author has picked a leaf inside the
47
+ * component. The graft (`composeReusableComponentNodes`) merges that slice
48
+ * over the matching definition node's props, per named prop, so canvas,
49
+ * Preview and tenant SSR agree without any of them knowing this file exists.
50
+ *
51
+ * A PLAIN node has no attribute-override layer at all, and this target
52
+ * refuses to write one: a plain node's attributes are `node.props`, which the
53
+ * Attributes form itself owns through `updateNodeProps`. Handing back a
54
+ * second writer for the same record is exactly how two controls end up
55
+ * fighting over one value, so the plain-node target reports
56
+ * `isInstanceOverride: false` and its `setAttrs` does nothing.
57
+ *
58
+ * `attrs` is a GETTER so `observer` components track the underlying MobX
59
+ * state at read time; a snapshot captured when the target was built would go
60
+ * stale after the first write.
61
+ */
62
+ export interface NodeAttrTarget {
63
+ /**
64
+ * The override slice edits read from and write to (live view), or
65
+ * `undefined` when this instance overrides nothing for this target.
66
+ *
67
+ * Deliberately NOT composed with the definition's own props: an override
68
+ * slice starts empty and empty MEANS "whatever the component says". Merging
69
+ * a base into the reading would make every inherited value look like an
70
+ * override this instance had chosen, and the ✕ on its chip would then
71
+ * appear to do nothing.
72
+ */
73
+ readonly attrs: Record<string, any> | undefined;
74
+ /** True when edits land in one of the instance's override slices. */
75
+ readonly isInstanceOverride: boolean;
76
+ /**
77
+ * The `attrOverrides` key being edited — `root`, or a definition-internal
78
+ * node id. Empty string for a plain node, which has no override layer.
79
+ */
80
+ readonly overrideKey: string;
81
+ /** True when the target is a leaf inside the component, not its root. */
82
+ readonly isLeafOverride: boolean;
83
+ /** Replaces the target slice wholesale (MobX action inside). */
84
+ setAttrs(next: Record<string, any> | undefined): void;
85
+ /** Removes ONE overridden prop, leaving this instance's others (MobX action inside). */
86
+ clearAttr(prop: string): void;
87
+ }
88
+ /**
89
+ * Whether a value the form produced is an OVERRIDE at all (AGL-1899).
90
+ *
91
+ * `strictNullChecks` is off repo-wide, so "absent" and "empty" fold together
92
+ * the moment anything tests an override slice for truthiness. This function is
93
+ * the one place that decision is made, and it is deliberately narrow:
94
+ *
95
+ * - `undefined` is not an override. A cleared field, and every prop the
96
+ * definition declares that this instance has not touched, arrive as
97
+ * `undefined`, and storing them would turn "I opened the panel" into an
98
+ * override on every prop of the component.
99
+ * - `''` is not an override either. final-form gives a cleared text box an
100
+ * empty string, so this is what "clear this field" actually looks like on
101
+ * the way in; the explicit way to say "override, and render nothing" is not
102
+ * offered by this panel, which does not edit content props at all.
103
+ * - `false` and `0` ARE overrides, and this is the case worth naming. They
104
+ * are the values `strictNullChecks: false` code most often loses: an
105
+ * instance that turns a component's `disableGutters` OFF, or sets an
106
+ * `elevation` of `0`, is making a real choice, and folding it to "no
107
+ * override" would render the component's own value instead — the override
108
+ * would appear to save and then silently not apply.
109
+ */
110
+ export declare function isAttrOverrideValue(value: unknown): boolean;
111
+ /**
112
+ * The attribute-override target for a selected node — see
113
+ * {@link NodeAttrTarget}.
114
+ *
115
+ * `overrideKey` selects WHICH slice of an instance's overrides is edited. A
116
+ * falsy key falls back to the root, so a caller that has not resolved a
117
+ * definition yet still edits something real rather than writing an
118
+ * `undefined`-keyed slice no renderer reads.
119
+ */
120
+ export declare function getNodeAttrTarget(node: Aglyn.NodeSchema<any> | null | undefined, overrideKey?: string | null): NodeAttrTarget;
121
+ /**
122
+ * Attribute editors the override panel offers (AGL-1899).
123
+ *
124
+ * Every entry is registered in `elementPropsComponentMapper` AND resolves
125
+ * entirely from the component schema — no canvas context, no host callback,
126
+ * no second prop written beside it. An unregistered editor makes the form
127
+ * renderer THROW, which is what once blanked the whole email designer's
128
+ * attributes panel (AGL-584), so the filter is an allowlist rather than a
129
+ * denylist: a component declaring an editor nobody thought about here loses
130
+ * one row from the override list, not the panel.
131
+ *
132
+ * Deliberately NOT offered, and each for its own reason:
133
+ *
134
+ * - `ICON_PICKER` writes a SECOND prop beside the one it names (the
135
+ * denormalized SVG path, AGL-1212). An override slice that carried the id
136
+ * without the path would render the "help" glyph.
137
+ * - `SCREEN_LINK`, and the screen/entity/dataset/node selects, resolve their
138
+ * options from editor context the graft never sees.
139
+ * - `MARKDOWN`, `CSS_GRADIENT`, `BREAKPOINT_SPAN` and `PLUGIN_SETTINGS` each
140
+ * edit a composite value with its own rules; a per-instance override of one
141
+ * is a design question, not a plumbing one.
142
+ */
143
+ export declare const ATTR_OVERRIDE_SUPPORTED_EDITORS: Set<string>;
144
+ /** One overridable attribute of a node inside a component definition. */
145
+ export interface InstanceAttrField {
146
+ /** The prop name, which is also the form field name and the slice key. */
147
+ name: string;
148
+ /** The field schema handed to the form renderer. */
149
+ field: Record<string, unknown>;
150
+ }
151
+ /**
152
+ * The attributes of ONE node inside a component definition that this
153
+ * instance may override, in the component schema's own order (AGL-1899).
154
+ *
155
+ * The definition node's CURRENT value shows as the field's placeholder, which
156
+ * is the whole of how "empty means the component's value" is made legible:
157
+ * an author looking at a blank Variant box can see it says `contained`
158
+ * underneath, and knows what clearing an override goes back to.
159
+ *
160
+ * Field names are the prop names verbatim and the form is flat, so a name
161
+ * carrying a dot is skipped — final-form reads `a.b` as a nested path, so
162
+ * such a field would write a level the slice does not have and the value
163
+ * would silently never reach the node (the same trap
164
+ * `COMPONENT_PROP_NAME_PATTERN` exists for one layer up).
165
+ */
166
+ export declare function listInstanceAttrFields(defNode: {
167
+ componentId?: string;
168
+ props?: Record<string, unknown>;
169
+ } | null | undefined): InstanceAttrField[];
170
+ export default getNodeAttrTarget;
@@ -0,0 +1,229 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { _ as _extends } from "@swc/helpers/_/_extends";
17
+ import { components, FieldComponentType, REUSABLE_INSTANCE_COMPONENT_ID, STYLE_OVERRIDES_ROOT_KEY } from "@aglyn/aglyn";
18
+ import { action, toJS } from "mobx";
19
+ /**
20
+ * Props an instance override must never write (AGL-1899).
21
+ *
22
+ * `sx` is refused at the RENDER layer too (`ATTR_OVERRIDE_REFUSED_PROPS` in
23
+ * `compose-reusable-components.ts`) — styling an instance already has its own
24
+ * override field one level up, and honouring both would leave two writers
25
+ * racing for one rendered value with no rule to say which wins.
26
+ *
27
+ * `children` and `html` are refused HERE, by the writer, and deliberately not
28
+ * at the render layer. They are CONTENT, and content inside a component
29
+ * already has two routes with an owner each: a declared `{{prop.*}}` filled
30
+ * in per instance, and AGL-1304's double-click-to-edit on the canvas, which
31
+ * writes through that same binding. A third control writing `children` on the
32
+ * instance would be a third writer on one rendered string — the shape behind
33
+ * the unreproduced "Maximum update depth exceeded" report on this panel — and
34
+ * it would silently win over a binding the component author put there on
35
+ * purpose. Refusing it in the writer (rather than in the graft) keeps the
36
+ * storage layer's meaning unchanged, so a later issue can offer content
37
+ * overrides deliberately instead of inheriting them by accident.
38
+ */ export const ATTR_OVERRIDE_REFUSED_WRITE_PROPS = new Set([
39
+ 'sx',
40
+ 'children',
41
+ 'html'
42
+ ]);
43
+ const isPlainRecord = (value)=>typeof value === 'object' && value !== null && !Array.isArray(value);
44
+ /**
45
+ * Whether a value the form produced is an OVERRIDE at all (AGL-1899).
46
+ *
47
+ * `strictNullChecks` is off repo-wide, so "absent" and "empty" fold together
48
+ * the moment anything tests an override slice for truthiness. This function is
49
+ * the one place that decision is made, and it is deliberately narrow:
50
+ *
51
+ * - `undefined` is not an override. A cleared field, and every prop the
52
+ * definition declares that this instance has not touched, arrive as
53
+ * `undefined`, and storing them would turn "I opened the panel" into an
54
+ * override on every prop of the component.
55
+ * - `''` is not an override either. final-form gives a cleared text box an
56
+ * empty string, so this is what "clear this field" actually looks like on
57
+ * the way in; the explicit way to say "override, and render nothing" is not
58
+ * offered by this panel, which does not edit content props at all.
59
+ * - `false` and `0` ARE overrides, and this is the case worth naming. They
60
+ * are the values `strictNullChecks: false` code most often loses: an
61
+ * instance that turns a component's `disableGutters` OFF, or sets an
62
+ * `elevation` of `0`, is making a real choice, and folding it to "no
63
+ * override" would render the component's own value instead — the override
64
+ * would appear to save and then silently not apply.
65
+ */ export function isAttrOverrideValue(value) {
66
+ return value !== undefined && value !== '';
67
+ }
68
+ /**
69
+ * The slice as it may be STORED: refused props dropped, and every
70
+ * non-override value dropped by KEY (AGL-1899).
71
+ *
72
+ * Deleting the key rather than storing `undefined` is load-bearing, not
73
+ * tidiness. The graft applies a slice by spreading it over the definition's
74
+ * props, so a stored `{ variant: undefined }` would set `variant` to
75
+ * `undefined` on the rendered node — while `CanvasManager.toJSON`'s
76
+ * `stripUndefinedDeep` removes that same key on the way to storage. The
77
+ * instance would then render one way on the canvas and another way after a
78
+ * reload, which is precisely the canvas/Preview/SSR disagreement this whole
79
+ * override layer is built as a single merge point to prevent.
80
+ */ function storableSlice(next) {
81
+ const slice = {};
82
+ if (!isPlainRecord(next)) return slice;
83
+ for (const [prop, value] of Object.entries(next)){
84
+ if (!prop || ATTR_OVERRIDE_REFUSED_WRITE_PROPS.has(prop)) continue;
85
+ if (!isAttrOverrideValue(value)) continue;
86
+ slice[prop] = value;
87
+ }
88
+ return slice;
89
+ }
90
+ /** A no-op target for nodes with no attribute-override layer. */ function plainNodeTarget() {
91
+ return {
92
+ isInstanceOverride: false,
93
+ overrideKey: '',
94
+ isLeafOverride: false,
95
+ get attrs () {
96
+ return undefined;
97
+ },
98
+ setAttrs: ()=>undefined,
99
+ clearAttr: ()=>undefined
100
+ };
101
+ }
102
+ /**
103
+ * The attribute-override target for a selected node — see
104
+ * {@link NodeAttrTarget}.
105
+ *
106
+ * `overrideKey` selects WHICH slice of an instance's overrides is edited. A
107
+ * falsy key falls back to the root, so a caller that has not resolved a
108
+ * definition yet still edits something real rather than writing an
109
+ * `undefined`-keyed slice no renderer reads.
110
+ */ export function getNodeAttrTarget(node, overrideKey) {
111
+ const isInstance = (node == null ? void 0 : node.componentId) === REUSABLE_INSTANCE_COMPONENT_ID;
112
+ if (!node || !isInstance) return plainNodeTarget();
113
+ const key = overrideKey || STYLE_OVERRIDES_ROOT_KEY;
114
+ return {
115
+ isInstanceOverride: true,
116
+ overrideKey: key,
117
+ isLeafOverride: key !== STYLE_OVERRIDES_ROOT_KEY,
118
+ get attrs () {
119
+ var _node_attrOverrides;
120
+ return (_node_attrOverrides = node.attrOverrides) == null ? void 0 : _node_attrOverrides[key];
121
+ },
122
+ setAttrs: action((next)=>{
123
+ var _node_attrOverrides;
124
+ const overrides = _extends({}, toJS((_node_attrOverrides = node.attrOverrides) != null ? _node_attrOverrides : {}));
125
+ const slice = storableSlice(next);
126
+ if (Object.keys(slice).length > 0) {
127
+ overrides[key] = slice;
128
+ } else {
129
+ // An emptied override is REMOVED, not stored as `{}`: the panel's
130
+ // override chip and the graft's "has an override" check must both
131
+ // read a cleared instance as clean. Only THIS slice goes — the
132
+ // instance's other targets keep theirs.
133
+ delete overrides[key];
134
+ }
135
+ node.attrOverrides = Object.keys(overrides).length > 0 ? overrides : undefined;
136
+ }),
137
+ clearAttr: action((prop)=>{
138
+ var _node_attrOverrides;
139
+ var _node_attrOverrides1;
140
+ const current = (_node_attrOverrides1 = node.attrOverrides) == null ? void 0 : _node_attrOverrides1[key];
141
+ if (!isPlainRecord(current) || !(prop in current)) return;
142
+ const nextSlice = _extends({}, toJS(current));
143
+ delete nextSlice[prop];
144
+ const overrides = _extends({}, toJS((_node_attrOverrides = node.attrOverrides) != null ? _node_attrOverrides : {}));
145
+ if (Object.keys(nextSlice).length > 0) overrides[key] = nextSlice;
146
+ else delete overrides[key];
147
+ node.attrOverrides = Object.keys(overrides).length > 0 ? overrides : undefined;
148
+ })
149
+ };
150
+ }
151
+ /**
152
+ * Attribute editors the override panel offers (AGL-1899).
153
+ *
154
+ * Every entry is registered in `elementPropsComponentMapper` AND resolves
155
+ * entirely from the component schema — no canvas context, no host callback,
156
+ * no second prop written beside it. An unregistered editor makes the form
157
+ * renderer THROW, which is what once blanked the whole email designer's
158
+ * attributes panel (AGL-584), so the filter is an allowlist rather than a
159
+ * denylist: a component declaring an editor nobody thought about here loses
160
+ * one row from the override list, not the panel.
161
+ *
162
+ * Deliberately NOT offered, and each for its own reason:
163
+ *
164
+ * - `ICON_PICKER` writes a SECOND prop beside the one it names (the
165
+ * denormalized SVG path, AGL-1212). An override slice that carried the id
166
+ * without the path would render the "help" glyph.
167
+ * - `SCREEN_LINK`, and the screen/entity/dataset/node selects, resolve their
168
+ * options from editor context the graft never sees.
169
+ * - `MARKDOWN`, `CSS_GRADIENT`, `BREAKPOINT_SPAN` and `PLUGIN_SETTINGS` each
170
+ * edit a composite value with its own rules; a per-instance override of one
171
+ * is a design question, not a plumbing one.
172
+ */ export const ATTR_OVERRIDE_SUPPORTED_EDITORS = new Set([
173
+ FieldComponentType.TEXT_FIELD,
174
+ FieldComponentType.TEXTAREA,
175
+ FieldComponentType.SELECT,
176
+ FieldComponentType.SWITCH,
177
+ FieldComponentType.CHECKBOX,
178
+ FieldComponentType.COLOR_PICKER,
179
+ FieldComponentType.CSS_DIMENSION
180
+ ]);
181
+ /**
182
+ * The attributes of ONE node inside a component definition that this
183
+ * instance may override, in the component schema's own order (AGL-1899).
184
+ *
185
+ * The definition node's CURRENT value shows as the field's placeholder, which
186
+ * is the whole of how "empty means the component's value" is made legible:
187
+ * an author looking at a blank Variant box can see it says `contained`
188
+ * underneath, and knows what clearing an override goes back to.
189
+ *
190
+ * Field names are the prop names verbatim and the form is flat, so a name
191
+ * carrying a dot is skipped — final-form reads `a.b` as a nested path, so
192
+ * such a field would write a level the slice does not have and the value
193
+ * would silently never reach the node (the same trap
194
+ * `COMPONENT_PROP_NAME_PATTERN` exists for one layer up).
195
+ */ export function listInstanceAttrFields(defNode) {
196
+ var _ref;
197
+ var _components_getSchema;
198
+ const attributes = (defNode == null ? void 0 : defNode.componentId) ? (_ref = (_components_getSchema = components.getSchema(defNode.componentId)) == null ? void 0 : _components_getSchema.attributes) != null ? _ref : [] : [];
199
+ const fields = [];
200
+ const seen = new Set();
201
+ for (const attribute of attributes){
202
+ var _defNode_props;
203
+ const name = attribute == null ? void 0 : attribute.name;
204
+ const component = attribute == null ? void 0 : attribute.component;
205
+ if (!name || seen.has(name)) continue;
206
+ if (name.includes('.') || name.includes('[')) continue;
207
+ if (ATTR_OVERRIDE_REFUSED_WRITE_PROPS.has(name)) continue;
208
+ if (!component || !ATTR_OVERRIDE_SUPPORTED_EDITORS.has(component)) continue;
209
+ seen.add(name);
210
+ const inherited = defNode == null ? void 0 : (_defNode_props = defNode.props) == null ? void 0 : _defNode_props[name];
211
+ fields.push({
212
+ name,
213
+ field: _extends({}, attribute, {
214
+ name,
215
+ // An override field is never required: leaving it empty is the
216
+ // supported state, and a `required` copied off the component's own
217
+ // schema would make the form invalid — and therefore unsavable — the
218
+ // moment the panel opened.
219
+ isRequired: false,
220
+ validate: undefined,
221
+ placeholder: typeof inherited === 'string' || typeof inherited === 'number' ? String(inherited) : undefined
222
+ })
223
+ });
224
+ }
225
+ return fields;
226
+ }
227
+ export default getNodeAttrTarget;
228
+
229
+ //# sourceMappingURL=attr-target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/attr-target.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport {\n components,\n FieldComponentType,\n REUSABLE_INSTANCE_COMPONENT_ID,\n STYLE_OVERRIDES_ROOT_KEY,\n} from '@aglyn/aglyn'\nimport { action, toJS } from 'mobx'\n\n/**\n * Props an instance override must never write (AGL-1899).\n *\n * `sx` is refused at the RENDER layer too (`ATTR_OVERRIDE_REFUSED_PROPS` in\n * `compose-reusable-components.ts`) — styling an instance already has its own\n * override field one level up, and honouring both would leave two writers\n * racing for one rendered value with no rule to say which wins.\n *\n * `children` and `html` are refused HERE, by the writer, and deliberately not\n * at the render layer. They are CONTENT, and content inside a component\n * already has two routes with an owner each: a declared `{{prop.*}}` filled\n * in per instance, and AGL-1304's double-click-to-edit on the canvas, which\n * writes through that same binding. A third control writing `children` on the\n * instance would be a third writer on one rendered string — the shape behind\n * the unreproduced \"Maximum update depth exceeded\" report on this panel — and\n * it would silently win over a binding the component author put there on\n * purpose. Refusing it in the writer (rather than in the graft) keeps the\n * storage layer's meaning unchanged, so a later issue can offer content\n * overrides deliberately instead of inheriting them by accident.\n */\nexport const ATTR_OVERRIDE_REFUSED_WRITE_PROPS = new Set([\n 'sx',\n 'children',\n 'html',\n])\n\n/**\n * Where the Attributes panel's per-instance ATTRIBUTE overrides land for the\n * selected node (AGL-1899) — the attribute-side twin of\n * {@link getNodeStyleTarget}.\n *\n * A reusable-component instance's overrides read and write one slice of\n * `node.attrOverrides`: the root slice by default, or the slice keyed by a\n * DEFINITION-internal node id when the author has picked a leaf inside the\n * component. The graft (`composeReusableComponentNodes`) merges that slice\n * over the matching definition node's props, per named prop, so canvas,\n * Preview and tenant SSR agree without any of them knowing this file exists.\n *\n * A PLAIN node has no attribute-override layer at all, and this target\n * refuses to write one: a plain node's attributes are `node.props`, which the\n * Attributes form itself owns through `updateNodeProps`. Handing back a\n * second writer for the same record is exactly how two controls end up\n * fighting over one value, so the plain-node target reports\n * `isInstanceOverride: false` and its `setAttrs` does nothing.\n *\n * `attrs` is a GETTER so `observer` components track the underlying MobX\n * state at read time; a snapshot captured when the target was built would go\n * stale after the first write.\n */\nexport interface NodeAttrTarget {\n /**\n * The override slice edits read from and write to (live view), or\n * `undefined` when this instance overrides nothing for this target.\n *\n * Deliberately NOT composed with the definition's own props: an override\n * slice starts empty and empty MEANS \"whatever the component says\". Merging\n * a base into the reading would make every inherited value look like an\n * override this instance had chosen, and the ✕ on its chip would then\n * appear to do nothing.\n */\n readonly attrs: Record<string, any> | undefined\n /** True when edits land in one of the instance's override slices. */\n readonly isInstanceOverride: boolean\n /**\n * The `attrOverrides` key being edited — `root`, or a definition-internal\n * node id. Empty string for a plain node, which has no override layer.\n */\n readonly overrideKey: string\n /** True when the target is a leaf inside the component, not its root. */\n readonly isLeafOverride: boolean\n /** Replaces the target slice wholesale (MobX action inside). */\n setAttrs(next: Record<string, any> | undefined): void\n /** Removes ONE overridden prop, leaving this instance's others (MobX action inside). */\n clearAttr(prop: string): void\n}\n\nconst isPlainRecord = (value: unknown): value is Record<string, any> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\n/**\n * Whether a value the form produced is an OVERRIDE at all (AGL-1899).\n *\n * `strictNullChecks` is off repo-wide, so \"absent\" and \"empty\" fold together\n * the moment anything tests an override slice for truthiness. This function is\n * the one place that decision is made, and it is deliberately narrow:\n *\n * - `undefined` is not an override. A cleared field, and every prop the\n * definition declares that this instance has not touched, arrive as\n * `undefined`, and storing them would turn \"I opened the panel\" into an\n * override on every prop of the component.\n * - `''` is not an override either. final-form gives a cleared text box an\n * empty string, so this is what \"clear this field\" actually looks like on\n * the way in; the explicit way to say \"override, and render nothing\" is not\n * offered by this panel, which does not edit content props at all.\n * - `false` and `0` ARE overrides, and this is the case worth naming. They\n * are the values `strictNullChecks: false` code most often loses: an\n * instance that turns a component's `disableGutters` OFF, or sets an\n * `elevation` of `0`, is making a real choice, and folding it to \"no\n * override\" would render the component's own value instead — the override\n * would appear to save and then silently not apply.\n */\nexport function isAttrOverrideValue(value: unknown): boolean {\n return value !== undefined && value !== ''\n}\n\n/**\n * The slice as it may be STORED: refused props dropped, and every\n * non-override value dropped by KEY (AGL-1899).\n *\n * Deleting the key rather than storing `undefined` is load-bearing, not\n * tidiness. The graft applies a slice by spreading it over the definition's\n * props, so a stored `{ variant: undefined }` would set `variant` to\n * `undefined` on the rendered node — while `CanvasManager.toJSON`'s\n * `stripUndefinedDeep` removes that same key on the way to storage. The\n * instance would then render one way on the canvas and another way after a\n * reload, which is precisely the canvas/Preview/SSR disagreement this whole\n * override layer is built as a single merge point to prevent.\n */\nfunction storableSlice(\n next: Record<string, any> | undefined,\n): Record<string, any> {\n const slice: Record<string, any> = {}\n if (!isPlainRecord(next)) return slice\n for (const [prop, value] of Object.entries(next)) {\n if (!prop || ATTR_OVERRIDE_REFUSED_WRITE_PROPS.has(prop)) continue\n if (!isAttrOverrideValue(value)) continue\n slice[prop] = value\n }\n return slice\n}\n\n/** A no-op target for nodes with no attribute-override layer. */\nfunction plainNodeTarget(): NodeAttrTarget {\n return {\n isInstanceOverride: false,\n overrideKey: '',\n isLeafOverride: false,\n get attrs() {\n return undefined\n },\n setAttrs: () => undefined,\n clearAttr: () => undefined,\n }\n}\n\n/**\n * The attribute-override target for a selected node — see\n * {@link NodeAttrTarget}.\n *\n * `overrideKey` selects WHICH slice of an instance's overrides is edited. A\n * falsy key falls back to the root, so a caller that has not resolved a\n * definition yet still edits something real rather than writing an\n * `undefined`-keyed slice no renderer reads.\n */\nexport function getNodeAttrTarget(\n node: Aglyn.NodeSchema<any> | null | undefined,\n overrideKey?: string | null,\n): NodeAttrTarget {\n const isInstance = node?.componentId === REUSABLE_INSTANCE_COMPONENT_ID\n if (!node || !isInstance) return plainNodeTarget()\n const key = overrideKey || STYLE_OVERRIDES_ROOT_KEY\n return {\n isInstanceOverride: true,\n overrideKey: key,\n isLeafOverride: key !== STYLE_OVERRIDES_ROOT_KEY,\n get attrs() {\n return (node.attrOverrides as Record<string, any> | undefined)?.[key]\n },\n setAttrs: action((next: Record<string, any> | undefined) => {\n const overrides: Record<string, any> = {\n ...toJS(node.attrOverrides ?? {}),\n }\n const slice = storableSlice(next)\n if (Object.keys(slice).length > 0) {\n overrides[key] = slice\n } else {\n // An emptied override is REMOVED, not stored as `{}`: the panel's\n // override chip and the graft's \"has an override\" check must both\n // read a cleared instance as clean. Only THIS slice goes — the\n // instance's other targets keep theirs.\n delete overrides[key]\n }\n node.attrOverrides =\n Object.keys(overrides).length > 0 ? overrides : undefined\n }),\n clearAttr: action((prop: string) => {\n const current = (node.attrOverrides as Record<string, any> | undefined)?.[\n key\n ]\n if (!isPlainRecord(current) || !(prop in current)) return\n const nextSlice = { ...toJS(current) }\n delete nextSlice[prop]\n const overrides: Record<string, any> = {\n ...toJS(node.attrOverrides ?? {}),\n }\n if (Object.keys(nextSlice).length > 0) overrides[key] = nextSlice\n else delete overrides[key]\n node.attrOverrides =\n Object.keys(overrides).length > 0 ? overrides : undefined\n }),\n }\n}\n\n/**\n * Attribute editors the override panel offers (AGL-1899).\n *\n * Every entry is registered in `elementPropsComponentMapper` AND resolves\n * entirely from the component schema — no canvas context, no host callback,\n * no second prop written beside it. An unregistered editor makes the form\n * renderer THROW, which is what once blanked the whole email designer's\n * attributes panel (AGL-584), so the filter is an allowlist rather than a\n * denylist: a component declaring an editor nobody thought about here loses\n * one row from the override list, not the panel.\n *\n * Deliberately NOT offered, and each for its own reason:\n *\n * - `ICON_PICKER` writes a SECOND prop beside the one it names (the\n * denormalized SVG path, AGL-1212). An override slice that carried the id\n * without the path would render the \"help\" glyph.\n * - `SCREEN_LINK`, and the screen/entity/dataset/node selects, resolve their\n * options from editor context the graft never sees.\n * - `MARKDOWN`, `CSS_GRADIENT`, `BREAKPOINT_SPAN` and `PLUGIN_SETTINGS` each\n * edit a composite value with its own rules; a per-instance override of one\n * is a design question, not a plumbing one.\n */\nexport const ATTR_OVERRIDE_SUPPORTED_EDITORS = new Set<string>([\n FieldComponentType.TEXT_FIELD,\n FieldComponentType.TEXTAREA,\n FieldComponentType.SELECT,\n FieldComponentType.SWITCH,\n FieldComponentType.CHECKBOX,\n FieldComponentType.COLOR_PICKER,\n FieldComponentType.CSS_DIMENSION,\n])\n\n/** One overridable attribute of a node inside a component definition. */\nexport interface InstanceAttrField {\n /** The prop name, which is also the form field name and the slice key. */\n name: string\n /** The field schema handed to the form renderer. */\n field: Record<string, unknown>\n}\n\n/**\n * The attributes of ONE node inside a component definition that this\n * instance may override, in the component schema's own order (AGL-1899).\n *\n * The definition node's CURRENT value shows as the field's placeholder, which\n * is the whole of how \"empty means the component's value\" is made legible:\n * an author looking at a blank Variant box can see it says `contained`\n * underneath, and knows what clearing an override goes back to.\n *\n * Field names are the prop names verbatim and the form is flat, so a name\n * carrying a dot is skipped — final-form reads `a.b` as a nested path, so\n * such a field would write a level the slice does not have and the value\n * would silently never reach the node (the same trap\n * `COMPONENT_PROP_NAME_PATTERN` exists for one layer up).\n */\nexport function listInstanceAttrFields(\n defNode:\n | { componentId?: string; props?: Record<string, unknown> }\n | null\n | undefined,\n): InstanceAttrField[] {\n const attributes = defNode?.componentId\n ? (components.getSchema(defNode.componentId)?.attributes ?? [])\n : []\n const fields: InstanceAttrField[] = []\n const seen = new Set<string>()\n for (const attribute of attributes) {\n const name = (attribute as { name?: string })?.name\n const component = (attribute as { component?: string })?.component\n if (!name || seen.has(name)) continue\n if (name.includes('.') || name.includes('[')) continue\n if (ATTR_OVERRIDE_REFUSED_WRITE_PROPS.has(name)) continue\n if (!component || !ATTR_OVERRIDE_SUPPORTED_EDITORS.has(component)) continue\n seen.add(name)\n const inherited = (defNode?.props as Record<string, unknown> | undefined)?.[\n name\n ]\n fields.push({\n name,\n field: {\n ...(attribute as Record<string, unknown>),\n name,\n // An override field is never required: leaving it empty is the\n // supported state, and a `required` copied off the component's own\n // schema would make the form invalid — and therefore unsavable — the\n // moment the panel opened.\n isRequired: false,\n validate: undefined,\n placeholder:\n typeof inherited === 'string' || typeof inherited === 'number'\n ? String(inherited)\n : undefined,\n },\n })\n }\n return fields\n}\n\nexport default getNodeAttrTarget\n"],"names":["components","FieldComponentType","REUSABLE_INSTANCE_COMPONENT_ID","STYLE_OVERRIDES_ROOT_KEY","action","toJS","ATTR_OVERRIDE_REFUSED_WRITE_PROPS","Set","isPlainRecord","value","Array","isArray","isAttrOverrideValue","undefined","storableSlice","next","slice","prop","Object","entries","has","plainNodeTarget","isInstanceOverride","overrideKey","isLeafOverride","attrs","setAttrs","clearAttr","getNodeAttrTarget","node","isInstance","componentId","key","attrOverrides","overrides","keys","length","current","nextSlice","ATTR_OVERRIDE_SUPPORTED_EDITORS","TEXT_FIELD","TEXTAREA","SELECT","SWITCH","CHECKBOX","COLOR_PICKER","CSS_DIMENSION","listInstanceAttrFields","defNode","attributes","getSchema","fields","seen","attribute","name","component","includes","add","inherited","props","push","field","isRequired","validate","placeholder","String"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAGD,SACEA,UAAU,EACVC,kBAAkB,EAClBC,8BAA8B,EAC9BC,wBAAwB,QACnB,eAAc;AACrB,SAASC,MAAM,EAAEC,IAAI,QAAQ,OAAM;AAEnC;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,MAAMC,oCAAoC,IAAIC,IAAI;IACvD;IACA;IACA;CACD,EAAC;AAoDF,MAAMC,gBAAgB,CAACC,QACrB,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAACC,MAAMC,OAAO,CAACF;AAEhE;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,SAASG,oBAAoBH,KAAc;IAChD,OAAOA,UAAUI,aAAaJ,UAAU;AAC1C;AAEA;;;;;;;;;;;;CAYC,GACD,SAASK,cACPC,IAAqC;IAErC,MAAMC,QAA6B,CAAC;IACpC,IAAI,CAACR,cAAcO,OAAO,OAAOC;IACjC,KAAK,MAAM,CAACC,MAAMR,MAAM,IAAIS,OAAOC,OAAO,CAACJ,MAAO;QAChD,IAAI,CAACE,QAAQX,kCAAkCc,GAAG,CAACH,OAAO;QAC1D,IAAI,CAACL,oBAAoBH,QAAQ;QACjCO,KAAK,CAACC,KAAK,GAAGR;IAChB;IACA,OAAOO;AACT;AAEA,+DAA+D,GAC/D,SAASK;IACP,OAAO;QACLC,oBAAoB;QACpBC,aAAa;QACbC,gBAAgB;QAChB,IAAIC;YACF,OAAOZ;QACT;QACAa,UAAU,IAAMb;QAChBc,WAAW,IAAMd;IACnB;AACF;AAEA;;;;;;;;CAQC,GACD,OAAO,SAASe,kBACdC,IAA8C,EAC9CN,WAA2B;IAE3B,MAAMO,aAAaD,CAAAA,wBAAAA,KAAME,WAAW,MAAK7B;IACzC,IAAI,CAAC2B,QAAQ,CAACC,YAAY,OAAOT;IACjC,MAAMW,MAAMT,eAAepB;IAC3B,OAAO;QACLmB,oBAAoB;QACpBC,aAAaS;QACbR,gBAAgBQ,QAAQ7B;QACxB,IAAIsB;gBACMI;YAAR,QAAQA,sBAAAA,KAAKI,aAAa,qBAAnB,AAACJ,mBAAwD,CAACG,IAAI;QACvE;QACAN,UAAUtB,OAAO,CAACW;gBAENc;YADV,MAAMK,YAAiC,aAClC7B,MAAKwB,sBAAAA,KAAKI,aAAa,YAAlBJ,sBAAsB,CAAC;YAEjC,MAAMb,QAAQF,cAAcC;YAC5B,IAAIG,OAAOiB,IAAI,CAACnB,OAAOoB,MAAM,GAAG,GAAG;gBACjCF,SAAS,CAACF,IAAI,GAAGhB;YACnB,OAAO;gBACL,kEAAkE;gBAClE,kEAAkE;gBAClE,+DAA+D;gBAC/D,wCAAwC;gBACxC,OAAOkB,SAAS,CAACF,IAAI;YACvB;YACAH,KAAKI,aAAa,GAChBf,OAAOiB,IAAI,CAACD,WAAWE,MAAM,GAAG,IAAIF,YAAYrB;QACpD;QACAc,WAAWvB,OAAO,CAACa;gBAQPY;gBAPOA;YAAjB,MAAMQ,WAAWR,uBAAAA,KAAKI,aAAa,qBAAnB,AAACJ,oBAAwD,CACvEG,IACD;YACD,IAAI,CAACxB,cAAc6B,YAAY,CAAEpB,CAAAA,QAAQoB,OAAM,GAAI;YACnD,MAAMC,YAAY,aAAKjC,KAAKgC;YAC5B,OAAOC,SAAS,CAACrB,KAAK;YACtB,MAAMiB,YAAiC,aAClC7B,MAAKwB,sBAAAA,KAAKI,aAAa,YAAlBJ,sBAAsB,CAAC;YAEjC,IAAIX,OAAOiB,IAAI,CAACG,WAAWF,MAAM,GAAG,GAAGF,SAAS,CAACF,IAAI,GAAGM;iBACnD,OAAOJ,SAAS,CAACF,IAAI;YAC1BH,KAAKI,aAAa,GAChBf,OAAOiB,IAAI,CAACD,WAAWE,MAAM,GAAG,IAAIF,YAAYrB;QACpD;IACF;AACF;AAEA;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,MAAM0B,kCAAkC,IAAIhC,IAAY;IAC7DN,mBAAmBuC,UAAU;IAC7BvC,mBAAmBwC,QAAQ;IAC3BxC,mBAAmByC,MAAM;IACzBzC,mBAAmB0C,MAAM;IACzB1C,mBAAmB2C,QAAQ;IAC3B3C,mBAAmB4C,YAAY;IAC/B5C,mBAAmB6C,aAAa;CACjC,EAAC;AAUF;;;;;;;;;;;;;;CAcC,GACD,OAAO,SAASC,uBACdC,OAGa;;QAGRhD;IADL,MAAMiD,aAAaD,CAAAA,2BAAAA,QAASjB,WAAW,aAClC/B,wBAAAA,WAAWkD,SAAS,CAACF,QAAQjB,WAAW,sBAAxC/B,sBAA2CiD,UAAU,mBAAI,EAAE,GAC5D,EAAE;IACN,MAAME,SAA8B,EAAE;IACtC,MAAMC,OAAO,IAAI7C;IACjB,KAAK,MAAM8C,aAAaJ,WAAY;YAQfD;QAPnB,MAAMM,OAAQD,6BAAD,AAACA,UAAiCC,IAAI;QACnD,MAAMC,YAAaF,6BAAD,AAACA,UAAsCE,SAAS;QAClE,IAAI,CAACD,QAAQF,KAAKhC,GAAG,CAACkC,OAAO;QAC7B,IAAIA,KAAKE,QAAQ,CAAC,QAAQF,KAAKE,QAAQ,CAAC,MAAM;QAC9C,IAAIlD,kCAAkCc,GAAG,CAACkC,OAAO;QACjD,IAAI,CAACC,aAAa,CAAChB,gCAAgCnB,GAAG,CAACmC,YAAY;QACnEH,KAAKK,GAAG,CAACH;QACT,MAAMI,YAAaV,4BAAAA,iBAAAA,QAASW,KAAK,qBAAf,AAACX,cAAwD,CACzEM,KACD;QACDH,OAAOS,IAAI,CAAC;YACVN;YACAO,OAAO,aACDR;gBACJC;gBACA,+DAA+D;gBAC/D,mEAAmE;gBACnE,qEAAqE;gBACrE,2BAA2B;gBAC3BQ,YAAY;gBACZC,UAAUlD;gBACVmD,aACE,OAAON,cAAc,YAAY,OAAOA,cAAc,WAClDO,OAAOP,aACP7C;;QAEV;IACF;IACA,OAAOsC;AACT;AAEA,eAAevB,kBAAiB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * A dotted form path read out of a values object, the way final-form reads
19
+ * one: `propValues.headline` is the `headline` inside `propValues`.
20
+ */
21
+ export declare function readAttributeFieldValue(values: Record<string, unknown> | null | undefined, name: string): unknown;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * A dotted form path read out of a values object, the way final-form reads
18
+ * one: `propValues.headline` is the `headline` inside `propValues`.
19
+ */ export function readAttributeFieldValue(values, name) {
20
+ let current = values;
21
+ for (const key of String(name).split('.')){
22
+ if (!current || typeof current !== 'object') return undefined;
23
+ current = current[key];
24
+ }
25
+ return current;
26
+ }
27
+
28
+ //# sourceMappingURL=attribute-field-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/attribute-field-value.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A dotted form path read out of a values object, the way final-form reads\n * one: `propValues.headline` is the `headline` inside `propValues`.\n */\nexport function readAttributeFieldValue(\n values: Record<string, unknown> | null | undefined,\n name: string,\n): unknown {\n let current: unknown = values\n for (const key of String(name).split('.')) {\n if (!current || typeof current !== 'object') return undefined\n current = (current as Record<string, unknown>)[key]\n }\n return current\n}\n"],"names":["readAttributeFieldValue","values","name","current","key","String","split","undefined"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;CAGC,GACD,OAAO,SAASA,wBACdC,MAAkD,EAClDC,IAAY;IAEZ,IAAIC,UAAmBF;IACvB,KAAK,MAAMG,OAAOC,OAAOH,MAAMI,KAAK,CAAC,KAAM;QACzC,IAAI,CAACH,WAAW,OAAOA,YAAY,UAAU,OAAOI;QACpDJ,UAAU,AAACA,OAAmC,CAACC,IAAI;IACrD;IACA,OAAOD;AACT"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /** Ask for the menu on this node; supersedes any earlier request. */
18
+ export declare function requestCanvasContextMenu(nodeId: string | undefined): void;
19
+ /** Whether the open menu was asked for on this node. */
20
+ export declare function isCanvasContextMenuRequested(nodeId: string | undefined): boolean;
21
+ /**
22
+ * Withdraw the request.
23
+ *
24
+ * Called when the menu closes, and unconditionally rather than only for the
25
+ * node that asked: a request left standing re-opens the menu the next time
26
+ * that node's overlay mounts, which reads as the menu opening by itself.
27
+ */
28
+ export declare function clearCanvasContextMenu(): void;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { observable, runInAction } from "mobx";
17
+ /**
18
+ * Right-click on the canvas opens the element's ⋮ menu (AGL-1405).
19
+ *
20
+ * The hierarchy row can open its own menu directly — the row and the menu are
21
+ * the same component. The canvas cannot: the menu is rendered by
22
+ * `node-quick-actions`, inside the overlay, which only mounts for a node that
23
+ * is already selected or hovered. The right-click happens on the LEAF, in a
24
+ * closed shadow root, and the two never meet.
25
+ *
26
+ * So the leaf asks and the overlay answers. One node id in module-scope
27
+ * observable state, which is also what makes the ordering work: the leaf
28
+ * selects the node and records the request, the overlay mounts BECAUSE of
29
+ * that selection, and reads the request on its first render.
30
+ *
31
+ * A single id rather than a queue — only one context menu can be open, and a
32
+ * second right-click supersedes the first rather than stacking.
33
+ */ const state = observable({
34
+ nodeId: null
35
+ });
36
+ /** Ask for the menu on this node; supersedes any earlier request. */ export function requestCanvasContextMenu(nodeId) {
37
+ runInAction(()=>{
38
+ state.nodeId = nodeId != null ? nodeId : null;
39
+ });
40
+ }
41
+ /** Whether the open menu was asked for on this node. */ export function isCanvasContextMenuRequested(nodeId) {
42
+ return Boolean(nodeId) && state.nodeId === nodeId;
43
+ }
44
+ /**
45
+ * Withdraw the request.
46
+ *
47
+ * Called when the menu closes, and unconditionally rather than only for the
48
+ * node that asked: a request left standing re-opens the menu the next time
49
+ * that node's overlay mounts, which reads as the menu opening by itself.
50
+ */ export function clearCanvasContextMenu() {
51
+ runInAction(()=>{
52
+ state.nodeId = null;
53
+ });
54
+ }
55
+
56
+ //# sourceMappingURL=canvas-context-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/canvas-context-menu.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { observable, runInAction } from 'mobx'\n\n/**\n * Right-click on the canvas opens the element's ⋮ menu (AGL-1405).\n *\n * The hierarchy row can open its own menu directly — the row and the menu are\n * the same component. The canvas cannot: the menu is rendered by\n * `node-quick-actions`, inside the overlay, which only mounts for a node that\n * is already selected or hovered. The right-click happens on the LEAF, in a\n * closed shadow root, and the two never meet.\n *\n * So the leaf asks and the overlay answers. One node id in module-scope\n * observable state, which is also what makes the ordering work: the leaf\n * selects the node and records the request, the overlay mounts BECAUSE of\n * that selection, and reads the request on its first render.\n *\n * A single id rather than a queue — only one context menu can be open, and a\n * second right-click supersedes the first rather than stacking.\n */\nconst state = observable<{ nodeId: string | null }>({ nodeId: null })\n\n/** Ask for the menu on this node; supersedes any earlier request. */\nexport function requestCanvasContextMenu(nodeId: string | undefined): void {\n runInAction(() => {\n state.nodeId = nodeId ?? null\n })\n}\n\n/** Whether the open menu was asked for on this node. */\nexport function isCanvasContextMenuRequested(\n nodeId: string | undefined,\n): boolean {\n return Boolean(nodeId) && state.nodeId === nodeId\n}\n\n/**\n * Withdraw the request.\n *\n * Called when the menu closes, and unconditionally rather than only for the\n * node that asked: a request left standing re-opens the menu the next time\n * that node's overlay mounts, which reads as the menu opening by itself.\n */\nexport function clearCanvasContextMenu(): void {\n runInAction(() => {\n state.nodeId = null\n })\n}\n"],"names":["observable","runInAction","state","nodeId","requestCanvasContextMenu","isCanvasContextMenuRequested","Boolean","clearCanvasContextMenu"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,UAAU,EAAEC,WAAW,QAAQ,OAAM;AAE9C;;;;;;;;;;;;;;;;CAgBC,GACD,MAAMC,QAAQF,WAAsC;IAAEG,QAAQ;AAAK;AAEnE,mEAAmE,GACnE,OAAO,SAASC,yBAAyBD,MAA0B;IACjEF,YAAY;QACVC,MAAMC,MAAM,GAAGA,iBAAAA,SAAU;IAC3B;AACF;AAEA,sDAAsD,GACtD,OAAO,SAASE,6BACdF,MAA0B;IAE1B,OAAOG,QAAQH,WAAWD,MAAMC,MAAM,KAAKA;AAC7C;AAEA;;;;;;CAMC,GACD,OAAO,SAASI;IACdN,YAAY;QACVC,MAAMC,MAAM,GAAG;IACjB;AACF"}