@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,67 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * @license
5
+ * Copyright 2026 Aglyn LLC
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */ import { canvas } from "@aglyn/aglyn";
19
+ import { ICON_VARIANT_MODIFY_REDO, ICON_VARIANT_MODIFY_UNDO } from "@aglyn/shared-data-enums";
20
+ import { MdiIcon } from "@aglyn/shared-ui-jsx";
21
+ import { IconButton as MuiIconButton, Stack as MuiStack, Tooltip as MuiTooltip } from "@mui/material";
22
+ import { observer } from "mobx-react-lite";
23
+ import { forwardRef } from "react";
24
+ function HistoryControls(props, ref) {
25
+ return /*#__PURE__*/ _jsxs(MuiStack, _extends({
26
+ ref: ref,
27
+ direction: "row",
28
+ spacing: 0.25
29
+ }, props, {
30
+ children: [
31
+ /*#__PURE__*/ _jsx(MuiTooltip, {
32
+ title: 'Undo (⌘Z)',
33
+ children: /*#__PURE__*/ _jsx("span", {
34
+ children: /*#__PURE__*/ _jsx(MuiIconButton, {
35
+ "aria-label": "undo action",
36
+ onClick: ()=>canvas.undo(),
37
+ disabled: !canvas.canUndo,
38
+ children: /*#__PURE__*/ _jsx(MdiIcon, {
39
+ fontSize: "small",
40
+ path: ICON_VARIANT_MODIFY_UNDO.path
41
+ })
42
+ })
43
+ })
44
+ }),
45
+ /*#__PURE__*/ _jsx(MuiTooltip, {
46
+ title: 'Redo (⌘Y)',
47
+ children: /*#__PURE__*/ _jsx("span", {
48
+ children: /*#__PURE__*/ _jsx(MuiIconButton, {
49
+ "aria-label": "redo action",
50
+ onClick: ()=>canvas.redo(),
51
+ disabled: !canvas.canRedo,
52
+ children: /*#__PURE__*/ _jsx(MdiIcon, {
53
+ fontSize: "small",
54
+ path: ICON_VARIANT_MODIFY_REDO.path
55
+ })
56
+ })
57
+ })
58
+ })
59
+ ]
60
+ }));
61
+ }
62
+ HistoryControls.displayName = 'HistoryControlsComponent';
63
+ HistoryControls.aglyn = true;
64
+ export const HistoryControlsComponent = observer(/*#__PURE__*/ forwardRef(HistoryControls));
65
+ export default HistoryControlsComponent;
66
+
67
+ //# sourceMappingURL=history-controls.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/history-controls.component.tsx"],"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 { canvas } from '@aglyn/aglyn'\nimport {\n ICON_VARIANT_MODIFY_REDO,\n ICON_VARIANT_MODIFY_UNDO,\n} from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport {\n IconButton as MuiIconButton,\n Stack as MuiStack,\n type StackProps,\n Tooltip as MuiTooltip,\n} from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport { forwardRef, type MutableRefObject } from 'react'\n\nexport interface HistoryControlsProps extends StackProps {}\n\nfunction HistoryControls(\n props: HistoryControlsProps,\n ref: MutableRefObject<any>,\n) {\n return (\n <MuiStack ref={ref} direction=\"row\" spacing={0.25} {...props}>\n <MuiTooltip title={'Undo (⌘Z)'}>\n <span>\n <MuiIconButton\n aria-label=\"undo action\"\n onClick={() => canvas.undo()}\n disabled={!canvas.canUndo}\n >\n <MdiIcon fontSize=\"small\" path={ICON_VARIANT_MODIFY_UNDO.path} />\n </MuiIconButton>\n </span>\n </MuiTooltip>\n <MuiTooltip title={'Redo (⌘Y)'}>\n <span>\n <MuiIconButton\n aria-label=\"redo action\"\n onClick={() => canvas.redo()}\n disabled={!canvas.canRedo}\n >\n <MdiIcon fontSize=\"small\" path={ICON_VARIANT_MODIFY_REDO.path} />\n </MuiIconButton>\n </span>\n </MuiTooltip>\n </MuiStack>\n )\n}\nHistoryControls.displayName = 'HistoryControlsComponent'\nHistoryControls.aglyn = true\n\nexport const HistoryControlsComponent = observer(\n forwardRef<any, HistoryControlsProps>(HistoryControls),\n)\nexport default HistoryControlsComponent\n"],"names":["canvas","ICON_VARIANT_MODIFY_REDO","ICON_VARIANT_MODIFY_UNDO","MdiIcon","IconButton","MuiIconButton","Stack","MuiStack","Tooltip","MuiTooltip","observer","forwardRef","HistoryControls","props","ref","direction","spacing","title","span","aria-label","onClick","undo","disabled","canUndo","fontSize","path","redo","canRedo","displayName","aglyn","HistoryControlsComponent"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,eAAc;AACrC,SACEC,wBAAwB,EACxBC,wBAAwB,QACnB,2BAA0B;AACjC,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SACEC,cAAcC,aAAa,EAC3BC,SAASC,QAAQ,EAEjBC,WAAWC,UAAU,QAChB,gBAAe;AACtB,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SAASC,UAAU,QAA+B,QAAO;AAIzD,SAASC,gBACPC,KAA2B,EAC3BC,GAA0B;IAE1B,qBACE,MAACP;QAASO,KAAKA;QAAKC,WAAU;QAAMC,SAAS;OAAUH;;0BACrD,KAACJ;gBAAWQ,OAAO;0BACjB,cAAA,KAACC;8BACC,cAAA,KAACb;wBACCc,cAAW;wBACXC,SAAS,IAAMpB,OAAOqB,IAAI;wBAC1BC,UAAU,CAACtB,OAAOuB,OAAO;kCAEzB,cAAA,KAACpB;4BAAQqB,UAAS;4BAAQC,MAAMvB,yBAAyBuB,IAAI;;;;;0BAInE,KAAChB;gBAAWQ,OAAO;0BACjB,cAAA,KAACC;8BACC,cAAA,KAACb;wBACCc,cAAW;wBACXC,SAAS,IAAMpB,OAAO0B,IAAI;wBAC1BJ,UAAU,CAACtB,OAAO2B,OAAO;kCAEzB,cAAA,KAACxB;4BAAQqB,UAAS;4BAAQC,MAAMxB,yBAAyBwB,IAAI;;;;;;;AAMzE;AACAb,gBAAgBgB,WAAW,GAAG;AAC9BhB,gBAAgBiB,KAAK,GAAG;AAExB,OAAO,MAAMC,2BAA2BpB,uBACtCC,WAAsCC,kBACvC;AACD,eAAekB,yBAAwB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * In-place markdown editing on the besigner canvas (AGL-1624).
3
+ *
4
+ * Double-clicking a component whose schema declares a `FieldComponentType
5
+ * .MARKDOWN` attribute opens the WYSIWYG over the element instead of sending
6
+ * the author to the attributes panel — the canvas half of AGL-1616, which
7
+ * shipped the panel half.
8
+ *
9
+ * Mounted once next to `InlineTextEditorComponent` in the viewport overlays,
10
+ * outside the closed canvas shadow root, so it positions in screen
11
+ * coordinates. `key`ed on the node so switching nodes remounts the surface,
12
+ * which is what turns every close into a flush.
13
+ */
14
+ export declare const InlineMarkdownEditorComponent: (() => import("react").JSX.Element) & {
15
+ displayName: string;
16
+ };
17
+ export default InlineMarkdownEditorComponent;
@@ -0,0 +1,220 @@
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
+ */ 'use client';
17
+ import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { canvas } from "@aglyn/aglyn";
20
+ import { MarkdownField } from "@aglyn/aglyn-markdown-editor";
21
+ import * as Besigner from "@aglyn/besigner";
22
+ import { Box, Button, Paper, Typography } from "@mui/material";
23
+ import { observer } from "mobx-react-lite";
24
+ import { useCallback, useEffect, useRef, useState } from "react";
25
+ import { clampToViewport, useAnchoredRect } from "../hooks/use-anchored-rect.js";
26
+ import { useDebouncedCommit } from "../hooks/use-debounced-commit.js";
27
+ import { useMarkdownMediaPicker } from "../hooks/use-markdown-media-picker.js";
28
+ import { inlineMarkdownEdit } from "../utils/inline-markdown-edit.store.js";
29
+ /**
30
+ * The mounted half. Everything that can lose an author's work lives here, and
31
+ * it is deliberately the same machinery the attributes panel uses.
32
+ *
33
+ * ## When the edit reaches the model
34
+ *
35
+ * `MarkdownVisualEditor` emits on every input event, so the newest string is
36
+ * always in hand. From there this is `useDebouncedCommit` (AGL-567), exactly as
37
+ * the panel wires it: a 250 ms trailing debounce, plus the hook's own
38
+ * flush-on-unmount. Every way of leaving the editor unmounts this component —
39
+ * Done, Escape, the selection moving to another node, the screen changing, the
40
+ * designer closing — so every exit path flushes. There is NO discard path, and
41
+ * that is the point: with a debounced commit a "cancel" could only ever throw
42
+ * away the last 250 ms of a document that is otherwise already written, which
43
+ * is a worse lie than committing and leaving Cmd+Z to do the undoing.
44
+ *
45
+ * What is deliberately NOT here is a commit on blur. The toolbar, the link
46
+ * popover and the URL dialog all move focus (two of them into a portal), so a
47
+ * blur-committed local draft would strand everything typed since the previous
48
+ * focus change — silently, with the canvas still showing the right text. The
49
+ * panel's wrapper learned this the same way (AGL-1616).
50
+ *
51
+ * ## Why the value is not re-derived
52
+ *
53
+ * `initialValue` seeds local state once and the node's props are never read
54
+ * back into the editor. The editor re-parses its row model whenever the
55
+ * incoming value differs from the string it last emitted, resetting undo and
56
+ * the caret; feeding a commit — or a co-editing peer's write — back in would do
57
+ * that mid-sentence.
58
+ */ const InlineMarkdownEditorSurface = observer(function InlineMarkdownEditorSurface(props) {
59
+ var _ref;
60
+ var _node_componentSchema_attributes_find, _node_componentSchema_attributes, _node_componentSchema;
61
+ const { node, rect, anchor, attributeName, initialValue, selected } = props;
62
+ // Follows the element as the canvas scrolls or resizes (AGL-1644).
63
+ const live = useAnchoredRect(anchor, rect);
64
+ const [value, setValue] = useState(initialValue);
65
+ const latestRef = useRef(initialValue);
66
+ const committedRef = useRef(initialValue);
67
+ // The toolbar's image action opens the host's media library rather than a
68
+ // "paste a URL" prompt (AGL-1645). The picker is a modal that takes focus,
69
+ // which is exactly what a blur-committed editor cannot survive — and the
70
+ // reason this one commits on a debounce instead is written out above.
71
+ const { editorRef, onPickImageFromMedia } = useMarkdownMediaPicker();
72
+ const commit = useCallback(()=>{
73
+ var _inlineMarkdownEdit_node;
74
+ const current = (_inlineMarkdownEdit_node = inlineMarkdownEdit.node) != null ? _inlineMarkdownEdit_node : node;
75
+ if (!current) return;
76
+ if (latestRef.current === committedRef.current) return;
77
+ committedRef.current = latestRef.current;
78
+ // Read the node's props at commit time, not at open: `updateNodeProps`
79
+ // REPLACES the props object, so anything a peer or the panel changed while
80
+ // the editor was open has to be spread from the live node.
81
+ canvas.updateNodeProps(current, _extends({}, current.props, {
82
+ [attributeName]: latestRef.current
83
+ }));
84
+ }, [
85
+ attributeName,
86
+ node
87
+ ]);
88
+ const { schedule } = useDebouncedCommit(commit);
89
+ const handleChange = useCallback((next)=>{
90
+ latestRef.current = next;
91
+ setValue(next);
92
+ schedule();
93
+ }, [
94
+ schedule
95
+ ]);
96
+ // The edit follows the selection: the double-click's own mousedown selected
97
+ // this node, so the selection moving off it (another node, the hierarchy
98
+ // tree, a click on empty canvas) means the author is done here. Closing
99
+ // unmounts this surface, which flushes.
100
+ useEffect(()=>{
101
+ if (!selected) inlineMarkdownEdit.close();
102
+ }, [
103
+ selected
104
+ ]);
105
+ const handleKeyDown = useCallback((event)=>{
106
+ if (event.key !== 'Escape') return;
107
+ // Escape CLOSES and keeps. It is not a cancel — see the commit note above.
108
+ event.stopPropagation();
109
+ inlineMarkdownEdit.close();
110
+ }, []);
111
+ const handleDone = useCallback(()=>{
112
+ inlineMarkdownEdit.close();
113
+ }, []);
114
+ // A double-click inside the editor selects a word. It must never reach the
115
+ // canvas, whose panning surface treats a double-click as zoom-in
116
+ // (`ZoomablePanningComponent`). Node double-clicks are already consumed at
117
+ // the leaf; this covers the overlay that sits on top of it.
118
+ const stop = useCallback((event)=>{
119
+ event.stopPropagation();
120
+ }, []);
121
+ // Read at render, which `useAnchoredRect` makes safe: it re-renders on every
122
+ // scroll and resize, so these are never a stale snapshot.
123
+ const viewportWidth = typeof window === 'undefined' ? Infinity : window.innerWidth;
124
+ const viewportHeight = typeof window === 'undefined' ? Infinity : window.innerHeight;
125
+ const width = Math.max(live.width, 360);
126
+ // A long document is usually TALLER than the viewport, so the element's top
127
+ // edge is frequently scrolled off the top of the screen while it is being
128
+ // edited. The editor waits at the nearest edge until the element comes back
129
+ // rather than following it out of sight; KEEP_VISIBLE is how much of it has
130
+ // to remain reachable at the bottom.
131
+ const KEEP_VISIBLE = 160;
132
+ return /*#__PURE__*/ _jsx(Box, {
133
+ "data-aglyn": "overlay:inline-markdown-editor",
134
+ "data-testid": "inline-markdown-editor",
135
+ onKeyDown: handleKeyDown,
136
+ onMouseDown: stop,
137
+ onDoubleClick: stop,
138
+ sx: {
139
+ position: 'fixed',
140
+ left: clampToViewport(live.left, width, viewportWidth),
141
+ top: clampToViewport(live.top, KEEP_VISIBLE, viewportHeight),
142
+ width,
143
+ maxWidth: '90vw',
144
+ zIndex: (theme)=>theme.zIndex.modal
145
+ },
146
+ children: /*#__PURE__*/ _jsxs(Paper, {
147
+ elevation: 8,
148
+ sx: {
149
+ p: 1,
150
+ maxHeight: '75vh',
151
+ overflowY: 'auto'
152
+ },
153
+ children: [
154
+ /*#__PURE__*/ _jsxs(Box, {
155
+ sx: {
156
+ display: 'flex',
157
+ alignItems: 'center',
158
+ justifyContent: 'space-between',
159
+ mb: 0.5
160
+ },
161
+ children: [
162
+ /*#__PURE__*/ _jsx(Typography, {
163
+ variant: "caption",
164
+ color: "text.secondary",
165
+ children: 'Editing on the canvas — changes are kept as you type'
166
+ }),
167
+ /*#__PURE__*/ _jsx(Button, {
168
+ size: "small",
169
+ color: "primary",
170
+ onClick: handleDone,
171
+ children: 'Done'
172
+ })
173
+ ]
174
+ }),
175
+ /*#__PURE__*/ _jsx(MarkdownField, {
176
+ label: String((_ref = node == null ? void 0 : (_node_componentSchema = node.componentSchema) == null ? void 0 : (_node_componentSchema_attributes = _node_componentSchema.attributes) == null ? void 0 : (_node_componentSchema_attributes_find = _node_componentSchema_attributes.find((attribute)=>(attribute == null ? void 0 : attribute.name) === attributeName)) == null ? void 0 : _node_componentSchema_attributes_find.label) != null ? _ref : 'Content'),
177
+ value: value,
178
+ onChange: handleChange,
179
+ editorRef: editorRef,
180
+ onPickImageFromMedia: onPickImageFromMedia,
181
+ // The OPEN rect, deliberately, not the live one: position follows the
182
+ // element, but the editor's own height must not change under the
183
+ // author mid-sentence just because the canvas relaid out.
184
+ minHeight: Math.min(Math.max(rect.height, 200), 520)
185
+ })
186
+ ]
187
+ })
188
+ });
189
+ });
190
+ InlineMarkdownEditorSurface.displayName = 'InlineMarkdownEditorSurface';
191
+ /**
192
+ * In-place markdown editing on the besigner canvas (AGL-1624).
193
+ *
194
+ * Double-clicking a component whose schema declares a `FieldComponentType
195
+ * .MARKDOWN` attribute opens the WYSIWYG over the element instead of sending
196
+ * the author to the attributes panel — the canvas half of AGL-1616, which
197
+ * shipped the panel half.
198
+ *
199
+ * Mounted once next to `InlineTextEditorComponent` in the viewport overlays,
200
+ * outside the closed canvas shadow root, so it positions in screen
201
+ * coordinates. `key`ed on the node so switching nodes remounts the surface,
202
+ * which is what turns every close into a flush.
203
+ */ export const InlineMarkdownEditorComponent = observer(function InlineMarkdownEditorComponent() {
204
+ const node = inlineMarkdownEdit.node;
205
+ const rect = inlineMarkdownEdit.rect;
206
+ const attributeName = inlineMarkdownEdit.attributeName;
207
+ if (!node || !rect || !attributeName) return null;
208
+ return /*#__PURE__*/ _jsx(InlineMarkdownEditorSurface, {
209
+ node: node,
210
+ rect: rect,
211
+ anchor: inlineMarkdownEdit.anchor,
212
+ attributeName: attributeName,
213
+ initialValue: inlineMarkdownEdit.initialValue,
214
+ selected: Besigner.focus.isNodeSelected(node)
215
+ }, `${node.$id}:${attributeName}`);
216
+ });
217
+ InlineMarkdownEditorComponent.displayName = 'InlineMarkdownEditorComponent';
218
+ export default InlineMarkdownEditorComponent;
219
+
220
+ //# sourceMappingURL=inline-markdown-editor.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/inline-markdown-editor.component.tsx"],"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'use client'\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport { canvas } from '@aglyn/aglyn'\nimport { MarkdownField } from '@aglyn/aglyn-markdown-editor'\nimport * as Besigner from '@aglyn/besigner'\nimport { Box, Button, Paper, Typography } from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport {\n type KeyboardEvent,\n type MouseEvent,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react'\nimport {\n clampToViewport,\n useAnchoredRect,\n} from '../hooks/use-anchored-rect'\nimport { useDebouncedCommit } from '../hooks/use-debounced-commit'\nimport { useMarkdownMediaPicker } from '../hooks/use-markdown-media-picker'\nimport {\n inlineMarkdownEdit,\n type InlineMarkdownEditRect,\n} from '../utils/inline-markdown-edit.store'\n\ninterface SurfaceProps {\n node: Aglyn.NodeSchema<any>\n rect: InlineMarkdownEditRect\n /** The element `rect` was measured from, re-measured as the canvas moves. */\n anchor?: Element\n attributeName: string\n initialValue: string\n /** Whether the canvas selection still names the node being edited. */\n selected: boolean\n}\n\n/**\n * The mounted half. Everything that can lose an author's work lives here, and\n * it is deliberately the same machinery the attributes panel uses.\n *\n * ## When the edit reaches the model\n *\n * `MarkdownVisualEditor` emits on every input event, so the newest string is\n * always in hand. From there this is `useDebouncedCommit` (AGL-567), exactly as\n * the panel wires it: a 250 ms trailing debounce, plus the hook's own\n * flush-on-unmount. Every way of leaving the editor unmounts this component —\n * Done, Escape, the selection moving to another node, the screen changing, the\n * designer closing — so every exit path flushes. There is NO discard path, and\n * that is the point: with a debounced commit a \"cancel\" could only ever throw\n * away the last 250 ms of a document that is otherwise already written, which\n * is a worse lie than committing and leaving Cmd+Z to do the undoing.\n *\n * What is deliberately NOT here is a commit on blur. The toolbar, the link\n * popover and the URL dialog all move focus (two of them into a portal), so a\n * blur-committed local draft would strand everything typed since the previous\n * focus change — silently, with the canvas still showing the right text. The\n * panel's wrapper learned this the same way (AGL-1616).\n *\n * ## Why the value is not re-derived\n *\n * `initialValue` seeds local state once and the node's props are never read\n * back into the editor. The editor re-parses its row model whenever the\n * incoming value differs from the string it last emitted, resetting undo and\n * the caret; feeding a commit — or a co-editing peer's write — back in would do\n * that mid-sentence.\n */\nconst InlineMarkdownEditorSurface = observer(function InlineMarkdownEditorSurface(\n props: SurfaceProps,\n) {\n const { node, rect, anchor, attributeName, initialValue, selected } = props\n // Follows the element as the canvas scrolls or resizes (AGL-1644).\n const live = useAnchoredRect(anchor, rect)\n const [value, setValue] = useState(initialValue)\n const latestRef = useRef(initialValue)\n const committedRef = useRef(initialValue)\n // The toolbar's image action opens the host's media library rather than a\n // \"paste a URL\" prompt (AGL-1645). The picker is a modal that takes focus,\n // which is exactly what a blur-committed editor cannot survive — and the\n // reason this one commits on a debounce instead is written out above.\n const { editorRef, onPickImageFromMedia } = useMarkdownMediaPicker()\n\n const commit = useCallback(() => {\n const current = inlineMarkdownEdit.node ?? node\n if (!current) return\n if (latestRef.current === committedRef.current) return\n committedRef.current = latestRef.current\n // Read the node's props at commit time, not at open: `updateNodeProps`\n // REPLACES the props object, so anything a peer or the panel changed while\n // the editor was open has to be spread from the live node.\n canvas.updateNodeProps(current, {\n ...current.props,\n [attributeName]: latestRef.current,\n })\n }, [attributeName, node])\n\n const { schedule } = useDebouncedCommit(commit)\n\n const handleChange = useCallback(\n (next: string) => {\n latestRef.current = next\n setValue(next)\n schedule()\n },\n [schedule],\n )\n\n // The edit follows the selection: the double-click's own mousedown selected\n // this node, so the selection moving off it (another node, the hierarchy\n // tree, a click on empty canvas) means the author is done here. Closing\n // unmounts this surface, which flushes.\n useEffect(() => {\n if (!selected) inlineMarkdownEdit.close()\n }, [selected])\n\n const handleKeyDown = useCallback((event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Escape') return\n // Escape CLOSES and keeps. It is not a cancel — see the commit note above.\n event.stopPropagation()\n inlineMarkdownEdit.close()\n }, [])\n\n const handleDone = useCallback(() => {\n inlineMarkdownEdit.close()\n }, [])\n\n // A double-click inside the editor selects a word. It must never reach the\n // canvas, whose panning surface treats a double-click as zoom-in\n // (`ZoomablePanningComponent`). Node double-clicks are already consumed at\n // the leaf; this covers the overlay that sits on top of it.\n const stop = useCallback((event: MouseEvent) => {\n event.stopPropagation()\n }, [])\n\n // Read at render, which `useAnchoredRect` makes safe: it re-renders on every\n // scroll and resize, so these are never a stale snapshot.\n const viewportWidth =\n typeof window === 'undefined' ? Infinity : window.innerWidth\n const viewportHeight =\n typeof window === 'undefined' ? Infinity : window.innerHeight\n const width = Math.max(live.width, 360)\n // A long document is usually TALLER than the viewport, so the element's top\n // edge is frequently scrolled off the top of the screen while it is being\n // edited. The editor waits at the nearest edge until the element comes back\n // rather than following it out of sight; KEEP_VISIBLE is how much of it has\n // to remain reachable at the bottom.\n const KEEP_VISIBLE = 160\n\n return (\n <Box\n data-aglyn=\"overlay:inline-markdown-editor\"\n data-testid=\"inline-markdown-editor\"\n onKeyDown={handleKeyDown}\n onMouseDown={stop}\n onDoubleClick={stop}\n sx={{\n position: 'fixed',\n left: clampToViewport(live.left, width, viewportWidth),\n top: clampToViewport(live.top, KEEP_VISIBLE, viewportHeight),\n width,\n maxWidth: '90vw',\n zIndex: (theme) => theme.zIndex.modal,\n }}\n >\n <Paper elevation={8} sx={{ p: 1, maxHeight: '75vh', overflowY: 'auto' }}>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n mb: 0.5,\n }}\n >\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'Editing on the canvas — changes are kept as you type'}\n </Typography>\n <Button size=\"small\" color=\"primary\" onClick={handleDone}>\n {'Done'}\n </Button>\n </Box>\n <MarkdownField\n label={String(\n node?.componentSchema?.attributes?.find(\n (attribute) => attribute?.name === attributeName,\n )?.label ?? 'Content',\n )}\n value={value}\n onChange={handleChange}\n editorRef={editorRef}\n onPickImageFromMedia={onPickImageFromMedia}\n // The OPEN rect, deliberately, not the live one: position follows the\n // element, but the editor's own height must not change under the\n // author mid-sentence just because the canvas relaid out.\n minHeight={Math.min(Math.max(rect.height, 200), 520)}\n />\n </Paper>\n </Box>\n )\n})\nInlineMarkdownEditorSurface.displayName = 'InlineMarkdownEditorSurface'\n\n/**\n * In-place markdown editing on the besigner canvas (AGL-1624).\n *\n * Double-clicking a component whose schema declares a `FieldComponentType\n * .MARKDOWN` attribute opens the WYSIWYG over the element instead of sending\n * the author to the attributes panel — the canvas half of AGL-1616, which\n * shipped the panel half.\n *\n * Mounted once next to `InlineTextEditorComponent` in the viewport overlays,\n * outside the closed canvas shadow root, so it positions in screen\n * coordinates. `key`ed on the node so switching nodes remounts the surface,\n * which is what turns every close into a flush.\n */\nexport const InlineMarkdownEditorComponent = observer(\n function InlineMarkdownEditorComponent() {\n const node = inlineMarkdownEdit.node\n const rect = inlineMarkdownEdit.rect\n const attributeName = inlineMarkdownEdit.attributeName\n if (!node || !rect || !attributeName) return null\n return (\n <InlineMarkdownEditorSurface\n key={`${node.$id}:${attributeName}`}\n node={node}\n rect={rect}\n anchor={inlineMarkdownEdit.anchor}\n attributeName={attributeName}\n initialValue={inlineMarkdownEdit.initialValue}\n selected={Besigner.focus.isNodeSelected(node)}\n />\n )\n },\n)\nInlineMarkdownEditorComponent.displayName = 'InlineMarkdownEditorComponent'\n\nexport default InlineMarkdownEditorComponent\n"],"names":["canvas","MarkdownField","Besigner","Box","Button","Paper","Typography","observer","useCallback","useEffect","useRef","useState","clampToViewport","useAnchoredRect","useDebouncedCommit","useMarkdownMediaPicker","inlineMarkdownEdit","InlineMarkdownEditorSurface","props","node","rect","anchor","attributeName","initialValue","selected","live","value","setValue","latestRef","committedRef","editorRef","onPickImageFromMedia","commit","current","updateNodeProps","schedule","handleChange","next","close","handleKeyDown","event","key","stopPropagation","handleDone","stop","viewportWidth","window","Infinity","innerWidth","viewportHeight","innerHeight","width","Math","max","KEEP_VISIBLE","data-aglyn","data-testid","onKeyDown","onMouseDown","onDoubleClick","sx","position","left","top","maxWidth","zIndex","theme","modal","elevation","p","maxHeight","overflowY","display","alignItems","justifyContent","mb","variant","color","size","onClick","label","String","componentSchema","attributes","find","attribute","name","onChange","minHeight","min","height","displayName","InlineMarkdownEditorComponent","focus","isNodeSelected","$id"],"mappings":"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"}
@@ -0,0 +1,48 @@
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
+ * Fixed-position overlay that edits a node's text in place, opened by
19
+ * double-clicking a `textEditable` element in the canvas (see
20
+ * DraggableDroppable). Plain components edit through a pill-capable
21
+ * contentEditable line (Enter or blur commits, Shift+Enter breaks a line,
22
+ * Escape cancels). Components flagged `richTextEditable` (AGL-54) get a
23
+ * contentEditable surface with a basic formatting toolbar; the commit
24
+ * sanitizes the markup through an allowlist and stores it in the `html`
25
+ * prop with `children` kept as the plain-text fallback. Either mode
26
+ * commits ONCE through `Aglyn.canvas.updateNodeProps` (a single undo entry).
27
+ *
28
+ * Binding pills (AGL-586): stored `{{...}}` tokens render as named,
29
+ * colored, atomic pills in BOTH modes when the editor opens; the toolbar's
30
+ * {x} button opens the same grouped insert picker as the attributes panel
31
+ * (assembled from this node's ancestor context) and drops a pill at the
32
+ * caret; clicking a pill offers Replace/Remove. Commits serialize pills
33
+ * back to raw token syntax — names shown, ids stored.
34
+ *
35
+ * Instance prop overrides (AGL-1304): opened with a `propTarget`, the same
36
+ * surface edits a component instance's `propValues[propName]` instead of a
37
+ * node's `children` — the double-clicked leaf is a GRAFTED preview node,
38
+ * not a canvas node, so the commit rides the instance. Always the plain
39
+ * surface (prop values substitute as strings), the same single
40
+ * `updateNodeProps` commit (one undo entry, and the same node-changed
41
+ * signal co-editing's shadow diff already mirrors), and an emptied commit
42
+ * REMOVES the override so the component's own copy returns — exactly what
43
+ * clearing the Attributes field does.
44
+ */
45
+ export declare const InlineTextEditorComponent: (() => import("react").JSX.Element) & {
46
+ displayName: string;
47
+ };
48
+ export default InlineTextEditorComponent;