@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,88 @@
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 { PickMediaOptions } from '@aglyn/aglyn';
18
+ /**
19
+ * Host-app-provided media browser (AGL-106): elements with a `src`
20
+ * attribute get a "Browse media" action in the Attributes panel when the
21
+ * host supplies this callback (the console opens its media-picker dialog);
22
+ * the designer stays storage-agnostic and hides the control otherwise.
23
+ */
24
+ export interface MediaPickerContextValue {
25
+ /**
26
+ * `onPick` receives the value the attribute should STORE, which is not
27
+ * necessarily a URL: the console hands back a `media:{scope}/{mediaId}`
28
+ * reference for library assets (AGL-1215) and a raw URL only for assets
29
+ * that have no CDN path. The designer writes it through verbatim — what
30
+ * the persisted form means is the host app's and the renderer's business,
31
+ * which is the same reason this context exists at all.
32
+ *
33
+ * `asset` carries the chosen asset's own authored metadata (AGL-1896) so a
34
+ * surface can DEFAULT a companion attribute from it — `alt`, which the DAM
35
+ * has stored since AGL-173 and which nothing ever read back, and the pixel
36
+ * `width`/`height` captured at upload. Structural and optional on purpose:
37
+ * the designer stays storage-agnostic, a host that supplies no metadata is
38
+ * unchanged, and this stays one extra argument rather than a second picker
39
+ * mechanism. Use `Aglyn.inheritedMediaAlt` to decide what to do with the
40
+ * alt — never inline the rule, or the override precedence drifts per
41
+ * surface.
42
+ *
43
+ * The dimensions are copied at PICK TIME because no tenant render path
44
+ * reads an image's media document (AGL-2486). Resolving them while
45
+ * rendering would put a per-image Firestore read on the hottest cached
46
+ * path; carrying them on the node costs two numbers and is read like any
47
+ * other prop. They are best-effort at upload, so either may be absent.
48
+ *
49
+ * `video` and `poster` are the video half of the same bargain (AGL-2749),
50
+ * and they are the DOCUMENT's own records rather than anything flattened on
51
+ * the way here — a video's dimensions live inside `video` precisely so a
52
+ * reader can tell a browser's report from a server measurement, and
53
+ * flattening them into `width`/`height` above would throw that distinction
54
+ * away at the seam. `Aglyn.videoMediaProps` owns what happens to them; a
55
+ * host that sends neither leaves every element exactly as it was.
56
+ *
57
+ * `options.kind` narrows the browser to the one kind of file the attribute
58
+ * can hold (AGL-2953), such as a Video element's source. Only `kind` is
59
+ * offered: a page cannot place a private asset, so the designer has no use
60
+ * for `allowPrivate`. A host that ignores it shows its whole library.
61
+ */
62
+ onPickMedia?: (onPick: (value: string, asset?: {
63
+ alt?: string;
64
+ width?: number;
65
+ height?: number;
66
+ /** The asset's `video` record: `durationMs`, `width`, `height`. */
67
+ video?: unknown;
68
+ /** The asset's generated `poster` record, when the DAM made one. */
69
+ poster?: unknown;
70
+ }) => void, options?: Pick<PickMediaOptions, 'kind'>) => void;
71
+ /**
72
+ * External image hosts this site's owner has approved (AGL-1152).
73
+ *
74
+ * Carried here rather than fetched by the field, because the designer must
75
+ * not read Firestore: it renders inside a plugin sandbox and the host doc is
76
+ * the console's to know. The provider that already takes `hostId` supplies
77
+ * it.
78
+ *
79
+ * ABSENT means "not known", NOT "nothing approved" — a field that cannot see
80
+ * the list must warn about nothing rather than warn about everything. The
81
+ * warning exists to tell an author something true before they publish; one
82
+ * that fires on every external URL because the list failed to load teaches
83
+ * them to ignore it, which is worse than silence.
84
+ */
85
+ approvedImageHosts?: readonly string[];
86
+ }
87
+ export declare const MediaPickerContext: import("react").Context<MediaPickerContextValue>;
88
+ export default MediaPickerContext;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { createContext } from "react";
17
+ export const MediaPickerContext = createContext({});
18
+ MediaPickerContext.displayName = 'MediaPickerContext';
19
+ export default MediaPickerContext;
20
+
21
+ //# sourceMappingURL=media-picker-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/media-picker-context.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 { PickMediaOptions } from '@aglyn/aglyn'\nimport { createContext } from 'react'\n\n/**\n * Host-app-provided media browser (AGL-106): elements with a `src`\n * attribute get a \"Browse media\" action in the Attributes panel when the\n * host supplies this callback (the console opens its media-picker dialog);\n * the designer stays storage-agnostic and hides the control otherwise.\n */\nexport interface MediaPickerContextValue {\n /**\n * `onPick` receives the value the attribute should STORE, which is not\n * necessarily a URL: the console hands back a `media:{scope}/{mediaId}`\n * reference for library assets (AGL-1215) and a raw URL only for assets\n * that have no CDN path. The designer writes it through verbatim — what\n * the persisted form means is the host app's and the renderer's business,\n * which is the same reason this context exists at all.\n *\n * `asset` carries the chosen asset's own authored metadata (AGL-1896) so a\n * surface can DEFAULT a companion attribute from it — `alt`, which the DAM\n * has stored since AGL-173 and which nothing ever read back, and the pixel\n * `width`/`height` captured at upload. Structural and optional on purpose:\n * the designer stays storage-agnostic, a host that supplies no metadata is\n * unchanged, and this stays one extra argument rather than a second picker\n * mechanism. Use `Aglyn.inheritedMediaAlt` to decide what to do with the\n * alt — never inline the rule, or the override precedence drifts per\n * surface.\n *\n * The dimensions are copied at PICK TIME because no tenant render path\n * reads an image's media document (AGL-2486). Resolving them while\n * rendering would put a per-image Firestore read on the hottest cached\n * path; carrying them on the node costs two numbers and is read like any\n * other prop. They are best-effort at upload, so either may be absent.\n *\n * `video` and `poster` are the video half of the same bargain (AGL-2749),\n * and they are the DOCUMENT's own records rather than anything flattened on\n * the way here — a video's dimensions live inside `video` precisely so a\n * reader can tell a browser's report from a server measurement, and\n * flattening them into `width`/`height` above would throw that distinction\n * away at the seam. `Aglyn.videoMediaProps` owns what happens to them; a\n * host that sends neither leaves every element exactly as it was.\n *\n * `options.kind` narrows the browser to the one kind of file the attribute\n * can hold (AGL-2953), such as a Video element's source. Only `kind` is\n * offered: a page cannot place a private asset, so the designer has no use\n * for `allowPrivate`. A host that ignores it shows its whole library.\n */\n onPickMedia?: (\n onPick: (\n value: string,\n asset?: {\n alt?: string\n width?: number\n height?: number\n /** The asset's `video` record: `durationMs`, `width`, `height`. */\n video?: unknown\n /** The asset's generated `poster` record, when the DAM made one. */\n poster?: unknown\n },\n ) => void,\n options?: Pick<PickMediaOptions, 'kind'>,\n ) => void\n /**\n * External image hosts this site's owner has approved (AGL-1152).\n *\n * Carried here rather than fetched by the field, because the designer must\n * not read Firestore: it renders inside a plugin sandbox and the host doc is\n * the console's to know. The provider that already takes `hostId` supplies\n * it.\n *\n * ABSENT means \"not known\", NOT \"nothing approved\" — a field that cannot see\n * the list must warn about nothing rather than warn about everything. The\n * warning exists to tell an author something true before they publish; one\n * that fires on every external URL because the list failed to load teaches\n * them to ignore it, which is worse than silence.\n */\n approvedImageHosts?: readonly string[]\n}\n\nexport const MediaPickerContext = createContext<MediaPickerContextValue>({})\nMediaPickerContext.displayName = 'MediaPickerContext'\n\nexport default MediaPickerContext\n"],"names":["createContext","MediaPickerContext","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,SAASA,aAAa,QAAQ,QAAO;AA8ErC,OAAO,MAAMC,qBAAqBD,cAAuC,CAAC,GAAE;AAC5EC,mBAAmBC,WAAW,GAAG;AAEjC,eAAeD,mBAAkB"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 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 { NodeId } from '@aglyn/aglyn';
18
+ import { type RefObject } from 'react';
19
+ export type ElementCanvasRefObject = Dictionary & {
20
+ $id: NodeId;
21
+ node: Element;
22
+ dragHandle: any;
23
+ };
24
+ export type RenderedCanvasElementsType = {
25
+ elements: RefObject<Record<NodeId, ElementCanvasRefObject>>;
26
+ setElementRef($id: NodeId, ref: ElementCanvasRefObject): void;
27
+ deleteElementRef($id: NodeId): void;
28
+ };
29
+ export declare const RenderedCanvasElementsContext: import("react").Context<RenderedCanvasElementsType>;
30
+ export declare const useRenderedCanvasElements: () => RenderedCanvasElementsType;
31
+ export declare const useRenderedCanvasElementRef: ({ $id }: {
32
+ $id: NodeId;
33
+ }) => ElementCanvasRefObject;
34
+ export interface RenderedCanvasElementsProps {
35
+ children?: JSX.Children;
36
+ }
37
+ export declare function RenderedCanvasElementsProvider(props: RenderedCanvasElementsProps): import("react").JSX.Element;
38
+ export declare namespace RenderedCanvasElementsProvider {
39
+ var displayName: string;
40
+ var aglyn: boolean;
41
+ }
42
+ export default RenderedCanvasElementsProvider;
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 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 { jsx as _jsx } from "react/jsx-runtime";
17
+ import { createContext, useContext, useEffect, useMemo, useRef } from "react";
18
+ export const RenderedCanvasElementsContext = /*#__PURE__*/ createContext({
19
+ elements: {
20
+ current: null
21
+ },
22
+ setElementRef () {},
23
+ deleteElementRef () {}
24
+ });
25
+ RenderedCanvasElementsContext.displayName = 'RenderedCanvasElementsContext';
26
+ RenderedCanvasElementsContext.aglyn = true;
27
+ export const useRenderedCanvasElements = ()=>{
28
+ return useContext(RenderedCanvasElementsContext);
29
+ };
30
+ export const useRenderedCanvasElementRef = ({ $id })=>{
31
+ const { elements } = useRenderedCanvasElements();
32
+ return useMemo(()=>elements.current[$id] || null, [
33
+ elements,
34
+ $id
35
+ ]);
36
+ };
37
+ export function RenderedCanvasElementsProvider(props) {
38
+ const { children } = props;
39
+ const elements = useRef({});
40
+ const context = useMemo(()=>({
41
+ elements,
42
+ setElementRef: ($id, ref)=>{
43
+ elements.current[$id] = ref;
44
+ },
45
+ deleteElementRef: ($id)=>{
46
+ delete elements.current[$id];
47
+ }
48
+ }), []);
49
+ // The registry, readable from a devtools console (AGL-2486).
50
+ //
51
+ // This map had NO writer for its entire existence and nothing said so:
52
+ // every consumer read `{}`, found nothing, and rendered nothing. Two
53
+ // features were void for months because the only way to discover an empty
54
+ // registry was to read the source of everything that touches it.
55
+ //
56
+ // `window.AglynCanvasElements()` returns the live ids, so "is the canvas
57
+ // registered?" is one line in a console instead of an afternoon. Cheap,
58
+ // dev-only, and it holds no reference the registry does not already hold.
59
+ useEffect(()=>{
60
+ if (process.env.NODE_ENV === 'production') return undefined;
61
+ if (typeof window === 'undefined') return undefined;
62
+ window['AglynCanvasElements'] = ()=>{
63
+ var _elements_current;
64
+ return Object.keys((_elements_current = elements.current) != null ? _elements_current : {});
65
+ };
66
+ return ()=>{
67
+ delete window['AglynCanvasElements'];
68
+ };
69
+ }, []);
70
+ return /*#__PURE__*/ _jsx(RenderedCanvasElementsContext.Provider, {
71
+ value: context,
72
+ children: children
73
+ });
74
+ }
75
+ RenderedCanvasElementsProvider.displayName = 'RenderedCanvasElementsProvider';
76
+ RenderedCanvasElementsProvider.aglyn = true;
77
+ export default RenderedCanvasElementsProvider;
78
+
79
+ //# sourceMappingURL=rendered-canvas-elements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/rendered-canvas-elements.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2023 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 { NodeId } from '@aglyn/aglyn'\nimport {\n createContext,\n type RefObject,\n useContext,\n useEffect,\n useMemo,\n useRef,\n} from 'react'\n\nexport type ElementCanvasRefObject = Dictionary & {\n $id: NodeId\n node: Element\n dragHandle: any\n}\n\nexport type RenderedCanvasElementsType = {\n elements: RefObject<Record<NodeId, ElementCanvasRefObject>>\n setElementRef($id: NodeId, ref: ElementCanvasRefObject): void\n deleteElementRef($id: NodeId): void\n}\n\nexport const RenderedCanvasElementsContext =\n createContext<RenderedCanvasElementsType>({\n elements: { current: null } as any,\n setElementRef() {},\n deleteElementRef() {},\n })\nRenderedCanvasElementsContext.displayName = 'RenderedCanvasElementsContext'\nRenderedCanvasElementsContext.aglyn = true\n\nexport const useRenderedCanvasElements = () => {\n return useContext(RenderedCanvasElementsContext)\n}\n\nexport const useRenderedCanvasElementRef = ({ $id }: { $id: NodeId }) => {\n const { elements } = useRenderedCanvasElements()\n return useMemo(() => elements.current[$id] || null, [elements, $id])\n}\n\nexport interface RenderedCanvasElementsProps {\n children?: JSX.Children\n}\n\nexport function RenderedCanvasElementsProvider(\n props: RenderedCanvasElementsProps,\n) {\n const { children } = props\n const elements = useRef<Record<NodeId, ElementCanvasRefObject>>({})\n const context = useMemo<RenderedCanvasElementsType>(\n () => ({\n elements,\n setElementRef: ($id, ref): void => {\n elements.current[$id] = ref\n },\n deleteElementRef: ($id): void => {\n delete elements.current[$id]\n },\n }),\n [],\n )\n\n // The registry, readable from a devtools console (AGL-2486).\n //\n // This map had NO writer for its entire existence and nothing said so:\n // every consumer read `{}`, found nothing, and rendered nothing. Two\n // features were void for months because the only way to discover an empty\n // registry was to read the source of everything that touches it.\n //\n // `window.AglynCanvasElements()` returns the live ids, so \"is the canvas\n // registered?\" is one line in a console instead of an afternoon. Cheap,\n // dev-only, and it holds no reference the registry does not already hold.\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') return undefined\n if (typeof window === 'undefined') return undefined\n ;(window as unknown as Record<string, unknown>)['AglynCanvasElements'] =\n () => Object.keys(elements.current ?? {})\n return () => {\n delete (window as unknown as Record<string, unknown>)[\n 'AglynCanvasElements'\n ]\n }\n }, [])\n\n return (\n <RenderedCanvasElementsContext.Provider value={context}>\n {children}\n </RenderedCanvasElementsContext.Provider>\n )\n}\n\nRenderedCanvasElementsProvider.displayName = 'RenderedCanvasElementsProvider'\nRenderedCanvasElementsProvider.aglyn = true\n\nexport default RenderedCanvasElementsProvider\n"],"names":["createContext","useContext","useEffect","useMemo","useRef","RenderedCanvasElementsContext","elements","current","setElementRef","deleteElementRef","displayName","aglyn","useRenderedCanvasElements","useRenderedCanvasElementRef","$id","RenderedCanvasElementsProvider","props","children","context","ref","process","env","NODE_ENV","undefined","window","Object","keys","Provider","value"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAGD,SACEA,aAAa,EAEbC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,QACD,QAAO;AAcd,OAAO,MAAMC,8CACXL,cAA0C;IACxCM,UAAU;QAAEC,SAAS;IAAK;IAC1BC,kBAAiB;IACjBC,qBAAoB;AACtB,GAAE;AACJJ,8BAA8BK,WAAW,GAAG;AAC5CL,8BAA8BM,KAAK,GAAG;AAEtC,OAAO,MAAMC,4BAA4B;IACvC,OAAOX,WAAWI;AACpB,EAAC;AAED,OAAO,MAAMQ,8BAA8B,CAAC,EAAEC,GAAG,EAAmB;IAClE,MAAM,EAAER,QAAQ,EAAE,GAAGM;IACrB,OAAOT,QAAQ,IAAMG,SAASC,OAAO,CAACO,IAAI,IAAI,MAAM;QAACR;QAAUQ;KAAI;AACrE,EAAC;AAMD,OAAO,SAASC,+BACdC,KAAkC;IAElC,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IACrB,MAAMV,WAAWF,OAA+C,CAAC;IACjE,MAAMc,UAAUf,QACd,IAAO,CAAA;YACLG;YACAE,eAAe,CAACM,KAAKK;gBACnBb,SAASC,OAAO,CAACO,IAAI,GAAGK;YAC1B;YACAV,kBAAkB,CAACK;gBACjB,OAAOR,SAASC,OAAO,CAACO,IAAI;YAC9B;QACF,CAAA,GACA,EAAE;IAGJ,6DAA6D;IAC7D,EAAE;IACF,uEAAuE;IACvE,qEAAqE;IACrE,0EAA0E;IAC1E,iEAAiE;IACjE,EAAE;IACF,yEAAyE;IACzE,wEAAwE;IACxE,0EAA0E;IAC1EZ,UAAU;QACR,IAAIkB,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc,OAAOC;QAClD,IAAI,OAAOC,WAAW,aAAa,OAAOD;QACxCC,MAA6C,CAAC,sBAAsB,GACpE;gBAAkBlB;mBAAZmB,OAAOC,IAAI,EAACpB,oBAAAA,SAASC,OAAO,YAAhBD,oBAAoB,CAAC;;QACzC,OAAO;YACL,OAAO,AAACkB,MAA6C,CACnD,sBACD;QACH;IACF,GAAG,EAAE;IAEL,qBACE,KAACnB,8BAA8BsB,QAAQ;QAACC,OAAOV;kBAC5CD;;AAGP;AAEAF,+BAA+BL,WAAW,GAAG;AAC7CK,+BAA+BJ,KAAK,GAAG;AAEvC,eAAeI,+BAA8B"}
@@ -0,0 +1,38 @@
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 { RepeatableDataset } from '@aglyn/aglyn/app-utils/expand-repeatables';
18
+ import type { DatasetModel } from '@aglyn/aglyn/app-utils/dataset-models';
19
+ /**
20
+ * The record the canvas nodes below this point are DRAWING (AGL-3111).
21
+ *
22
+ * Set by a repeating element around the template an author edits, so its
23
+ * `{{item.*}}` tokens render the first record's values the way the published
24
+ * page will. Nothing under it is changed — it decides render copies only.
25
+ *
26
+ * ABSENT everywhere else, which is the ordinary case: an element outside any
27
+ * repeat shows its props as written.
28
+ */
29
+ export interface RepeatRecordContextValue {
30
+ /** The record's value map, with `$id` (AGL-180 hops resolve through it). */
31
+ record: Record<string, unknown>;
32
+ /** Model of the repeated rows; a reference hop needs its field configs. */
33
+ model?: DatasetModel;
34
+ /** Rows by key, so `{{item.author.name}}` resolves on the canvas too. */
35
+ datasetsByKey?: Record<string, RepeatableDataset | undefined>;
36
+ }
37
+ export declare const RepeatRecordContext: import("react").Context<RepeatRecordContextValue>;
38
+ export default RepeatRecordContext;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { createContext } from "react";
17
+ export const RepeatRecordContext = createContext(undefined);
18
+ RepeatRecordContext.displayName = 'RepeatRecordContext';
19
+ export default RepeatRecordContext;
20
+
21
+ //# sourceMappingURL=repeat-record-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/repeat-record-context.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 { RepeatableDataset } from '@aglyn/aglyn/app-utils/expand-repeatables'\nimport type { DatasetModel } from '@aglyn/aglyn/app-utils/dataset-models'\nimport { createContext } from 'react'\n\n/**\n * The record the canvas nodes below this point are DRAWING (AGL-3111).\n *\n * Set by a repeating element around the template an author edits, so its\n * `{{item.*}}` tokens render the first record's values the way the published\n * page will. Nothing under it is changed — it decides render copies only.\n *\n * ABSENT everywhere else, which is the ordinary case: an element outside any\n * repeat shows its props as written.\n */\nexport interface RepeatRecordContextValue {\n /** The record's value map, with `$id` (AGL-180 hops resolve through it). */\n record: Record<string, unknown>\n /** Model of the repeated rows; a reference hop needs its field configs. */\n model?: DatasetModel\n /** Rows by key, so `{{item.author.name}}` resolves on the canvas too. */\n datasetsByKey?: Record<string, RepeatableDataset | undefined>\n}\n\nexport const RepeatRecordContext = createContext<\n RepeatRecordContextValue | undefined\n>(undefined)\nRepeatRecordContext.displayName = 'RepeatRecordContext'\n\nexport default RepeatRecordContext\n"],"names":["createContext","RepeatRecordContext","undefined","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAID,SAASA,aAAa,QAAQ,QAAO;AAqBrC,OAAO,MAAMC,sBAAsBD,cAEjCE,WAAU;AACZD,oBAAoBE,WAAW,GAAG;AAElC,eAAeF,oBAAmB"}
@@ -0,0 +1,53 @@
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 { RepeatRowsAnswer } from '@aglyn/aglyn/app-utils/repeat-sources';
18
+ import { type HeldAnswersSource, type HeldAnswersStore } from '../utils/held-answers-store';
19
+ /**
20
+ * The rows a canvas repeat is drawn from (AGL-3111).
21
+ *
22
+ * A repeating element holds its source and key here; the host app renders one
23
+ * reader per held request, which asks the registered repeat source for the
24
+ * rows and files the answer back under {@link repeatRowsKey}. The canvas then
25
+ * draws the copies and the badge from that answer, through the published
26
+ * page's own expansion.
27
+ *
28
+ * ABSENT when no host app reads rows: every repeat then draws its template
29
+ * once, as the canvas always did.
30
+ */
31
+ export interface RepeatRowsRequest {
32
+ /** The registered repeat source's id. */
33
+ sourceId: string;
34
+ /** The key exactly as the node stores it, trimmed. */
35
+ key: string;
36
+ }
37
+ export type RepeatRowsSource = HeldAnswersSource<RepeatRowsRequest, RepeatRowsAnswer>;
38
+ export type RepeatRowsStore = HeldAnswersStore<RepeatRowsRequest, RepeatRowsAnswer>;
39
+ /**
40
+ * Where a request's answer is filed.
41
+ *
42
+ * NUL joins the two parts because it cannot appear in a source id or in a
43
+ * stored repeat key, so no pair can forge another pair's key. It is written
44
+ * as the `\x00` ESCAPE and never as a raw NUL byte (AGL-1890): a literal NUL
45
+ * in the first 8000 bytes makes the whole file BINARY to git, which leaves it
46
+ * with no diff, no blame and nothing for `grep` to find. The escape parses to
47
+ * the identical one-character string, so nothing about the key changes.
48
+ */
49
+ export declare function repeatRowsKey(request: RepeatRowsRequest): string;
50
+ /** An in-memory store. How each request is read is the host app's business. */
51
+ export declare function createRepeatRowsStore(): RepeatRowsStore;
52
+ export declare const RepeatRowsContext: import("react").Context<RepeatRowsSource>;
53
+ export default RepeatRowsContext;
@@ -0,0 +1,38 @@
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
+ */ // By path: which sources exist is editor business, kept out of every barrel.
17
+ import { createContext } from "react";
18
+ import { createHeldAnswersStore } from "../utils/held-answers-store.js";
19
+ /**
20
+ * Where a request's answer is filed.
21
+ *
22
+ * NUL joins the two parts because it cannot appear in a source id or in a
23
+ * stored repeat key, so no pair can forge another pair's key. It is written
24
+ * as the `\x00` ESCAPE and never as a raw NUL byte (AGL-1890): a literal NUL
25
+ * in the first 8000 bytes makes the whole file BINARY to git, which leaves it
26
+ * with no diff, no blame and nothing for `grep` to find. The escape parses to
27
+ * the identical one-character string, so nothing about the key changes.
28
+ */ export function repeatRowsKey(request) {
29
+ return `${request.sourceId}\x00${request.key}`;
30
+ }
31
+ /** An in-memory store. How each request is read is the host app's business. */ export function createRepeatRowsStore() {
32
+ return createHeldAnswersStore(repeatRowsKey);
33
+ }
34
+ export const RepeatRowsContext = createContext(undefined);
35
+ RepeatRowsContext.displayName = 'RepeatRowsContext';
36
+ export default RepeatRowsContext;
37
+
38
+ //# sourceMappingURL=repeat-rows-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/repeat-rows-context.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// By path: which sources exist is editor business, kept out of every barrel.\nimport type { RepeatRowsAnswer } from '@aglyn/aglyn/app-utils/repeat-sources'\nimport { createContext } from 'react'\nimport {\n createHeldAnswersStore,\n type HeldAnswersSource,\n type HeldAnswersStore,\n} from '../utils/held-answers-store'\n\n/**\n * The rows a canvas repeat is drawn from (AGL-3111).\n *\n * A repeating element holds its source and key here; the host app renders one\n * reader per held request, which asks the registered repeat source for the\n * rows and files the answer back under {@link repeatRowsKey}. The canvas then\n * draws the copies and the badge from that answer, through the published\n * page's own expansion.\n *\n * ABSENT when no host app reads rows: every repeat then draws its template\n * once, as the canvas always did.\n */\nexport interface RepeatRowsRequest {\n /** The registered repeat source's id. */\n sourceId: string\n /** The key exactly as the node stores it, trimmed. */\n key: string\n}\n\nexport type RepeatRowsSource = HeldAnswersSource<\n RepeatRowsRequest,\n RepeatRowsAnswer\n>\nexport type RepeatRowsStore = HeldAnswersStore<\n RepeatRowsRequest,\n RepeatRowsAnswer\n>\n\n/**\n * Where a request's answer is filed.\n *\n * NUL joins the two parts because it cannot appear in a source id or in a\n * stored repeat key, so no pair can forge another pair's key. It is written\n * as the `\\x00` ESCAPE and never as a raw NUL byte (AGL-1890): a literal NUL\n * in the first 8000 bytes makes the whole file BINARY to git, which leaves it\n * with no diff, no blame and nothing for `grep` to find. The escape parses to\n * the identical one-character string, so nothing about the key changes.\n */\nexport function repeatRowsKey(request: RepeatRowsRequest): string {\n return `${request.sourceId}\\x00${request.key}`\n}\n\n/** An in-memory store. How each request is read is the host app's business. */\nexport function createRepeatRowsStore(): RepeatRowsStore {\n return createHeldAnswersStore<RepeatRowsRequest, RepeatRowsAnswer>(\n repeatRowsKey,\n )\n}\n\nexport const RepeatRowsContext = createContext<RepeatRowsSource | undefined>(\n undefined,\n)\nRepeatRowsContext.displayName = 'RepeatRowsContext'\n\nexport default RepeatRowsContext\n"],"names":["createContext","createHeldAnswersStore","repeatRowsKey","request","sourceId","key","createRepeatRowsStore","RepeatRowsContext","undefined","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,6EAA6E;AAE7E,SAASA,aAAa,QAAQ,QAAO;AACrC,SACEC,sBAAsB,QAGjB,iCAA6B;AA8BpC;;;;;;;;;CASC,GACD,OAAO,SAASC,cAAcC,OAA0B;IACtD,OAAO,GAAGA,QAAQC,QAAQ,CAAC,IAAI,EAAED,QAAQE,GAAG,EAAE;AAChD;AAEA,6EAA6E,GAC7E,OAAO,SAASC;IACd,OAAOL,uBACLC;AAEJ;AAEA,OAAO,MAAMK,oBAAoBP,cAC/BQ,WACD;AACDD,kBAAkBE,WAAW,GAAG;AAEhC,eAAeF,kBAAiB"}
@@ -0,0 +1,31 @@
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 ReactNode } from 'react';
18
+ /**
19
+ * Controls the host app adds to the besigner's secondary toolbar, after the
20
+ * undo and redo controls (AGL-2984).
21
+ *
22
+ * The designer stays free of console imports the way the Attributes panel's
23
+ * section does: the console supplies the node — its plugin widget slot,
24
+ * rendered with the shell's own gates — and the toolbar draws whatever
25
+ * arrives, and nothing when the host supplied nothing. Nothing here knows
26
+ * what a plugin is.
27
+ */
28
+ export declare const BesignerToolbarExtrasContext: import("react").Context<ReactNode>;
29
+ /** The host-supplied controls, or `null` when the host supplied nothing. */
30
+ export declare function useBesignerToolbarExtras(): ReactNode;
31
+ export default BesignerToolbarExtrasContext;
@@ -0,0 +1,33 @@
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 { createContext, useContext } from "react";
17
+ /**
18
+ * Controls the host app adds to the besigner's secondary toolbar, after the
19
+ * undo and redo controls (AGL-2984).
20
+ *
21
+ * The designer stays free of console imports the way the Attributes panel's
22
+ * section does: the console supplies the node — its plugin widget slot,
23
+ * rendered with the shell's own gates — and the toolbar draws whatever
24
+ * arrives, and nothing when the host supplied nothing. Nothing here knows
25
+ * what a plugin is.
26
+ */ export const BesignerToolbarExtrasContext = /*#__PURE__*/ createContext(null);
27
+ BesignerToolbarExtrasContext.displayName = 'BesignerToolbarExtrasContext';
28
+ /** The host-supplied controls, or `null` when the host supplied nothing. */ export function useBesignerToolbarExtras() {
29
+ return useContext(BesignerToolbarExtrasContext);
30
+ }
31
+ export default BesignerToolbarExtrasContext;
32
+
33
+ //# sourceMappingURL=toolbar-extras-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/toolbar-extras-context.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 { createContext, useContext, type ReactNode } from 'react'\n\n/**\n * Controls the host app adds to the besigner's secondary toolbar, after the\n * undo and redo controls (AGL-2984).\n *\n * The designer stays free of console imports the way the Attributes panel's\n * section does: the console supplies the node — its plugin widget slot,\n * rendered with the shell's own gates — and the toolbar draws whatever\n * arrives, and nothing when the host supplied nothing. Nothing here knows\n * what a plugin is.\n */\nexport const BesignerToolbarExtrasContext = createContext<ReactNode>(null)\nBesignerToolbarExtrasContext.displayName = 'BesignerToolbarExtrasContext'\n\n/** The host-supplied controls, or `null` when the host supplied nothing. */\nexport function useBesignerToolbarExtras(): ReactNode {\n return useContext(BesignerToolbarExtrasContext)\n}\n\nexport default BesignerToolbarExtrasContext\n"],"names":["createContext","useContext","BesignerToolbarExtrasContext","displayName","useBesignerToolbarExtras"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,aAAa,EAAEC,UAAU,QAAwB,QAAO;AAEjE;;;;;;;;;CASC,GACD,OAAO,MAAMC,6CAA+BF,cAAyB,MAAK;AAC1EE,6BAA6BC,WAAW,GAAG;AAE3C,0EAA0E,GAC1E,OAAO,SAASC;IACd,OAAOH,WAAWC;AACpB;AAEA,eAAeA,6BAA4B"}
@@ -0,0 +1,110 @@
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 ProcessableNodes } from '@aglyn/aglyn';
18
+ /**
19
+ * Local crash net for unsaved besigner work (AGL-1256).
20
+ *
21
+ * ## What this is not
22
+ *
23
+ * It is deliberately **not** version history. Versioning is a paid feature
24
+ * (`versioning`, Pro and above): named snapshots of the *saved* document that
25
+ * you can list, reopen, publish and schedule. A store of dated snapshots in
26
+ * the browser is one careless design decision away from being a free
27
+ * imitation of exactly that, so three rules hold the line, and every one of
28
+ * them is load-bearing rather than incidental:
29
+ *
30
+ * 1. **One draft per document, latest wins.** No list, no names, no history.
31
+ * There is nothing to browse and nothing to choose between.
32
+ * 2. **A draft only ever holds work that was never saved.** It is cleared the
33
+ * moment a save succeeds, so it can never act as "restore the document to
34
+ * how it was before" — that is rollback, and rollback is what versions
35
+ * sell. The only thing a draft can give back is the thing that would
36
+ * otherwise be gone forever.
37
+ * 3. **A draft expires.** {@link DRAFT_MAX_AGE_MS} keeps it a recovery window
38
+ * rather than an archive.
39
+ *
40
+ * Because of those, drafts are ungated: this is data-loss prevention, and
41
+ * gating it would mean a free org's crash still costs them their afternoon.
42
+ * A free org gets back exactly what they had in the canvas and not one
43
+ * revision more.
44
+ */
45
+ /** Every key this module owns; also the set it may evict from. */
46
+ export declare const BESIGNER_DRAFT_KEY_PREFIX = "aglyn:draft:";
47
+ /**
48
+ * A week. Long enough to cover "my laptop died on Friday", short enough that
49
+ * the store never becomes an accumulating pile of restore points.
50
+ */
51
+ export declare const DRAFT_MAX_AGE_MS: number;
52
+ /**
53
+ * Which besigner document a draft belongs to.
54
+ *
55
+ * Every field is part of the key on purpose. `useBesignerDocument`'s
56
+ * `documentKey` looks like the natural choice and is not safe as one: both
57
+ * email editors build it as `${templateKey}:${versionId}`, so a platform
58
+ * email template and a host's override of the same key — and two different
59
+ * hosts overriding it — all collide. This is the same trap AGL-1203 hit with
60
+ * preview snapshots, where screen, layout, component and template ids come
61
+ * from one generator and live in sibling collections.
62
+ */
63
+ export interface BesignerDraftIds {
64
+ /**
65
+ * Owning host id, or `'platform'` for the staff-owned system documents
66
+ * that have no host.
67
+ */
68
+ scope: string;
69
+ kind: 'screen' | 'layout' | 'component' | 'template' | 'email' | 'form';
70
+ docId: string;
71
+ /**
72
+ * Which version of the document is open. Keeping this in the key is what
73
+ * stops a draft taken against version A being offered on version B —
74
+ * versions are meant to be independent, and a draft that leaked across
75
+ * them would corrupt the paid feature rather than merely duplicate it.
76
+ * Templates version but never publish, so they have none.
77
+ */
78
+ versionId?: string;
79
+ }
80
+ export interface BesignerDraft {
81
+ nodes: ProcessableNodes;
82
+ /**
83
+ * The stored document's version stamp when this draft was taken, in
84
+ * `Aglyn.versionStamp` form. Null when the document had not stamped yet.
85
+ * This is what makes the restore prompt honest about a colleague having
86
+ * saved in the meantime (AGL-674).
87
+ */
88
+ baseStamp: string | null;
89
+ /** When the draft was last written. */
90
+ updatedAt: number;
91
+ }
92
+ export declare function besignerDraftKey(ids: BesignerDraftIds): string;
93
+ /**
94
+ * Writes the draft, replacing any previous one for this document.
95
+ *
96
+ * Returns false when storage refused it — the caller carries on editing
97
+ * either way. Preview snapshots are spent first when the origin is full
98
+ * (they regenerate on the next Preview click); other documents' drafts only
99
+ * after that, oldest first.
100
+ */
101
+ export declare function writeBesignerDraft(ids: BesignerDraftIds, draft: Omit<BesignerDraft, 'updatedAt'>, now?: number): boolean;
102
+ /**
103
+ * Reads this document's draft, or null when there is none, it is unreadable,
104
+ * or it has aged out. An expired draft is removed on the way past, so the
105
+ * store self-prunes on the path everyone takes.
106
+ */
107
+ export declare function readBesignerDraft(ids: BesignerDraftIds, now?: number): BesignerDraft | null;
108
+ export declare function clearBesignerDraft(ids: BesignerDraftIds): void;
109
+ /** Drops every expired draft, whichever document it belongs to. */
110
+ export declare function pruneBesignerDrafts(now?: number): string[];