@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,85 @@
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
+ export interface InlineTextEditRect {
19
+ left: number;
20
+ top: number;
21
+ width: number;
22
+ height: number;
23
+ }
24
+ /**
25
+ * Prop-override edit target (AGL-1304): the editor is anchored on a grafted
26
+ * text leaf INSIDE a component instance, and the commit writes the
27
+ * instance's `propValues[propName]` instead of the node's `children`. The
28
+ * `node` held by the store stays the INSTANCE — the grafted leaf is not a
29
+ * canvas node, only the anchor rect came from it.
30
+ */
31
+ export interface InlinePropEditTarget {
32
+ /** Declared prop name the edit commits to. */
33
+ propName: string;
34
+ /**
35
+ * The text the leaf currently renders (override unless unset, else the
36
+ * declared default — `getInstanceEffectivePropText`). Captured at open
37
+ * because the editor cannot re-derive it without the definition.
38
+ */
39
+ initialText: string;
40
+ }
41
+ /**
42
+ * State for the inline canvas text editor: which node is being edited and
43
+ * where its element sits in viewport coordinates (the editor renders as a
44
+ * fixed overlay OUTSIDE the closed canvas shadow root, so screen coordinates
45
+ * are the only shared frame of reference).
46
+ *
47
+ * `anchor` is the element the rect was measured from, kept so the editor can
48
+ * re-measure rather than drift when the canvas scrolls (AGL-1644). It is the
49
+ * anchor RATHER than the node's `Besigner.refs` entry because a prop-override
50
+ * edit measures a grafted preview leaf, which is not a canvas node and has no
51
+ * ref — the case a ref lookup would have missed silently.
52
+ *
53
+ * An `observable.ref`: a DOM node is a foreign object graph, and mobx has no
54
+ * business walking into it.
55
+ */
56
+ declare class InlineTextEditStore {
57
+ node?: Aglyn.NodeSchema<any>;
58
+ rect?: InlineTextEditRect;
59
+ anchor?: Element;
60
+ propTarget?: InlinePropEditTarget;
61
+ constructor();
62
+ open(node: Aglyn.NodeSchema<any>, rect: InlineTextEditRect, propTarget?: InlinePropEditTarget, anchor?: Element): void;
63
+ close(): void;
64
+ }
65
+ export declare const inlineTextEdit: InlineTextEditStore;
66
+ /**
67
+ * Whether an inline text edit is open ON or INSIDE `element` (AGL-2486).
68
+ *
69
+ * The one place the "stand down, someone is typing in here" rule is
70
+ * expressed. Every canvas leaf registers its own pointer handlers, and those
71
+ * handlers begin by preventing the default — which is the default the
72
+ * browser uses to place a caret. Asking only "is this leaf the node being
73
+ * edited?" is not enough, and worse than not enough: a nested run stands its
74
+ * own leaf down, the event then BUBBLES to the ancestor leaf, and the
75
+ * ancestor prevents the default instead. The author sees an editor that is
76
+ * open, styled and completely uninteractive — no caret, no drag-select, no
77
+ * double-click-to-select-a-word.
78
+ *
79
+ * Containment, not identity, and by DOM rather than by node tree: the anchor
80
+ * is the element that was measured, which is the one thing that is true for
81
+ * a grafted instance leaf as well as a canvas node, and `contains` answers
82
+ * for any nesting depth including the element itself.
83
+ */
84
+ export declare function isInlineEditWithin(element: Element | null | undefined): boolean;
85
+ export default inlineTextEdit;
@@ -0,0 +1,78 @@
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 { makeAutoObservable, observable } from "mobx";
17
+ /**
18
+ * State for the inline canvas text editor: which node is being edited and
19
+ * where its element sits in viewport coordinates (the editor renders as a
20
+ * fixed overlay OUTSIDE the closed canvas shadow root, so screen coordinates
21
+ * are the only shared frame of reference).
22
+ *
23
+ * `anchor` is the element the rect was measured from, kept so the editor can
24
+ * re-measure rather than drift when the canvas scrolls (AGL-1644). It is the
25
+ * anchor RATHER than the node's `Besigner.refs` entry because a prop-override
26
+ * edit measures a grafted preview leaf, which is not a canvas node and has no
27
+ * ref — the case a ref lookup would have missed silently.
28
+ *
29
+ * An `observable.ref`: a DOM node is a foreign object graph, and mobx has no
30
+ * business walking into it.
31
+ */ let InlineTextEditStore = class InlineTextEditStore {
32
+ open(node, rect, propTarget, anchor) {
33
+ this.node = node;
34
+ this.rect = rect;
35
+ this.propTarget = propTarget;
36
+ this.anchor = anchor;
37
+ }
38
+ close() {
39
+ this.node = undefined;
40
+ this.rect = undefined;
41
+ this.anchor = undefined;
42
+ this.propTarget = undefined;
43
+ }
44
+ constructor(){
45
+ this.node = undefined;
46
+ this.rect = undefined;
47
+ this.anchor = undefined;
48
+ this.propTarget = undefined;
49
+ makeAutoObservable(this, {
50
+ anchor: observable.ref
51
+ });
52
+ }
53
+ };
54
+ export const inlineTextEdit = new InlineTextEditStore();
55
+ /**
56
+ * Whether an inline text edit is open ON or INSIDE `element` (AGL-2486).
57
+ *
58
+ * The one place the "stand down, someone is typing in here" rule is
59
+ * expressed. Every canvas leaf registers its own pointer handlers, and those
60
+ * handlers begin by preventing the default — which is the default the
61
+ * browser uses to place a caret. Asking only "is this leaf the node being
62
+ * edited?" is not enough, and worse than not enough: a nested run stands its
63
+ * own leaf down, the event then BUBBLES to the ancestor leaf, and the
64
+ * ancestor prevents the default instead. The author sees an editor that is
65
+ * open, styled and completely uninteractive — no caret, no drag-select, no
66
+ * double-click-to-select-a-word.
67
+ *
68
+ * Containment, not identity, and by DOM rather than by node tree: the anchor
69
+ * is the element that was measured, which is the one thing that is true for
70
+ * a grafted instance leaf as well as a canvas node, and `contains` answers
71
+ * for any nesting depth including the element itself.
72
+ */ export function isInlineEditWithin(element) {
73
+ const anchor = inlineTextEdit.anchor;
74
+ return Boolean(anchor && element && element.contains(anchor));
75
+ }
76
+ export default inlineTextEdit;
77
+
78
+ //# sourceMappingURL=inline-text-edit.store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/inline-text-edit.store.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 { makeAutoObservable, observable } from 'mobx'\n\nexport interface InlineTextEditRect {\n left: number\n top: number\n width: number\n height: number\n}\n\n/**\n * Prop-override edit target (AGL-1304): the editor is anchored on a grafted\n * text leaf INSIDE a component instance, and the commit writes the\n * instance's `propValues[propName]` instead of the node's `children`. The\n * `node` held by the store stays the INSTANCE — the grafted leaf is not a\n * canvas node, only the anchor rect came from it.\n */\nexport interface InlinePropEditTarget {\n /** Declared prop name the edit commits to. */\n propName: string\n /**\n * The text the leaf currently renders (override unless unset, else the\n * declared default — `getInstanceEffectivePropText`). Captured at open\n * because the editor cannot re-derive it without the definition.\n */\n initialText: string\n}\n\n/**\n * State for the inline canvas text editor: which node is being edited and\n * where its element sits in viewport coordinates (the editor renders as a\n * fixed overlay OUTSIDE the closed canvas shadow root, so screen coordinates\n * are the only shared frame of reference).\n *\n * `anchor` is the element the rect was measured from, kept so the editor can\n * re-measure rather than drift when the canvas scrolls (AGL-1644). It is the\n * anchor RATHER than the node's `Besigner.refs` entry because a prop-override\n * edit measures a grafted preview leaf, which is not a canvas node and has no\n * ref — the case a ref lookup would have missed silently.\n *\n * An `observable.ref`: a DOM node is a foreign object graph, and mobx has no\n * business walking into it.\n */\nclass InlineTextEditStore {\n node?: Aglyn.NodeSchema<any> = undefined\n rect?: InlineTextEditRect = undefined\n anchor?: Element = undefined\n propTarget?: InlinePropEditTarget = undefined\n\n constructor() {\n makeAutoObservable(this, { anchor: observable.ref })\n }\n\n open(\n node: Aglyn.NodeSchema<any>,\n rect: InlineTextEditRect,\n propTarget?: InlinePropEditTarget,\n anchor?: Element,\n ) {\n this.node = node\n this.rect = rect\n this.propTarget = propTarget\n this.anchor = anchor\n }\n\n close() {\n this.node = undefined\n this.rect = undefined\n this.anchor = undefined\n this.propTarget = undefined\n }\n}\n\nexport const inlineTextEdit = new InlineTextEditStore()\n\n/**\n * Whether an inline text edit is open ON or INSIDE `element` (AGL-2486).\n *\n * The one place the \"stand down, someone is typing in here\" rule is\n * expressed. Every canvas leaf registers its own pointer handlers, and those\n * handlers begin by preventing the default — which is the default the\n * browser uses to place a caret. Asking only \"is this leaf the node being\n * edited?\" is not enough, and worse than not enough: a nested run stands its\n * own leaf down, the event then BUBBLES to the ancestor leaf, and the\n * ancestor prevents the default instead. The author sees an editor that is\n * open, styled and completely uninteractive — no caret, no drag-select, no\n * double-click-to-select-a-word.\n *\n * Containment, not identity, and by DOM rather than by node tree: the anchor\n * is the element that was measured, which is the one thing that is true for\n * a grafted instance leaf as well as a canvas node, and `contains` answers\n * for any nesting depth including the element itself.\n */\nexport function isInlineEditWithin(\n element: Element | null | undefined,\n): boolean {\n const anchor = inlineTextEdit.anchor\n return Boolean(anchor && element && element.contains(anchor))\n}\n\nexport default inlineTextEdit\n"],"names":["makeAutoObservable","observable","InlineTextEditStore","open","node","rect","propTarget","anchor","close","undefined","ref","inlineTextEdit","isInlineEditWithin","element","Boolean","contains"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,SAASA,kBAAkB,EAAEC,UAAU,QAAQ,OAAM;AA2BrD;;;;;;;;;;;;;;CAcC,GACD,IAAA,AAAMC,sBAAN,MAAMA;IAUJC,KACEC,IAA2B,EAC3BC,IAAwB,EACxBC,UAAiC,EACjCC,MAAgB,EAChB;QACA,IAAI,CAACH,IAAI,GAAGA;QACZ,IAAI,CAACC,IAAI,GAAGA;QACZ,IAAI,CAACC,UAAU,GAAGA;QAClB,IAAI,CAACC,MAAM,GAAGA;IAChB;IAEAC,QAAQ;QACN,IAAI,CAACJ,IAAI,GAAGK;QACZ,IAAI,CAACJ,IAAI,GAAGI;QACZ,IAAI,CAACF,MAAM,GAAGE;QACd,IAAI,CAACH,UAAU,GAAGG;IACpB;IArBA,aAAc;aALdL,OAA+BK;aAC/BJ,OAA4BI;aAC5BF,SAAmBE;aACnBH,aAAoCG;QAGlCT,mBAAmB,IAAI,EAAE;YAAEO,QAAQN,WAAWS,GAAG;QAAC;IACpD;AAoBF;AAEA,OAAO,MAAMC,iBAAiB,IAAIT,sBAAqB;AAEvD;;;;;;;;;;;;;;;;;CAiBC,GACD,OAAO,SAASU,mBACdC,OAAmC;IAEnC,MAAMN,SAASI,eAAeJ,MAAM;IACpC,OAAOO,QAAQP,UAAUM,WAAWA,QAAQE,QAAQ,CAACR;AACvD;AAEA,eAAeI,eAAc"}
@@ -0,0 +1,39 @@
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 grafted preview leaf under the double-clicked point (AGL-1304). */
18
+ export interface InstanceLeafElementHit {
19
+ /** Grafted node id (`cmp__{instanceId}__{defId}`) parsed off the stamp. */
20
+ graftedId: string;
21
+ /** The rendered element, for anchoring the inline editor's overlay. */
22
+ element: Element;
23
+ }
24
+ /**
25
+ * Geometric hit-test into an instance's rendered component preview
26
+ * (AGL-1304): the deepest grafted leaf whose bounding rect contains the
27
+ * viewport point `(x, y)`, or `null` when the point misses the preview.
28
+ *
29
+ * Geometry, not `elementFromPoint`, out of necessity: `NodeLeaf` renders
30
+ * the preview under `pointer-events: none` so every click selects the
31
+ * instance, and hit-testing APIs skip such elements entirely — the
32
+ * double-click's coordinates are all that ever reaches us.
33
+ *
34
+ * "Deepest" among overlapping candidates: a descendant beats its ancestors,
35
+ * and between unrelated overlapping leaves the later one in document order
36
+ * wins (paint order, near enough for a double-click).
37
+ */
38
+ export declare function findInstanceLeafAtPoint(container: Element, x: number, y: number): InstanceLeafElementHit | null;
39
+ export default findInstanceLeafAtPoint;
@@ -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
+ */ /**
17
+ * The `data-aglyn="leaf:<nodeId>"` stamp the node renderer's `Leaf` puts on
18
+ * every element it renders — the only identity the INERT instance preview
19
+ * carries, since its nodes are never in the canvas (AGL-1251).
20
+ */ const LEAF_STAMP_PREFIX = 'leaf:';
21
+ /**
22
+ * Geometric hit-test into an instance's rendered component preview
23
+ * (AGL-1304): the deepest grafted leaf whose bounding rect contains the
24
+ * viewport point `(x, y)`, or `null` when the point misses the preview.
25
+ *
26
+ * Geometry, not `elementFromPoint`, out of necessity: `NodeLeaf` renders
27
+ * the preview under `pointer-events: none` so every click selects the
28
+ * instance, and hit-testing APIs skip such elements entirely — the
29
+ * double-click's coordinates are all that ever reaches us.
30
+ *
31
+ * "Deepest" among overlapping candidates: a descendant beats its ancestors,
32
+ * and between unrelated overlapping leaves the later one in document order
33
+ * wins (paint order, near enough for a double-click).
34
+ */ export function findInstanceLeafAtPoint(container, x, y) {
35
+ var _best_getAttribute;
36
+ const candidates = container.querySelectorAll(`[data-aglyn-component-preview] [data-aglyn^="${LEAF_STAMP_PREFIX}"]`);
37
+ let best = null;
38
+ for (const candidate of Array.from(candidates)){
39
+ const rect = candidate.getBoundingClientRect();
40
+ const contains = rect.width > 0 && rect.height > 0 && x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
41
+ if (!contains) continue;
42
+ // Keep the candidate unless it is an ANCESTOR of the current best —
43
+ // descendants refine the hit, later unrelated leaves paint on top.
44
+ if (!best || !candidate.contains(best)) best = candidate;
45
+ }
46
+ if (!best) return null;
47
+ const stamp = (_best_getAttribute = best.getAttribute('data-aglyn')) != null ? _best_getAttribute : '';
48
+ const graftedId = stamp.slice(LEAF_STAMP_PREFIX.length);
49
+ return graftedId ? {
50
+ graftedId,
51
+ element: best
52
+ } : null;
53
+ }
54
+ export default findInstanceLeafAtPoint;
55
+
56
+ //# sourceMappingURL=instance-leaf-hit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/instance-leaf-hit.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 * The `data-aglyn=\"leaf:<nodeId>\"` stamp the node renderer's `Leaf` puts on\n * every element it renders — the only identity the INERT instance preview\n * carries, since its nodes are never in the canvas (AGL-1251).\n */\nconst LEAF_STAMP_PREFIX = 'leaf:'\n\n/** A grafted preview leaf under the double-clicked point (AGL-1304). */\nexport interface InstanceLeafElementHit {\n /** Grafted node id (`cmp__{instanceId}__{defId}`) parsed off the stamp. */\n graftedId: string\n /** The rendered element, for anchoring the inline editor's overlay. */\n element: Element\n}\n\n/**\n * Geometric hit-test into an instance's rendered component preview\n * (AGL-1304): the deepest grafted leaf whose bounding rect contains the\n * viewport point `(x, y)`, or `null` when the point misses the preview.\n *\n * Geometry, not `elementFromPoint`, out of necessity: `NodeLeaf` renders\n * the preview under `pointer-events: none` so every click selects the\n * instance, and hit-testing APIs skip such elements entirely — the\n * double-click's coordinates are all that ever reaches us.\n *\n * \"Deepest\" among overlapping candidates: a descendant beats its ancestors,\n * and between unrelated overlapping leaves the later one in document order\n * wins (paint order, near enough for a double-click).\n */\nexport function findInstanceLeafAtPoint(\n container: Element,\n x: number,\n y: number,\n): InstanceLeafElementHit | null {\n const candidates = container.querySelectorAll(\n `[data-aglyn-component-preview] [data-aglyn^=\"${LEAF_STAMP_PREFIX}\"]`,\n )\n let best: Element | null = null\n for (const candidate of Array.from(candidates)) {\n const rect = candidate.getBoundingClientRect()\n const contains =\n rect.width > 0 &&\n rect.height > 0 &&\n x >= rect.left &&\n x <= rect.right &&\n y >= rect.top &&\n y <= rect.bottom\n if (!contains) continue\n // Keep the candidate unless it is an ANCESTOR of the current best —\n // descendants refine the hit, later unrelated leaves paint on top.\n if (!best || !candidate.contains(best)) best = candidate\n }\n if (!best) return null\n const stamp = best.getAttribute('data-aglyn') ?? ''\n const graftedId = stamp.slice(LEAF_STAMP_PREFIX.length)\n return graftedId ? { graftedId, element: best } : null\n}\n\nexport default findInstanceLeafAtPoint\n"],"names":["LEAF_STAMP_PREFIX","findInstanceLeafAtPoint","container","x","y","best","candidates","querySelectorAll","candidate","Array","from","rect","getBoundingClientRect","contains","width","height","left","right","top","bottom","stamp","getAttribute","graftedId","slice","length","element"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;CAIC,GACD,MAAMA,oBAAoB;AAU1B;;;;;;;;;;;;;CAaC,GACD,OAAO,SAASC,wBACdC,SAAkB,EAClBC,CAAS,EACTC,CAAS;QAqBKC;IAnBd,MAAMC,aAAaJ,UAAUK,gBAAgB,CAC3C,CAAC,6CAA6C,EAAEP,kBAAkB,EAAE,CAAC;IAEvE,IAAIK,OAAuB;IAC3B,KAAK,MAAMG,aAAaC,MAAMC,IAAI,CAACJ,YAAa;QAC9C,MAAMK,OAAOH,UAAUI,qBAAqB;QAC5C,MAAMC,WACJF,KAAKG,KAAK,GAAG,KACbH,KAAKI,MAAM,GAAG,KACdZ,KAAKQ,KAAKK,IAAI,IACdb,KAAKQ,KAAKM,KAAK,IACfb,KAAKO,KAAKO,GAAG,IACbd,KAAKO,KAAKQ,MAAM;QAClB,IAAI,CAACN,UAAU;QACf,oEAAoE;QACpE,mEAAmE;QACnE,IAAI,CAACR,QAAQ,CAACG,UAAUK,QAAQ,CAACR,OAAOA,OAAOG;IACjD;IACA,IAAI,CAACH,MAAM,OAAO;IAClB,MAAMe,SAAQf,qBAAAA,KAAKgB,YAAY,CAAC,yBAAlBhB,qBAAmC;IACjD,MAAMiB,YAAYF,MAAMG,KAAK,CAACvB,kBAAkBwB,MAAM;IACtD,OAAOF,YAAY;QAAEA;QAAWG,SAASpB;IAAK,IAAI;AACpD;AAEA,eAAeJ,wBAAuB"}
@@ -0,0 +1,76 @@
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
+ * Switching a CLASS off while designing (AGL-2486).
19
+ *
20
+ * ## What the chip's eye means, and what it does not
21
+ *
22
+ * The Classes field's chips could only be removed. Seeing an element without
23
+ * one of its classes meant deleting the chip and typing the name back, which
24
+ * is the same destructive round trip the style fields had. The eye stops the
25
+ * class applying ON THE CANVAS and keeps it on the element.
26
+ *
27
+ * It is CANVAS ONLY, exactly like the style mutes it sits beside: the class
28
+ * list in the document is untouched, so what the chips show is what ships,
29
+ * and a switched-off class cannot reach a published page as an enabled one
30
+ * because it was never disabled anywhere a publish can see. The chip's ✕
31
+ * remains the one control that changes what the element carries.
32
+ *
33
+ * ## The one class that is not switched here
34
+ *
35
+ * {@link Aglyn.ELEMENT_HIDDEN_CLASS} is what the hierarchy's visibility eye
36
+ * already keys on (AGL-592), and "stop applying the hidden class on the
37
+ * canvas" and "show this element while I design it" are the same act. Two
38
+ * controls carrying one meaning can disagree, so they do not: this module
39
+ * refuses that class ({@link isClassSwitchable}) and the chip is wired to the
40
+ * visibility state instead. One switch, reachable from the hierarchy row and
41
+ * from the chip.
42
+ */
43
+ /** One muted class on one element. */
44
+ export interface MutedClassTarget {
45
+ nodeId: string;
46
+ className: string;
47
+ }
48
+ /**
49
+ * Whether a class carries its own canvas switch. The hidden class does not —
50
+ * the element's own visibility toggle owns that decision.
51
+ */
52
+ export declare function isClassSwitchable(className: string): boolean;
53
+ /** The flag entry for a target. */
54
+ export declare function mutedClassKey(target: MutedClassTarget): string;
55
+ /** The target a flag entry stands for, or null when it is not one of ours. */
56
+ export declare function parseMutedClassKey(key: string): MutedClassTarget | null;
57
+ /** Whether this class is switched off on this element. */
58
+ export declare function isClassMuted(mutedClasses: readonly string[] | undefined, target: MutedClassTarget): boolean;
59
+ /**
60
+ * The mute list with one class flipped. Returns a new array so the flag's
61
+ * subscribers see a changed value, and never mutates the input.
62
+ */
63
+ export declare function toggleMutedClass(mutedClasses: readonly string[] | undefined, target: MutedClassTarget): string[];
64
+ /** The classes switched off on one element. */
65
+ export declare function mutedClassesForNode(mutedClasses: readonly string[] | undefined, nodeId: string | undefined): string[];
66
+ /**
67
+ * CANVAS ONLY: the node as the canvas should render it, with its
68
+ * switched-off classes taken out of the class list.
69
+ *
70
+ * Applied to the RENDER copy the canvas leaf already builds for resolved
71
+ * bindings, never to the canvas node itself — selection, the hierarchy and
72
+ * every save keep reading the element's real class list. Returns the node BY
73
+ * IDENTITY when it carries no muted class, which is every element until
74
+ * somebody opens the comparison.
75
+ */
76
+ export declare function stripMutedClasses<T extends Record<string, any>>(node: T | undefined, nodeId: string | undefined, mutedClasses: readonly string[] | undefined): T | undefined;
@@ -0,0 +1,108 @@
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 { ELEMENT_HIDDEN_CLASS } from "@aglyn/aglyn";
18
+ /**
19
+ * Whether a class carries its own canvas switch. The hidden class does not —
20
+ * the element's own visibility toggle owns that decision.
21
+ */ export function isClassSwitchable(className) {
22
+ return className !== ELEMENT_HIDDEN_CLASS;
23
+ }
24
+ /** The flag entry for a target. */ export function mutedClassKey(target) {
25
+ return `${target.nodeId}|${target.className}`;
26
+ }
27
+ /** The target a flag entry stands for, or null when it is not one of ours. */ export function parseMutedClassKey(key) {
28
+ const separator = key.indexOf('|');
29
+ if (separator <= 0 || separator === key.length - 1) return null;
30
+ return {
31
+ nodeId: key.slice(0, separator),
32
+ className: key.slice(separator + 1)
33
+ };
34
+ }
35
+ /** Whether this class is switched off on this element. */ export function isClassMuted(mutedClasses, target) {
36
+ const key = mutedClassKey(target);
37
+ return !!(mutedClasses == null ? void 0 : mutedClasses.some((entry)=>entry === key));
38
+ }
39
+ /**
40
+ * The mute list with one class flipped. Returns a new array so the flag's
41
+ * subscribers see a changed value, and never mutates the input.
42
+ */ export function toggleMutedClass(mutedClasses, target) {
43
+ const key = mutedClassKey(target);
44
+ const current = mutedClasses != null ? mutedClasses : [];
45
+ return current.some((entry)=>entry === key) ? current.filter((entry)=>entry !== key) : [
46
+ ...current,
47
+ key
48
+ ];
49
+ }
50
+ /** The classes switched off on one element. */ export function mutedClassesForNode(mutedClasses, nodeId) {
51
+ if (!nodeId || !(mutedClasses == null ? void 0 : mutedClasses.length)) return [];
52
+ const names = [];
53
+ for (const entry of mutedClasses){
54
+ const target = parseMutedClassKey(entry);
55
+ if (target && target.nodeId === nodeId) names.push(target.className);
56
+ }
57
+ return names;
58
+ }
59
+ /** A class list with the switched-off names taken out. */ function withoutClasses(value, removed) {
60
+ if (typeof value !== 'string') return value;
61
+ const kept = value.split(/\s+/).filter((name)=>name && !removed.includes(name));
62
+ return kept.length ? kept.join(' ') : undefined;
63
+ }
64
+ /**
65
+ * CANVAS ONLY: the node as the canvas should render it, with its
66
+ * switched-off classes taken out of the class list.
67
+ *
68
+ * Applied to the RENDER copy the canvas leaf already builds for resolved
69
+ * bindings, never to the canvas node itself — selection, the hierarchy and
70
+ * every save keep reading the element's real class list. Returns the node BY
71
+ * IDENTITY when it carries no muted class, which is every element until
72
+ * somebody opens the comparison.
73
+ */ export function stripMutedClasses(node, nodeId, mutedClasses) {
74
+ if (!node) return node;
75
+ const removed = mutedClassesForNode(mutedClasses, nodeId);
76
+ if (!removed.length) return node;
77
+ const props = node['props'];
78
+ const propsClassName = props == null ? void 0 : props['className'];
79
+ const nextPropsClassName = withoutClasses(propsClassName, removed);
80
+ const nextClassName = withoutClasses(node['className'], removed);
81
+ const propsChanged = typeof propsClassName === 'string' && nextPropsClassName !== propsClassName;
82
+ const nodeChanged = typeof node['className'] === 'string' && nextClassName !== node['className'];
83
+ if (!propsChanged && !nodeChanged) return node;
84
+ const next = _extends({}, node);
85
+ if (propsChanged) {
86
+ const nextProps = _extends({}, props != null ? props : {});
87
+ if (nextPropsClassName === undefined) delete nextProps['className'];
88
+ else nextProps['className'] = nextPropsClassName;
89
+ next['props'] = nextProps;
90
+ // `Leaf` prefers `resolvedProps` when a component declares a resolver, so
91
+ // the copy has to agree with itself or the class comes back through the
92
+ // other reading.
93
+ if (node['resolvedProps']) {
94
+ const resolved = _extends({}, node['resolvedProps']);
95
+ const nextResolved = withoutClasses(resolved['className'], removed);
96
+ if (nextResolved === undefined) delete resolved['className'];
97
+ else resolved['className'] = nextResolved;
98
+ next['resolvedProps'] = resolved;
99
+ }
100
+ }
101
+ if (nodeChanged) {
102
+ if (nextClassName === undefined) delete next['className'];
103
+ else next['className'] = nextClassName;
104
+ }
105
+ return next;
106
+ }
107
+
108
+ //# sourceMappingURL=muted-classes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/muted-classes.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 { ELEMENT_HIDDEN_CLASS } from '@aglyn/aglyn'\n\n/**\n * Switching a CLASS off while designing (AGL-2486).\n *\n * ## What the chip's eye means, and what it does not\n *\n * The Classes field's chips could only be removed. Seeing an element without\n * one of its classes meant deleting the chip and typing the name back, which\n * is the same destructive round trip the style fields had. The eye stops the\n * class applying ON THE CANVAS and keeps it on the element.\n *\n * It is CANVAS ONLY, exactly like the style mutes it sits beside: the class\n * list in the document is untouched, so what the chips show is what ships,\n * and a switched-off class cannot reach a published page as an enabled one\n * because it was never disabled anywhere a publish can see. The chip's ✕\n * remains the one control that changes what the element carries.\n *\n * ## The one class that is not switched here\n *\n * {@link Aglyn.ELEMENT_HIDDEN_CLASS} is what the hierarchy's visibility eye\n * already keys on (AGL-592), and \"stop applying the hidden class on the\n * canvas\" and \"show this element while I design it\" are the same act. Two\n * controls carrying one meaning can disagree, so they do not: this module\n * refuses that class ({@link isClassSwitchable}) and the chip is wired to the\n * visibility state instead. One switch, reachable from the hierarchy row and\n * from the chip.\n */\n\n/** One muted class on one element. */\nexport interface MutedClassTarget {\n nodeId: string\n className: string\n}\n\n/**\n * Whether a class carries its own canvas switch. The hidden class does not —\n * the element's own visibility toggle owns that decision.\n */\nexport function isClassSwitchable(className: string): boolean {\n return className !== ELEMENT_HIDDEN_CLASS\n}\n\n/** The flag entry for a target. */\nexport function mutedClassKey(target: MutedClassTarget): string {\n return `${target.nodeId}|${target.className}`\n}\n\n/** The target a flag entry stands for, or null when it is not one of ours. */\nexport function parseMutedClassKey(key: string): MutedClassTarget | null {\n const separator = key.indexOf('|')\n if (separator <= 0 || separator === key.length - 1) return null\n return {\n nodeId: key.slice(0, separator),\n className: key.slice(separator + 1),\n }\n}\n\n/** Whether this class is switched off on this element. */\nexport function isClassMuted(\n mutedClasses: readonly string[] | undefined,\n target: MutedClassTarget,\n): boolean {\n const key = mutedClassKey(target)\n return !!mutedClasses?.some((entry) => entry === key)\n}\n\n/**\n * The mute list with one class flipped. Returns a new array so the flag's\n * subscribers see a changed value, and never mutates the input.\n */\nexport function toggleMutedClass(\n mutedClasses: readonly string[] | undefined,\n target: MutedClassTarget,\n): string[] {\n const key = mutedClassKey(target)\n const current = mutedClasses ?? []\n return current.some((entry) => entry === key)\n ? current.filter((entry) => entry !== key)\n : [...current, key]\n}\n\n/** The classes switched off on one element. */\nexport function mutedClassesForNode(\n mutedClasses: readonly string[] | undefined,\n nodeId: string | undefined,\n): string[] {\n if (!nodeId || !mutedClasses?.length) return []\n const names: string[] = []\n for (const entry of mutedClasses) {\n const target = parseMutedClassKey(entry)\n if (target && target.nodeId === nodeId) names.push(target.className)\n }\n return names\n}\n\n/** A class list with the switched-off names taken out. */\nfunction withoutClasses(\n value: unknown,\n removed: readonly string[],\n): string | undefined {\n if (typeof value !== 'string') return value as undefined\n const kept = value\n .split(/\\s+/)\n .filter((name) => name && !removed.includes(name))\n return kept.length ? kept.join(' ') : undefined\n}\n\n/**\n * CANVAS ONLY: the node as the canvas should render it, with its\n * switched-off classes taken out of the class list.\n *\n * Applied to the RENDER copy the canvas leaf already builds for resolved\n * bindings, never to the canvas node itself — selection, the hierarchy and\n * every save keep reading the element's real class list. Returns the node BY\n * IDENTITY when it carries no muted class, which is every element until\n * somebody opens the comparison.\n */\nexport function stripMutedClasses<T extends Record<string, any>>(\n node: T | undefined,\n nodeId: string | undefined,\n mutedClasses: readonly string[] | undefined,\n): T | undefined {\n if (!node) return node\n const removed = mutedClassesForNode(mutedClasses, nodeId)\n if (!removed.length) return node\n const props = node['props'] as Record<string, unknown> | undefined\n const propsClassName = props?.['className']\n const nextPropsClassName = withoutClasses(propsClassName, removed)\n const nextClassName = withoutClasses(node['className'], removed)\n const propsChanged =\n typeof propsClassName === 'string' && nextPropsClassName !== propsClassName\n const nodeChanged =\n typeof node['className'] === 'string' && nextClassName !== node['className']\n if (!propsChanged && !nodeChanged) return node\n const next: Record<string, any> = { ...node }\n if (propsChanged) {\n const nextProps = { ...(props ?? {}) }\n if (nextPropsClassName === undefined) delete nextProps['className']\n else nextProps['className'] = nextPropsClassName\n next['props'] = nextProps\n // `Leaf` prefers `resolvedProps` when a component declares a resolver, so\n // the copy has to agree with itself or the class comes back through the\n // other reading.\n if (node['resolvedProps']) {\n const resolved = { ...(node['resolvedProps'] as Record<string, unknown>) }\n const nextResolved = withoutClasses(resolved['className'], removed)\n if (nextResolved === undefined) delete resolved['className']\n else resolved['className'] = nextResolved\n next['resolvedProps'] = resolved\n }\n }\n if (nodeChanged) {\n if (nextClassName === undefined) delete next['className']\n else next['className'] = nextClassName\n }\n return next as T\n}\n"],"names":["ELEMENT_HIDDEN_CLASS","isClassSwitchable","className","mutedClassKey","target","nodeId","parseMutedClassKey","key","separator","indexOf","length","slice","isClassMuted","mutedClasses","some","entry","toggleMutedClass","current","filter","mutedClassesForNode","names","push","withoutClasses","value","removed","kept","split","name","includes","join","undefined","stripMutedClasses","node","props","propsClassName","nextPropsClassName","nextClassName","propsChanged","nodeChanged","next","nextProps","resolved","nextResolved"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAGD,SAASA,oBAAoB,QAAQ,eAAc;AAmCnD;;;CAGC,GACD,OAAO,SAASC,kBAAkBC,SAAiB;IACjD,OAAOA,cAAcF;AACvB;AAEA,iCAAiC,GACjC,OAAO,SAASG,cAAcC,MAAwB;IACpD,OAAO,GAAGA,OAAOC,MAAM,CAAC,CAAC,EAAED,OAAOF,SAAS,EAAE;AAC/C;AAEA,4EAA4E,GAC5E,OAAO,SAASI,mBAAmBC,GAAW;IAC5C,MAAMC,YAAYD,IAAIE,OAAO,CAAC;IAC9B,IAAID,aAAa,KAAKA,cAAcD,IAAIG,MAAM,GAAG,GAAG,OAAO;IAC3D,OAAO;QACLL,QAAQE,IAAII,KAAK,CAAC,GAAGH;QACrBN,WAAWK,IAAII,KAAK,CAACH,YAAY;IACnC;AACF;AAEA,wDAAwD,GACxD,OAAO,SAASI,aACdC,YAA2C,EAC3CT,MAAwB;IAExB,MAAMG,MAAMJ,cAAcC;IAC1B,OAAO,CAAC,EAACS,gCAAAA,aAAcC,IAAI,CAAC,CAACC,QAAUA,UAAUR;AACnD;AAEA;;;CAGC,GACD,OAAO,SAASS,iBACdH,YAA2C,EAC3CT,MAAwB;IAExB,MAAMG,MAAMJ,cAAcC;IAC1B,MAAMa,UAAUJ,uBAAAA,eAAgB,EAAE;IAClC,OAAOI,QAAQH,IAAI,CAAC,CAACC,QAAUA,UAAUR,OACrCU,QAAQC,MAAM,CAAC,CAACH,QAAUA,UAAUR,OACpC;WAAIU;QAASV;KAAI;AACvB;AAEA,6CAA6C,GAC7C,OAAO,SAASY,oBACdN,YAA2C,EAC3CR,MAA0B;IAE1B,IAAI,CAACA,UAAU,EAACQ,gCAAAA,aAAcH,MAAM,GAAE,OAAO,EAAE;IAC/C,MAAMU,QAAkB,EAAE;IAC1B,KAAK,MAAML,SAASF,aAAc;QAChC,MAAMT,SAASE,mBAAmBS;QAClC,IAAIX,UAAUA,OAAOC,MAAM,KAAKA,QAAQe,MAAMC,IAAI,CAACjB,OAAOF,SAAS;IACrE;IACA,OAAOkB;AACT;AAEA,wDAAwD,GACxD,SAASE,eACPC,KAAc,EACdC,OAA0B;IAE1B,IAAI,OAAOD,UAAU,UAAU,OAAOA;IACtC,MAAME,OAAOF,MACVG,KAAK,CAAC,OACNR,MAAM,CAAC,CAACS,OAASA,QAAQ,CAACH,QAAQI,QAAQ,CAACD;IAC9C,OAAOF,KAAKf,MAAM,GAAGe,KAAKI,IAAI,CAAC,OAAOC;AACxC;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASC,kBACdC,IAAmB,EACnB3B,MAA0B,EAC1BQ,YAA2C;IAE3C,IAAI,CAACmB,MAAM,OAAOA;IAClB,MAAMR,UAAUL,oBAAoBN,cAAcR;IAClD,IAAI,CAACmB,QAAQd,MAAM,EAAE,OAAOsB;IAC5B,MAAMC,QAAQD,IAAI,CAAC,QAAQ;IAC3B,MAAME,iBAAiBD,yBAAAA,KAAO,CAAC,YAAY;IAC3C,MAAME,qBAAqBb,eAAeY,gBAAgBV;IAC1D,MAAMY,gBAAgBd,eAAeU,IAAI,CAAC,YAAY,EAAER;IACxD,MAAMa,eACJ,OAAOH,mBAAmB,YAAYC,uBAAuBD;IAC/D,MAAMI,cACJ,OAAON,IAAI,CAAC,YAAY,KAAK,YAAYI,kBAAkBJ,IAAI,CAAC,YAAY;IAC9E,IAAI,CAACK,gBAAgB,CAACC,aAAa,OAAON;IAC1C,MAAMO,OAA4B,aAAKP;IACvC,IAAIK,cAAc;QAChB,MAAMG,YAAY,aAAMP,gBAAAA,QAAS,CAAC;QAClC,IAAIE,uBAAuBL,WAAW,OAAOU,SAAS,CAAC,YAAY;aAC9DA,SAAS,CAAC,YAAY,GAAGL;QAC9BI,IAAI,CAAC,QAAQ,GAAGC;QAChB,0EAA0E;QAC1E,wEAAwE;QACxE,iBAAiB;QACjB,IAAIR,IAAI,CAAC,gBAAgB,EAAE;YACzB,MAAMS,WAAW,aAAMT,IAAI,CAAC,gBAAgB;YAC5C,MAAMU,eAAepB,eAAemB,QAAQ,CAAC,YAAY,EAAEjB;YAC3D,IAAIkB,iBAAiBZ,WAAW,OAAOW,QAAQ,CAAC,YAAY;iBACvDA,QAAQ,CAAC,YAAY,GAAGC;YAC7BH,IAAI,CAAC,gBAAgB,GAAGE;QAC1B;IACF;IACA,IAAIH,aAAa;QACf,IAAIF,kBAAkBN,WAAW,OAAOS,IAAI,CAAC,YAAY;aACpDA,IAAI,CAAC,YAAY,GAAGH;IAC3B;IACA,OAAOG;AACT"}
@@ -0,0 +1,125 @@
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 { FieldMuteAction } from '@aglyn/shared-ui-jsx-forms';
18
+ import { type SxBreakpoint } from './responsive-sx';
19
+ import { type SxState } from './state-sx';
20
+ /**
21
+ * Muting one style declaration while designing (AGL-2486).
22
+ *
23
+ * ## What this is
24
+ *
25
+ * Every field in the Styles panel could set a value and take one off, and
26
+ * nothing in between. Seeing a layout without its `maxWidth` meant deleting
27
+ * the value and typing it back afterwards — which loses the very thing being
28
+ * compared against. This is the browser-devtools checkbox: the declaration
29
+ * stops applying, its value stays where it is, and one click puts it back.
30
+ *
31
+ * ## Canvas only, and the value is never moved
32
+ *
33
+ * A mute is held in the `mutedStyles` canvas flag, alongside `heldState`. The
34
+ * document is not touched at all — the declaration stays in `node.sx` exactly
35
+ * where the author left it, and the canvas renders a COPY with it removed,
36
+ * through the same `LeafSxTransformContext` seam the artboard device pin and
37
+ * the interaction-state hold already use.
38
+ *
39
+ * That is what makes the two requirements of a comparison tool hold at once.
40
+ * The value is not parked somewhere and restored later, so turning a mute back
41
+ * off cannot fail or lose anything; and nothing disabled can reach a published
42
+ * page, because there is nothing in the document to reach it — no reserved sx
43
+ * key for a renderer to recognise, no substitution pass on the tenant's render
44
+ * path, and nothing for a publish to serialize. The cost is that a mute is a
45
+ * session's worth of comparison rather than a saved state: reload, and every
46
+ * declaration is applying again.
47
+ *
48
+ * ## Scope
49
+ *
50
+ * A mute belongs to the scope the panel was in when it was made — the
51
+ * interaction state and the breakpoint the chips name. Muting `color` in the
52
+ * hover slice leaves the default one applying, and a mute made while styling
53
+ * SM is not in force at "all screen sizes".
54
+ */
55
+ /** One muted declaration, in the scope it was muted in. */
56
+ export interface MutedStyleTarget {
57
+ nodeId: string;
58
+ /** sx property key, in the panel's spelling (`backgroundColor`, not `bgcolor`). */
59
+ property: string;
60
+ /** Interaction-state slice, or null for the element's default styles. */
61
+ state?: SxState | null;
62
+ /** Breakpoint scope, or null for "all screen sizes". */
63
+ breakpoint?: SxBreakpoint | null;
64
+ }
65
+ /**
66
+ * The flag entry for a target. Encoded rather than stored as an object
67
+ * because the flag is a plain value compared by identity: a string list is
68
+ * cheap to test membership in and cheap to rewrite immutably.
69
+ */
70
+ export declare function mutedStyleKey(target: MutedStyleTarget): string;
71
+ /** The target a flag entry stands for, or null when it is not one of ours. */
72
+ export declare function parseMutedStyleKey(key: string): MutedStyleTarget | null;
73
+ /** Whether this declaration is muted in this scope. */
74
+ export declare function isStyleMuted(mutedStyles: readonly string[] | undefined, target: MutedStyleTarget): boolean;
75
+ /**
76
+ * The mute list with one declaration flipped. Returns a new array so the
77
+ * flag's subscribers see a changed value, and never mutates the input.
78
+ */
79
+ export declare function toggleMutedStyle(mutedStyles: readonly string[] | undefined, target: MutedStyleTarget): string[];
80
+ /** Every mute recorded against one element. */
81
+ export declare function mutedStylesForNode(mutedStyles: readonly string[] | undefined, nodeId: string | undefined): MutedStyleTarget[];
82
+ /**
83
+ * CANVAS ONLY: the element's sx with its muted declarations removed.
84
+ *
85
+ * Runs on the fully merged sx at the one point in `Leaf` where it reaches the
86
+ * element, and BEFORE the interaction-state hoist: a muted base declaration
87
+ * has to be gone before a hover slice is folded over it, and a muted hover
88
+ * declaration has to leave its slice so the base shows through.
89
+ *
90
+ * Handles the array form of sx for the same reason `hoistStateSx` does — a
91
+ * component may compose its own sx with the author's. Returns the input BY
92
+ * IDENTITY when nothing is muted, which is every element in every session
93
+ * where nobody has opened the comparison.
94
+ */
95
+ export declare function applyMutedStyles<T>(sx: T, nodeId: string | undefined, mutedStyles: readonly string[] | undefined): T;
96
+ /** What the panel needs to know to offer a row's mute control. */
97
+ export interface StyleMuteScope {
98
+ nodeId?: string;
99
+ state?: SxState | null;
100
+ breakpoint?: SxBreakpoint | null;
101
+ /**
102
+ * What the ACTIVE SCOPE declares, keyed by field name — not what the panel
103
+ * displays. The two differ in a state scope, where a field the author has
104
+ * not overridden for hover still shows the base value it inherits: there is
105
+ * no hover declaration to switch off, so that row gets no control.
106
+ */
107
+ scopeValues: Record<string, unknown>;
108
+ mutedStyles?: readonly string[];
109
+ onToggle: (target: MutedStyleTarget) => void;
110
+ }
111
+ /** The mute control for one field, or nothing when there is none to offer. */
112
+ export declare function buildStyleMute(name: string, label: unknown, scope: StyleMuteScope): FieldMuteAction | undefined;
113
+ /**
114
+ * A group's field declarations carrying their per-row mute control.
115
+ *
116
+ * Supplied through `FormFieldGridProps`, which every editor in the shared
117
+ * mapper spreads onto its wrapper, so the affordance arrives on every field
118
+ * without each editor knowing anything about it. Fields with nothing to mute
119
+ * come back BY IDENTITY, so a panel where nothing is set re-renders exactly
120
+ * as it did before.
121
+ */
122
+ export declare function withStyleMuteControls<T extends {
123
+ name?: string;
124
+ label?: unknown;
125
+ }>(fields: readonly T[], scope: StyleMuteScope): T[];