@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,228 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
3
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
4
+ /**
5
+ * @license
6
+ * Copyright 2026 Aglyn LLC
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */ import { ICON_VARIANT_COLLAPSIBLE_OPEN } from "@aglyn/shared-data-enums";
20
+ import { HelpTip, MdiIcon } from "@aglyn/shared-ui-jsx";
21
+ import { styled } from "@aglyn/shared-ui-theme";
22
+ import { Accordion as MuiAccordion, AccordionDetails as MuiAccordionDetails, AccordionSummary as MuiAccordionSummary } from "@mui/material";
23
+ import { observer } from "mobx-react-lite";
24
+ import { forwardRef, useCallback, useState } from "react";
25
+ const StyledAccordion = styled(MuiAccordion)(({ theme })=>{
26
+ var _ref, _ref1;
27
+ var _tv_palette_surface, _tv_palette_background;
28
+ // In CSS vars mode, theme.palette.* is always the static light values.
29
+ // Use (theme.vars || theme) so these become live CSS custom-property refs.
30
+ const tv = theme.vars || theme;
31
+ return {
32
+ border: `1px solid ${tv.palette.divider}`,
33
+ borderLeft: 0,
34
+ borderRight: 0,
35
+ // Collapse the shared edge between stacked accordions. Keyed off the
36
+ // preceding sibling rather than `:not(:last-of-type)`, which compares
37
+ // against every sibling *div* — so a run followed by any other element
38
+ // (the styles panel ends with a Container) matched no accordion at all
39
+ // and the stack lost its closing border. For a contiguous run the two
40
+ // are equivalent: n top edges + 1 bottom, vs 1 top + n bottom edges.
41
+ '& + &': {
42
+ borderTop: 0
43
+ },
44
+ '&:before': {
45
+ display: 'none'
46
+ },
47
+ '& .MuiAccordionSummary-root': {
48
+ textTransform: 'uppercase',
49
+ /*
50
+ * `surface` is an AGLYN palette extension, not a MUI one, so it is absent
51
+ * from any theme that did not come from `console.theme.ts` — a
52
+ * self-hosted deployment with its own palette, and every test that mounts
53
+ * a component containing this one under a bare `createTheme()`. Reading
54
+ * it unguarded did not degrade there, it THREW, which turns "this
55
+ * accordion is the wrong grey" into "the panel does not render".
56
+ */ backgroundColor: (_ref = (_ref1 = (_tv_palette_surface = tv.palette.surface) == null ? void 0 : _tv_palette_surface.main) != null ? _ref1 : (_tv_palette_background = tv.palette.background) == null ? void 0 : _tv_palette_background.paper) != null ? _ref : undefined,
57
+ flexDirection: 'row-reverse',
58
+ minHeight: 38,
59
+ fontSize: theme.typography.pxToRem(14),
60
+ '& .MuiAccordionSummary-expandIconWrapper.Mui-expanded': {
61
+ transform: 'rotate(90deg)'
62
+ },
63
+ '& .MuiAccordionSummary-content': {
64
+ marginLeft: theme.spacing(1),
65
+ marginBottom: theme.spacing(1),
66
+ marginTop: theme.spacing(1)
67
+ },
68
+ '&': {}
69
+ },
70
+ '& .MuiAccordionDetails-root': {
71
+ padding: theme.spacing(2),
72
+ borderTop: `1px solid ${tv.palette.divider}`
73
+ }
74
+ };
75
+ });
76
+ export const Accordion = /*#__PURE__*/ forwardRef((props, ref)=>{
77
+ const { expanded: expandedProp, onChange, AccordionSummaryProps, AccordionDetailsProps, summary, help, children } = props, rest = _object_without_properties_loose(props, [
78
+ "expanded",
79
+ "onChange",
80
+ "AccordionSummaryProps",
81
+ "AccordionDetailsProps",
82
+ "summary",
83
+ "help",
84
+ "children"
85
+ ]);
86
+ // Always a boolean so MUI sees a controlled Accordion from the first
87
+ // render — seeding with an omitted (undefined) prop rendered it
88
+ // uncontrolled until the first toggle flipped it controlled (AGL-590).
89
+ const [expanded, setExpanded] = useState(Boolean(expandedProp));
90
+ // ...and it has to keep FOLLOWING the prop, not just start from it
91
+ // (AGL-2486). Seeding once made this a write-only prop: a parent that
92
+ // opened a group after mount changed `expandedProp` and nothing moved,
93
+ // which is how a search whose results group is created asynchronously
94
+ // rendered shut and showed an empty panel. Adjusted during render rather
95
+ // than in an effect so the open state never commits a frame behind the
96
+ // prop — an effect would paint the group shut first and animate it open.
97
+ const [lastExpandedProp, setLastExpandedProp] = useState(expandedProp);
98
+ if (expandedProp !== lastExpandedProp) {
99
+ setLastExpandedProp(expandedProp);
100
+ setExpanded(Boolean(expandedProp));
101
+ }
102
+ const handleToggle = useCallback((e, expanded)=>{
103
+ setExpanded(Boolean(expanded));
104
+ onChange == null ? void 0 : onChange(e, expanded);
105
+ }, [
106
+ onChange
107
+ ]);
108
+ return /*#__PURE__*/ _jsxs(StyledAccordion, _extends({
109
+ ref: ref,
110
+ onChange: handleToggle,
111
+ elevation: 0,
112
+ expanded: expanded,
113
+ disableGutters: true,
114
+ square: true
115
+ }, rest, {
116
+ children: [
117
+ /*#__PURE__*/ _jsxs(MuiAccordionSummary, _extends({
118
+ sx: {
119
+ position: 'sticky',
120
+ top: 0,
121
+ zIndex: 5
122
+ },
123
+ expandIcon: /*#__PURE__*/ _jsx(MdiIcon, {
124
+ path: ICON_VARIANT_COLLAPSIBLE_OPEN.path,
125
+ sx: {
126
+ fontSize: '0.9rem'
127
+ }
128
+ })
129
+ }, AccordionSummaryProps, {
130
+ children: [
131
+ summary,
132
+ help && /*#__PURE__*/ _jsx(HelpTip, _extends({}, help, {
133
+ sx: {
134
+ fontSize: '0.8em',
135
+ ml: 0.5,
136
+ my: -0.5
137
+ },
138
+ onClick: (event)=>event.stopPropagation()
139
+ }))
140
+ ]
141
+ })),
142
+ /*#__PURE__*/ _jsx(MuiAccordionDetails, _extends({
143
+ sx: {
144
+ zIndex: 1
145
+ }
146
+ }, AccordionDetailsProps, {
147
+ children: children
148
+ }))
149
+ ]
150
+ }));
151
+ });
152
+ export const AccordionListComponent = observer((props)=>{
153
+ const { items, defaultExpanded, onRenderSummary, onRenderDetail, AccordionProps, AccordionSummaryProps, AccordionDetailsProps, unique, getItemId, getItemHelp } = props;
154
+ const [expanded, setExpanded] = useState(()=>[
155
+ ...defaultExpanded || []
156
+ ]);
157
+ /**
158
+ * A group that appears AFTER mount opens (AGL-2486).
159
+ *
160
+ * `defaultExpanded` used to be read once, in the initialiser, so a list
161
+ * whose groups arrive later got none of them — the element pickers build
162
+ * their "Best matches" group after an await (fuse.js loads dynamically),
163
+ * so it was always a late arrival and always rendered shut. The callers
164
+ * papered over it with a `key` that remounted the whole list, which
165
+ * cannot work: the remount happens when the QUERY changes, one render
166
+ * before the results group exists.
167
+ *
168
+ * Seeded ids are remembered so this only ever opens a group the first
169
+ * time it is seen. Re-deriving from `defaultExpanded` every render would
170
+ * instead re-open every group the user deliberately closed, on the next
171
+ * unrelated render.
172
+ */ const [seeded, setSeeded] = useState(()=>[
173
+ ...defaultExpanded || []
174
+ ]);
175
+ const arrived = (defaultExpanded || []).filter((id)=>!seeded.some((seen)=>seen === id));
176
+ if (arrived.length) {
177
+ setSeeded((prev)=>[
178
+ ...prev,
179
+ ...arrived
180
+ ]);
181
+ setExpanded((prev)=>[
182
+ ...prev,
183
+ ...arrived
184
+ ]);
185
+ }
186
+ const handleToggle = useCallback((id)=>(e, expanded)=>{
187
+ setExpanded((prev)=>{
188
+ if (unique && expanded) return [
189
+ id
190
+ ];
191
+ if (unique && !expanded) return [];
192
+ const data = [
193
+ ...prev
194
+ ].filter((i)=>i !== id);
195
+ if (expanded) data.push(id);
196
+ return data;
197
+ });
198
+ }, [
199
+ unique
200
+ ]);
201
+ return /*#__PURE__*/ _jsx(_Fragment, {
202
+ children: items.map((item)=>{
203
+ const id = getItemId(item);
204
+ const isExpanded = expanded.some((i)=>i === id);
205
+ return /*#__PURE__*/ _jsx(Accordion, _extends({
206
+ expanded: isExpanded,
207
+ onChange: handleToggle(id),
208
+ elevation: 0,
209
+ disableGutters: true,
210
+ square: true,
211
+ summary: onRenderSummary({
212
+ item
213
+ }),
214
+ help: getItemHelp == null ? void 0 : getItemHelp(item),
215
+ AccordionSummaryProps: AccordionSummaryProps,
216
+ AccordionDetailsProps: AccordionDetailsProps
217
+ }, AccordionProps, {
218
+ children: onRenderDetail({
219
+ item
220
+ })
221
+ }), id);
222
+ })
223
+ });
224
+ });
225
+ AccordionListComponent.displayName = 'AccordionListComponent';
226
+ export default AccordionListComponent;
227
+
228
+ //# sourceMappingURL=accordion-list.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/accordion-list.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ICON_VARIANT_COLLAPSIBLE_OPEN } from '@aglyn/shared-data-enums'\nimport { HelpTip, type HelpTipContent, MdiIcon } from '@aglyn/shared-ui-jsx'\nimport { styled } from '@aglyn/shared-ui-theme'\nimport {\n Accordion as MuiAccordion,\n AccordionDetails as MuiAccordionDetails,\n type AccordionDetailsProps as MuiAccordionDetailsProps,\n AccordionProps as MuiAccordionProps,\n AccordionSummary as MuiAccordionSummary,\n type AccordionSummaryProps as MuiAccordionSummaryProps,\n} from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport { forwardRef, useCallback, useState } from 'react'\n\nconst StyledAccordion = styled(MuiAccordion)(({ theme }) => {\n // In CSS vars mode, theme.palette.* is always the static light values.\n // Use (theme.vars || theme) so these become live CSS custom-property refs.\n const tv = (theme as any).vars || theme\n return {\n border: `1px solid ${tv.palette.divider}`,\n borderLeft: 0,\n borderRight: 0,\n // Collapse the shared edge between stacked accordions. Keyed off the\n // preceding sibling rather than `:not(:last-of-type)`, which compares\n // against every sibling *div* — so a run followed by any other element\n // (the styles panel ends with a Container) matched no accordion at all\n // and the stack lost its closing border. For a contiguous run the two\n // are equivalent: n top edges + 1 bottom, vs 1 top + n bottom edges.\n '& + &': {\n borderTop: 0,\n },\n '&:before': {\n display: 'none',\n },\n\n '& .MuiAccordionSummary-root': {\n textTransform: 'uppercase',\n /*\n * `surface` is an AGLYN palette extension, not a MUI one, so it is absent\n * from any theme that did not come from `console.theme.ts` — a\n * self-hosted deployment with its own palette, and every test that mounts\n * a component containing this one under a bare `createTheme()`. Reading\n * it unguarded did not degrade there, it THREW, which turns \"this\n * accordion is the wrong grey\" into \"the panel does not render\".\n */\n backgroundColor:\n tv.palette.surface?.main ?? tv.palette.background?.paper ?? undefined,\n flexDirection: 'row-reverse',\n minHeight: 38,\n fontSize: theme.typography.pxToRem(14),\n\n '& .MuiAccordionSummary-expandIconWrapper.Mui-expanded': {\n transform: 'rotate(90deg)',\n },\n '& .MuiAccordionSummary-content': {\n marginLeft: theme.spacing(1),\n marginBottom: theme.spacing(1),\n marginTop: theme.spacing(1),\n },\n '&': {},\n },\n '& .MuiAccordionDetails-root': {\n padding: theme.spacing(2),\n borderTop: `1px solid ${tv.palette.divider}`,\n },\n}}) as typeof MuiAccordion\n\nexport interface AccordionProps extends MuiAccordionProps {\n AccordionSummaryProps?: MuiAccordionSummaryProps\n AccordionDetailsProps?: MuiAccordionDetailsProps\n summary?: JSX.Children\n /** Contextual help affordance rendered after the summary label (AGL-600). */\n help?: HelpTipContent\n}\n\nexport const Accordion = forwardRef<any, AccordionProps>((props, ref) => {\n const {\n expanded: expandedProp,\n onChange,\n AccordionSummaryProps,\n AccordionDetailsProps,\n summary,\n help,\n children,\n ...rest\n } = props\n // Always a boolean so MUI sees a controlled Accordion from the first\n // render — seeding with an omitted (undefined) prop rendered it\n // uncontrolled until the first toggle flipped it controlled (AGL-590).\n const [expanded, setExpanded] = useState(Boolean(expandedProp))\n\n // ...and it has to keep FOLLOWING the prop, not just start from it\n // (AGL-2486). Seeding once made this a write-only prop: a parent that\n // opened a group after mount changed `expandedProp` and nothing moved,\n // which is how a search whose results group is created asynchronously\n // rendered shut and showed an empty panel. Adjusted during render rather\n // than in an effect so the open state never commits a frame behind the\n // prop — an effect would paint the group shut first and animate it open.\n const [lastExpandedProp, setLastExpandedProp] = useState(expandedProp)\n if (expandedProp !== lastExpandedProp) {\n setLastExpandedProp(expandedProp)\n setExpanded(Boolean(expandedProp))\n }\n\n const handleToggle = useCallback(\n (e, expanded: boolean) => {\n setExpanded(Boolean(expanded))\n onChange?.(e, expanded)\n },\n [onChange],\n )\n\n return (\n <StyledAccordion\n ref={ref}\n onChange={handleToggle}\n elevation={0}\n expanded={expanded}\n disableGutters\n square\n {...rest}\n >\n <MuiAccordionSummary\n sx={{ position: 'sticky', top: 0, zIndex: 5 }}\n expandIcon={\n <MdiIcon\n path={ICON_VARIANT_COLLAPSIBLE_OPEN.path}\n sx={{ fontSize: '0.9rem' }}\n />\n }\n {...AccordionSummaryProps}\n >\n {summary}\n {help && (\n <HelpTip\n {...help}\n sx={{ fontSize: '0.8em', ml: 0.5, my: -0.5 }}\n onClick={(event) => event.stopPropagation()}\n />\n )}\n </MuiAccordionSummary>\n <MuiAccordionDetails sx={{ zIndex: 1 }} {...AccordionDetailsProps}>\n {children}\n </MuiAccordionDetails>\n </StyledAccordion>\n )\n})\n\nexport interface AccordionListProps<T = any> {\n items: T[]\n unique?: boolean\n defaultExpanded?: JSX.Key[]\n AccordionProps?: MuiAccordionProps\n AccordionSummaryProps?: MuiAccordionSummaryProps\n AccordionDetailsProps?: MuiAccordionDetailsProps\n onRenderSummary: (props: { item: T }) => JSX.Children\n onRenderDetail: (props: { item: T }) => JSX.Children\n getItemId: (item: T) => string | number\n /** Per-item help affordance on the accordion summary (AGL-2167). Returns\n * undefined for the groups that need no explanation, so a list can help\n * one group without captioning every one of them — which `AccordionProps`\n * cannot do, since it applies to all of them alike. */\n getItemHelp?: (item: T) => HelpTipContent | undefined\n}\n\nexport const AccordionListComponent = observer(\n <T,>(props: AccordionListProps<T>) => {\n const {\n items,\n defaultExpanded,\n onRenderSummary,\n onRenderDetail,\n AccordionProps,\n AccordionSummaryProps,\n AccordionDetailsProps,\n unique,\n getItemId,\n getItemHelp,\n } = props\n\n const [expanded, setExpanded] = useState<JSX.Key[]>(() => [\n ...(defaultExpanded || []),\n ])\n\n /**\n * A group that appears AFTER mount opens (AGL-2486).\n *\n * `defaultExpanded` used to be read once, in the initialiser, so a list\n * whose groups arrive later got none of them — the element pickers build\n * their \"Best matches\" group after an await (fuse.js loads dynamically),\n * so it was always a late arrival and always rendered shut. The callers\n * papered over it with a `key` that remounted the whole list, which\n * cannot work: the remount happens when the QUERY changes, one render\n * before the results group exists.\n *\n * Seeded ids are remembered so this only ever opens a group the first\n * time it is seen. Re-deriving from `defaultExpanded` every render would\n * instead re-open every group the user deliberately closed, on the next\n * unrelated render.\n */\n const [seeded, setSeeded] = useState<JSX.Key[]>(() => [\n ...(defaultExpanded || []),\n ])\n const arrived = (defaultExpanded || []).filter(\n (id) => !seeded.some((seen) => seen === id),\n )\n if (arrived.length) {\n setSeeded((prev) => [...prev, ...arrived])\n setExpanded((prev) => [...prev, ...arrived])\n }\n\n const handleToggle = useCallback(\n (id: JSX.Key) => (e, expanded: boolean) => {\n setExpanded((prev) => {\n if (unique && expanded) return [id]\n if (unique && !expanded) return []\n const data = [...prev].filter((i) => i !== id)\n if (expanded) data.push(id)\n return data\n })\n },\n [unique],\n )\n\n return (\n <>\n {items.map((item) => {\n const id = getItemId(item)\n const isExpanded = expanded.some((i) => i === id)\n return (\n <Accordion\n key={id}\n expanded={isExpanded}\n onChange={handleToggle(id)}\n elevation={0}\n disableGutters\n square\n summary={onRenderSummary({ item })}\n help={getItemHelp?.(item)}\n AccordionSummaryProps={AccordionSummaryProps}\n AccordionDetailsProps={AccordionDetailsProps}\n {...AccordionProps}\n >\n {onRenderDetail({ item })}\n </Accordion>\n )\n })}\n </>\n )\n },\n)\nAccordionListComponent.displayName = 'AccordionListComponent'\n\nexport default AccordionListComponent\n"],"names":["ICON_VARIANT_COLLAPSIBLE_OPEN","HelpTip","MdiIcon","styled","Accordion","MuiAccordion","AccordionDetails","MuiAccordionDetails","AccordionSummary","MuiAccordionSummary","observer","forwardRef","useCallback","useState","StyledAccordion","theme","tv","vars","border","palette","divider","borderLeft","borderRight","borderTop","display","textTransform","backgroundColor","surface","main","background","paper","undefined","flexDirection","minHeight","fontSize","typography","pxToRem","transform","marginLeft","spacing","marginBottom","marginTop","padding","props","ref","expanded","expandedProp","onChange","AccordionSummaryProps","AccordionDetailsProps","summary","help","children","rest","setExpanded","Boolean","lastExpandedProp","setLastExpandedProp","handleToggle","e","elevation","disableGutters","square","sx","position","top","zIndex","expandIcon","path","ml","my","onClick","event","stopPropagation","AccordionListComponent","items","defaultExpanded","onRenderSummary","onRenderDetail","AccordionProps","unique","getItemId","getItemHelp","seeded","setSeeded","arrived","filter","id","some","seen","length","prev","data","i","push","map","item","isExpanded","displayName"],"mappings":"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"}
@@ -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
+ */
17
+ import { type StackProps } from '@mui/material';
18
+ export interface AddControlsProps extends StackProps {
19
+ }
20
+ declare const AddControlsComponent: import("react").ForwardRefExoticComponent<Omit<AddControlsProps, "ref"> & import("react").RefAttributes<any>>;
21
+ export { AddControlsComponent };
22
+ export default AddControlsComponent;
@@ -0,0 +1,50 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * @license
5
+ * Copyright 2026 Aglyn LLC
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */ import * as Besigner from "@aglyn/besigner";
19
+ import { ICON_VARIANT_MODIFY_ADD } from "@aglyn/shared-data-enums";
20
+ import { MdiIcon } from "@aglyn/shared-ui-jsx";
21
+ import { IconButton as MuiIconButton, Stack as MuiStack, Tooltip as MuiTooltip } from "@mui/material";
22
+ import { forwardRef } from "react";
23
+ import useAddElementDrawerCallback from "../hooks/use-add-element-drawer-callback.js";
24
+ const AddControlsComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
25
+ const handleAddElementClick = useAddElementDrawerCallback();
26
+ return /*#__PURE__*/ _jsx(MuiStack, _extends({
27
+ ref: ref,
28
+ direction: "row",
29
+ spacing: 1
30
+ }, props, {
31
+ children: /*#__PURE__*/ _jsx(MuiTooltip, {
32
+ title: 'Add element',
33
+ children: /*#__PURE__*/ _jsx(MuiIconButton, {
34
+ "aria-haspopup": "menu",
35
+ "aria-label": "add-element",
36
+ onClick: ()=>handleAddElementClick(Besigner.focus.getLastSelected()),
37
+ children: /*#__PURE__*/ _jsx(MdiIcon, {
38
+ fontSize: "small",
39
+ path: ICON_VARIANT_MODIFY_ADD.path
40
+ })
41
+ })
42
+ })
43
+ }));
44
+ });
45
+ AddControlsComponent.displayName = 'AddControlsComponent';
46
+ AddControlsComponent.aglyn = true;
47
+ export { AddControlsComponent };
48
+ export default AddControlsComponent;
49
+
50
+ //# sourceMappingURL=add-controls.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/add-controls.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Besigner from '@aglyn/besigner'\nimport { ICON_VARIANT_MODIFY_ADD } from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport {\n IconButton as MuiIconButton,\n Stack as MuiStack,\n type StackProps,\n Tooltip as MuiTooltip,\n} from '@mui/material'\nimport { forwardRef } from 'react'\nimport useAddElementDrawerCallback from '../hooks/use-add-element-drawer-callback'\n\nexport interface AddControlsProps extends StackProps {}\n\nconst AddControlsComponent = forwardRef<any, AddControlsProps>((props, ref) => {\n const handleAddElementClick = useAddElementDrawerCallback()\n\n return (\n <MuiStack ref={ref} direction=\"row\" spacing={1} {...props}>\n <MuiTooltip title={'Add element'}>\n <MuiIconButton\n aria-haspopup=\"menu\"\n aria-label=\"add-element\"\n onClick={() =>\n handleAddElementClick(Besigner.focus.getLastSelected())\n }\n >\n <MdiIcon fontSize=\"small\" path={ICON_VARIANT_MODIFY_ADD.path} />\n </MuiIconButton>\n </MuiTooltip>\n </MuiStack>\n )\n})\nAddControlsComponent.displayName = 'AddControlsComponent'\nAddControlsComponent.aglyn = true\n\nexport { AddControlsComponent }\nexport default AddControlsComponent\n"],"names":["Besigner","ICON_VARIANT_MODIFY_ADD","MdiIcon","IconButton","MuiIconButton","Stack","MuiStack","Tooltip","MuiTooltip","forwardRef","useAddElementDrawerCallback","AddControlsComponent","props","ref","handleAddElementClick","direction","spacing","title","aria-haspopup","aria-label","onClick","focus","getLastSelected","fontSize","path","displayName","aglyn"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,cAAc,kBAAiB;AAC3C,SAASC,uBAAuB,QAAQ,2BAA0B;AAClE,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SACEC,cAAcC,aAAa,EAC3BC,SAASC,QAAQ,EAEjBC,WAAWC,UAAU,QAChB,gBAAe;AACtB,SAASC,UAAU,QAAQ,QAAO;AAClC,OAAOC,iCAAiC,8CAA0C;AAIlF,MAAMC,qCAAuBF,WAAkC,CAACG,OAAOC;IACrE,MAAMC,wBAAwBJ;IAE9B,qBACE,KAACJ;QAASO,KAAKA;QAAKE,WAAU;QAAMC,SAAS;OAAOJ;kBAClD,cAAA,KAACJ;YAAWS,OAAO;sBACjB,cAAA,KAACb;gBACCc,iBAAc;gBACdC,cAAW;gBACXC,SAAS,IACPN,sBAAsBd,SAASqB,KAAK,CAACC,eAAe;0BAGtD,cAAA,KAACpB;oBAAQqB,UAAS;oBAAQC,MAAMvB,wBAAwBuB,IAAI;;;;;AAKtE;AACAb,qBAAqBc,WAAW,GAAG;AACnCd,qBAAqBe,KAAK,GAAG;AAE7B,SAASf,oBAAoB,GAAE;AAC/B,eAAeA,qBAAoB"}
@@ -0,0 +1,29 @@
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 * as Aglyn from '@aglyn/aglyn';
18
+ import { type AppBarProps as MuiAppBarProps, type ButtonBaseProps as ButtonBaseProps } from '@mui/material';
19
+ export interface BreadcrumbItemProps extends Partial<Omit<ButtonBaseProps<'button'>, 'onClick' | 'onMouseEnter' | 'onFocusVisible'>> {
20
+ $id: Aglyn.NodeId;
21
+ lastItem?: boolean;
22
+ onClick?: (e: any, node: Aglyn.NodeSchema<any>) => void;
23
+ onMouseEnter?: (e: any, node: Aglyn.NodeSchema<any>) => void;
24
+ onFocusVisible?: (e: any, node: Aglyn.NodeSchema<any>) => void;
25
+ }
26
+ export interface AppBarBreadcrumbsComponentProps extends Partial<MuiAppBarProps> {
27
+ }
28
+ export declare const AppBarBreadcrumbsComponent: import("react").ForwardRefExoticComponent<Omit<AppBarBreadcrumbsComponentProps, "ref"> & import("react").RefAttributes<any>>;
29
+ export default AppBarBreadcrumbsComponent;
@@ -0,0 +1,279 @@
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 { _ as _extends } from "@swc/helpers/_/_extends";
17
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
18
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
+ import { canvas } from "@aglyn/aglyn";
20
+ import * as Besigner from "@aglyn/besigner";
21
+ import { generateComponentClassKeys, mergeSxProps, styled } from "@aglyn/shared-ui-theme";
22
+ import { AppBar as MuiAppBar, Breadcrumbs as MuiBreadcrumbs, breadcrumbsClasses, ButtonBase as MuiButtonBase, Chip, Stack, Toolbar as MuiToolbar } from "@mui/material";
23
+ import clsx from "clsx";
24
+ import { observer } from "mobx-react-lite";
25
+ import { forwardRef, useCallback, useEffect, useRef } from "react";
26
+ import useLeafDrop from "../hooks/use-leaf-drop.js";
27
+ const breadcrumbItemClassKey = generateComponentClassKeys('BreadcrumbItem', [
28
+ 'root',
29
+ 'lastItem',
30
+ 'hovered'
31
+ ]);
32
+ const StyledBreadcrumbs = styled(MuiBreadcrumbs)(({ theme })=>{
33
+ const tv = theme.vars || theme;
34
+ return {
35
+ lineHeight: 1,
36
+ fontSize: 11,
37
+ overflowX: 'auto',
38
+ [`.${breadcrumbsClasses.ol}`]: {
39
+ flexWrap: 'nowrap',
40
+ whiteSpace: 'nowrap'
41
+ },
42
+ [`.${breadcrumbsClasses.separator}`]: {
43
+ margin: 0,
44
+ padding: 0
45
+ },
46
+ [`.${breadcrumbsClasses.li}`]: {
47
+ marginLeft: theme.spacing(-0.5),
48
+ [`.${breadcrumbItemClassKey.root}`]: {
49
+ fontSize: 'inherit',
50
+ padding: theme.spacing(0.75),
51
+ paddingLeft: theme.spacing(1.75),
52
+ paddingRight: theme.spacing(1.75),
53
+ marginLeft: theme.spacing(-0.5),
54
+ clipPath: `polygon(calc(100% - ${theme.spacing(1)}) 0px, 100% 50%, calc(100% - ${theme.spacing(1)}) 100%, 0% 100%, ${theme.spacing(1)} 50%, 0% 0%)`,
55
+ color: tv.palette.text.primary,
56
+ background: `rgba(${tv.palette.primary.lightChannel} / ${theme.palette.action.hoverOpacity})`,
57
+ [`:hover, .${breadcrumbItemClassKey.hovered}`]: {
58
+ background: `rgba(${tv.palette.primary.lightChannel} / ${theme.palette.action.activatedOpacity})`
59
+ },
60
+ [`:focus`]: {
61
+ background: `rgba(${tv.palette.primary.lightChannel} / ${theme.palette.action.focusOpacity})`
62
+ },
63
+ [`:active`]: {
64
+ background: `rgba(${tv.palette.primary.lightChannel} / ${theme.palette.action.activatedOpacity})`
65
+ }
66
+ },
67
+ [':before']: {
68
+ content: '""',
69
+ position: 'absolute',
70
+ top: 0,
71
+ height: '100%',
72
+ width: `calc(${theme.spacing(1)} + 1px)`,
73
+ backgroundColor: tv.palette.divider,
74
+ marginLeft: theme.spacing(-0.5),
75
+ clipPath: `polygon(calc(100% - ${theme.spacing(1)}) 0px, 100% 50%, calc(100% - ${theme.spacing(1)}) 100%, 0% 100%, ${theme.spacing(1)} 50%, 0% 0%)`
76
+ },
77
+ [`:first-of-type .${breadcrumbItemClassKey.root}`]: {
78
+ clipPath: `polygon(calc(100% - ${theme.spacing(1)}) 0px, 100% 50%, calc(100% - ${theme.spacing(1)}) 100%, 0% 100%, 0% 0%, 0% 0%)`
79
+ },
80
+ [[
81
+ `:last-of-type .${breadcrumbItemClassKey.root}`,
82
+ `.${breadcrumbItemClassKey.root} .${breadcrumbItemClassKey.lastItem}`
83
+ ].join()]: {
84
+ color: tv.palette.text.primary,
85
+ background: `rgba(${tv.palette.secondary.lightChannel} / ${theme.palette.action.selectedOpacity})`,
86
+ [`:hover, ${breadcrumbItemClassKey.hovered}`]: {
87
+ background: `rgba(${tv.palette.secondary.lightChannel} / ${theme.palette.action.activatedOpacity})`
88
+ },
89
+ [`:focus, .Mui-focusVisible`]: {
90
+ background: `rgba(${tv.palette.secondary.lightChannel} / ${theme.palette.action.focusOpacity})`
91
+ },
92
+ [`:active`]: {
93
+ background: `rgba(${tv.palette.secondary.lightChannel} / ${theme.palette.action.hoverOpacity})`
94
+ }
95
+ }
96
+ }
97
+ };
98
+ });
99
+ const BreadcrumbItem = observer((props)=>{
100
+ const { children, $id, lastItem, onClick, onMouseEnter, onFocusVisible } = props, rest = _object_without_properties_loose(props, [
101
+ "children",
102
+ "$id",
103
+ "lastItem",
104
+ "onClick",
105
+ "onMouseEnter",
106
+ "onFocusVisible"
107
+ ]);
108
+ const node = canvas.getNode($id);
109
+ const isHovered = Besigner.focus.isNodeHovered(node);
110
+ const { setNodeRef: setDroppableNodeRef } = useLeafDrop(node, undefined, 'breadcrumbs');
111
+ const handleClick = useCallback((e)=>{
112
+ onClick && onClick(e, node);
113
+ }, [
114
+ onClick,
115
+ node
116
+ ]);
117
+ const handleMouseEnter = useCallback((e)=>{
118
+ onMouseEnter && onMouseEnter(e, node);
119
+ }, [
120
+ onMouseEnter,
121
+ node
122
+ ]);
123
+ const handleFocusVisible = useCallback((e)=>{
124
+ onFocusVisible && onFocusVisible(e, node);
125
+ }, [
126
+ onFocusVisible,
127
+ node
128
+ ]);
129
+ return /*#__PURE__*/ _jsx(MuiButtonBase, _extends({
130
+ ref: setDroppableNodeRef,
131
+ onClick: handleClick,
132
+ onMouseEnter: handleMouseEnter,
133
+ onFocusVisible: handleFocusVisible,
134
+ className: clsx(breadcrumbItemClassKey.root, {
135
+ [breadcrumbItemClassKey.lastItem]: lastItem,
136
+ [breadcrumbItemClassKey.hovered]: isHovered
137
+ })
138
+ }, rest, {
139
+ children: /*#__PURE__*/ _jsxs(_Fragment, {
140
+ children: [
141
+ node == null ? void 0 : node.labelShort,
142
+ children
143
+ ]
144
+ })
145
+ }));
146
+ });
147
+ const Breadcrumbs = observer((props)=>{
148
+ const { children, sx } = props, rest = _object_without_properties_loose(props, [
149
+ "children",
150
+ "sx"
151
+ ]);
152
+ const lastSelected = Besigner.focus.getLastSelected();
153
+ const selectionCount = Besigner.focus.selectionCount();
154
+ const handleClick = useCallback((e, node)=>{
155
+ Besigner.focus.setSelectedNode(node);
156
+ }, []);
157
+ const handleMouseEnter = useCallback((e, node)=>{
158
+ Besigner.focus.setHoveredNode(node);
159
+ }, []);
160
+ const handleFocusVisible = useCallback((e, node)=>{
161
+ Besigner.focus.setHoveredNode(node);
162
+ }, []);
163
+ return /*#__PURE__*/ _jsxs(StyledBreadcrumbs, _extends({
164
+ separator: null,
165
+ "aria-label": "breadcrumb",
166
+ sx: sx
167
+ }, rest, {
168
+ children: [
169
+ lastSelected == null ? void 0 : lastSelected.breadcrumbPath.map(($id)=>{
170
+ return /*#__PURE__*/ _jsx(BreadcrumbItem, {
171
+ $id: $id,
172
+ onClick: handleClick,
173
+ onMouseEnter: handleMouseEnter,
174
+ onFocusVisible: handleFocusVisible,
175
+ lastItem: (lastSelected == null ? void 0 : lastSelected.$id) === $id
176
+ }, $id);
177
+ }),
178
+ selectionCount > 1 ? /*#__PURE__*/ _jsx(Chip, {
179
+ label: `+${selectionCount - 1} selected`,
180
+ size: "small",
181
+ variant: "outlined",
182
+ color: "primary",
183
+ sx: {
184
+ ml: 0.5,
185
+ height: 18,
186
+ fontSize: '0.65rem'
187
+ }
188
+ }) : null
189
+ ]
190
+ }));
191
+ });
192
+ export const AppBarBreadcrumbsComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
193
+ const { children, sx } = props, rest = _object_without_properties_loose(props, [
194
+ "children",
195
+ "sx"
196
+ ]);
197
+ // This strip is the canvas column's bottom chrome, so it is what a
198
+ // viewport-fixed affordance in that corner would clip (AGL-2486). It
199
+ // publishes its own height as the stand-off the Assist launcher reads;
200
+ // measured rather than assumed, because "24px dense toolbar plus a
201
+ // border" is exactly the kind of constant that stops being true the
202
+ // first time a chip wraps.
203
+ const stripRef = useRef(null);
204
+ const setRefs = useCallback((node)=>{
205
+ stripRef.current = node;
206
+ if (typeof ref === 'function') ref(node);
207
+ else if (ref) ref.current = node;
208
+ }, [
209
+ ref
210
+ ]);
211
+ useEffect(()=>{
212
+ const node = stripRef.current;
213
+ if (!node) return undefined;
214
+ const root = document.documentElement;
215
+ const property = '--aglyn-assist-inset-bottom';
216
+ const publish = ()=>{
217
+ const { height } = node.getBoundingClientRect();
218
+ root.style.setProperty(property, `${Math.round(height) + 20}px`);
219
+ };
220
+ publish();
221
+ // Guarded: jsdom has no ResizeObserver, and the initial publish above
222
+ // is the part that matters — the observer only keeps it honest.
223
+ const observer = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(publish);
224
+ observer == null ? void 0 : observer.observe(node);
225
+ return ()=>{
226
+ observer == null ? void 0 : observer.disconnect();
227
+ root.style.removeProperty(property);
228
+ };
229
+ }, []);
230
+ return /*#__PURE__*/ _jsx(MuiAppBar, _extends({
231
+ ref: setRefs,
232
+ id: "aglyn:besigner-appbar-secondary",
233
+ "aria-label": "secondary app toolbar",
234
+ position: "static",
235
+ color: "surface",
236
+ component: "header",
237
+ elevation: 0,
238
+ sx: mergeSxProps({
239
+ top: 0,
240
+ // Stack above the canvas selection overlays (portaled, low z).
241
+ position: 'relative',
242
+ zIndex: 'appBar',
243
+ borderBottomWidth: '1px',
244
+ borderBottomStyle: 'solid',
245
+ borderBottomColor: 'divider',
246
+ [`& .MuiToolbar-root`]: {
247
+ minHeight: 24
248
+ }
249
+ }, sx)
250
+ }, rest, {
251
+ children: /*#__PURE__*/ _jsx(MuiToolbar, {
252
+ variant: "dense",
253
+ sx: {
254
+ px: {
255
+ xs: 0,
256
+ sm: 0
257
+ }
258
+ },
259
+ children: /*#__PURE__*/ _jsxs(Stack, {
260
+ direction: "row",
261
+ spacing: 1,
262
+ sx: {
263
+ alignItems: "center",
264
+ justifyContent: "space-between",
265
+ width: 1
266
+ },
267
+ children: [
268
+ /*#__PURE__*/ _jsx(Breadcrumbs, {}),
269
+ children
270
+ ]
271
+ })
272
+ })
273
+ }));
274
+ });
275
+ AppBarBreadcrumbsComponent.displayName = 'AppBarBreadcrumbsComponent';
276
+ AppBarBreadcrumbsComponent.aglyn = true;
277
+ export default AppBarBreadcrumbsComponent;
278
+
279
+ //# sourceMappingURL=app-bar-breadcrumbs.component.js.map