@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,203 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { _ as _extends } from "@swc/helpers/_/_extends";
17
+ import { mergeNodeSx, REUSABLE_INSTANCE_COMPONENT_ID, STYLE_OVERRIDES_ROOT_KEY } from "@aglyn/aglyn";
18
+ import { expandSxAliases } from "@aglyn/shared-data-enums";
19
+ import isEqual from "lodash-es/isEqual.js";
20
+ import { action, toJS } from "mobx";
21
+ const isPlainRecord = (value)=>typeof value === 'object' && value !== null && !Array.isArray(value);
22
+ /**
23
+ * A node's `props.sx` — the SECOND sx record every node can carry
24
+ * (AGL-1346).
25
+ *
26
+ * `Leaf` composes `mergeSxProps(sx, props.sx, node.sx)` and MUI's array
27
+ * form lets later entries win, so `node.sx` shadows `props.sx` key by key
28
+ * — but only the keys it names. Everything `props.sx` sets and `node.sx`
29
+ * does not is rendering, unshadowed, and until this issue no panel could
30
+ * see it: the Styles panel read `node.sx` alone and reported "Margin:
31
+ * default on all four edges" over a `marginInline: auto` that was
32
+ * genuinely in the layout. Presets authored the record (`props: { sx: … }`)
33
+ * and nothing could unauthor it.
34
+ *
35
+ * Returned as a live read, undefined when the node carries no such record
36
+ * or carries a non-record one (an array/callback sx composes but does not
37
+ * merge).
38
+ */ function nodePropsSx(node) {
39
+ var _node_props;
40
+ const value = node == null ? void 0 : (_node_props = node.props) == null ? void 0 : _node_props['sx'];
41
+ return isPlainRecord(value) ? value : undefined;
42
+ }
43
+ /**
44
+ * What the panel SHOWS for a plain node: `props.sx` with `node.sx` merged
45
+ * over it — the same precedence the renderer applies, so the displayed
46
+ * value is the effective one (AGL-1346).
47
+ *
48
+ * `mergeNodeSx` is the house merge (AGL-1306): responsive breakpoint
49
+ * objects cascade mobile-first, `@scheme dark` and nested selector blocks
50
+ * merge key by key, plain properties replace. Reusing it is what keeps the
51
+ * panel's reading of a shadowed value identical to the graft's.
52
+ *
53
+ * A node with no `props.sx` — every node but the ones presets touched —
54
+ * gets `node.sx` back BY IDENTITY, so nothing downstream re-renders or
55
+ * re-computes because this function exists.
56
+ */ function composedNodeSx(node) {
57
+ const nodeSx = node == null ? void 0 : node.sx;
58
+ const propsSx = nodePropsSx(node);
59
+ if (!propsSx) return nodeSx;
60
+ if (nodeSx !== undefined && !isPlainRecord(nodeSx)) return nodeSx;
61
+ return mergeNodeSx(toJS(propsSx), toJS(nodeSx));
62
+ }
63
+ /**
64
+ * Splits the panel's write back across the two records (AGL-1346).
65
+ *
66
+ * The panel hands us the whole intended sx — it always builds `next` from
67
+ * `target.sx`, which is now the COMPOSED record — so a naive
68
+ * `node.sx = next` would copy every `props.sx` key up into `node.sx` on the
69
+ * first unrelated edit. That is the migration this issue explicitly does
70
+ * NOT want: the mega-menu panels keep their entire positioning
71
+ * (`position: absolute`, `top: 100%`, `zIndex: 1300`, `bgcolor`, `p`,
72
+ * `marginInline`) in `props.sx`, and re-emitting those declarations from a
73
+ * later slot changes shorthand/longhand resolution order. So the write is a
74
+ * DIFF against the composed baseline:
75
+ *
76
+ * - a key already in `node.sx` keeps its position there and takes the new
77
+ * value (or goes, if the author cleared it);
78
+ * - a key whose new value is what `props.sx` already says is NOT copied up
79
+ * — nothing changed, so nothing is written;
80
+ * - a key the author genuinely changed is appended to `node.sx`, where it
81
+ * wins exactly as the Styles panel's output has always won;
82
+ * - a key the author CLEARED is deleted from `props.sx` as well, which is
83
+ * the half that makes the panel able to unauthor what a preset wrote.
84
+ *
85
+ * That last rule is why this edits `props.sx` in place rather than writing
86
+ * a neutralising override: there is no value that reliably means "no
87
+ * declaration" across sx keys — `unset`/`revert` are cascade keywords with
88
+ * their own meaning, and system props (`p`, `bgcolor`, `zIndex`) run
89
+ * through theme transforms first. Deleting the key is exact, and it is the
90
+ * only record involved when nothing shadows it.
91
+ *
92
+ * The invariant that makes this safe on 8,000 authored nodes: writing back
93
+ * an UNCHANGED composed record leaves both stored records byte-identical,
94
+ * key order included. Only a key the author actually touched moves.
95
+ */ function writeComposedNodeSx(node, next) {
96
+ const propsSx = nodePropsSx(node);
97
+ const current = node.sx;
98
+ if (!propsSx || current !== undefined && !isPlainRecord(current)) {
99
+ // No second record to reconcile (or an sx form that composes rather
100
+ // than merges): the write is what it always was.
101
+ node.sx = next != null ? next : {};
102
+ return;
103
+ }
104
+ const nextSx = next != null ? next : {};
105
+ // Both stored records are read in the panel's spelling (AGL-2207). The
106
+ // composed baseline the panel edits comes through `mergeNodeSx`, which
107
+ // canonicalizes MUI's system-prop aliases, so diffing against the RAW
108
+ // records would read every `p`/`bgcolor` as a key the author had just
109
+ // cleared and migrate the positioning on the first unrelated edit — the
110
+ // exact thing this function exists to prevent. Expanded, the byte-
111
+ // identical invariant holds; `props.sx` is only ever REWRITTEN below,
112
+ // when the author genuinely cleared one of its values.
113
+ const currentSx = expandSxAliases(isPlainRecord(current) ? toJS(current) : {}, {
114
+ deep: true
115
+ });
116
+ const propsRecord = expandSxAliases(toJS(propsSx), {
117
+ deep: true
118
+ });
119
+ const sx = {};
120
+ for (const key of Object.keys(currentSx)){
121
+ if (key in nextSx) sx[key] = nextSx[key];
122
+ }
123
+ for (const [key, value] of Object.entries(nextSx)){
124
+ if (key in sx) continue;
125
+ if (key in propsRecord && isEqual(propsRecord[key], value)) continue;
126
+ sx[key] = value;
127
+ }
128
+ node.sx = sx;
129
+ const cleared = Object.keys(propsRecord).filter((key)=>!(key in nextSx));
130
+ if (!cleared.length) return;
131
+ const remaining = _extends({}, propsRecord);
132
+ for (const key of cleared)delete remaining[key];
133
+ // Assigned as a fresh props object rather than mutated in place: the
134
+ // Attributes form reads `node.props` as its initial values, and a
135
+ // replaced reference is the signal it re-reads on (`updateNodeProps`
136
+ // replaces it too, for the same reason). Not routed through
137
+ // `updateNodeProps`, though — that records its own history entry, and
138
+ // this write is already inside the panel's coalesced `transact` step.
139
+ const props = _extends({}, toJS(node.props));
140
+ if (Object.keys(remaining).length) props['sx'] = remaining;
141
+ else delete props['sx'];
142
+ node.props = props;
143
+ }
144
+ /**
145
+ * The style target for a selected node — see {@link NodeStyleTarget}.
146
+ *
147
+ * `overrideKey` selects WHICH slice of an instance's overrides is edited;
148
+ * it is ignored for a plain node. A falsy key falls back to the root, so a
149
+ * caller that has not resolved a definition yet still edits something real
150
+ * rather than writing an `undefined`-keyed slice no renderer reads.
151
+ */ export function getNodeStyleTarget(node, overrideKey) {
152
+ const isInstance = (node == null ? void 0 : node.componentId) === REUSABLE_INSTANCE_COMPONENT_ID;
153
+ if (!node || !isInstance) {
154
+ return {
155
+ isInstanceOverride: false,
156
+ overrideKey: '',
157
+ isLeafOverride: false,
158
+ get sx () {
159
+ // The COMPOSED record, not `node.sx` alone (AGL-1346) — see
160
+ // `composedNodeSx`. Identity is preserved when the node has no
161
+ // `props.sx`, which is every node but the handful presets touched.
162
+ return composedNodeSx(node);
163
+ },
164
+ setSx: action((next)=>{
165
+ if (!node) return;
166
+ writeComposedNodeSx(node, next);
167
+ })
168
+ };
169
+ }
170
+ // An instance's target is deliberately NOT composed with anything
171
+ // (AGL-1346): an override slice starts empty and empty MEANS "whatever
172
+ // the component does" (AGL-1338) — merging a base into the reading is
173
+ // exactly the distinction the override badge and the Background Fill
174
+ // control exist to keep. A `props.sx` on a definition node is shown and
175
+ // cleared where it lives, by selecting that node inside the component.
176
+ const key = overrideKey || STYLE_OVERRIDES_ROOT_KEY;
177
+ return {
178
+ isInstanceOverride: true,
179
+ overrideKey: key,
180
+ isLeafOverride: key !== STYLE_OVERRIDES_ROOT_KEY,
181
+ get sx () {
182
+ var _node_styleOverrides;
183
+ return (_node_styleOverrides = node.styleOverrides) == null ? void 0 : _node_styleOverrides[key];
184
+ },
185
+ setSx: action((next)=>{
186
+ var _node_styleOverrides;
187
+ const overrides = _extends({}, toJS((_node_styleOverrides = node.styleOverrides) != null ? _node_styleOverrides : {}));
188
+ if (next && Object.keys(next).length > 0) {
189
+ overrides[key] = next;
190
+ } else {
191
+ // An emptied override is REMOVED, not stored as `{}`: the panel's
192
+ // override badge and the graft's "has an override" check must both
193
+ // read a cleared instance as clean. Only THIS slice goes — the
194
+ // instance's other targets keep theirs.
195
+ delete overrides[key];
196
+ }
197
+ node.styleOverrides = Object.keys(overrides).length > 0 ? overrides : undefined;
198
+ })
199
+ };
200
+ }
201
+ export default getNodeStyleTarget;
202
+
203
+ //# sourceMappingURL=style-target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/style-target.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport {\n mergeNodeSx,\n REUSABLE_INSTANCE_COMPONENT_ID,\n STYLE_OVERRIDES_ROOT_KEY,\n} from '@aglyn/aglyn'\nimport { expandSxAliases } from '@aglyn/shared-data-enums'\nimport isEqual from 'lodash-es/isEqual.js'\nimport { action, toJS } from 'mobx'\n\n/**\n * Where the Styles panel's edits land for the selected node (AGL-1306,\n * AGL-1332, AGL-1346).\n *\n * A plain node's edits read and write `node.sx`, exactly as they always\n * have. A reusable-component INSTANCE's edits read and write one slice of\n * `node.styleOverrides` instead — the root slice by default, or the slice\n * keyed by a DEFINITION-internal node id when the author has picked a leaf\n * inside the component. Either way the panel behaves like it does on a\n * fresh plain node (empty until this instance overrides something), and\n * the canvas/Preview/tenant render the override merged over the matching\n * component node via `composeReusableComponentNodes`. Mutating the\n * component itself from a placing document is exactly what this layer\n * exists to avoid — a leaf target styles the instance's copy of that leaf,\n * and never unlocks the component's content, which stays the component's.\n *\n * `sx` is a GETTER so observer components track the underlying MobX state\n * at read time; a snapshot captured when the target was built would go\n * stale after the first write.\n */\nexport interface NodeStyleTarget {\n /**\n * The sx record edits read from and write to (live view).\n *\n * For a plain node this is the COMPOSED record — `props.sx` with\n * `node.sx` merged over it (AGL-1346) — so what the panel displays is\n * what renders. Writes are split back across the two records by\n * {@link writeComposedNodeSx}.\n */\n readonly sx: Record<string, any> | undefined\n /** True when edits land in one of the instance's override slices. */\n readonly isInstanceOverride: boolean\n /**\n * The `styleOverrides` key being edited — `root`, or a definition-internal\n * node id. Empty string for a plain node, which has no override layer.\n */\n readonly overrideKey: string\n /** True when the target is a leaf inside the component, not its root. */\n readonly isLeafOverride: boolean\n /** Replaces the target sx wholesale (MobX action inside). */\n setSx(next: Record<string, any> | undefined): void\n}\n\nconst isPlainRecord = (value: unknown): value is Record<string, any> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\n/**\n * A node's `props.sx` — the SECOND sx record every node can carry\n * (AGL-1346).\n *\n * `Leaf` composes `mergeSxProps(sx, props.sx, node.sx)` and MUI's array\n * form lets later entries win, so `node.sx` shadows `props.sx` key by key\n * — but only the keys it names. Everything `props.sx` sets and `node.sx`\n * does not is rendering, unshadowed, and until this issue no panel could\n * see it: the Styles panel read `node.sx` alone and reported \"Margin:\n * default on all four edges\" over a `marginInline: auto` that was\n * genuinely in the layout. Presets authored the record (`props: { sx: … }`)\n * and nothing could unauthor it.\n *\n * Returned as a live read, undefined when the node carries no such record\n * or carries a non-record one (an array/callback sx composes but does not\n * merge).\n */\nfunction nodePropsSx(\n node: Aglyn.NodeSchema<any> | null | undefined,\n): Record<string, any> | undefined {\n const value = (node?.props as Record<string, any> | undefined)?.['sx']\n return isPlainRecord(value) ? value : undefined\n}\n\n/**\n * What the panel SHOWS for a plain node: `props.sx` with `node.sx` merged\n * over it — the same precedence the renderer applies, so the displayed\n * value is the effective one (AGL-1346).\n *\n * `mergeNodeSx` is the house merge (AGL-1306): responsive breakpoint\n * objects cascade mobile-first, `@scheme dark` and nested selector blocks\n * merge key by key, plain properties replace. Reusing it is what keeps the\n * panel's reading of a shadowed value identical to the graft's.\n *\n * A node with no `props.sx` — every node but the ones presets touched —\n * gets `node.sx` back BY IDENTITY, so nothing downstream re-renders or\n * re-computes because this function exists.\n */\nfunction composedNodeSx(\n node: Aglyn.NodeSchema<any> | null | undefined,\n): Record<string, any> | undefined {\n const nodeSx = node?.sx as Record<string, any> | undefined\n const propsSx = nodePropsSx(node)\n if (!propsSx) return nodeSx\n if (nodeSx !== undefined && !isPlainRecord(nodeSx)) return nodeSx\n return mergeNodeSx(toJS(propsSx), toJS(nodeSx)) as Record<string, any>\n}\n\n/**\n * Splits the panel's write back across the two records (AGL-1346).\n *\n * The panel hands us the whole intended sx — it always builds `next` from\n * `target.sx`, which is now the COMPOSED record — so a naive\n * `node.sx = next` would copy every `props.sx` key up into `node.sx` on the\n * first unrelated edit. That is the migration this issue explicitly does\n * NOT want: the mega-menu panels keep their entire positioning\n * (`position: absolute`, `top: 100%`, `zIndex: 1300`, `bgcolor`, `p`,\n * `marginInline`) in `props.sx`, and re-emitting those declarations from a\n * later slot changes shorthand/longhand resolution order. So the write is a\n * DIFF against the composed baseline:\n *\n * - a key already in `node.sx` keeps its position there and takes the new\n * value (or goes, if the author cleared it);\n * - a key whose new value is what `props.sx` already says is NOT copied up\n * — nothing changed, so nothing is written;\n * - a key the author genuinely changed is appended to `node.sx`, where it\n * wins exactly as the Styles panel's output has always won;\n * - a key the author CLEARED is deleted from `props.sx` as well, which is\n * the half that makes the panel able to unauthor what a preset wrote.\n *\n * That last rule is why this edits `props.sx` in place rather than writing\n * a neutralising override: there is no value that reliably means \"no\n * declaration\" across sx keys — `unset`/`revert` are cascade keywords with\n * their own meaning, and system props (`p`, `bgcolor`, `zIndex`) run\n * through theme transforms first. Deleting the key is exact, and it is the\n * only record involved when nothing shadows it.\n *\n * The invariant that makes this safe on 8,000 authored nodes: writing back\n * an UNCHANGED composed record leaves both stored records byte-identical,\n * key order included. Only a key the author actually touched moves.\n */\nfunction writeComposedNodeSx(\n node: Aglyn.NodeSchema<any>,\n next: Record<string, any> | undefined,\n): void {\n const propsSx = nodePropsSx(node)\n const current = node.sx as Record<string, any> | undefined\n if (!propsSx || (current !== undefined && !isPlainRecord(current))) {\n // No second record to reconcile (or an sx form that composes rather\n // than merges): the write is what it always was.\n node.sx = (next ?? {}) as any\n return\n }\n const nextSx = (next ?? {}) as Record<string, any>\n // Both stored records are read in the panel's spelling (AGL-2207). The\n // composed baseline the panel edits comes through `mergeNodeSx`, which\n // canonicalizes MUI's system-prop aliases, so diffing against the RAW\n // records would read every `p`/`bgcolor` as a key the author had just\n // cleared and migrate the positioning on the first unrelated edit — the\n // exact thing this function exists to prevent. Expanded, the byte-\n // identical invariant holds; `props.sx` is only ever REWRITTEN below,\n // when the author genuinely cleared one of its values.\n const currentSx = expandSxAliases(\n isPlainRecord(current) ? toJS(current) : {},\n { deep: true },\n )\n const propsRecord = expandSxAliases(toJS(propsSx), { deep: true })\n\n const sx: Record<string, any> = {}\n for (const key of Object.keys(currentSx)) {\n if (key in nextSx) sx[key] = nextSx[key]\n }\n for (const [key, value] of Object.entries(nextSx)) {\n if (key in sx) continue\n if (key in propsRecord && isEqual(propsRecord[key], value)) continue\n sx[key] = value\n }\n node.sx = sx as any\n\n const cleared = Object.keys(propsRecord).filter((key) => !(key in nextSx))\n if (!cleared.length) return\n const remaining = { ...propsRecord }\n for (const key of cleared) delete remaining[key]\n // Assigned as a fresh props object rather than mutated in place: the\n // Attributes form reads `node.props` as its initial values, and a\n // replaced reference is the signal it re-reads on (`updateNodeProps`\n // replaces it too, for the same reason). Not routed through\n // `updateNodeProps`, though — that records its own history entry, and\n // this write is already inside the panel's coalesced `transact` step.\n const props = { ...(toJS(node.props) as Record<string, any>) }\n if (Object.keys(remaining).length) props['sx'] = remaining\n else delete props['sx']\n node.props = props as any\n}\n\n/**\n * The style target for a selected node — see {@link NodeStyleTarget}.\n *\n * `overrideKey` selects WHICH slice of an instance's overrides is edited;\n * it is ignored for a plain node. A falsy key falls back to the root, so a\n * caller that has not resolved a definition yet still edits something real\n * rather than writing an `undefined`-keyed slice no renderer reads.\n */\nexport function getNodeStyleTarget(\n node: Aglyn.NodeSchema<any> | null | undefined,\n overrideKey?: string | null,\n): NodeStyleTarget {\n const isInstance =\n node?.componentId === REUSABLE_INSTANCE_COMPONENT_ID\n if (!node || !isInstance) {\n return {\n isInstanceOverride: false,\n overrideKey: '',\n isLeafOverride: false,\n get sx() {\n // The COMPOSED record, not `node.sx` alone (AGL-1346) — see\n // `composedNodeSx`. Identity is preserved when the node has no\n // `props.sx`, which is every node but the handful presets touched.\n return composedNodeSx(node)\n },\n setSx: action((next: Record<string, any> | undefined) => {\n if (!node) return\n writeComposedNodeSx(node, next)\n }),\n }\n }\n // An instance's target is deliberately NOT composed with anything\n // (AGL-1346): an override slice starts empty and empty MEANS \"whatever\n // the component does\" (AGL-1338) — merging a base into the reading is\n // exactly the distinction the override badge and the Background Fill\n // control exist to keep. A `props.sx` on a definition node is shown and\n // cleared where it lives, by selecting that node inside the component.\n const key = overrideKey || STYLE_OVERRIDES_ROOT_KEY\n return {\n isInstanceOverride: true,\n overrideKey: key,\n isLeafOverride: key !== STYLE_OVERRIDES_ROOT_KEY,\n get sx() {\n return (node.styleOverrides as Record<string, any> | undefined)?.[key]\n },\n setSx: action((next: Record<string, any> | undefined) => {\n const overrides: Record<string, any> = {\n ...toJS(node.styleOverrides ?? {}),\n }\n if (next && Object.keys(next).length > 0) {\n overrides[key] = next\n } else {\n // An emptied override is REMOVED, not stored as `{}`: the panel's\n // override badge and the graft's \"has an override\" check must both\n // read a cleared instance as clean. Only THIS slice goes — the\n // instance's other targets keep theirs.\n delete overrides[key]\n }\n node.styleOverrides =\n Object.keys(overrides).length > 0 ? overrides : undefined\n }),\n }\n}\n\nexport default getNodeStyleTarget\n"],"names":["mergeNodeSx","REUSABLE_INSTANCE_COMPONENT_ID","STYLE_OVERRIDES_ROOT_KEY","expandSxAliases","isEqual","action","toJS","isPlainRecord","value","Array","isArray","nodePropsSx","node","props","undefined","composedNodeSx","nodeSx","sx","propsSx","writeComposedNodeSx","next","current","nextSx","currentSx","deep","propsRecord","key","Object","keys","entries","cleared","filter","length","remaining","getNodeStyleTarget","overrideKey","isInstance","componentId","isInstanceOverride","isLeafOverride","setSx","styleOverrides","overrides"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAGD,SACEA,WAAW,EACXC,8BAA8B,EAC9BC,wBAAwB,QACnB,eAAc;AACrB,SAASC,eAAe,QAAQ,2BAA0B;AAC1D,OAAOC,aAAa,uBAAsB;AAC1C,SAASC,MAAM,EAAEC,IAAI,QAAQ,OAAM;AA6CnC,MAAMC,gBAAgB,CAACC,QACrB,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAACC,MAAMC,OAAO,CAACF;AAEhE;;;;;;;;;;;;;;;;CAgBC,GACD,SAASG,YACPC,IAA8C;QAE/BA;IAAf,MAAMJ,QAASI,yBAAAA,cAAAA,KAAMC,KAAK,qBAAZ,AAACD,WAAiD,CAAC,KAAK;IACtE,OAAOL,cAAcC,SAASA,QAAQM;AACxC;AAEA;;;;;;;;;;;;;CAaC,GACD,SAASC,eACPH,IAA8C;IAE9C,MAAMI,SAASJ,wBAAAA,KAAMK,EAAE;IACvB,MAAMC,UAAUP,YAAYC;IAC5B,IAAI,CAACM,SAAS,OAAOF;IACrB,IAAIA,WAAWF,aAAa,CAACP,cAAcS,SAAS,OAAOA;IAC3D,OAAOhB,YAAYM,KAAKY,UAAUZ,KAAKU;AACzC;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCC,GACD,SAASG,oBACPP,IAA2B,EAC3BQ,IAAqC;IAErC,MAAMF,UAAUP,YAAYC;IAC5B,MAAMS,UAAUT,KAAKK,EAAE;IACvB,IAAI,CAACC,WAAYG,YAAYP,aAAa,CAACP,cAAcc,UAAW;QAClE,oEAAoE;QACpE,iDAAiD;QACjDT,KAAKK,EAAE,GAAIG,eAAAA,OAAQ,CAAC;QACpB;IACF;IACA,MAAME,SAAUF,eAAAA,OAAQ,CAAC;IACzB,uEAAuE;IACvE,uEAAuE;IACvE,sEAAsE;IACtE,sEAAsE;IACtE,wEAAwE;IACxE,mEAAmE;IACnE,sEAAsE;IACtE,uDAAuD;IACvD,MAAMG,YAAYpB,gBAChBI,cAAcc,WAAWf,KAAKe,WAAW,CAAC,GAC1C;QAAEG,MAAM;IAAK;IAEf,MAAMC,cAActB,gBAAgBG,KAAKY,UAAU;QAAEM,MAAM;IAAK;IAEhE,MAAMP,KAA0B,CAAC;IACjC,KAAK,MAAMS,OAAOC,OAAOC,IAAI,CAACL,WAAY;QACxC,IAAIG,OAAOJ,QAAQL,EAAE,CAACS,IAAI,GAAGJ,MAAM,CAACI,IAAI;IAC1C;IACA,KAAK,MAAM,CAACA,KAAKlB,MAAM,IAAImB,OAAOE,OAAO,CAACP,QAAS;QACjD,IAAII,OAAOT,IAAI;QACf,IAAIS,OAAOD,eAAerB,QAAQqB,WAAW,CAACC,IAAI,EAAElB,QAAQ;QAC5DS,EAAE,CAACS,IAAI,GAAGlB;IACZ;IACAI,KAAKK,EAAE,GAAGA;IAEV,MAAMa,UAAUH,OAAOC,IAAI,CAACH,aAAaM,MAAM,CAAC,CAACL,MAAQ,CAAEA,CAAAA,OAAOJ,MAAK;IACvE,IAAI,CAACQ,QAAQE,MAAM,EAAE;IACrB,MAAMC,YAAY,aAAKR;IACvB,KAAK,MAAMC,OAAOI,QAAS,OAAOG,SAAS,CAACP,IAAI;IAChD,qEAAqE;IACrE,kEAAkE;IAClE,qEAAqE;IACrE,4DAA4D;IAC5D,sEAAsE;IACtE,sEAAsE;IACtE,MAAMb,QAAQ,aAAMP,KAAKM,KAAKC,KAAK;IACnC,IAAIc,OAAOC,IAAI,CAACK,WAAWD,MAAM,EAAEnB,KAAK,CAAC,KAAK,GAAGoB;SAC5C,OAAOpB,KAAK,CAAC,KAAK;IACvBD,KAAKC,KAAK,GAAGA;AACf;AAEA;;;;;;;CAOC,GACD,OAAO,SAASqB,mBACdtB,IAA8C,EAC9CuB,WAA2B;IAE3B,MAAMC,aACJxB,CAAAA,wBAAAA,KAAMyB,WAAW,MAAKpC;IACxB,IAAI,CAACW,QAAQ,CAACwB,YAAY;QACxB,OAAO;YACLE,oBAAoB;YACpBH,aAAa;YACbI,gBAAgB;YAChB,IAAItB;gBACF,4DAA4D;gBAC5D,+DAA+D;gBAC/D,mEAAmE;gBACnE,OAAOF,eAAeH;YACxB;YACA4B,OAAOnC,OAAO,CAACe;gBACb,IAAI,CAACR,MAAM;gBACXO,oBAAoBP,MAAMQ;YAC5B;QACF;IACF;IACA,kEAAkE;IAClE,uEAAuE;IACvE,sEAAsE;IACtE,qEAAqE;IACrE,wEAAwE;IACxE,uEAAuE;IACvE,MAAMM,MAAMS,eAAejC;IAC3B,OAAO;QACLoC,oBAAoB;QACpBH,aAAaT;QACba,gBAAgBb,QAAQxB;QACxB,IAAIe;gBACML;YAAR,QAAQA,uBAAAA,KAAK6B,cAAc,qBAApB,AAAC7B,oBAAyD,CAACc,IAAI;QACxE;QACAc,OAAOnC,OAAO,CAACe;gBAEHR;YADV,MAAM8B,YAAiC,aAClCpC,MAAKM,uBAAAA,KAAK6B,cAAc,YAAnB7B,uBAAuB,CAAC;YAElC,IAAIQ,QAAQO,OAAOC,IAAI,CAACR,MAAMY,MAAM,GAAG,GAAG;gBACxCU,SAAS,CAAChB,IAAI,GAAGN;YACnB,OAAO;gBACL,kEAAkE;gBAClE,mEAAmE;gBACnE,+DAA+D;gBAC/D,wCAAwC;gBACxC,OAAOsB,SAAS,CAAChB,IAAI;YACvB;YACAd,KAAK6B,cAAc,GACjBd,OAAOC,IAAI,CAACc,WAAWV,MAAM,GAAG,IAAIU,YAAY5B;QACpD;IACF;AACF;AAEA,eAAeoB,mBAAkB"}
@@ -0,0 +1,169 @@
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 { PresetChoiceOption, ThemeScaleOption } from '@aglyn/shared-ui-jsx-forms';
18
+ /**
19
+ * The theme scales the styles panel offers for Font Size, Font Weight and
20
+ * Z-Index (AGL-2486, item 12).
21
+ *
22
+ * Every option's `value` is a token path MUI's sx system resolves ITSELF —
23
+ * `fontSize` and `fontWeight` are declared with `themeKey: 'typography'` and
24
+ * `zIndex` with `themeKey: 'zIndex'`, so `h4.fontSize`, `fontWeightBold` and
25
+ * `appBar` behave exactly like `color: 'primary.main'` does. Nothing new has
26
+ * to resolve them and nothing downstream has to know these lists exist: the
27
+ * panel stores a string, the theme turns it into a number.
28
+ *
29
+ * They are built from the SITE theme rather than hardcoded, so a host that
30
+ * has retuned its type scale or added a z-index layer offers its own values,
31
+ * and the `hint` on each option is read out of that theme too — which is the
32
+ * only thing that makes `h4.fontSize` legible to an author.
33
+ */
34
+ /** The subset of a theme these builders read. */
35
+ export interface ThemeScaleSource {
36
+ typography?: Record<string, unknown>;
37
+ zIndex?: Record<string, unknown>;
38
+ /** A created theme exposes `spacing` as a FUNCTION (`spacing(2)` →
39
+ * `'16px'`); raw theme options carry the bare unit number. Both are
40
+ * accepted because both reach these builders. */
41
+ spacing?: ((factor: number) => string | number) | number;
42
+ /** `shape.borderRadius` — the unit a bare `borderRadius` number multiplies. */
43
+ shape?: {
44
+ borderRadius?: number | string;
45
+ };
46
+ /** `theme.shadows`, MUI's 25-entry elevation ladder. */
47
+ shadows?: ReadonlyArray<string>;
48
+ }
49
+ /** Font sizes from `theme.typography`, e.g. `h4.fontSize` → `2.125rem`. */
50
+ export declare function buildFontSizeScaleOptions(theme: ThemeScaleSource | undefined): ThemeScaleOption[];
51
+ export declare function buildFontWeightScaleOptions(theme: ThemeScaleSource | undefined): ThemeScaleOption[];
52
+ /**
53
+ * Stacking layers from `theme.zIndex`, ordered by the layer they sit on
54
+ * rather than alphabetically — an author picking "above the app bar" is
55
+ * reading the stack, not the key names.
56
+ *
57
+ * This is the one of the three where a raw number is usually the WRONG
58
+ * answer: typing `1300` next to a modal the theme also puts at 1300 is a
59
+ * coin toss, and a host that re-tunes its layers leaves that number behind.
60
+ */
61
+ export declare function buildZIndexScaleOptions(theme: ThemeScaleSource | undefined): ThemeScaleOption[];
62
+ /**
63
+ * One rung of the theme's spacing ladder, as the box styler offers it
64
+ * (AGL-2486, item 5).
65
+ *
66
+ * **`value` is a NUMBER and that is the whole point.** MUI's sx system
67
+ * resolves a bare number on a spacing property through `theme.spacing`, so
68
+ * `marginTop: 2` renders 16px under `spacing: 8` and 8px under `spacing: 4`
69
+ * — it keeps following the theme exactly the way `h4.fontSize` and
70
+ * `primary.main` do. Storing the resolved `'16px'` instead would be wrong
71
+ * for the same reason a flattened colour is wrong: it stops tracking the
72
+ * theme the moment anyone retunes it.
73
+ *
74
+ * The numeric form is also the ONLY one that works. MUI multiplies numbers
75
+ * and passes strings through untouched, so the string `'2'` would reach the
76
+ * browser as `margin-top: 2` and be dropped by the CSS parser.
77
+ */
78
+ export interface SpacingScaleOption {
79
+ /** The theme spacing STEP, stored as a number so MUI resolves it. */
80
+ value: number;
81
+ /** The author's name for it (`Medium`) — no CSS vocabulary required. */
82
+ label: string;
83
+ /** What it resolves to in this theme today (`16px`). */
84
+ hint: string;
85
+ }
86
+ /**
87
+ * The spacing ladder read off the SITE theme, so a host that set
88
+ * `spacing: 4` offers its own eight-step ladder rather than Aglyn's.
89
+ *
90
+ * A theme with no usable `spacing` yields an empty list, which leaves the
91
+ * styler on custom amounts only — never a ladder of numbers that resolve to
92
+ * nothing.
93
+ */
94
+ export declare function buildSpacingScaleOptions(theme: ThemeScaleSource | undefined): SpacingScaleOption[];
95
+ /** Every theme scale the style field groups need, built once per theme. */
96
+ export interface StyleThemeScales {
97
+ fontSize: ThemeScaleOption[];
98
+ fontWeight: ThemeScaleOption[];
99
+ zIndex: ThemeScaleOption[];
100
+ /** The box styler's spacing ladder (AGL-2486, item 5). */
101
+ spacing: SpacingScaleOption[];
102
+ /** Corner-radius presets on the theme's shape scale (AGL-2486). */
103
+ cornerRadius: PresetChoiceOption[];
104
+ /** Drop-shadow presets named by what they look like (AGL-2486). */
105
+ shadow: PresetChoiceOption[];
106
+ /** The theme's own faces, then web-safe stacks (AGL-2486). */
107
+ fontFamily: PresetChoiceOption[];
108
+ /** Whole typography variants — `typography: 'h2'` (AGL-2486). */
109
+ typographyVariant: PresetChoiceOption[];
110
+ /** Grid/flex gaps on the theme's spacing ladder (AGL-2486). */
111
+ gap: PresetChoiceOption[];
112
+ }
113
+ export declare function buildStyleThemeScales(theme: ThemeScaleSource | undefined): StyleThemeScales;
114
+ /** Corner-radius presets, with what each resolves to in THIS theme. */
115
+ export declare function buildCornerRadiusChoices(theme: ThemeScaleSource | undefined): PresetChoiceOption[];
116
+ export declare function buildShadowChoices(theme?: ThemeScaleSource | undefined): PresetChoiceOption[];
117
+ /**
118
+ * Font-family choices: the SITE THEME's own faces first, then web-safe
119
+ *
120
+ * The old field was free text carrying the advice *"Prefer theme typography
121
+ * when possible"* — advice with no way to act on it. Leading with the
122
+ * theme's faces makes the recommended answer the first one in reach, and
123
+ * every row renders its own label in its own face so the choice can be made
124
+ * by looking.
125
+ *
126
+ * A theme face is stored as the resolved STACK rather than as a token path,
127
+ * because MUI declares `fontFamily` with `themeKey: 'typography'` and
128
+ * `typography.fontFamily` is the only path that resolves — `h1.fontFamily`
129
+ * does not. Duplicates are collapsed so a theme using one face everywhere
130
+ * offers it once.
131
+ */
132
+ export declare function buildFontFamilyChoices(theme: ThemeScaleSource | undefined): PresetChoiceOption[];
133
+ /**
134
+ * Whole text styles from `theme.typography` (AGL-2486).
135
+ *
136
+ * Every other control in this group sets ONE property, so matching a heading
137
+ * to the theme takes five correct picks in a row — face, size, weight, line
138
+ * height, letter spacing — and getting any of them wrong leaves text that
139
+ * looks almost right. `typography: 'h2'` is a single sx key that applies all
140
+ * of them at once, and it is the key MUI itself reaches for.
141
+ *
142
+ * Without this control a page can carry eleven headings at MUI's default `h2`
143
+ * — Light 300 at 60px — while every panel in the besigner reports nothing
144
+ * wrong: no field says "this is a Heading 2", only fields that say "this is
145
+ * 60px" once somebody types it.
146
+ *
147
+ * The hint names what the variant resolves to in THIS theme rather than in
148
+ * the abstract, because "Heading 2" means nothing until you know the host
149
+ * made it 40px semibold.
150
+ */
151
+ export declare function buildTypographyVariantChoices(theme: ThemeScaleSource | undefined): PresetChoiceOption[];
152
+ /**
153
+ * Grid and flex gaps on the theme's spacing ladder (AGL-2486).
154
+ *
155
+ * A free-text box for `gap`, `rowGap` or `columnGap` reads as a CSS length
156
+ * question and gets answered with one — but MUI runs all three through
157
+ * `createUnaryUnit(theme, 'spacing', …)`, exactly like margin and padding. So
158
+ * `gap: 2` is a theme multiple that follows a host retuning its unit, and
159
+ * `gap: '16px'` is a bespoke value that does not.
160
+ *
161
+ * These are the same rungs and the same labels the box styler offers for
162
+ * margin and padding, so the two controls agree; gaps only sit apart because
163
+ * they live in the Grid and Flex groups.
164
+ *
165
+ * A `PresetChoiceOption` rather than a `ThemeScaleOption` because the value
166
+ * STORED is a number and that interface is string-only — the same reason
167
+ * Corner Radius is a preset.
168
+ */
169
+ export declare function buildGapChoices(theme: ThemeScaleSource | undefined): PresetChoiceOption[];