@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,45 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { _ as _extends } from "@swc/helpers/_/_extends";
17
+ import { createContext, useContext } from "react";
18
+ export const DEFAULT_OPTIONS = {
19
+ title: 'Are you sure?',
20
+ description: '',
21
+ selectionText: 'OK',
22
+ cancellationText: 'Cancel',
23
+ dialogProps: {},
24
+ selectionButtonProps: {},
25
+ cancellationButtonProps: {}
26
+ };
27
+ export const buildOptions = (defaultOptions, options)=>{
28
+ const dialogProps = _extends({}, defaultOptions.dialogProps || DEFAULT_OPTIONS.dialogProps, options.dialogProps || {});
29
+ const selectionButtonProps = _extends({}, defaultOptions.selectionButtonProps || DEFAULT_OPTIONS.selectionButtonProps, options.selectionButtonProps || {});
30
+ const cancellationButtonProps = _extends({}, defaultOptions.cancellationButtonProps || DEFAULT_OPTIONS.cancellationButtonProps, options.cancellationButtonProps || {});
31
+ return _extends({}, DEFAULT_OPTIONS, defaultOptions, options, {
32
+ dialogProps,
33
+ selectionButtonProps,
34
+ cancellationButtonProps
35
+ });
36
+ };
37
+ export const ElementDrawerContext = createContext(null);
38
+ ElementDrawerContext.displayName = 'ElementDrawerContext';
39
+ ElementDrawerContext.aglyn = true;
40
+ export const useElementDrawerContext = ()=>{
41
+ return useContext(ElementDrawerContext);
42
+ };
43
+ export default ElementDrawerContext;
44
+
45
+ //# sourceMappingURL=element-drawer-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/element-drawer-context.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 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 ButtonProps } from '@mui/material/Button'\nimport { type DialogProps } from '@mui/material/Dialog'\nimport { type DialogContentTextProps } from '@mui/material/DialogContentText'\nimport { type DialogTitleProps } from '@mui/material/DialogTitle'\nimport { createContext, useContext } from 'react'\n\nexport interface ElementDrawerOptions {\n cancellationText?: ButtonProps['children']\n selectionText?: ButtonProps['children']\n cancellationButtonProps?: Partial<ButtonProps>\n selectionButtonProps?: Partial<ButtonProps>\n dialogProps?: Partial<DialogProps>\n title?: DialogTitleProps['children']\n description?: DialogContentTextProps['children']\n}\n\nexport type ElementDrawerFn = (\n options?: ElementDrawerOptions,\n) => Promise<unknown>\n\nexport interface ElementDrawerContextType {\n elementDrawer: ElementDrawerFn\n /**\n * Whether the Choose-element dialog is currently open (AGL-2486).\n *\n * Published so surfaces BELOW the provider can stand down while it is up —\n * the Elements panel's floating detail has no business surviving a modal\n * opening over it, and sniffing for a backdrop in the DOM would be a guess\n * where the provider already knows the answer.\n */\n open?: boolean\n}\n\nexport type UseElementDrawerType = () => ElementDrawerContextType\n\nexport const DEFAULT_OPTIONS: ElementDrawerOptions = {\n title: 'Are you sure?',\n description: '',\n selectionText: 'OK',\n cancellationText: 'Cancel',\n dialogProps: {},\n selectionButtonProps: {},\n cancellationButtonProps: {},\n}\n\nexport const buildOptions = (defaultOptions: ElementDrawerOptions, options: ElementDrawerOptions) => {\n const dialogProps = {\n ...(defaultOptions.dialogProps || DEFAULT_OPTIONS.dialogProps),\n ...(options.dialogProps || {}),\n }\n const selectionButtonProps = {\n ...(defaultOptions.selectionButtonProps ||\n DEFAULT_OPTIONS.selectionButtonProps),\n ...(options.selectionButtonProps || {}),\n }\n const cancellationButtonProps = {\n ...(defaultOptions.cancellationButtonProps ||\n DEFAULT_OPTIONS.cancellationButtonProps),\n ...(options.cancellationButtonProps || {}),\n }\n\n return {\n ...DEFAULT_OPTIONS,\n ...defaultOptions,\n ...options,\n dialogProps,\n selectionButtonProps,\n cancellationButtonProps,\n }\n}\n\nexport const ElementDrawerContext =\n createContext<ElementDrawerContextType>(null)\nElementDrawerContext.displayName = 'ElementDrawerContext'\nElementDrawerContext.aglyn = true\nexport const useElementDrawerContext: UseElementDrawerType = () => {\n return useContext(ElementDrawerContext)\n}\n\nexport default ElementDrawerContext\n"],"names":["createContext","useContext","DEFAULT_OPTIONS","title","description","selectionText","cancellationText","dialogProps","selectionButtonProps","cancellationButtonProps","buildOptions","defaultOptions","options","ElementDrawerContext","displayName","aglyn","useElementDrawerContext"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAMD,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAO;AA+BjD,OAAO,MAAMC,kBAAwC;IACnDC,OAAO;IACPC,aAAa;IACbC,eAAe;IACfC,kBAAkB;IAClBC,aAAa,CAAC;IACdC,sBAAsB,CAAC;IACvBC,yBAAyB,CAAC;AAC5B,EAAC;AAED,OAAO,MAAMC,eAAe,CAACC,gBAAsCC;IACjE,MAAML,cAAc,aACdI,eAAeJ,WAAW,IAAIL,gBAAgBK,WAAW,EACzDK,QAAQL,WAAW,IAAI,CAAC;IAE9B,MAAMC,uBAAuB,aACvBG,eAAeH,oBAAoB,IACrCN,gBAAgBM,oBAAoB,EAClCI,QAAQJ,oBAAoB,IAAI,CAAC;IAEvC,MAAMC,0BAA0B,aAC1BE,eAAeF,uBAAuB,IACxCP,gBAAgBO,uBAAuB,EACrCG,QAAQH,uBAAuB,IAAI,CAAC;IAG1C,OAAO,aACFP,iBACAS,gBACAC;QACHL;QACAC;QACAC;;AAEJ,EAAC;AAED,OAAO,MAAMI,uBACXb,cAAwC,MAAK;AAC/Ca,qBAAqBC,WAAW,GAAG;AACnCD,qBAAqBE,KAAK,GAAG;AAC7B,OAAO,MAAMC,0BAAgD;IAC3D,OAAOf,WAAWY;AACpB,EAAC;AAED,eAAeA,qBAAoB"}
@@ -0,0 +1,32 @@
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 { BesignerInspected } from './inspector-extras-context';
18
+ /**
19
+ * What the Attributes panel tells a host section about the selection
20
+ * (AGL-2908).
21
+ *
22
+ * `editable` is the drag manager's rule, which is the rule the panel already
23
+ * draws its own in-place actions under — Save as reusable component, Detach
24
+ * from component: the canvas root fails it, and so does a node whose schema
25
+ * forbids dragging, which is how locked layout chrome reaches the panel.
26
+ *
27
+ * It is computed here rather than in the section because a section is handed
28
+ * a node and nothing else. Working the rule out for itself would mean
29
+ * importing the editor into a host app or a plugin, which is exactly what
30
+ * the zone exists to avoid, and would leave two answers to one question.
31
+ */
32
+ export declare function besignerInspected(node: BesignerInspected['node'] | null | undefined): BesignerInspected | null;
@@ -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
+ */ import * as Besigner from "@aglyn/besigner";
17
+ /**
18
+ * What the Attributes panel tells a host section about the selection
19
+ * (AGL-2908).
20
+ *
21
+ * `editable` is the drag manager's rule, which is the rule the panel already
22
+ * draws its own in-place actions under — Save as reusable component, Detach
23
+ * from component: the canvas root fails it, and so does a node whose schema
24
+ * forbids dragging, which is how locked layout chrome reaches the panel.
25
+ *
26
+ * It is computed here rather than in the section because a section is handed
27
+ * a node and nothing else. Working the rule out for itself would mean
28
+ * importing the editor into a host app or a plugin, which is exactly what
29
+ * the zone exists to avoid, and would leave two answers to one question.
30
+ */ export function besignerInspected(node) {
31
+ if (!node) return null;
32
+ return {
33
+ node,
34
+ editable: Besigner.dnd.canDragNode(node)
35
+ };
36
+ }
37
+
38
+ //# sourceMappingURL=inspected-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/inspected-selection.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 * as Besigner from '@aglyn/besigner'\nimport type { BesignerInspected } from './inspector-extras-context'\n\n/**\n * What the Attributes panel tells a host section about the selection\n * (AGL-2908).\n *\n * `editable` is the drag manager's rule, which is the rule the panel already\n * draws its own in-place actions under — Save as reusable component, Detach\n * from component: the canvas root fails it, and so does a node whose schema\n * forbids dragging, which is how locked layout chrome reaches the panel.\n *\n * It is computed here rather than in the section because a section is handed\n * a node and nothing else. Working the rule out for itself would mean\n * importing the editor into a host app or a plugin, which is exactly what\n * the zone exists to avoid, and would leave two answers to one question.\n */\nexport function besignerInspected(\n node: BesignerInspected['node'] | null | undefined,\n): BesignerInspected | null {\n if (!node) return null\n return { node, editable: Besigner.dnd.canDragNode(node) }\n}\n"],"names":["Besigner","besignerInspected","node","editable","dnd","canDragNode"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,cAAc,kBAAiB;AAG3C;;;;;;;;;;;;;CAaC,GACD,OAAO,SAASC,kBACdC,IAAkD;IAElD,IAAI,CAACA,MAAM,OAAO;IAClB,OAAO;QAAEA;QAAMC,UAAUH,SAASI,GAAG,CAACC,WAAW,CAACH;IAAM;AAC1D"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { NodeSchema } from '@aglyn/aglyn';
18
+ import { type ReactNode } from 'react';
19
+ /** What the Attributes panel knows when it draws the host's section. */
20
+ export interface BesignerInspected {
21
+ /** The selected element, as the panel resolved it. */
22
+ node: NodeSchema<any>;
23
+ /**
24
+ * Whether this document's editor may change the element in place
25
+ * (AGL-2908): the panel's own rule for the actions it offers under the
26
+ * element's fields — Save as reusable component, Detach from component —
27
+ * which the canvas root and locked layout chrome fail.
28
+ *
29
+ * The panel answers it because only the panel can. A host section is
30
+ * handed a node, not the editor: it has no canvas, no drag manager and no
31
+ * business importing either to work the rule out for itself. A section
32
+ * that would change the element reads this; one that only reports on it
33
+ * ignores it.
34
+ */
35
+ editable: boolean;
36
+ }
37
+ /**
38
+ * The host's section: a node drawn as it is, or a function that draws one
39
+ * for the selected element (AGL-2984).
40
+ */
41
+ export type BesignerInspectorExtras = ReactNode | ((inspected: BesignerInspected) => ReactNode);
42
+ /**
43
+ * A section the host app appends to the Attributes panel, under the
44
+ * selected element's own fields (AGL-2940).
45
+ *
46
+ * The designer stays free of console imports: the console supplies the
47
+ * section — its plugin widget slot, rendered with the shell's own gates, and
48
+ * handed the selection when it is a function — and the panel draws whatever
49
+ * arrives. Nothing here knows what a plugin is.
50
+ */
51
+ export declare const BesignerInspectorExtrasContext: import("react").Context<BesignerInspectorExtras>;
52
+ /** The host-supplied section, or `null` when the host supplied nothing. */
53
+ export declare function useBesignerInspectorExtras(): BesignerInspectorExtras;
54
+ /** The section to draw for a selection: a function's answer for it, or the node as given. */
55
+ export declare function inspectorExtrasFor(extras: BesignerInspectorExtras, inspected: BesignerInspected): ReactNode;
56
+ export default BesignerInspectorExtrasContext;
@@ -0,0 +1,35 @@
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
+ * A section the host app appends to the Attributes panel, under the
19
+ * selected element's own fields (AGL-2940).
20
+ *
21
+ * The designer stays free of console imports: the console supplies the
22
+ * section — its plugin widget slot, rendered with the shell's own gates, and
23
+ * handed the selection when it is a function — and the panel draws whatever
24
+ * arrives. Nothing here knows what a plugin is.
25
+ */ export const BesignerInspectorExtrasContext = /*#__PURE__*/ createContext(null);
26
+ BesignerInspectorExtrasContext.displayName = 'BesignerInspectorExtrasContext';
27
+ /** The host-supplied section, or `null` when the host supplied nothing. */ export function useBesignerInspectorExtras() {
28
+ return useContext(BesignerInspectorExtrasContext);
29
+ }
30
+ /** The section to draw for a selection: a function's answer for it, or the node as given. */ export function inspectorExtrasFor(extras, inspected) {
31
+ return typeof extras === 'function' ? extras(inspected) : extras;
32
+ }
33
+ export default BesignerInspectorExtrasContext;
34
+
35
+ //# sourceMappingURL=inspector-extras-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/inspector-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 type { NodeSchema } from '@aglyn/aglyn'\nimport { createContext, useContext, type ReactNode } from 'react'\n\n/** What the Attributes panel knows when it draws the host's section. */\nexport interface BesignerInspected {\n /** The selected element, as the panel resolved it. */\n node: NodeSchema<any>\n /**\n * Whether this document's editor may change the element in place\n * (AGL-2908): the panel's own rule for the actions it offers under the\n * element's fields — Save as reusable component, Detach from component —\n * which the canvas root and locked layout chrome fail.\n *\n * The panel answers it because only the panel can. A host section is\n * handed a node, not the editor: it has no canvas, no drag manager and no\n * business importing either to work the rule out for itself. A section\n * that would change the element reads this; one that only reports on it\n * ignores it.\n */\n editable: boolean\n}\n\n/**\n * The host's section: a node drawn as it is, or a function that draws one\n * for the selected element (AGL-2984).\n */\nexport type BesignerInspectorExtras =\n | ReactNode\n | ((inspected: BesignerInspected) => ReactNode)\n\n/**\n * A section the host app appends to the Attributes panel, under the\n * selected element's own fields (AGL-2940).\n *\n * The designer stays free of console imports: the console supplies the\n * section — its plugin widget slot, rendered with the shell's own gates, and\n * handed the selection when it is a function — and the panel draws whatever\n * arrives. Nothing here knows what a plugin is.\n */\nexport const BesignerInspectorExtrasContext = createContext<BesignerInspectorExtras>(null)\nBesignerInspectorExtrasContext.displayName = 'BesignerInspectorExtrasContext'\n\n/** The host-supplied section, or `null` when the host supplied nothing. */\nexport function useBesignerInspectorExtras(): BesignerInspectorExtras {\n return useContext(BesignerInspectorExtrasContext)\n}\n\n/** The section to draw for a selection: a function's answer for it, or the node as given. */\nexport function inspectorExtrasFor(\n extras: BesignerInspectorExtras,\n inspected: BesignerInspected,\n): ReactNode {\n return typeof extras === 'function' ? extras(inspected) : extras\n}\n\nexport default BesignerInspectorExtrasContext\n"],"names":["createContext","useContext","BesignerInspectorExtrasContext","displayName","useBesignerInspectorExtras","inspectorExtrasFor","extras","inspected"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,SAASA,aAAa,EAAEC,UAAU,QAAwB,QAAO;AA6BjE;;;;;;;;CAQC,GACD,OAAO,MAAMC,+CAAiCF,cAAuC,MAAK;AAC1FE,+BAA+BC,WAAW,GAAG;AAE7C,yEAAyE,GACzE,OAAO,SAASC;IACd,OAAOH,WAAWC;AACpB;AAEA,2FAA2F,GAC3F,OAAO,SAASG,mBACdC,MAA+B,EAC/BC,SAA4B;IAE5B,OAAO,OAAOD,WAAW,aAAaA,OAAOC,aAAaD;AAC5D;AAEA,eAAeJ,+BAA8B"}
@@ -0,0 +1,99 @@
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
+ * Host-app-provided interactions for the Attributes panel (AGL-258): the
19
+ * console supplies the host's element-scoped automations and section
20
+ * experiments plus creators; the designer stays storage-agnostic and
21
+ * hides the section when no context is provided. Element selectors use
22
+ * the renderer's stable `[data-aglyn="leaf:<nodeId>"]` attribute.
23
+ */
24
+ export interface InteractionAutomation {
25
+ id: string;
26
+ name?: string;
27
+ event: string;
28
+ selector?: string;
29
+ enabled?: boolean;
30
+ }
31
+ export interface SectionExperimentRef {
32
+ id: string;
33
+ name?: string;
34
+ nodeId?: string;
35
+ status?: string;
36
+ }
37
+ export type InteractionTriggerEvent = 'elementClick' | 'elementVisible' | 'scrollToElement' | 'elementHoverEnter' | 'elementHoverLeave';
38
+ /**
39
+ * A ready-to-persist interaction resolved from a preset's templates
40
+ * (AGL-589): every ref is already a concrete `[data-aglyn="leaf:<id>"]`
41
+ * selector. The host app validates and writes it like a builder save.
42
+ */
43
+ export interface PresetInteractionDraftStep {
44
+ type: string;
45
+ selector: string;
46
+ delayMs?: number;
47
+ dismissOn?: string[];
48
+ }
49
+ export interface PresetInteractionDraft {
50
+ name: string;
51
+ event: InteractionTriggerEvent | string;
52
+ selector: string;
53
+ steps: PresetInteractionDraftStep[];
54
+ }
55
+ export interface InteractionsContextValue {
56
+ /** The host's site-event automations (for per-element listing). */
57
+ automations?: InteractionAutomation[];
58
+ /** Screen/section experiments (badges + duplication guard). */
59
+ sectionExperiments?: SectionExperimentRef[];
60
+ /**
61
+ * Opens the interaction builder for a new automation bound to the
62
+ * node's element selector — trigger, steps, and frequency configure
63
+ * inline without leaving the besigner (AGL-319).
64
+ */
65
+ onCreateInteraction?: (options: {
66
+ nodeId: string;
67
+ event: InteractionTriggerEvent;
68
+ }) => void;
69
+ /** Reopens the builder for an existing element automation (AGL-319). */
70
+ onEditInteraction?: (options: {
71
+ id: string;
72
+ nodeId: string;
73
+ }) => void;
74
+ /** Creates a draft section experiment targeting the node. */
75
+ onCreateSectionExperiment?: (options: {
76
+ nodeId: string;
77
+ }) => void;
78
+ /** Enables/disables an element automation in place (wave v7). */
79
+ onToggleInteraction?: (options: {
80
+ id: string;
81
+ enabled: boolean;
82
+ }) => void;
83
+ /**
84
+ * Persists interactions a preset declared for its inserted nodes
85
+ * (AGL-589) — fired by the add-element flow after the subtree lands
86
+ * so presets like Dropdown Panel arrive with their hover choreography
87
+ * already wired and enabled.
88
+ */
89
+ onCreatePresetInteractions?: (options: {
90
+ interactions: PresetInteractionDraft[];
91
+ }) => void;
92
+ /** Soft-deletes an element automation (wave v7). */
93
+ onDeleteInteraction?: (options: {
94
+ id: string;
95
+ }) => void;
96
+ }
97
+ export declare const InteractionsContext: import("react").Context<InteractionsContextValue>;
98
+ /** The selector the renderer/automations engine can target for a node. */
99
+ export declare function nodeElementSelector(nodeId: string): string;
@@ -0,0 +1,22 @@
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 InteractionsContext = createContext({});
18
+ /** The selector the renderer/automations engine can target for a node. */ export function nodeElementSelector(nodeId) {
19
+ return `[data-aglyn="leaf:${nodeId}"]`;
20
+ }
21
+
22
+ //# sourceMappingURL=interactions-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/interactions-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 { createContext } from 'react'\n\n/**\n * Host-app-provided interactions for the Attributes panel (AGL-258): the\n * console supplies the host's element-scoped automations and section\n * experiments plus creators; the designer stays storage-agnostic and\n * hides the section when no context is provided. Element selectors use\n * the renderer's stable `[data-aglyn=\"leaf:<nodeId>\"]` attribute.\n */\nexport interface InteractionAutomation {\n id: string\n name?: string\n event: string\n selector?: string\n enabled?: boolean\n}\n\nexport interface SectionExperimentRef {\n id: string\n name?: string\n nodeId?: string\n status?: string\n}\n\nexport type InteractionTriggerEvent =\n | 'elementClick'\n | 'elementVisible'\n | 'scrollToElement'\n // Hover choreography (AGL-562): mega menus, drawers, show/hide.\n | 'elementHoverEnter'\n | 'elementHoverLeave'\n\n/**\n * A ready-to-persist interaction resolved from a preset's templates\n * (AGL-589): every ref is already a concrete `[data-aglyn=\"leaf:<id>\"]`\n * selector. The host app validates and writes it like a builder save.\n */\nexport interface PresetInteractionDraftStep {\n type: string\n selector: string\n delayMs?: number\n dismissOn?: string[]\n}\n\nexport interface PresetInteractionDraft {\n name: string\n event: InteractionTriggerEvent | string\n selector: string\n steps: PresetInteractionDraftStep[]\n}\n\nexport interface InteractionsContextValue {\n /** The host's site-event automations (for per-element listing). */\n automations?: InteractionAutomation[]\n /** Screen/section experiments (badges + duplication guard). */\n sectionExperiments?: SectionExperimentRef[]\n /**\n * Opens the interaction builder for a new automation bound to the\n * node's element selector — trigger, steps, and frequency configure\n * inline without leaving the besigner (AGL-319).\n */\n onCreateInteraction?: (options: {\n nodeId: string\n event: InteractionTriggerEvent\n }) => void\n /** Reopens the builder for an existing element automation (AGL-319). */\n onEditInteraction?: (options: { id: string; nodeId: string }) => void\n /** Creates a draft section experiment targeting the node. */\n onCreateSectionExperiment?: (options: { nodeId: string }) => void\n /** Enables/disables an element automation in place (wave v7). */\n onToggleInteraction?: (options: { id: string; enabled: boolean }) => void\n /**\n * Persists interactions a preset declared for its inserted nodes\n * (AGL-589) — fired by the add-element flow after the subtree lands\n * so presets like Dropdown Panel arrive with their hover choreography\n * already wired and enabled.\n */\n onCreatePresetInteractions?: (options: {\n interactions: PresetInteractionDraft[]\n }) => void\n /** Soft-deletes an element automation (wave v7). */\n onDeleteInteraction?: (options: { id: string }) => void\n}\n\nexport const InteractionsContext = createContext<InteractionsContextValue>({})\n\n/** The selector the renderer/automations engine can target for a node. */\nexport function nodeElementSelector(nodeId: string): string {\n return `[data-aglyn=\"leaf:${nodeId}\"]`\n}\n"],"names":["createContext","InteractionsContext","nodeElementSelector","nodeId"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,aAAa,QAAQ,QAAO;AAoFrC,OAAO,MAAMC,sBAAsBD,cAAwC,CAAC,GAAE;AAE9E,wEAAwE,GACxE,OAAO,SAASE,oBAAoBC,MAAc;IAChD,OAAO,CAAC,kBAAkB,EAAEA,OAAO,EAAE,CAAC;AACxC"}
@@ -0,0 +1,37 @@
1
+ import type * as Aglyn from '@aglyn/aglyn';
2
+ export type LayoutChromeContextValue = {
3
+ /**
4
+ * Read-only canvas holding the bound layout's nodes. The viewport renders
5
+ * it as non-interactive chrome around the editable screen canvas; absent,
6
+ * the screen renders bare (today's behavior).
7
+ */
8
+ chromeCanvas?: Aglyn.CanvasManager;
9
+ };
10
+ export declare const LayoutChromeContext: import("react").Context<LayoutChromeContextValue>;
11
+ export declare function useLayoutChromeContext(): LayoutChromeContextValue;
12
+ /**
13
+ * Builds the read-only chrome canvas from a layout version's node map.
14
+ * Returns undefined without nodes so unbound screens skip chrome entirely.
15
+ *
16
+ * `reusableDefinitions` (host components keyed by id) grafts the layout's
17
+ * reusable instances before the canvas loads (AGL-1217). The placeholder an
18
+ * unexpanded instance renders is the EDITOR's UX — it names what you would
19
+ * be selecting in the document that owns it — but chrome is not editable
20
+ * from here, so on this canvas it is just a dashed grey box where the site
21
+ * shows the nav. Grafting into the chrome canvas alone keeps the layout's
22
+ * own editor untouched, and chrome stays as locked as it was: expansion
23
+ * only adds nodes to a canvas the viewport already renders non-interactive.
24
+ * Omitted or undefined, the graft no-ops and chrome renders as it did.
25
+ */
26
+ export declare function useLayoutChromeCanvas(layoutNodes: Aglyn.ProcessableNodes | undefined, reusableDefinitions?: Record<string, Aglyn.ReusableComponentTree>,
27
+ /**
28
+ * The layout's declared properties and this screen's values for them
29
+ * (AGL-2893), applied before anything is grafted — the composition the
30
+ * published page runs, so the chrome shows the banner, copy and choices
31
+ * this screen will publish with.
32
+ */
33
+ layoutProps?: {
34
+ props?: Aglyn.ReusableComponentProp[] | null;
35
+ values?: Record<string, unknown> | null;
36
+ }): Aglyn.CanvasManager | undefined;
37
+ export default LayoutChromeContext;
@@ -0,0 +1,75 @@
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 { aglyn, applyLayoutProps, CanvasManager, composeReusableComponentNodes, NODE_ROOT_ID } from "@aglyn/aglyn";
19
+ import { createContext, useContext, useMemo } from "react";
20
+ export const LayoutChromeContext = /*#__PURE__*/ createContext({});
21
+ LayoutChromeContext.displayName = 'LayoutChromeContext';
22
+ export function useLayoutChromeContext() {
23
+ return useContext(LayoutChromeContext);
24
+ }
25
+ /**
26
+ * Builds the read-only chrome canvas from a layout version's node map.
27
+ * Returns undefined without nodes so unbound screens skip chrome entirely.
28
+ *
29
+ * `reusableDefinitions` (host components keyed by id) grafts the layout's
30
+ * reusable instances before the canvas loads (AGL-1217). The placeholder an
31
+ * unexpanded instance renders is the EDITOR's UX — it names what you would
32
+ * be selecting in the document that owns it — but chrome is not editable
33
+ * from here, so on this canvas it is just a dashed grey box where the site
34
+ * shows the nav. Grafting into the chrome canvas alone keeps the layout's
35
+ * own editor untouched, and chrome stays as locked as it was: expansion
36
+ * only adds nodes to a canvas the viewport already renders non-interactive.
37
+ * Omitted or undefined, the graft no-ops and chrome renders as it did.
38
+ */ export function useLayoutChromeCanvas(layoutNodes, reusableDefinitions, /**
39
+ * The layout's declared properties and this screen's values for them
40
+ * (AGL-2893), applied before anything is grafted — the composition the
41
+ * published page runs, so the chrome shows the banner, copy and choices
42
+ * this screen will publish with.
43
+ */ layoutProps) {
44
+ const declared = layoutProps == null ? void 0 : layoutProps.props;
45
+ const values = layoutProps == null ? void 0 : layoutProps.values;
46
+ return useMemo(()=>{
47
+ var _applyLayoutProps;
48
+ if (!layoutNodes) return undefined;
49
+ // Separate store instance so edits, history, and persistence stay on the
50
+ // global screen canvas — but backed by the real app: node getters reach
51
+ // through store.aglyn.components to resolve component schemas.
52
+ const canvas = new CanvasManager(aglyn);
53
+ // Cast as the tenant pipeline and Preview do: the canvas's `NodeSchema`
54
+ // makes `componentId` optional, the graft's `AglynNodeSchema` requires
55
+ // it, and neither side is wrong about its own half of the trip.
56
+ const nodes = _extends({}, composeReusableComponentNodes((_applyLayoutProps = applyLayoutProps(layoutNodes, declared, values)) != null ? _applyLayoutProps : layoutNodes, reusableDefinitions));
57
+ // Early seeds stored roots without $id, letting the canvas assign a
58
+ // random one — pin the root to its canonical id before loading.
59
+ if (nodes[NODE_ROOT_ID]) {
60
+ nodes[NODE_ROOT_ID] = _extends({}, nodes[NODE_ROOT_ID], {
61
+ $id: NODE_ROOT_ID
62
+ });
63
+ }
64
+ canvas.setNodes(canvas.processNodesToDenormalized(nodes));
65
+ return canvas;
66
+ }, [
67
+ layoutNodes,
68
+ reusableDefinitions,
69
+ declared,
70
+ values
71
+ ]);
72
+ }
73
+ export default LayoutChromeContext;
74
+
75
+ //# sourceMappingURL=layout-chrome-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/layout-chrome-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'use client'\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport {\n aglyn,\n applyLayoutProps,\n CanvasManager,\n composeReusableComponentNodes,\n NODE_ROOT_ID,\n} from '@aglyn/aglyn'\nimport { createContext, useContext, useMemo } from 'react'\n\nexport type LayoutChromeContextValue = {\n /**\n * Read-only canvas holding the bound layout's nodes. The viewport renders\n * it as non-interactive chrome around the editable screen canvas; absent,\n * the screen renders bare (today's behavior).\n */\n chromeCanvas?: Aglyn.CanvasManager\n}\n\nexport const LayoutChromeContext = createContext<LayoutChromeContextValue>({})\nLayoutChromeContext.displayName = 'LayoutChromeContext'\n\nexport function useLayoutChromeContext() {\n return useContext(LayoutChromeContext)\n}\n\n/**\n * Builds the read-only chrome canvas from a layout version's node map.\n * Returns undefined without nodes so unbound screens skip chrome entirely.\n *\n * `reusableDefinitions` (host components keyed by id) grafts the layout's\n * reusable instances before the canvas loads (AGL-1217). The placeholder an\n * unexpanded instance renders is the EDITOR's UX — it names what you would\n * be selecting in the document that owns it — but chrome is not editable\n * from here, so on this canvas it is just a dashed grey box where the site\n * shows the nav. Grafting into the chrome canvas alone keeps the layout's\n * own editor untouched, and chrome stays as locked as it was: expansion\n * only adds nodes to a canvas the viewport already renders non-interactive.\n * Omitted or undefined, the graft no-ops and chrome renders as it did.\n */\nexport function useLayoutChromeCanvas(\n layoutNodes: Aglyn.ProcessableNodes | undefined,\n reusableDefinitions?: Record<string, Aglyn.ReusableComponentTree>,\n /**\n * The layout's declared properties and this screen's values for them\n * (AGL-2893), applied before anything is grafted — the composition the\n * published page runs, so the chrome shows the banner, copy and choices\n * this screen will publish with.\n */\n layoutProps?: {\n props?: Aglyn.ReusableComponentProp[] | null\n values?: Record<string, unknown> | null\n },\n): Aglyn.CanvasManager | undefined {\n const declared = layoutProps?.props\n const values = layoutProps?.values\n return useMemo(() => {\n if (!layoutNodes) return undefined\n // Separate store instance so edits, history, and persistence stay on the\n // global screen canvas — but backed by the real app: node getters reach\n // through store.aglyn.components to resolve component schemas.\n const canvas = new CanvasManager(aglyn)\n // Cast as the tenant pipeline and Preview do: the canvas's `NodeSchema`\n // makes `componentId` optional, the graft's `AglynNodeSchema` requires\n // it, and neither side is wrong about its own half of the trip.\n const nodes = {\n ...(composeReusableComponentNodes(\n (applyLayoutProps(layoutNodes as any, declared, values) ??\n layoutNodes) as any,\n reusableDefinitions as any,\n ) as Record<string, Aglyn.NodeSchema>),\n }\n // Early seeds stored roots without $id, letting the canvas assign a\n // random one — pin the root to its canonical id before loading.\n if (nodes[NODE_ROOT_ID]) {\n nodes[NODE_ROOT_ID] = {\n ...nodes[NODE_ROOT_ID],\n $id: NODE_ROOT_ID,\n }\n }\n canvas.setNodes(canvas.processNodesToDenormalized(nodes))\n return canvas\n }, [layoutNodes, reusableDefinitions, declared, values])\n}\n\nexport default LayoutChromeContext\n"],"names":["aglyn","applyLayoutProps","CanvasManager","composeReusableComponentNodes","NODE_ROOT_ID","createContext","useContext","useMemo","LayoutChromeContext","displayName","useLayoutChromeContext","useLayoutChromeCanvas","layoutNodes","reusableDefinitions","layoutProps","declared","props","values","undefined","canvas","nodes","$id","setNodes","processNodesToDenormalized"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAGA,SACEA,KAAK,EACLC,gBAAgB,EAChBC,aAAa,EACbC,6BAA6B,EAC7BC,YAAY,QACP,eAAc;AACrB,SAASC,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,QAAO;AAW1D,OAAO,MAAMC,oCAAsBH,cAAwC,CAAC,GAAE;AAC9EG,oBAAoBC,WAAW,GAAG;AAElC,OAAO,SAASC;IACd,OAAOJ,WAAWE;AACpB;AAEA;;;;;;;;;;;;;CAaC,GACD,OAAO,SAASG,sBACdC,WAA+C,EAC/CC,mBAAiE,EACjE;;;;;GAKC,GACDC,WAGC;IAED,MAAMC,WAAWD,+BAAAA,YAAaE,KAAK;IACnC,MAAMC,SAASH,+BAAAA,YAAaG,MAAM;IAClC,OAAOV,QAAQ;YAWRN;QAVL,IAAI,CAACW,aAAa,OAAOM;QACzB,yEAAyE;QACzE,wEAAwE;QACxE,+DAA+D;QAC/D,MAAMC,SAAS,IAAIjB,cAAcF;QACjC,wEAAwE;QACxE,uEAAuE;QACvE,gEAAgE;QAChE,MAAMoB,QAAQ,aACRjB,+BACDF,oBAAAA,iBAAiBW,aAAoBG,UAAUE,mBAA/ChB,oBACCW,aACFC;QAGJ,oEAAoE;QACpE,gEAAgE;QAChE,IAAIO,KAAK,CAAChB,aAAa,EAAE;YACvBgB,KAAK,CAAChB,aAAa,GAAG,aACjBgB,KAAK,CAAChB,aAAa;gBACtBiB,KAAKjB;;QAET;QACAe,OAAOG,QAAQ,CAACH,OAAOI,0BAA0B,CAACH;QAClD,OAAOD;IACT,GAAG;QAACP;QAAaC;QAAqBE;QAAUE;KAAO;AACzD;AAEA,eAAeT,oBAAmB"}
@@ -0,0 +1,74 @@
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 { MediaRef } from '@aglyn/aglyn';
18
+ import { type MediaAssetFacts } from '@aglyn/aglyn/app-utils/media-asset-facts';
19
+ /**
20
+ * What each placed library asset's DAM document records NOW, for the canvas
21
+ * (AGL-2838, AGL-2856).
22
+ *
23
+ * Picking a library asset copies facts onto its node: a film's running time,
24
+ * frame pair and poster flag, an image's pixel pair. A replace rewrites the
25
+ * asset and cannot rewrite the nodes. The published page lays the asset's
26
+ * current records over the node when it is composed (AGL-2807, AGL-2833); a
27
+ * canvas drawing the node's props alone would show the replaced file's shape
28
+ * instead.
29
+ *
30
+ * The designer does not read Firestore — it renders inside a plugin sandbox,
31
+ * and the documents are the host app's to know, which is the same reason
32
+ * `MediaPickerContext` carries the approved image hosts. So the host app
33
+ * supplies a source, the canvas holds the assets it is drawing, and
34
+ * `useMediaAssetFactsOverlay` lays each answer over the render copy through
35
+ * `applyMediaAssetFacts`, the published page's own rule.
36
+ *
37
+ * ABSENT when no host app answers for assets: every placement then renders
38
+ * from its stored props.
39
+ */
40
+ export interface MediaAssetFactsSource {
41
+ /**
42
+ * The facts filed under `mediaAssetFactsKey`, or `undefined` while nothing
43
+ * has answered for that asset. Pending, refused, deleted and failed are all
44
+ * `undefined`, because each of them renders the node's stored props.
45
+ */
46
+ get(key: string): MediaAssetFacts | undefined;
47
+ /**
48
+ * Keeps the asset's document read while the caller holds it, and returns
49
+ * the release. Holds are counted, so two placements of one asset share a
50
+ * read and the read ends with the last of them.
51
+ */
52
+ retain(ref: MediaRef): () => void;
53
+ /** Called after any asset's answer changes. Returns the unsubscribe. */
54
+ subscribe(listener: () => void): () => void;
55
+ /** Moves on every change, so a subscriber can tell a new answer apart. */
56
+ getVersion(): number;
57
+ }
58
+ /** The source, plus the two ends the host app drives it from. */
59
+ export interface MediaAssetFactsStore extends MediaAssetFactsSource {
60
+ /** Files an asset's answer; `undefined` withdraws it. */
61
+ set(key: string, facts: MediaAssetFacts | undefined): void;
62
+ /**
63
+ * The assets something currently holds, one per key. The array is replaced
64
+ * only when that set changes, which is the stable snapshot
65
+ * `useSyncExternalStore` needs to render one reader per asset.
66
+ */
67
+ getRetained(): readonly MediaRef[];
68
+ /** Called after the held set changes. Returns the unsubscribe. */
69
+ subscribeRetained(listener: () => void): () => void;
70
+ }
71
+ /** An in-memory store. How each asset is read is the host app's business. */
72
+ export declare function createMediaAssetFactsStore(): MediaAssetFactsStore;
73
+ export declare const MediaAssetFactsContext: import("react").Context<MediaAssetFactsSource>;
74
+ export default MediaAssetFactsContext;
@@ -0,0 +1,27 @@
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: the overlay rules stay out of every `@aglyn/aglyn` barrel.
17
+ import { mediaAssetFactsKey } from "@aglyn/aglyn/app-utils/media-asset-facts";
18
+ import { createContext } from "react";
19
+ import { createHeldAnswersStore } from "../utils/held-answers-store.js";
20
+ /** An in-memory store. How each asset is read is the host app's business. */ export function createMediaAssetFactsStore() {
21
+ return createHeldAnswersStore(mediaAssetFactsKey);
22
+ }
23
+ export const MediaAssetFactsContext = createContext(undefined);
24
+ MediaAssetFactsContext.displayName = 'MediaAssetFactsContext';
25
+ export default MediaAssetFactsContext;
26
+
27
+ //# sourceMappingURL=media-asset-facts-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/contexts/media-asset-facts-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 { MediaRef } from '@aglyn/aglyn'\n// By path: the overlay rules stay out of every `@aglyn/aglyn` barrel.\nimport {\n type MediaAssetFacts,\n mediaAssetFactsKey,\n} from '@aglyn/aglyn/app-utils/media-asset-facts'\nimport { createContext } from 'react'\nimport { createHeldAnswersStore } from '../utils/held-answers-store'\n\n/**\n * What each placed library asset's DAM document records NOW, for the canvas\n * (AGL-2838, AGL-2856).\n *\n * Picking a library asset copies facts onto its node: a film's running time,\n * frame pair and poster flag, an image's pixel pair. A replace rewrites the\n * asset and cannot rewrite the nodes. The published page lays the asset's\n * current records over the node when it is composed (AGL-2807, AGL-2833); a\n * canvas drawing the node's props alone would show the replaced file's shape\n * instead.\n *\n * The designer does not read Firestore — it renders inside a plugin sandbox,\n * and the documents are the host app's to know, which is the same reason\n * `MediaPickerContext` carries the approved image hosts. So the host app\n * supplies a source, the canvas holds the assets it is drawing, and\n * `useMediaAssetFactsOverlay` lays each answer over the render copy through\n * `applyMediaAssetFacts`, the published page's own rule.\n *\n * ABSENT when no host app answers for assets: every placement then renders\n * from its stored props.\n */\nexport interface MediaAssetFactsSource {\n /**\n * The facts filed under `mediaAssetFactsKey`, or `undefined` while nothing\n * has answered for that asset. Pending, refused, deleted and failed are all\n * `undefined`, because each of them renders the node's stored props.\n */\n get(key: string): MediaAssetFacts | undefined\n /**\n * Keeps the asset's document read while the caller holds it, and returns\n * the release. Holds are counted, so two placements of one asset share a\n * read and the read ends with the last of them.\n */\n retain(ref: MediaRef): () => void\n /** Called after any asset's answer changes. Returns the unsubscribe. */\n subscribe(listener: () => void): () => void\n /** Moves on every change, so a subscriber can tell a new answer apart. */\n getVersion(): number\n}\n\n/** The source, plus the two ends the host app drives it from. */\nexport interface MediaAssetFactsStore extends MediaAssetFactsSource {\n /** Files an asset's answer; `undefined` withdraws it. */\n set(key: string, facts: MediaAssetFacts | undefined): void\n /**\n * The assets something currently holds, one per key. The array is replaced\n * only when that set changes, which is the stable snapshot\n * `useSyncExternalStore` needs to render one reader per asset.\n */\n getRetained(): readonly MediaRef[]\n /** Called after the held set changes. Returns the unsubscribe. */\n subscribeRetained(listener: () => void): () => void\n}\n\n/** An in-memory store. How each asset is read is the host app's business. */\nexport function createMediaAssetFactsStore(): MediaAssetFactsStore {\n return createHeldAnswersStore<MediaRef, MediaAssetFacts>(mediaAssetFactsKey)\n}\n\nexport const MediaAssetFactsContext = createContext<\n MediaAssetFactsSource | undefined\n>(undefined)\nMediaAssetFactsContext.displayName = 'MediaAssetFactsContext'\n\nexport default MediaAssetFactsContext\n"],"names":["mediaAssetFactsKey","createContext","createHeldAnswersStore","createMediaAssetFactsStore","MediaAssetFactsContext","undefined","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAGD,sEAAsE;AACtE,SAEEA,kBAAkB,QACb,2CAA0C;AACjD,SAASC,aAAa,QAAQ,QAAO;AACrC,SAASC,sBAAsB,QAAQ,iCAA6B;AAwDpE,2EAA2E,GAC3E,OAAO,SAASC;IACd,OAAOD,uBAAkDF;AAC3D;AAEA,OAAO,MAAMI,yBAAyBH,cAEpCI,WAAU;AACZD,uBAAuBE,WAAW,GAAG;AAErC,eAAeF,uBAAsB"}