@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,1350 @@
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 { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
18
+ import { canvas, components, listInstanceStyleTargets, REUSABLE_INSTANCE_COMPONENT_ID, STYLE_OVERRIDES_ROOT_KEY } from "@aglyn/aglyn";
19
+ import { BoxStyler } from "../box-styler/index.js";
20
+ import { ToggleButtonFormControl } from "../form-fields/index.js";
21
+ import { FieldComponentType } from "@aglyn/aglyn";
22
+ import { SX_SCHEME_DARK_KEY, useAglynSiteTheme } from "@aglyn/aglyn-node-renderer";
23
+ import { ICON_VARIANT_ALIGN_CENTER, ICON_VARIANT_ALIGN_JUSTIFY, ICON_VARIANT_ALIGN_LEFT, ICON_VARIANT_ALIGN_RIGHT, ICON_VARIANT_CSS_INHERIT } from "@aglyn/shared-data-enums";
24
+ import { alignContentCenterIcon, alignContentEndIcon, alignContentSpaceAroundIcon, alignContentSpaceBetweenIcon, alignContentSpaceEvenlyIcon, alignContentStartIcon, alignContentStretchIcon, alignItemsCenterIcon, alignItemsFlexEndIcon, alignItemsFlexStartIcon, alignItemsStretchIcon, alignSelfCenterIcon, alignSelfFlexEndIcon, alignSelfFlexStartIcon, alignSelfStretchIcon, flexDirectionIcon, flexNowrapIcon, flexWrapIcon, justifyContentCenterIcon, justifyContentFlexEndIcon, justifyContentFlexStartIcon, justifyContentSpaceAroundIcon, justifyContentSpaceBetweenIcon } from "@aglyn/shared-svg-icons";
25
+ import { componentMapper, FIELD_MUTED_STYLES, FieldMuteButton, FormRenderer } from "@aglyn/shared-ui-jsx-forms";
26
+ import { Container, HelpTip, MdiIcon } from "@aglyn/shared-ui-jsx";
27
+ import { useHostThemeDocument } from "@aglyn/shared-ui-theme";
28
+ import { objectFlatten } from "@aglyn/shared-util-vendor/object-flatten";
29
+ import { Alert, Box, Chip, FormControlLabel, FormHelperText, FormLabel, MenuItem, Switch, TextField, ToggleButton, ToggleButtonGroup, Tooltip } from "@mui/material";
30
+ import Button from "@mui/material/Button";
31
+ import FormControl from "@mui/material/FormControl";
32
+ import { observer } from "mobx-react-lite";
33
+ import { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
34
+ import ComponentPromotionContext from "../contexts/component-promotion-context.js";
35
+ import useAglynBesignerFlag from "../hooks/use-aglyn-besigner-flag.js";
36
+ import { buildStyleMute, toggleMutedStyle, withStyleMuteControls } from "../utils/muted-styles.js";
37
+ import { deriveStateSlice, readStateSlice, stateScopedSx, stripStateSlices, stateAdvisory, sxHasStateSlice, sxStateSliceLabel, SX_STATE_DESCRIPTIONS, SX_STATE_LABELS, SX_STATE_PROSE, SX_STATES, writeStateSlice } from "../utils/state-sx.js";
38
+ import useDeleteElementCallback from "../hooks/use-delete-element-callback.js";
39
+ import { besignerDocsUrl } from "../utils/docs-help.js";
40
+ import { canvasSchemeToSxScheme, deviceFlagToBreakpoint } from "../utils/responsive-sx.js";
41
+ import { applyStylePartialToSx, buildFlexGridGroup, buildStyleFieldGroups, computeEffectiveStyleValues, computeStylePartial, pickStyleValues, styleGroupFieldNames } from "../utils/style-field-groups.js";
42
+ import { filterStyleGroup, matchesStyleQuery, STYLE_SECTION_ENTRIES, styleFieldEntry } from "../utils/style-field-search.js";
43
+ import { getNodeStyleTarget } from "../utils/style-target.js";
44
+ import { buildStyleThemeScales } from "../utils/theme-scale-options.js";
45
+ import { readHiddenBands, VISIBILITY_BAND_LABELS, VISIBILITY_BANDS, writeHiddenBand } from "../utils/visibility-styles.js";
46
+ import { Accordion } from "./accordion-list.component.js";
47
+ import CustomCssForm from "./custom-css-form.component.js";
48
+ import ElementClassesField from "./element-classes-field.component.js";
49
+ import ElementStylesFormTemplate from "./element-styles-form-template.component.js";
50
+ const alignItems = {
51
+ name: 'alignItems',
52
+ label: 'Align items',
53
+ helperText: 'The CSS align-items property sets the align-self value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area.',
54
+ options: [
55
+ {
56
+ value: 'center',
57
+ label: 'Center',
58
+ icon: {
59
+ viewBox: '0 0 13 13',
60
+ component: alignItemsCenterIcon
61
+ }
62
+ },
63
+ {
64
+ value: 'flex-end',
65
+ label: 'Flex end',
66
+ icon: {
67
+ viewBox: '0 0 13 13',
68
+ component: alignItemsFlexEndIcon
69
+ }
70
+ },
71
+ {
72
+ value: 'flex-start',
73
+ label: 'Flex start',
74
+ icon: {
75
+ viewBox: '0 0 13 13',
76
+ component: alignItemsFlexStartIcon
77
+ }
78
+ },
79
+ {
80
+ value: 'stretch',
81
+ label: 'Stretch',
82
+ icon: {
83
+ viewBox: '0 0 13 13',
84
+ component: alignItemsStretchIcon
85
+ }
86
+ }
87
+ ]
88
+ };
89
+ const alignContent = {
90
+ name: 'alignContent',
91
+ label: 'Align content',
92
+ helperText: "The CSS align-content property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis.",
93
+ options: [
94
+ {
95
+ value: 'center',
96
+ label: 'Center',
97
+ icon: {
98
+ viewBox: '0 0 13 13',
99
+ component: alignContentCenterIcon
100
+ }
101
+ },
102
+ {
103
+ value: 'end',
104
+ label: 'End',
105
+ icon: {
106
+ viewBox: '0 0 13 13',
107
+ component: alignContentEndIcon
108
+ }
109
+ },
110
+ {
111
+ value: 'space-around',
112
+ label: 'Space around',
113
+ icon: {
114
+ viewBox: '0 0 13 13',
115
+ component: alignContentSpaceAroundIcon
116
+ }
117
+ },
118
+ {
119
+ value: 'space-between',
120
+ label: 'Space between',
121
+ icon: {
122
+ viewBox: '0 0 13 13',
123
+ component: alignContentSpaceBetweenIcon
124
+ }
125
+ },
126
+ {
127
+ value: 'space-evenly',
128
+ label: 'Space evenly',
129
+ icon: {
130
+ viewBox: '0 0 13 13',
131
+ component: alignContentSpaceEvenlyIcon
132
+ }
133
+ },
134
+ {
135
+ value: 'start',
136
+ label: 'Start',
137
+ icon: {
138
+ viewBox: '0 0 13 13',
139
+ component: alignContentStartIcon
140
+ }
141
+ },
142
+ {
143
+ value: 'stretch',
144
+ label: 'Stretch',
145
+ icon: {
146
+ viewBox: '0 0 13 13',
147
+ component: alignContentStretchIcon
148
+ }
149
+ }
150
+ ]
151
+ };
152
+ const alignSelf = {
153
+ name: 'alignSelf',
154
+ label: 'Align self',
155
+ helperText: "The align-self CSS property overrides a grid or flex item's align-items value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis.",
156
+ options: [
157
+ {
158
+ value: 'center',
159
+ label: 'Center',
160
+ icon: {
161
+ viewBox: '0 0 13 13',
162
+ component: alignSelfCenterIcon
163
+ }
164
+ },
165
+ {
166
+ value: 'end',
167
+ label: 'End',
168
+ icon: {
169
+ viewBox: '0 0 13 13',
170
+ component: alignSelfFlexEndIcon
171
+ }
172
+ },
173
+ {
174
+ value: 'start',
175
+ label: 'Start',
176
+ icon: {
177
+ viewBox: '0 0 13 13',
178
+ component: alignSelfFlexStartIcon
179
+ }
180
+ },
181
+ {
182
+ value: 'stretch',
183
+ label: 'Stretch',
184
+ icon: {
185
+ viewBox: '0 0 13 13',
186
+ component: alignSelfStretchIcon
187
+ }
188
+ }
189
+ ]
190
+ };
191
+ const flexWrap = {
192
+ name: 'flexWrap',
193
+ label: 'Flex wrap',
194
+ helperText: 'The flex-wrap CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked.',
195
+ options: [
196
+ {
197
+ value: 'nowrap',
198
+ label: 'No wrap',
199
+ icon: {
200
+ viewBox: '0 0 13 13',
201
+ component: flexNowrapIcon
202
+ }
203
+ },
204
+ {
205
+ value: 'wrap',
206
+ label: 'Wrap',
207
+ icon: {
208
+ viewBox: '0 0 13 13',
209
+ component: flexWrapIcon
210
+ }
211
+ },
212
+ {
213
+ value: 'wrap-reverse',
214
+ label: 'Wrap reverse',
215
+ icon: {
216
+ viewBox: '0 0 13 13',
217
+ component: flexWrapIcon
218
+ }
219
+ }
220
+ ]
221
+ };
222
+ const flexDirection = {
223
+ name: 'flexDirection',
224
+ label: 'Flex direction',
225
+ helperText: 'The flex-direction CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed).',
226
+ options: [
227
+ {
228
+ value: 'column',
229
+ label: 'Column',
230
+ icon: {
231
+ viewBox: '0 0 13 13',
232
+ component: flexDirectionIcon
233
+ }
234
+ },
235
+ {
236
+ value: 'column-reverse',
237
+ label: 'Column reverse',
238
+ icon: {
239
+ viewBox: '0 0 13 13',
240
+ component: flexDirectionIcon,
241
+ sx: {
242
+ transform: 'rotate(-180deg)'
243
+ }
244
+ }
245
+ },
246
+ {
247
+ value: 'row',
248
+ label: 'Row',
249
+ icon: {
250
+ viewBox: '0 0 13 13',
251
+ component: flexDirectionIcon,
252
+ sx: {
253
+ transform: 'rotate(-90deg)'
254
+ }
255
+ }
256
+ },
257
+ {
258
+ value: 'row-reverse',
259
+ label: 'Row reverse',
260
+ icon: {
261
+ viewBox: '0 0 13 13',
262
+ component: flexDirectionIcon,
263
+ sx: {
264
+ transform: 'rotate(90deg)'
265
+ }
266
+ }
267
+ }
268
+ ]
269
+ };
270
+ const justifyItems = {
271
+ name: 'justifyItems',
272
+ label: 'Justify items',
273
+ helperText: 'The CSS justify-items property defines the default justify-self for all items of the box, giving them all a default way of justifying each box along the appropriate axis.',
274
+ options: [
275
+ {
276
+ value: 'center',
277
+ label: 'Center',
278
+ icon: {
279
+ viewBox: '0 0 13 13',
280
+ component: alignSelfCenterIcon
281
+ }
282
+ },
283
+ {
284
+ value: 'end',
285
+ label: 'End',
286
+ icon: {
287
+ viewBox: '0 0 13 13',
288
+ component: alignSelfFlexEndIcon
289
+ }
290
+ },
291
+ {
292
+ value: 'start',
293
+ label: 'Start',
294
+ icon: {
295
+ viewBox: '0 0 13 13',
296
+ component: alignSelfFlexStartIcon
297
+ }
298
+ },
299
+ {
300
+ value: 'stretch',
301
+ label: 'Stretch',
302
+ icon: {
303
+ viewBox: '0 0 13 13',
304
+ component: alignSelfStretchIcon
305
+ }
306
+ }
307
+ ]
308
+ };
309
+ const justifyContent = {
310
+ name: 'justifyContent',
311
+ label: 'Justify content',
312
+ helperText: 'The CSS justify-content property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container.',
313
+ options: [
314
+ {
315
+ value: 'center',
316
+ label: 'Center',
317
+ icon: {
318
+ viewBox: '0 0 13 13',
319
+ component: justifyContentCenterIcon
320
+ }
321
+ },
322
+ {
323
+ value: 'flex-end',
324
+ label: 'Flex end',
325
+ icon: {
326
+ viewBox: '0 0 13 13',
327
+ component: justifyContentFlexEndIcon
328
+ }
329
+ },
330
+ {
331
+ value: 'flex-start',
332
+ label: 'Flex start',
333
+ icon: {
334
+ viewBox: '0 0 13 13',
335
+ component: justifyContentFlexStartIcon
336
+ }
337
+ },
338
+ {
339
+ value: 'space-around',
340
+ label: 'Space around',
341
+ icon: {
342
+ viewBox: '0 0 13 13',
343
+ component: justifyContentSpaceAroundIcon
344
+ }
345
+ },
346
+ {
347
+ value: 'space-between',
348
+ label: 'Space between',
349
+ icon: {
350
+ viewBox: '0 0 13 13',
351
+ component: justifyContentSpaceBetweenIcon
352
+ }
353
+ }
354
+ ]
355
+ };
356
+ const justifySelf = {
357
+ name: 'justifySelf',
358
+ label: 'Justify self',
359
+ helperText: 'The CSS justify-self property sets the way a box is justified inside its alignment container along the appropriate axis.',
360
+ options: [
361
+ {
362
+ value: 'center',
363
+ label: 'Center',
364
+ icon: {
365
+ viewBox: '0 0 13 13',
366
+ component: alignSelfCenterIcon
367
+ }
368
+ },
369
+ {
370
+ value: 'end',
371
+ label: 'End',
372
+ icon: {
373
+ viewBox: '0 0 13 13',
374
+ component: alignSelfFlexEndIcon
375
+ }
376
+ },
377
+ {
378
+ value: 'start',
379
+ label: 'Start',
380
+ icon: {
381
+ viewBox: '0 0 13 13',
382
+ component: alignSelfFlexStartIcon
383
+ }
384
+ },
385
+ {
386
+ value: 'stretch',
387
+ label: 'Stretch',
388
+ icon: {
389
+ viewBox: '0 0 13 13',
390
+ component: alignSelfStretchIcon
391
+ }
392
+ }
393
+ ]
394
+ };
395
+ /**
396
+ * The Flexbox & Grid alignment toggles, in panel order (AGL-1458).
397
+ *
398
+ * A list rather than eight literal call sites because every one of them
399
+ * needs the same two wirings — the change handler AND the effective value
400
+ * — and the shipped panel gave them only the first. One render site is one
401
+ * place for that pair to be right.
402
+ *
403
+ * Ordered container-first, then the two per-ITEM properties (AGL-2486).
404
+ * `Align self` and `Justify self` describe how this element sits inside
405
+ * its parent, not how it arranges its own children, and reading them in
406
+ * the middle of the container list was half of why the panel needed a
407
+ * second layout section to put the rest of the per-item properties in.
408
+ */ const FLEXBOX_TOGGLES = [
409
+ flexDirection,
410
+ flexWrap,
411
+ justifyContent,
412
+ alignItems,
413
+ alignContent,
414
+ justifyItems,
415
+ alignSelf,
416
+ justifySelf
417
+ ];
418
+ const TextAlignToggleButtonGroup = (props)=>{
419
+ const { onChange, value, mute, field } = props;
420
+ return /*#__PURE__*/ _jsxs(FormControl, {
421
+ fullWidth: true,
422
+ sx: (mute == null ? void 0 : mute.muted) ? FIELD_MUTED_STYLES : undefined,
423
+ children: [
424
+ /*#__PURE__*/ _jsxs(Box, {
425
+ sx: {
426
+ display: 'flex',
427
+ alignItems: 'center',
428
+ gap: 0.5,
429
+ mb: 1
430
+ },
431
+ children: [
432
+ /*#__PURE__*/ _jsx(FormLabel, {
433
+ htmlFor: field.name,
434
+ children: field.label
435
+ }),
436
+ /*#__PURE__*/ _jsx(FieldMuteButton, {
437
+ mute: mute
438
+ })
439
+ ]
440
+ }),
441
+ /*#__PURE__*/ _jsx("div", {
442
+ children: /*#__PURE__*/ _jsx(ToggleButtonGroup, {
443
+ id: field.name,
444
+ value: value || '',
445
+ size: "small",
446
+ color: "primary",
447
+ onChange: onChange,
448
+ fullWidth: true,
449
+ exclusive: true,
450
+ children: field.options.map((option)=>/*#__PURE__*/ _jsx(ToggleButton, {
451
+ value: option.value,
452
+ children: /*#__PURE__*/ _jsx(Tooltip, {
453
+ title: option.label,
454
+ children: /*#__PURE__*/ _jsx(MdiIcon, {
455
+ path: option.icon,
456
+ fontSize: "inherit"
457
+ })
458
+ }, option.value)
459
+ }, option.value))
460
+ })
461
+ }),
462
+ /*#__PURE__*/ _jsx(FormHelperText, {
463
+ children: field.description
464
+ })
465
+ ]
466
+ });
467
+ };
468
+ /**
469
+ * The styles panel (AGL-587 consolidation): every control applies
470
+ * immediately through {@link ElementStylesFormTemplate} or a direct
471
+ * `applyStyleValues` call — no per-group "Save Element" buttons — and
472
+ * every style field has exactly one home:
473
+ *
474
+ * - Flexbox & Grid: the alignment toggles plus every typed layout field
475
+ * (gaps, grid tracks, item placement, flex-child sizing) — one section
476
+ * since AGL-2486, where it used to be two.
477
+ * - Visibility: device-band switches.
478
+ * - Layout / Colors / Sizing / Typography / Borders & Shadows /
479
+ * Position & Overflow: the accordion field groups from
480
+ * `buildStyleFieldGroups`.
481
+ * - Top level: search box, breakpoint chip, BoxStyler, and the text-align
482
+ * toggle.
483
+ *
484
+ * The search box (AGL-2486) filters every one of those by property name AND
485
+ * by the words a non-developer would use — `rounded` finds Corner Radius —
486
+ * hiding sections with no match and opening the ones that have one. See
487
+ * `style-field-search.ts`; the filtered group is also what each form SAVES
488
+ * through, so hiding a field can never clear it.
489
+ */ const ElementStylesForm = observer(/*#__PURE__*/ forwardRef((props, ref)=>{
490
+ var _canvas_getNode, _effectiveValues_marginTop, _effectiveValues_marginLeft, _effectiveValues_marginRight, _effectiveValues_marginBottom, _effectiveValues_paddingTop, _effectiveValues_paddingLeft, _effectiveValues_paddingRight, _effectiveValues_paddingBottom, _target_sx, _ref, _ref1;
491
+ const { node: selectedNode } = props;
492
+ const deleteElementCallback = useDeleteElementCallback();
493
+ // The node as the CANVAS currently holds it (AGL-2486).
494
+ //
495
+ // Undo and redo restore a whole-document snapshot through
496
+ // `CanvasManager.setNodes`, which mints fresh node instances and
497
+ // replaces the map. The selection holds a node OBJECT, not an id, so
498
+ // after an undo the aside panel handed this component a DETACHED copy
499
+ // — the canvas rolled back and every field here kept reading the value
500
+ // that had just been undone, then wrote it back over the restored one
501
+ // on the next edit. Looking the id up in the map re-attaches the panel
502
+ // to what the canvas renders, and — read inside an `observer` — is
503
+ // also what makes an undo re-render the panel at all.
504
+ //
505
+ // The fallback keeps a node the map does not have (a spec's hand-built
506
+ // schema, a node deleted while its panel is still mounted) rendering
507
+ // rather than blanking the panel.
508
+ const node = (selectedNode == null ? void 0 : selectedNode.$id) ? (_canvas_getNode = canvas.getNode(selectedNode.$id)) != null ? _canvas_getNode : selectedNode : selectedNode;
509
+ // The definition behind a selected instance (AGL-1332): the panel needs
510
+ // its node tree to offer the leaves an author may style. Read from the
511
+ // same context the canvas renders instances through, so the picker can
512
+ // only ever offer targets the graft will actually consult.
513
+ const { definitions } = useContext(ComponentPromotionContext);
514
+ const definition = useMemo(()=>{
515
+ var _node_props;
516
+ if ((node == null ? void 0 : node.componentId) !== REUSABLE_INSTANCE_COMPONENT_ID) {
517
+ return undefined;
518
+ }
519
+ const refId = node == null ? void 0 : (_node_props = node.props) == null ? void 0 : _node_props.refId;
520
+ return refId ? definitions == null ? void 0 : definitions[refId] : undefined;
521
+ }, [
522
+ node,
523
+ definitions
524
+ ]);
525
+ const styleTargets = useMemo(()=>listInstanceStyleTargets(definition), [
526
+ definition
527
+ ]);
528
+ // Which target inside the instance the panel is editing. Held per
529
+ // selection rather than in an effect: switching nodes must land on the
530
+ // component root, and deriving that from the current `node.$id` cannot
531
+ // render one frame aimed at the PREVIOUS instance's leaf.
532
+ const [picked, setPicked] = useState({
533
+ key: STYLE_OVERRIDES_ROOT_KEY
534
+ });
535
+ const pickedKey = picked.nodeId && picked.nodeId === (node == null ? void 0 : node.$id) ? picked.key : STYLE_OVERRIDES_ROOT_KEY;
536
+ // A leaf the component no longer has falls back to the root instead of
537
+ // aiming the panel at a slice nothing renders (the definition may have
538
+ // been edited since). An unloaded definition offers nothing yet, so it
539
+ // is not evidence the key is stale.
540
+ const overrideKey = !styleTargets.length || styleTargets.some((entry)=>entry.key === pickedKey) ? pickedKey : STYLE_OVERRIDES_ROOT_KEY;
541
+ // Where edits land (AGL-1306 root, AGL-1332 leaves): a plain node's own
542
+ // sx, or — for a reusable-component instance — one slice of its
543
+ // styleOverrides, so the whole panel styles the instance without
544
+ // touching the component. Reads go through the same target, so the
545
+ // panel shows exactly what THIS instance overrides for THIS target
546
+ // (empty = the component's own look), the same way a fresh plain node
547
+ // starts empty.
548
+ const target = useMemo(()=>getNodeStyleTarget(node, overrideKey), [
549
+ node,
550
+ overrideKey
551
+ ]);
552
+ const nodeSx = target.sx;
553
+ const hostThemeDoc = useHostThemeDocument();
554
+ const siteTheme = useAglynSiteTheme({
555
+ theme: hostThemeDoc
556
+ });
557
+ const presetColors = useMemo(()=>Object.entries(objectFlatten(siteTheme.palette)).map(([, value])=>String(value)).filter((color)=>{
558
+ var _color_match;
559
+ return Boolean((_color_match = color.match(/^(rgb|#)/)) == null ? void 0 : _color_match[0]);
560
+ }), [
561
+ siteTheme
562
+ ]);
563
+ // Accordion field groups (AGL-540/587): layout, colors, sizing,
564
+ // typography, borders & shadows, position & overflow, grid/flex-child.
565
+ //
566
+ // The override mode is passed in (AGL-1338) because a field whose
567
+ // "empty" state is meaningful has to say what empty MEANS here: on an
568
+ // instance an unset Background Fill is the component's gradient, not
569
+ // no gradient, and the control that could not tell those apart was
570
+ // the bug.
571
+ // The theme's own scales for font size, font weight and z-index
572
+ // (AGL-2486, item 12). Read off the SITE theme, so a host that retuned
573
+ // its type scale or added a stacking layer offers its own values — and
574
+ // the option list names what each token resolves to, which is the only
575
+ // thing that makes `h4.fontSize` legible to an author.
576
+ const themeScales = useMemo(()=>buildStyleThemeScales(siteTheme), [
577
+ siteTheme
578
+ ]);
579
+ const styleGroups = useMemo(()=>buildStyleFieldGroups(presetColors, {
580
+ isInstanceOverride: target.isInstanceOverride,
581
+ themeScales
582
+ }), [
583
+ presetColors,
584
+ target.isInstanceOverride,
585
+ themeScales
586
+ ]);
587
+ // Every typed layout field, rendered under the alignment toggles in
588
+ // the single Flexbox & Grid section (AGL-2486).
589
+ // Gaps are theme-spacing pickers, so this group needs the scales too.
590
+ const flexGridGroup = useMemo(()=>buildFlexGridGroup({
591
+ themeScales
592
+ }), [
593
+ themeScales
594
+ ]);
595
+ // Breakpoint-scoped editing (AGL-333): when the artboard preview is a
596
+ // device size, style edits write into that breakpoint's slice of the
597
+ // responsive sx value; fluid preview edits the base.
598
+ const [devicePreview] = useAglynBesignerFlag('devicePreview');
599
+ const activeBreakpoint = deviceFlagToBreakpoint(devicePreview);
600
+ // Scheme-scoped colors (AGL-588): while the artboard previews the
601
+ // DARK scheme, color-bearing fields write into the sx dark slice and
602
+ // read through it; light preview edits the base (light IS the base).
603
+ // Non-color fields stay scheme-agnostic either way.
604
+ const [canvasScheme] = useAglynBesignerFlag('canvasScheme');
605
+ const activeScheme = canvasSchemeToSxScheme(canvasScheme);
606
+ // Interaction-state scope (AGL-2486 item 39): a state chip puts the panel
607
+ // into that state's slice — every field then reads and writes
608
+ // `sx['&:hover']` instead of the base. Selecting the chip ALSO holds the
609
+ // state on the canvas for this element, because you cannot hover an
610
+ // element while working in a side panel. The hold is a canvas flag, never
611
+ // a document field, so it cannot be saved and cannot reach Preview or a
612
+ // published page; and it is not a toggle that can be left on by mistake —
613
+ // going back to `Default` ends it.
614
+ const [heldState, setHeldState] = useAglynBesignerFlag('heldState');
615
+ const [, setHeldStateNodeId] = useAglynBesignerFlag('heldStateNodeId');
616
+ const activeState = heldState != null ? heldState : null;
617
+ // What THIS panel is holding, tracked in a ref so the release paths below
618
+ // can read it without depending on it. Two reasons it is not the flag
619
+ // itself: an effect that read the flag would have registered its unmount
620
+ // cleanup on the render where it was still undefined (the chip is clicked
621
+ // AFTER mount) and stranded the canvas holding a state with no visible
622
+ // control left to explain it; and the release must be able to tell "we
623
+ // hold nothing" from "we hold nothing yet", because writing a flag needs a
624
+ // live besigner app and a panel rendered without one — which is every
625
+ // panel unit test — would throw on mount.
626
+ const heldRef = useRef(null);
627
+ const selectState = useCallback((next)=>{
628
+ heldRef.current = next;
629
+ setHeldState(next != null ? next : undefined);
630
+ setHeldStateNodeId(next ? node == null ? void 0 : node.$id : undefined);
631
+ }, [
632
+ setHeldState,
633
+ setHeldStateNodeId,
634
+ node
635
+ ]);
636
+ /** Ends the hold, and writes nothing when there is nothing to end. */ const releaseHold = useCallback(()=>{
637
+ if (!heldRef.current) return;
638
+ heldRef.current = null;
639
+ setHeldState(undefined);
640
+ setHeldStateNodeId(undefined);
641
+ // eslint-disable-next-line react-hooks/exhaustive-deps
642
+ }, []);
643
+ // The hold dies with the panel: a preview nothing on screen explains any
644
+ // more is worse than no preview.
645
+ useEffect(()=>()=>releaseHold(), [
646
+ releaseHold
647
+ ]);
648
+ // …and it follows the SELECTION. Clicking element B while holding hover on
649
+ // element A must not leave either of them rendering as hovered — the panel
650
+ // now describes a different element, and a scope the chips no longer show
651
+ // is a scope the author cannot get out of.
652
+ useEffect(()=>{
653
+ releaseHold();
654
+ // eslint-disable-next-line react-hooks/exhaustive-deps
655
+ }, [
656
+ node == null ? void 0 : node.$id
657
+ ]);
658
+ /** Drops a whole state slice — the clear affordance, one level up. */ const clearState = useCallback((state)=>{
659
+ if (!node) return;
660
+ canvas.transact(()=>{
661
+ var _target_sx;
662
+ target.setSx(writeStateSlice((_target_sx = target.sx) != null ? _target_sx : {}, state, undefined));
663
+ }, [
664
+ 'sx',
665
+ node.$id,
666
+ 'clear-state',
667
+ state
668
+ ].join(':'));
669
+ }, [
670
+ node,
671
+ target
672
+ ]);
673
+ // Allowed on every element, but said out loud where it will never fire.
674
+ const stateAdvisoryText = useMemo(()=>{
675
+ var _node_props, _node_props1;
676
+ return stateAdvisory(activeState, {
677
+ componentId: node == null ? void 0 : node.componentId,
678
+ hasHref: !!(node == null ? void 0 : (_node_props = node.props) == null ? void 0 : _node_props['href']),
679
+ hasTabIndex: (node == null ? void 0 : (_node_props1 = node.props) == null ? void 0 : _node_props1['tabIndex']) !== undefined
680
+ });
681
+ }, [
682
+ activeState,
683
+ node
684
+ ]);
685
+ /**
686
+ * Merges style values into node.sx at the active breakpoint + scheme
687
+ * scope. Unchanged values are skipped so effective (inherited)
688
+ * readings never get pinned into a slice by round-tripping through a
689
+ * form.
690
+ */ const applyStyleValues = useCallback((partial)=>{
691
+ if (!node) return;
692
+ // Undoable, and coalesced (AGL-1204). Every control here applies
693
+ // live — one call per character typed, one per drag tick — so the
694
+ // key ends the burst when the adjustment changes, not when the
695
+ // writing stops: the field names are in it, so moving from Gap to
696
+ // Padding is a second undo step even mid-burst.
697
+ //
698
+ // The write itself goes through the style target (AGL-1306), so the
699
+ // step is recorded whether the edit lands in the node's own sx or in
700
+ // a component instance's root override slice — the history snapshot
701
+ // carries `styleOverrides` like any other node field.
702
+ canvas.transact(()=>{
703
+ var _target_sx;
704
+ const current = (_target_sx = target.sx) != null ? _target_sx : {};
705
+ if (!activeState) {
706
+ target.setSx(applyStylePartialToSx(current, partial, activeBreakpoint, activeScheme));
707
+ return;
708
+ }
709
+ // A state scope edits the MERGED reading — base with the slice
710
+ // over it, i.e. what the element actually looks like hovered —
711
+ // and the write is split back out so only a genuine difference
712
+ // is stored. That one rule gives all three behaviours: a changed
713
+ // value lands in the slice, a value set back to the base leaves
714
+ // it, and a cleared value leaves it so the state inherits again.
715
+ const base = stripStateSlices(current);
716
+ const edited = applyStylePartialToSx(stateScopedSx(current, activeState), partial, activeBreakpoint, activeScheme);
717
+ target.setSx(writeStateSlice(current, activeState, deriveStateSlice(base, edited)));
718
+ }, [
719
+ 'sx',
720
+ node.$id,
721
+ activeState != null ? activeState : 'base',
722
+ activeBreakpoint != null ? activeBreakpoint : 'base',
723
+ activeScheme != null ? activeScheme : 'light',
724
+ Object.keys(partial).sort().join(':')
725
+ ].join(':'));
726
+ }, [
727
+ node,
728
+ target,
729
+ activeBreakpoint,
730
+ activeScheme,
731
+ activeState
732
+ ]);
733
+ // Effective scalar values at the active breakpoint + scheme — feeds
734
+ // the form and controls; responsive objects resolve to their active
735
+ // slice, color fields through the dark slice while previewing dark.
736
+ const effectiveValues = useMemo(()=>computeEffectiveStyleValues(// In a state scope the panel reads the slice merged over the base
737
+ // (AGL-2486), so a field the author has not overridden for hover
738
+ // shows the inherited value rather than empty — the same reading
739
+ // the breakpoint scope gives, and what the browser actually paints.
740
+ stateScopedSx(nodeSx, activeState), activeBreakpoint, activeScheme), [
741
+ nodeSx,
742
+ activeBreakpoint,
743
+ activeScheme,
744
+ activeState
745
+ ]);
746
+ // Declarations switched off for comparison (AGL-2486). Canvas only: the
747
+ // value stays in the document and only the canvas's copy of the sx drops
748
+ // it, so turning one back on is not a restore that can fail — see
749
+ // `muted-styles`.
750
+ const [mutedStyles, setMutedStyles] = useAglynBesignerFlag('mutedStyles');
751
+ // What the ACTIVE SCOPE declares, as against what the panel displays.
752
+ // The two differ in a state scope, where a field the author has not
753
+ // overridden for hover still shows the base value it inherits: there is
754
+ // no hover declaration to switch off, so that row gets no control.
755
+ const scopeValues = useMemo(()=>{
756
+ const sx = nodeSx != null ? nodeSx : {};
757
+ const scoped = activeState ? readStateSlice(sx, activeState) : stripStateSlices(sx);
758
+ return computeEffectiveStyleValues(scoped != null ? scoped : {}, activeBreakpoint, activeScheme);
759
+ }, [
760
+ nodeSx,
761
+ activeState,
762
+ activeBreakpoint,
763
+ activeScheme
764
+ ]);
765
+ const styleMute = useCallback((name, label)=>buildStyleMute(name, label, {
766
+ nodeId: node == null ? void 0 : node.$id,
767
+ state: activeState,
768
+ breakpoint: activeBreakpoint,
769
+ scopeValues,
770
+ mutedStyles,
771
+ onToggle: (muteTarget)=>setMutedStyles((current)=>toggleMutedStyle(current, muteTarget))
772
+ }), [
773
+ node,
774
+ activeState,
775
+ activeBreakpoint,
776
+ scopeValues,
777
+ mutedStyles,
778
+ setMutedStyles
779
+ ]);
780
+ const withStyleMutes = useCallback((fields)=>withStyleMuteControls(fields, {
781
+ nodeId: node == null ? void 0 : node.$id,
782
+ state: activeState,
783
+ breakpoint: activeBreakpoint,
784
+ scopeValues,
785
+ mutedStyles,
786
+ onToggle: (muteTarget)=>setMutedStyles((current)=>toggleMutedStyle(current, muteTarget))
787
+ }), [
788
+ node,
789
+ activeState,
790
+ activeBreakpoint,
791
+ scopeValues,
792
+ mutedStyles,
793
+ setMutedStyles
794
+ ]);
795
+ /**
796
+ * Scoped group save (AGL-540): a group's auto-apply may only write
797
+ * its own field names, so it can never clear values owned by other
798
+ * groups or by the custom-CSS editor.
799
+ */ const handleGroupSave = useCallback((fieldNames)=>(values)=>{
800
+ applyStyleValues(computeStylePartial(fieldNames, values));
801
+ }, [
802
+ applyStyleValues
803
+ ]);
804
+ const handleBoxStylerChange = useCallback((dimensions)=>{
805
+ applyStyleValues(dimensions);
806
+ }, [
807
+ applyStyleValues
808
+ ]);
809
+ /**
810
+ * The border shorthand the box diagram draws for context (AGL-2486).
811
+ * Read only — border width, style and colour are edited in the
812
+ * Borders & Shadows section, which is their one home.
813
+ */ const boxBorder = effectiveValues['border'] === undefined ? undefined : `${effectiveValues['border']}`;
814
+ const boxMeasurements = {
815
+ marginTop: (_effectiveValues_marginTop = effectiveValues['marginTop']) != null ? _effectiveValues_marginTop : undefined,
816
+ marginLeft: (_effectiveValues_marginLeft = effectiveValues['marginLeft']) != null ? _effectiveValues_marginLeft : undefined,
817
+ marginRight: (_effectiveValues_marginRight = effectiveValues['marginRight']) != null ? _effectiveValues_marginRight : undefined,
818
+ marginBottom: (_effectiveValues_marginBottom = effectiveValues['marginBottom']) != null ? _effectiveValues_marginBottom : undefined,
819
+ paddingTop: (_effectiveValues_paddingTop = effectiveValues['paddingTop']) != null ? _effectiveValues_paddingTop : undefined,
820
+ paddingLeft: (_effectiveValues_paddingLeft = effectiveValues['paddingLeft']) != null ? _effectiveValues_paddingLeft : undefined,
821
+ paddingRight: (_effectiveValues_paddingRight = effectiveValues['paddingRight']) != null ? _effectiveValues_paddingRight : undefined,
822
+ paddingBottom: (_effectiveValues_paddingBottom = effectiveValues['paddingBottom']) != null ? _effectiveValues_paddingBottom : undefined
823
+ };
824
+ const handleTextAlignChange = useCallback((e, value)=>{
825
+ applyStyleValues({
826
+ textAlign: value || undefined
827
+ });
828
+ }, [
829
+ applyStyleValues
830
+ ]);
831
+ const handleFlexboxChange = useCallback((name)=>(e, value)=>{
832
+ applyStyleValues({
833
+ [name]: value || undefined
834
+ });
835
+ }, [
836
+ applyStyleValues
837
+ ]);
838
+ // Responsive visibility (AGL-562): band toggles write display:none
839
+ // under range-scoped media keys — independent of the artboard's
840
+ // breakpoint scope, since each band is absolute.
841
+ const hiddenBands = readHiddenBands(nodeSx);
842
+ const handleVisibilityChange = useCallback((band)=>(event)=>{
843
+ if (!node) return;
844
+ // No coalesce key: a band switch is one discrete decision, so it
845
+ // gets its own undo step even when two are flipped in quick
846
+ // succession (AGL-1204).
847
+ canvas.transact(()=>{
848
+ var _target_sx;
849
+ target.setSx(writeHiddenBand((_target_sx = target.sx) != null ? _target_sx : {}, band, event.target.checked));
850
+ });
851
+ }, [
852
+ node,
853
+ target
854
+ ]);
855
+ // Per-property clear for the instance override list (AGL-1306):
856
+ // removing the top-level key returns this instance to the component's
857
+ // own value for that property. Clearing the last one removes the
858
+ // override field entirely (see NodeStyleTarget.setSx).
859
+ const handleClearOverride = useCallback((property)=>()=>{
860
+ // Undoable and uncoalesced (AGL-1204): clearing a chip is a discrete
861
+ // decision, and it DISCARDS an override — the one edit in this panel
862
+ // that most needs a way back.
863
+ canvas.transact(()=>{
864
+ var _target_sx;
865
+ const next = _extends({}, (_target_sx = target.sx) != null ? _target_sx : {});
866
+ delete next[property];
867
+ target.setSx(next);
868
+ });
869
+ }, [
870
+ target
871
+ ]);
872
+ // Read during render (observer): the list tracks the live override
873
+ // record, so it updates as edits land or chips clear.
874
+ const overrideProperties = target.isInstanceOverride ? Object.keys((_target_sx = target.sx) != null ? _target_sx : {}) : [];
875
+ // Which targets this instance has overridden at all, so the picker can
876
+ // mark them — an author restyling a CTA needs to see that the headline
877
+ // already carries a colour without opening every leaf.
878
+ const overriddenKeys = target.isInstanceOverride ? new Set(Object.keys((_ref = node == null ? void 0 : node.styleOverrides) != null ? _ref : {})) : new Set();
879
+ /** The picker's name for one target — the author's word, then the component's. */ const styleTargetLabel = useCallback((entry)=>entry.isRoot ? 'Component root' : entry.name || entry.componentId && components.getLabel(entry.componentId) || entry.componentInternalId, []);
880
+ const handleStyleTargetChange = useCallback((event)=>{
881
+ setPicked({
882
+ nodeId: node == null ? void 0 : node.$id,
883
+ key: event.target.value
884
+ });
885
+ }, [
886
+ node == null ? void 0 : node.$id
887
+ ]);
888
+ // Panel search (AGL-2486, item 13). The panel is seven accordions plus
889
+ // the box stylers and the toggles, so "which section is Corner Radius
890
+ // in?" was a question every author had to answer from memory. Filtering
891
+ // is derived from the query on every render rather than held in state:
892
+ // one source of truth, and no way for the list to disagree with the box.
893
+ const [query, setQuery] = useState('');
894
+ const search = query.trim();
895
+ const searching = search !== '';
896
+ const handleSearchChange = useCallback((event)=>setQuery(event.target.value), []);
897
+ // While searching, a section that HAS a match opens itself — a hit
898
+ // hidden inside a collapsed accordion is not a hit. Keyed on the search
899
+ // MODE rather than the text so this re-seeds the accordions once, when
900
+ // searching starts or stops, not on every keystroke.
901
+ const accordionKey = searching ? 'search' : 'browse';
902
+ const matchesSection = useCallback((key)=>matchesStyleQuery(STYLE_SECTION_ENTRIES[key], search), [
903
+ search
904
+ ]);
905
+ const visibleFlexboxToggles = useMemo(()=>FLEXBOX_TOGGLES.filter((schema)=>matchesStyleQuery(styleFieldEntry(schema), search)), [
906
+ search
907
+ ]);
908
+ const visibleFlexGridGroup = useMemo(()=>filterStyleGroup(flexGridGroup, search), [
909
+ flexGridGroup,
910
+ search
911
+ ]);
912
+ const visibleStyleGroups = useMemo(()=>styleGroups.map((group)=>filterStyleGroup(group, search)).filter((group)=>Boolean(group)), [
913
+ styleGroups,
914
+ search
915
+ ]);
916
+ // Nothing anywhere answered the query — said once, rather than leaving
917
+ // the author looking at a panel that has silently emptied itself.
918
+ const hasResults = !searching || Boolean(visibleStyleGroups.length || visibleFlexboxToggles.length || visibleFlexGridGroup || matchesSection('box') || matchesSection('textAlign') || matchesSection('visibility') || matchesSection('classes'));
919
+ // Re-seeds a group form's initial values when the selection, the
920
+ // override target or the artboard scope changes (AGL-540/588/1332).
921
+ const formSeedKey = `${(_ref1 = node == null ? void 0 : node.$id) != null ? _ref1 : ''}:${overrideKey}:${activeBreakpoint != null ? activeBreakpoint : 'base'}` + `:${activeScheme != null ? activeScheme : 'light'}:${activeState != null ? activeState : 'base'}`;
922
+ return /*#__PURE__*/ _jsxs(_Fragment, {
923
+ children: [
924
+ /*#__PURE__*/ _jsx(Container, {
925
+ gutterY: [
926
+ 1
927
+ ],
928
+ dense: true,
929
+ children: /*#__PURE__*/ _jsx(TextField, {
930
+ fullWidth: true,
931
+ size: "small",
932
+ margin: "dense",
933
+ type: "search",
934
+ value: query,
935
+ onChange: handleSearchChange,
936
+ label: "Search styles",
937
+ placeholder: "rounded, shadow, spacing…"
938
+ })
939
+ }),
940
+ hasResults ? null : /*#__PURE__*/ _jsx(Container, {
941
+ gutterY: [
942
+ 1
943
+ ],
944
+ dense: true,
945
+ children: /*#__PURE__*/ _jsx(Alert, {
946
+ severity: "info",
947
+ sx: {
948
+ fontSize: '0.8125rem'
949
+ },
950
+ children: `No style matches “${search}”. Try a plainer word — ` + '“rounded”, “shadow”, “spacing”, “hide”.'
951
+ })
952
+ }),
953
+ /*#__PURE__*/ _jsxs(Container, {
954
+ gutterY: [
955
+ 1
956
+ ],
957
+ dense: true,
958
+ children: [
959
+ /*#__PURE__*/ _jsx(Tooltip, {
960
+ title: activeBreakpoint ? `Edits apply from the ${activeBreakpoint.toUpperCase()} ` + 'breakpoint up. Switch the artboard preview to Fluid ' + 'Responsive to edit the base styles.' : 'Edits apply at every screen size. Switch the artboard ' + 'preview to a device size to style that breakpoint only.',
961
+ children: /*#__PURE__*/ _jsx(Chip, {
962
+ size: "small",
963
+ color: activeBreakpoint ? 'primary' : 'default',
964
+ label: activeBreakpoint ? `Styling breakpoint: ${activeBreakpoint.toUpperCase()}` : 'Styling: all screen sizes'
965
+ })
966
+ }),
967
+ activeScheme === 'dark' ? /*#__PURE__*/ _jsx(Tooltip, {
968
+ title: 'The artboard is previewing the dark scheme: text, ' + 'background, and border color edits apply to dark mode ' + 'only. Other styles still apply to both schemes. Switch ' + 'the artboard back to light to edit the base colors.',
969
+ children: /*#__PURE__*/ _jsx(Chip, {
970
+ size: "small",
971
+ color: "primary",
972
+ variant: "outlined",
973
+ sx: {
974
+ ml: 1
975
+ },
976
+ label: "Styling: dark scheme"
977
+ })
978
+ }) : null
979
+ ]
980
+ }),
981
+ /*#__PURE__*/ _jsxs(Container, {
982
+ gutterY: [
983
+ 1
984
+ ],
985
+ dense: true,
986
+ sx: {
987
+ position: 'relative',
988
+ pr: 3
989
+ },
990
+ children: [
991
+ /*#__PURE__*/ _jsx(HelpTip, {
992
+ title: "Hover, focus & other states",
993
+ excerpt: "Style how this element looks when someone points at it, presses it or reaches it with the keyboard. Picking a state also shows it on the canvas while you work — that preview is never saved.",
994
+ href: besignerDocsUrl('responsiveStyling', '#interaction-states'),
995
+ sx: {
996
+ position: 'absolute',
997
+ top: 0,
998
+ right: 8,
999
+ zIndex: 1,
1000
+ fontSize: '0.9em'
1001
+ }
1002
+ }),
1003
+ /*#__PURE__*/ _jsxs(Box, {
1004
+ sx: {
1005
+ display: 'flex',
1006
+ flexWrap: 'nowrap',
1007
+ alignItems: 'center',
1008
+ gap: 0.5,
1009
+ overflowX: 'auto',
1010
+ // The scrollbar would eat more height than the chips it serves.
1011
+ scrollbarWidth: 'none',
1012
+ '&::-webkit-scrollbar': {
1013
+ display: 'none'
1014
+ },
1015
+ // Tightened from the stock small chip so the row clears a narrow
1016
+ // panel; the 0.75rem type still matches the breakpoint chip above.
1017
+ '& .MuiChip-label': {
1018
+ px: 0.75
1019
+ },
1020
+ '& .MuiChip-root': {
1021
+ flexShrink: 0
1022
+ },
1023
+ '& .MuiChip-deleteIcon': {
1024
+ ml: '-2px',
1025
+ mr: '2px'
1026
+ }
1027
+ },
1028
+ children: [
1029
+ /*#__PURE__*/ _jsx(Tooltip, {
1030
+ title: "Styles that apply at rest, and everywhere a state does not override them.",
1031
+ children: /*#__PURE__*/ _jsx(Chip, {
1032
+ size: "small",
1033
+ variant: "filled",
1034
+ color: activeState ? 'default' : 'primary',
1035
+ label: "Default",
1036
+ onClick: ()=>selectState(null)
1037
+ })
1038
+ }),
1039
+ SX_STATES.map((state)=>/*#__PURE__*/ _jsx(Tooltip, {
1040
+ title: SX_STATE_DESCRIPTIONS[state],
1041
+ children: /*#__PURE__*/ _jsx(Chip, {
1042
+ size: "small",
1043
+ variant: "outlined",
1044
+ color: activeState === state ? 'primary' : 'default',
1045
+ label: sxHasStateSlice(nodeSx, state) ? `${SX_STATE_LABELS[state]} •` : SX_STATE_LABELS[state],
1046
+ onClick: ()=>selectState(state),
1047
+ // The X clears the WHOLE slice, and only appears on the state
1048
+ // being edited that actually has one — the same clear
1049
+ // affordance individual values have, one level up.
1050
+ onDelete: activeState === state && sxHasStateSlice(nodeSx, state) ? ()=>clearState(state) : undefined
1051
+ })
1052
+ }, state))
1053
+ ]
1054
+ })
1055
+ ]
1056
+ }),
1057
+ activeState ? /*#__PURE__*/ _jsxs(Container, {
1058
+ gutterY: [
1059
+ 1
1060
+ ],
1061
+ dense: true,
1062
+ children: [
1063
+ /*#__PURE__*/ _jsx(Alert, {
1064
+ severity: "warning",
1065
+ sx: {
1066
+ fontSize: '0.8125rem'
1067
+ },
1068
+ children: `The canvas is showing this element's ${SX_STATE_PROSE[activeState]}` + ' state so you can see what you are styling. ' + 'It is a preview — it is not saved and does not affect your ' + 'published page. Choose Default to stop.'
1069
+ }),
1070
+ stateAdvisoryText ? /*#__PURE__*/ _jsx(Alert, {
1071
+ severity: "info",
1072
+ sx: {
1073
+ fontSize: '0.8125rem',
1074
+ mt: 1
1075
+ },
1076
+ children: stateAdvisoryText
1077
+ }) : null
1078
+ ]
1079
+ }) : null,
1080
+ target.isInstanceOverride ? /*#__PURE__*/ _jsxs(Container, {
1081
+ gutterY: [
1082
+ 1
1083
+ ],
1084
+ dense: true,
1085
+ children: [
1086
+ styleTargets.length > 1 ? /*#__PURE__*/ _jsx(TextField, {
1087
+ select: true,
1088
+ fullWidth: true,
1089
+ size: "small",
1090
+ margin: "dense",
1091
+ label: "Style target",
1092
+ value: overrideKey,
1093
+ onChange: handleStyleTargetChange,
1094
+ helperText: target.isLeafOverride ? 'Styling one element inside the component, on this ' + 'instance only. Its content still comes from the ' + 'component.' : "Styling the component's outer element on this " + 'instance. Pick an element inside it to restyle that ' + 'part — a headline that sets its own color ignores ' + 'one set out here.',
1095
+ children: styleTargets.map((entry)=>/*#__PURE__*/ _jsxs(MenuItem, {
1096
+ value: entry.key,
1097
+ // Nesting reads as nesting: the definition's tree is the
1098
+ // only map an author has of what is inside a component.
1099
+ sx: {
1100
+ pl: 2 + entry.depth * 1.5
1101
+ },
1102
+ children: [
1103
+ styleTargetLabel(entry),
1104
+ overriddenKeys.has(entry.key) ? ' •' : ''
1105
+ ]
1106
+ }, entry.key))
1107
+ }) : null,
1108
+ /*#__PURE__*/ _jsx(Tooltip, {
1109
+ title: 'This element is a component instance: style edits here ' + 'apply to this instance only, layered over the ' + "component's own styles. Other placements keep the " + 'component look, and component updates still flow ' + 'through. Use "Edit component" on the Attributes tab to ' + 'change the component for everyone.',
1110
+ children: /*#__PURE__*/ _jsx(Chip, {
1111
+ size: "small",
1112
+ color: overrideProperties.length ? 'secondary' : 'default',
1113
+ label: overrideProperties.length ? `Instance overrides: ${overrideProperties.length}` : 'Styling this instance'
1114
+ })
1115
+ }),
1116
+ overrideProperties.map((property)=>{
1117
+ var // property — printing the raw `&:hover` here would
1118
+ // show an author a selector they never typed
1119
+ // (AGL-2486).
1120
+ _sxStateSliceLabel;
1121
+ return /*#__PURE__*/ _jsx(Tooltip, {
1122
+ title: 'Clear this override — the instance returns to the ' + "component's own value",
1123
+ children: /*#__PURE__*/ _jsx(Chip, {
1124
+ size: "small",
1125
+ variant: "outlined",
1126
+ sx: {
1127
+ ml: 1,
1128
+ mt: 0.5
1129
+ },
1130
+ label: property === SX_SCHEME_DARK_KEY ? 'dark scheme' : (_sxStateSliceLabel = sxStateSliceLabel(property)) != null ? _sxStateSliceLabel : property,
1131
+ onDelete: handleClearOverride(property)
1132
+ })
1133
+ }, property);
1134
+ })
1135
+ ]
1136
+ }) : null,
1137
+ matchesSection('box') ? /*#__PURE__*/ _jsxs(Container, {
1138
+ gutterY: [
1139
+ 2
1140
+ ],
1141
+ dense: true,
1142
+ sx: {
1143
+ position: 'relative'
1144
+ },
1145
+ children: [
1146
+ /*#__PURE__*/ _jsx(HelpTip, {
1147
+ title: "Margin & padding",
1148
+ excerpt: "Click a side of the box to set its space at the active breakpoint — a step from your theme's spacing scale, or an exact amount in the unit of your choice.",
1149
+ href: besignerDocsUrl('responsiveStyling', '#box-stylers'),
1150
+ sx: {
1151
+ position: 'absolute',
1152
+ top: 0,
1153
+ right: 8,
1154
+ zIndex: 1,
1155
+ fontSize: '0.9em'
1156
+ }
1157
+ }),
1158
+ /*#__PURE__*/ _jsx(BoxStyler, {
1159
+ measurements: boxMeasurements,
1160
+ spacingSteps: themeScales.spacing,
1161
+ border: boxBorder,
1162
+ onChange: handleBoxStylerChange,
1163
+ // One eye per SIDE, resolved when a side is opened: the box
1164
+ // editor shows one side's value at a time, and each side is
1165
+ // its own declaration.
1166
+ muteForSide: styleMute
1167
+ })
1168
+ ]
1169
+ }) : null,
1170
+ matchesSection('textAlign') ? /*#__PURE__*/ _jsx(Container, {
1171
+ gutterY: [
1172
+ 2
1173
+ ],
1174
+ dense: true,
1175
+ children: /*#__PURE__*/ _jsx(TextAlignToggleButtonGroup, {
1176
+ onChange: handleTextAlignChange,
1177
+ value: effectiveValues['textAlign'],
1178
+ mute: styleMute('textAlign', 'Text Alignment'),
1179
+ field: {
1180
+ component: FieldComponentType.TOGGLE_BUTTON,
1181
+ name: 'textAlign',
1182
+ label: 'Text Alignment',
1183
+ description: 'Sets the horizontal alignment of the inline-level content inside a block element or table-cell box.',
1184
+ exclusive: true,
1185
+ options: [
1186
+ {
1187
+ value: 'inherit',
1188
+ icon: ICON_VARIANT_CSS_INHERIT.path,
1189
+ label: 'Inherit'
1190
+ },
1191
+ {
1192
+ value: 'left',
1193
+ icon: ICON_VARIANT_ALIGN_LEFT.path,
1194
+ label: 'Left'
1195
+ },
1196
+ {
1197
+ value: 'center',
1198
+ icon: ICON_VARIANT_ALIGN_CENTER.path,
1199
+ label: 'Center'
1200
+ },
1201
+ {
1202
+ value: 'right',
1203
+ icon: ICON_VARIANT_ALIGN_RIGHT.path,
1204
+ label: 'Right'
1205
+ },
1206
+ {
1207
+ value: 'justify',
1208
+ icon: ICON_VARIANT_ALIGN_JUSTIFY.path,
1209
+ label: 'Justify'
1210
+ }
1211
+ ]
1212
+ }
1213
+ })
1214
+ }) : null,
1215
+ visibleFlexboxToggles.length || visibleFlexGridGroup ? /*#__PURE__*/ _jsxs(Accordion, {
1216
+ expanded: searching,
1217
+ summary: "Flexbox & Grid",
1218
+ help: {
1219
+ title: 'Flexbox & grid layout',
1220
+ excerpt: 'Configure the selected element as a flex or grid container — alignment, wrapping, direction, gaps and track lists — and place it inside its own parent’s layout.',
1221
+ href: besignerDocsUrl('responsiveStyling', '#style-groups')
1222
+ },
1223
+ children: [
1224
+ visibleFlexboxToggles.map((schema)=>{
1225
+ var _effectiveValues_schema_name;
1226
+ return /*#__PURE__*/ _jsx(ToggleButtonFormControl, {
1227
+ onChange: handleFlexboxChange(schema.name),
1228
+ schema: schema,
1229
+ mute: styleMute(schema.name, schema.label),
1230
+ value: (_effectiveValues_schema_name = effectiveValues[schema.name]) != null ? _effectiveValues_schema_name : ''
1231
+ }, schema.name);
1232
+ }),
1233
+ visibleFlexGridGroup ? /*#__PURE__*/ _jsx(FormRenderer, {
1234
+ FormTemplate: ElementStylesFormTemplate,
1235
+ componentMapper: componentMapper,
1236
+ keepDirtyOnReinitialize: true,
1237
+ // The SAVE stays scoped to the whole group even while the
1238
+ // panel shows a filtered subset (AGL-2486): a partial does not
1239
+ // carry the hidden fields, and `computeStylePartial` would
1240
+ // then write `undefined` over every one of them — a search
1241
+ // would silently clear the styles it was only meant to hide.
1242
+ onSubmit: handleGroupSave(styleGroupFieldNames(visibleFlexGridGroup)),
1243
+ initialValues: pickStyleValues(styleGroupFieldNames(visibleFlexGridGroup), effectiveValues),
1244
+ schema: {
1245
+ fields: withStyleMutes(visibleFlexGridGroup.fields)
1246
+ }
1247
+ }, formSeedKey) : null
1248
+ ]
1249
+ }, `flex-grid:${accordionKey}`) : null,
1250
+ matchesSection('visibility') ? /*#__PURE__*/ _jsxs(Accordion, {
1251
+ expanded: searching,
1252
+ summary: "Visibility",
1253
+ help: {
1254
+ title: 'Visibility per device band',
1255
+ excerpt: 'Hide the element on whole device bands — e.g. hide a desktop link cluster on mobile and show a menu button instead.',
1256
+ href: besignerDocsUrl('responsiveStyling', '#visibility-per-device-band')
1257
+ },
1258
+ children: [
1259
+ VISIBILITY_BANDS.map((band)=>/*#__PURE__*/ _jsx(FormControlLabel, {
1260
+ control: /*#__PURE__*/ _jsx(Switch, {
1261
+ size: "small",
1262
+ checked: hiddenBands.includes(band),
1263
+ onChange: handleVisibilityChange(band)
1264
+ }),
1265
+ label: VISIBILITY_BAND_LABELS[band],
1266
+ sx: {
1267
+ display: 'flex',
1268
+ mb: 0.5
1269
+ }
1270
+ }, band)),
1271
+ /*#__PURE__*/ _jsx(FormHelperText, {
1272
+ children: 'Hidden bands apply on the live site at those screen widths. ' + 'The canvas preview follows your browser window width, so ' + 'resize the window (or publish) to see the effect.'
1273
+ })
1274
+ ]
1275
+ }, `visibility:${accordionKey}`) : null,
1276
+ visibleStyleGroups.map((group)=>{
1277
+ const fieldNames = styleGroupFieldNames(group);
1278
+ return /*#__PURE__*/ _jsx(Accordion, {
1279
+ expanded: searching,
1280
+ summary: group.label,
1281
+ help: {
1282
+ title: `${group.label} styles`,
1283
+ excerpt: 'Every field edits the selected element at the active breakpoint and scheme scope; the line under each field says what it does, and a ? marks the few whose bare number is not pixels.',
1284
+ href: besignerDocsUrl('responsiveStyling', '#style-groups')
1285
+ },
1286
+ children: /*#__PURE__*/ _jsx(FormRenderer, {
1287
+ FormTemplate: ElementStylesFormTemplate,
1288
+ componentMapper: componentMapper,
1289
+ // Re-seed from the document, but never over the caret
1290
+ // (AGL-2486). Changing `initialValues` is what carries an
1291
+ // undo into these fields; on its own it also resets the
1292
+ // field being typed in the moment a SIBLING key in the same
1293
+ // group moves. `keepDirtyOnReinitialize` draws the line
1294
+ // where it belongs: a field whose value still equals what
1295
+ // was last stored takes the new reading, and one the author
1296
+ // has since changed keeps their characters until the
1297
+ // debounced commit stores them.
1298
+ keepDirtyOnReinitialize: true,
1299
+ onSubmit: handleGroupSave(fieldNames),
1300
+ initialValues: pickStyleValues(fieldNames, effectiveValues),
1301
+ schema: {
1302
+ fields: withStyleMutes(group.fields)
1303
+ }
1304
+ }, formSeedKey)
1305
+ }, `${group.$id}:${accordionKey}`);
1306
+ }),
1307
+ matchesSection('classes') ? /*#__PURE__*/ _jsxs(Accordion, {
1308
+ expanded: searching,
1309
+ summary: "Classes & custom CSS",
1310
+ help: {
1311
+ title: 'Custom classes & CSS',
1312
+ excerpt: 'Attach reusable style classes to the element, or write raw CSS (sx) for anything the panels don’t cover.',
1313
+ href: besignerDocsUrl('responsiveStyling', '#custom-classes')
1314
+ },
1315
+ children: [
1316
+ /*#__PURE__*/ _jsx(ElementClassesField, {
1317
+ node: node
1318
+ }),
1319
+ /*#__PURE__*/ _jsx(CustomCssForm, {
1320
+ node: node,
1321
+ breakpoint: activeBreakpoint,
1322
+ overrideKey: overrideKey
1323
+ })
1324
+ ]
1325
+ }, `classes:${accordionKey}`) : null,
1326
+ /*#__PURE__*/ _jsx(Container, {
1327
+ gutterY: [
1328
+ 2
1329
+ ],
1330
+ dense: true,
1331
+ children: /*#__PURE__*/ _jsx(FormControl, {
1332
+ margin: "none",
1333
+ fullWidth: true,
1334
+ children: /*#__PURE__*/ _jsx(Button, {
1335
+ onClick: ()=>deleteElementCallback(node),
1336
+ sx: {
1337
+ color: 'error.main'
1338
+ },
1339
+ fullWidth: true,
1340
+ children: "Delete Element"
1341
+ })
1342
+ })
1343
+ })
1344
+ ]
1345
+ });
1346
+ }));
1347
+ ElementStylesForm.displayName = 'ElementStylesForm';
1348
+ export default ElementStylesForm;
1349
+
1350
+ //# sourceMappingURL=element-styles-form.component.js.map