react-semaphor 0.1.507 → 0.1.509

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 (254) hide show
  1. package/DATA_APP_SDK.md +56 -0
  2. package/dist/analytics-protocol/index.cjs +1 -1
  3. package/dist/analytics-protocol/index.js +194 -172
  4. package/dist/appearance/index.cjs +1 -1
  5. package/dist/appearance/index.js +1 -1
  6. package/dist/appearance-runtime/index.cjs +1 -1
  7. package/dist/appearance-runtime/index.js +1 -1
  8. package/dist/brand-studio/index.cjs +2 -2
  9. package/dist/brand-studio/index.js +279 -250
  10. package/dist/briefings/index.cjs +1 -1
  11. package/dist/briefings/index.js +3 -3
  12. package/dist/chunks/appearance-context-DzqCdhB4.cjs +1 -0
  13. package/dist/chunks/{appearance-context-XviHOhWJ.js → appearance-context-VJdrKi7r.js} +2 -1
  14. package/dist/chunks/{appearance-runtime-provider-D0xVQWnH.js → appearance-runtime-provider-CC4HT2Gi.js} +2 -2
  15. package/dist/chunks/{appearance-runtime-provider-Ca8rxO86.cjs → appearance-runtime-provider-D5pkvgE4.cjs} +1 -1
  16. package/dist/chunks/calculated-field-identity-BiTGmnST.cjs +1 -0
  17. package/dist/chunks/calculated-field-identity-CJL54uFx.js +1373 -0
  18. package/dist/chunks/{constants-NUleP4DY.js → card-config-utils-Bq1enstT.js} +260 -260
  19. package/dist/chunks/card-config-utils-CMO4_zVs.cjs +1 -0
  20. package/dist/chunks/{dashboard-briefing-launcher-DXTpU85p.js → dashboard-briefing-launcher-B5AQu-Vb.js} +12 -12
  21. package/dist/chunks/{dashboard-briefing-launcher-C8nDSDnV.cjs → dashboard-briefing-launcher-BoXFrqq0.cjs} +1 -1
  22. package/dist/chunks/{dashboard-controls-CyL0yimg.js → dashboard-controls-CKKkSXEX.js} +16 -14
  23. package/dist/chunks/dashboard-controls-gUVkQm8o.cjs +52 -0
  24. package/dist/chunks/dashboard-json-B7fSi6_b.cjs +1 -0
  25. package/dist/chunks/{dashboard-json-5Jr3RudV.js → dashboard-json-CAJJquVx.js} +9 -9
  26. package/dist/chunks/edit-dashboard-visual-AZetLUv1.cjs +172 -0
  27. package/dist/chunks/{edit-dashboard-visual-C7X-um9g.js → edit-dashboard-visual-DCnbqRRn.js} +1986 -1990
  28. package/dist/chunks/{editor-action-buttons-CcDm8nA5.cjs → editor-action-buttons-CBQsVYdt.cjs} +2 -2
  29. package/dist/chunks/{editor-action-buttons-C5Wja_J4.js → editor-action-buttons-DDA5JGwO.js} +6 -6
  30. package/dist/chunks/field-aggregations-DUb0NU6c.js +1229 -0
  31. package/dist/chunks/field-aggregations-jSi77h9Z.cjs +1 -0
  32. package/dist/chunks/{field-dependencies-DVl2p1Nm.js → field-dependencies-Cl97kkHy.js} +30 -34
  33. package/dist/chunks/{field-dependencies-r_U0CGQ-.cjs → field-dependencies-DIab72rQ.cjs} +1 -1
  34. package/dist/chunks/{index-BVr4fcCB.js → index-0pdaQ9e1.js} +5 -5
  35. package/dist/chunks/{index-De2QNsqV.js → index-CL2lvhwk.js} +47783 -46019
  36. package/dist/chunks/{index-C9KXfCkC.js → index-CLIro-EG.js} +3 -0
  37. package/dist/chunks/index-Cx3qmRUB.cjs +1 -0
  38. package/dist/chunks/{index-BlYf8gNa.cjs → index-DhlVxvyI.cjs} +1 -1
  39. package/dist/chunks/index-DkEAikW8.cjs +1420 -0
  40. package/dist/chunks/{matrix-card-DACDwdTq.js → matrix-card-CnKQpnsj.js} +1 -1
  41. package/dist/chunks/{matrix-card-CRXcmAjp.cjs → matrix-card-U4c72doZ.cjs} +1 -1
  42. package/dist/chunks/{matrix-control-sources-ClQzIk7E.js → matrix-control-sources-CRRdP03Q.js} +165 -134
  43. package/dist/chunks/matrix-control-sources-FjxGIbqk.cjs +1 -0
  44. package/dist/chunks/{matrix-formatter-7GLTcBuy.cjs → matrix-formatter-CveLJo6S.cjs} +1 -1
  45. package/dist/chunks/{matrix-formatter-xsq7n_e6.js → matrix-formatter-ZVS5QOuq.js} +2 -2
  46. package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +1 -0
  47. package/dist/chunks/matrix-member-presentation-CzGZJd3a.js +182 -0
  48. package/dist/chunks/matrix-operation-contract-DoiWTUbT.cjs +1 -0
  49. package/dist/chunks/matrix-operation-contract-xL8IhFzp.js +1802 -0
  50. package/dist/chunks/{pivot-header-presentation-3wqWChFd.cjs → pivot-header-presentation-Cxz8-06f.cjs} +1 -1
  51. package/dist/chunks/{pivot-header-presentation-D44ODZGn.js → pivot-header-presentation-DVylCBHB.js} +2 -2
  52. package/dist/chunks/{pivot-result-lifecycle-DZ0ZSMoM.cjs → pivot-result-lifecycle-BiERyXnS.cjs} +1 -1
  53. package/dist/chunks/{pivot-result-lifecycle-BSmqVkVG.js → pivot-result-lifecycle-CmjpW7qG.js} +1 -1
  54. package/dist/chunks/{report-preferences-dialog-xADifRXs.js → report-preferences-dialog-Bv2VIOKc.js} +4 -4
  55. package/dist/chunks/report-preferences-dialog-Wg9g9fIj.cjs +1 -0
  56. package/dist/chunks/{search-BHsQIWBV.js → selection-reducer-B94WgZ9V.js} +55 -11
  57. package/dist/chunks/selection-reducer-CGKKsaPa.cjs +26 -0
  58. package/dist/chunks/{semantic-format-BhIL1PXP.cjs → semantic-format-BzH69TRq.cjs} +1 -1
  59. package/dist/chunks/{semantic-format-C3amkGmY.js → semantic-format-CBlRO8Aw.js} +1 -1
  60. package/dist/chunks/{switch-DHGiC0aU.js → switch-CD4uGTZI.js} +7450 -7694
  61. package/dist/chunks/switch-iC1x2dcE.cjs +134 -0
  62. package/dist/chunks/token-types-Ahh5u4iT.cjs +1 -0
  63. package/dist/chunks/token-types-CPde8_LG.js +8 -0
  64. package/dist/chunks/{update-policy-Cc9h57pA.cjs → update-policy-COjFudhl.cjs} +1 -1
  65. package/dist/chunks/{update-policy-eTcz52jO.js → update-policy-D9q1Tz8k.js} +1 -1
  66. package/dist/dashboard/index.cjs +1 -1
  67. package/dist/dashboard/index.js +1 -1
  68. package/dist/dashboard-authoring/index.cjs +3 -3
  69. package/dist/dashboard-authoring/index.js +734 -622
  70. package/dist/data-app-builder/index.cjs +1 -1
  71. package/dist/data-app-builder/index.js +3 -3
  72. package/dist/data-app-codegen/index.cjs +1 -1
  73. package/dist/data-app-codegen/index.js +2 -2
  74. package/dist/data-app-codegen-node/index.cjs +94 -92
  75. package/dist/data-app-codegen-node/index.js +337 -333
  76. package/dist/data-app-sdk/index.cjs +9 -9
  77. package/dist/data-app-sdk/index.js +1091 -969
  78. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  79. package/dist/data-app-sdk-adapters/index.js +104 -96
  80. package/dist/data-app-sdk-validation/index.cjs +1 -1
  81. package/dist/data-app-sdk-validation/index.js +2 -2
  82. package/dist/format-utils/index.cjs +1 -1
  83. package/dist/format-utils/index.js +8 -8
  84. package/dist/index.cjs +1 -1
  85. package/dist/index.js +15 -15
  86. package/dist/style.css +1 -1
  87. package/dist/surfboard/index.cjs +1 -1
  88. package/dist/surfboard/index.js +2 -2
  89. package/dist/types/brand-studio/brand-studio-draft.d.ts +3 -1
  90. package/dist/types/components/dashboard/card-selection-pill.d.ts +5 -0
  91. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  92. package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -0
  93. package/dist/types/components/dashboard/drill-navigation-controls.d.ts +3 -3
  94. package/dist/types/components/interactions/applied-filters-display.d.ts +6 -1
  95. package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +21 -0
  96. package/dist/types/components/interactions/dashboard-drill-host.d.ts +13 -0
  97. package/dist/types/components/interactions/filter-badge-tooltip.d.ts +4 -4
  98. package/dist/types/components/interactions/insight-modal.d.ts +4 -14
  99. package/dist/types/components/interactions/insight-viewer.d.ts +7 -19
  100. package/dist/types/components/interactions/interactions-sheet.d.ts +6 -0
  101. package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +20 -0
  102. package/dist/types/components/interactions/reusable/interaction-selection-popover.d.ts +2 -2
  103. package/dist/types/components/interactions/sheet/action-editor.d.ts +17 -0
  104. package/dist/types/components/interactions/sheet/action-meta.d.ts +45 -0
  105. package/dist/types/components/interactions/sheet/action-picker.d.ts +7 -0
  106. package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +10 -0
  107. package/dist/types/components/interactions/sheet/interactions-home.d.ts +28 -0
  108. package/dist/types/components/interactions/sheet/sheet-parts.d.ts +37 -0
  109. package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +28 -1
  110. package/dist/types/components/surfboard/filter/selection-chip.d.ts +11 -0
  111. package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +4 -0
  112. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +3 -0
  113. package/dist/types/components/ui/resizable.d.ts +1 -1
  114. package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
  115. package/dist/types/components/visual/matrix-table/matrix-selection-click.d.ts +6 -0
  116. package/dist/types/components/visual/matrix-table/matrix-window-viewer.d.ts +1 -1
  117. package/dist/types/data-app-sdk/adapters.d.ts +3 -2
  118. package/dist/types/data-app-sdk/builders.d.ts +2 -1
  119. package/dist/types/data-app-sdk/contracts.d.ts +44 -2
  120. package/dist/types/data-app-sdk/index.d.ts +1 -0
  121. package/dist/types/data-app-sdk/query-request.d.ts +7 -2
  122. package/dist/types/data-app-sdk/selection.d.ts +2 -0
  123. package/dist/types/index.cjs +1 -1
  124. package/dist/types/index.js +24 -23
  125. package/dist/types/lib/appearance/types.d.ts +3 -1
  126. package/dist/types/lib/briefings/briefing-attachment-model.d.ts +0 -2
  127. package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -8
  128. package/dist/types/lib/dashboard/click-to-filter-card-references.d.ts +23 -0
  129. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +16 -2
  130. package/dist/types/lib/dashboard-inputs/build-selection-dashboard-inputs.d.ts +31 -0
  131. package/dist/types/lib/dashboard-inputs/click-to-filter-emitted-fields.d.ts +17 -0
  132. package/dist/types/lib/dashboard-inputs/click-to-filter-mapping-draft.d.ts +99 -0
  133. package/dist/types/lib/dashboard-inputs/click-to-filter-sheet-reach.d.ts +12 -0
  134. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +18 -1
  135. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-candidate-metadata.d.ts +4 -1
  136. package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +10 -0
  137. package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +8 -1
  138. package/dist/types/lib/dashboard-inputs/index.d.ts +1 -0
  139. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +18 -7
  140. package/dist/types/lib/dashboard-inputs/resolve-field-date-comparison-coverage.d.ts +5 -2
  141. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +77 -0
  142. package/dist/types/lib/dashboard-inputs/selection-targets.d.ts +26 -0
  143. package/dist/types/lib/dashboard-inputs/transient-input-context.d.ts +102 -0
  144. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +50 -0
  145. package/dist/types/lib/dashboard-navigation/describe-carried-context.d.ts +11 -0
  146. package/dist/types/lib/dashboard-navigation/index.d.ts +1 -0
  147. package/dist/types/lib/dashboard-navigation/navigation-state.d.ts +120 -0
  148. package/dist/types/lib/dashboard-navigation/run-one-off-drill.d.ts +11 -0
  149. package/dist/types/lib/dashboard-navigation/use-transient-contexts.d.ts +17 -0
  150. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +48 -0
  151. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +20 -0
  152. package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
  153. package/dist/types/lib/download-pdf.d.ts +0 -3
  154. package/dist/types/lib/formatters/metric-formatting.d.ts +1 -1
  155. package/dist/types/lib/hooks/ai/dashboard-context.d.ts +15 -8
  156. package/dist/types/lib/hooks/chartjs/use-chart-blur.d.ts +10 -2
  157. package/dist/types/lib/hooks/interactions/{use-event-engine.d.ts → use-drill-actions.d.ts} +28 -7
  158. package/dist/types/lib/hooks/selection/use-active-selections.d.ts +15 -0
  159. package/dist/types/lib/hooks/selection/use-click-to-filter-mapping-draft.d.ts +20 -0
  160. package/dist/types/lib/hooks/selection/use-selection-click.d.ts +34 -0
  161. package/dist/types/lib/hooks/selection/use-selection-gestures.d.ts +38 -0
  162. package/dist/types/lib/hooks/selection/use-table-row-selection.d.ts +46 -0
  163. package/dist/types/lib/hooks/use-dashboard-card.d.ts +0 -2
  164. package/dist/types/lib/hooks/use-dashboard-filter-mapping-candidates.d.ts +18 -0
  165. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +0 -1
  166. package/dist/types/lib/hooks/use-dashboard.d.ts +1 -3
  167. package/dist/types/lib/hooks/use-interactions-popover.d.ts +1 -8
  168. package/dist/types/lib/hooks/use-resolved-card-config.d.ts +6 -0
  169. package/dist/types/lib/interactions/click-outcome.d.ts +25 -0
  170. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +3 -1
  171. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +1 -1
  172. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +7 -0
  173. package/dist/types/lib/interactions/interaction-utils.d.ts +17 -1
  174. package/dist/types/lib/matrix-table/build-matrix-drill-to-detail.d.ts +15 -0
  175. package/dist/types/lib/matrix-table/matrix-card-interactions.d.ts +14 -3
  176. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +0 -3
  177. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +0 -4
  178. package/dist/types/lib/matrix-table/{use-matrix-selection.d.ts → use-matrix-cell-focus.d.ts} +13 -17
  179. package/dist/types/lib/matrix-table/use-matrix.d.ts +0 -1
  180. package/dist/types/lib/query-context/build-card-query-context.d.ts +19 -8
  181. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -3
  182. package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +12 -4
  183. package/dist/types/lib/query-context/compile-selection-filters.d.ts +5 -0
  184. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +46 -0
  185. package/dist/types/lib/query-context/filter-group-utils.d.ts +3 -0
  186. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +29 -0
  187. package/dist/types/lib/selection/click-to-filter-authoring-support.d.ts +9 -0
  188. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  189. package/dist/types/lib/selection/selection-labels.d.ts +3 -0
  190. package/dist/types/lib/selection/selection-notices.d.ts +9 -0
  191. package/dist/types/lib/selection/selection-reducer.d.ts +46 -0
  192. package/dist/types/lib/stores/dashboard-store.d.ts +62 -17
  193. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  194. package/dist/types/lib/stores/index.d.ts +0 -2
  195. package/dist/types/lib/types/common-types.d.ts +60 -6
  196. package/dist/types/lib/types/explorer-types.d.ts +1 -22
  197. package/dist/types/lib/types/interaction-types.d.ts +6 -198
  198. package/dist/types/lib/utils/calculate-context-aware-filters.d.ts +21 -12
  199. package/dist/types/lib/utils/card-utils.d.ts +11 -0
  200. package/dist/types/lib/utils/date-hierarchy-utils.d.ts +3 -1
  201. package/dist/types/lib/utils/drag-and-drop-utils.d.ts +1 -1
  202. package/dist/types/lib/utils/interaction-icons.d.ts +1 -1
  203. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +32 -32
  204. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  205. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +100 -0
  206. package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +12 -0
  207. package/dist/types/shared/dashboard-authoring/apply-group-by-override.d.ts +19 -0
  208. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +88 -0
  209. package/dist/types/shared/dashboard-authoring/contracts.d.ts +8 -0
  210. package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
  211. package/dist/types/shared/dashboard-authoring/linked-click-to-filter-overrides.d.ts +32 -0
  212. package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
  213. package/package.json +1 -1
  214. package/src/data-app-sdk/README.md +58 -1
  215. package/dist/chunks/appearance-context-tNjvTJj3.cjs +0 -1
  216. package/dist/chunks/calculated-field-identity-BTpUqfEu.js +0 -1276
  217. package/dist/chunks/calculated-field-identity-rMuXuzEY.cjs +0 -1
  218. package/dist/chunks/constants-vtu7_IUo.cjs +0 -1
  219. package/dist/chunks/dashboard-controls-DlxeddZN.cjs +0 -52
  220. package/dist/chunks/dashboard-json-DhS4yJfc.cjs +0 -1
  221. package/dist/chunks/edit-dashboard-visual-X3OCnivL.cjs +0 -172
  222. package/dist/chunks/field-aggregations-BU_3gHKR.js +0 -957
  223. package/dist/chunks/field-aggregations-CDCamEsQ.cjs +0 -1
  224. package/dist/chunks/index-C8XCKzB6.cjs +0 -1
  225. package/dist/chunks/index-DSa6RSdg.cjs +0 -1417
  226. package/dist/chunks/matrix-control-sources-CeC5EMyq.cjs +0 -1
  227. package/dist/chunks/matrix-member-presentation-E2B4k3ws.cjs +0 -1
  228. package/dist/chunks/matrix-member-presentation-qiHxv67e.js +0 -105
  229. package/dist/chunks/matrix-operation-contract-Cqy4EW2H.js +0 -1638
  230. package/dist/chunks/matrix-operation-contract-D9dLX-Wr.cjs +0 -1
  231. package/dist/chunks/report-preferences-dialog-7Vsc_fsG.cjs +0 -1
  232. package/dist/chunks/search-BqqhaMx9.cjs +0 -26
  233. package/dist/chunks/switch-BytP6QY8.cjs +0 -139
  234. package/dist/types/components/interactions/configuration-popover.d.ts +0 -1
  235. package/dist/types/components/interactions/interaction-card.d.ts +0 -59
  236. package/dist/types/components/interactions/interaction-event-handler.d.ts +0 -11
  237. package/dist/types/components/interactions/interactions-list.d.ts +0 -50
  238. package/dist/types/components/interactions/panels/cross-filter-panel.d.ts +0 -24
  239. package/dist/types/components/interactions/panels/inline-drill-panel.d.ts +0 -24
  240. package/dist/types/components/interactions/selectors/action-selector.d.ts +0 -31
  241. package/dist/types/components/interactions/selectors/trigger-selector.d.ts +0 -38
  242. package/dist/types/components/surfboard/filter/click-filter-section.d.ts +0 -5
  243. package/dist/types/lib/interactions/build-interaction-event.d.ts +0 -25
  244. package/dist/types/lib/interactions/convert-click-filters-to-filter-group.d.ts +0 -10
  245. package/dist/types/lib/interactions/execute-interaction-event.d.ts +0 -80
  246. package/dist/types/lib/interactions/field-utils.d.ts +0 -11
  247. package/dist/types/lib/interactions/handle-chart-click.d.ts +0 -75
  248. package/dist/types/lib/interactions/linked-interaction-utils.d.ts +0 -14
  249. package/dist/types/lib/interactions/source-card-filter-utils.d.ts +0 -9
  250. package/dist/types/lib/matrix-table/matrix-clipboard.d.ts +0 -45
  251. package/dist/types/lib/matrix-table/matrix-selection.d.ts +0 -20
  252. package/dist/types/lib/stores/drill-actions.d.ts +0 -139
  253. package/dist/types/lib/stores/interaction-store.d.ts +0 -113
  254. package/dist/types/lib/stores/pointer-interaction-store.d.ts +0 -18
@@ -1,13 +1,13 @@
1
- import { jsxs as d, jsx as r, Fragment as ce } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as r, Fragment as le } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { c as q, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as le, S as se, d as Je, T as je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q as K, V as Q, W as ee, X as he, Y as re, Z as oe, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-DHGiC0aU.js";
3
+ import { c as K, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as se, S as ue, d as je, T as Je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q, V as ee, W as re, X as he, Y as oe, Z as ae, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-CD4uGTZI.js";
4
4
  import { A as We, p as He } from "../chunks/color-CJvdlFM_.js";
5
- import { c as ae, X as Xe } from "../chunks/x-CXDkqdur.js";
6
- import "../chunks/constants-NUleP4DY.js";
5
+ import { c as ne, X as Xe } from "../chunks/x-CXDkqdur.js";
6
+ import "../chunks/card-config-utils-Bq1enstT.js";
7
7
  import "../chunks/validators-BDYzZFgs.js";
8
- import "../chunks/matrix-operation-contract-Cqy4EW2H.js";
8
+ import "../chunks/matrix-operation-contract-xL8IhFzp.js";
9
9
  import "../value-format-preferences/index.js";
10
- import { r as Ye, v as Ze, A as qe } from "../chunks/index-C9KXfCkC.js";
10
+ import { r as Ye, v as Ze, A as qe } from "../chunks/index-CLIro-EG.js";
11
11
  import { P as G } from "../chunks/palette-Cp1hqZtm.js";
12
12
  import { B as Ke } from "../chunks/braces-8TRlDwDw.js";
13
13
  import { S as Qe } from "../chunks/save-DgMfP0j8.js";
@@ -18,7 +18,7 @@ import { L as er } from "../chunks/layout-grid-CiubineE.js";
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
20
  */
21
- const rr = ae("Ban", [
21
+ const rr = ne("Ban", [
22
22
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
23
23
  ["path", { d: "m4.9 4.9 14.2 14.2", key: "1m5liu" }]
24
24
  ]);
@@ -28,7 +28,7 @@ const rr = ae("Ban", [
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
30
  */
31
- const or = ae("Clipboard", [
31
+ const or = ne("Clipboard", [
32
32
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
33
33
  [
34
34
  "path",
@@ -44,7 +44,7 @@ const or = ae("Clipboard", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const ar = ae("Pipette", [
47
+ const ar = ne("Pipette", [
48
48
  ["path", { d: "m2 22 1-1h3l9-9", key: "1sre89" }],
49
49
  ["path", { d: "M3 21v-3l9-9", key: "hpe2y6" }],
50
50
  [
@@ -71,6 +71,7 @@ const ar = ae("Pipette", [
71
71
  primaryForeground: "#ffffff",
72
72
  accent: "#f4f4f5",
73
73
  accentForeground: "#18181b",
74
+ selection: "#2563eb",
74
75
  card: "#ffffff",
75
76
  cardForeground: "#18181b",
76
77
  chartPalette: [
@@ -92,6 +93,7 @@ const ar = ae("Pipette", [
92
93
  primaryForeground: "#09090b",
93
94
  accent: "#27272a",
94
95
  accentForeground: "#fafafa",
96
+ selection: "#5090f7",
95
97
  card: "#09090b",
96
98
  cardForeground: "#fafafa",
97
99
  chartPalette: [
@@ -120,6 +122,7 @@ const ar = ae("Pipette", [
120
122
  primaryForeground: "#ffffff",
121
123
  accent: "#dbeafe",
122
124
  accentForeground: "#1e3a8a",
125
+ selection: "#2563eb",
123
126
  card: "#ffffff",
124
127
  cardForeground: "#0f172a",
125
128
  chartPalette: [
@@ -141,6 +144,7 @@ const ar = ae("Pipette", [
141
144
  primaryForeground: "#020617",
142
145
  accent: "#1e3a8a",
143
146
  accentForeground: "#dbeafe",
147
+ selection: "#60a5fa",
144
148
  card: "#0f172a",
145
149
  cardForeground: "#e2e8f0",
146
150
  chartPalette: [
@@ -169,6 +173,7 @@ const ar = ae("Pipette", [
169
173
  primaryForeground: "#ffffff",
170
174
  accent: "#d1fae5",
171
175
  accentForeground: "#064e3b",
176
+ selection: "#047857",
172
177
  card: "#ffffff",
173
178
  cardForeground: "#10231d",
174
179
  chartPalette: [
@@ -190,6 +195,7 @@ const ar = ae("Pipette", [
190
195
  primaryForeground: "#071511",
191
196
  accent: "#064e3b",
192
197
  accentForeground: "#d1fae5",
198
+ selection: "#34d399",
193
199
  card: "#0b1d17",
194
200
  cardForeground: "#e7f4ef",
195
201
  chartPalette: [
@@ -203,11 +209,25 @@ const ar = ae("Pipette", [
203
209
  }
204
210
  }
205
211
  ];
206
- function j(e) {
212
+ function J(e) {
207
213
  const n = Ye({
208
214
  organizationAppearance: e ?? void 0
209
215
  });
210
- return tr(O(n));
216
+ return nr(
217
+ dr(O(n))
218
+ );
219
+ }
220
+ function nr(e) {
221
+ for (const n of Object.values(e.schemes))
222
+ for (const t of [
223
+ n.components.table,
224
+ n.components.aggregateTable,
225
+ n.components.pivotTable
226
+ ]) {
227
+ const c = t == null ? void 0 : t.row;
228
+ c != null && c.selectedBackground && c.selectedBackground === c.hoverBackground && delete c.selectedBackground;
229
+ }
230
+ return e;
211
231
  }
212
232
  function L(e) {
213
233
  const n = O({
@@ -216,55 +236,55 @@ function L(e) {
216
236
  schemes: e.schemes
217
237
  }), t = Ze(n);
218
238
  if (!t.success) {
219
- const u = t.issues[0];
239
+ const c = t.issues[0];
220
240
  throw new Error(
221
- `Invalid Brand Studio appearance at ${u.path}: ${u.message}`
241
+ `Invalid Brand Studio appearance at ${c.path}: ${c.message}`
222
242
  );
223
243
  }
224
244
  return t.value;
225
245
  }
226
- function nr(e, n) {
227
- const t = Ne.find((c) => c.id === n);
246
+ function tr(e, n) {
247
+ const t = Ne.find((l) => l.id === n);
228
248
  if (!t)
229
249
  return e;
230
- const u = O(e);
231
- return ue(u.schemes.light, t.light), ue(u.schemes.dark, t.dark), u;
250
+ const c = O(e);
251
+ return pe(c.schemes.light, t.light), pe(c.schemes.dark, t.dark), c;
232
252
  }
233
- function ue(e, n) {
234
- e.tokens.color.background = n.background, e.tokens.color.foreground = n.foreground, e.tokens.color.muted = n.muted, e.tokens.color.mutedForeground = n.mutedForeground, e.tokens.color.border = n.border, e.tokens.color.input = n.border, e.tokens.color.primary = n.primary, e.tokens.color.primaryForeground = n.primaryForeground, e.tokens.color.accent = n.accent, e.tokens.color.accentForeground = n.accentForeground, e.tokens.color.card = n.card, e.tokens.color.cardForeground = n.cardForeground, e.components.dashboard.background = n.background, e.components.dashboard.foreground = n.foreground, e.components.dashboard.borderColor = n.border, e.components.card.background = n.card, e.components.card.foreground = n.cardForeground, e.components.card.borderColor = n.border, e.components.interactive.toolbarBackground = n.background, e.components.interactive.background = n.card, e.components.interactive.foreground = n.foreground, e.components.interactive.borderColor = n.border, e.components.chart.palette = [...n.chartPalette], e.components.chart.background = n.card, e.components.chart.foreground = n.foreground, e.components.chart.gridColor = n.border, e.components.chart.axisColor = n.mutedForeground, e.components.table.container.background = n.card, e.components.table.container.borderColor = n.border, e.components.table.header.background = n.muted, e.components.table.header.foreground = n.mutedForeground, e.components.table.header.dividerColor = n.border, e.components.table.row.dividerColor = n.border, e.components.table.row.zebraBackground = n.muted, e.components.table.pagination.background = n.card, e.components.table.pagination.foreground = n.foreground, e.components.table.pagination.borderColor = n.border, s(e, "aggregateTable"), s(e, "pivotTable");
253
+ function pe(e, n) {
254
+ e.tokens.color.background = n.background, e.tokens.color.foreground = n.foreground, e.tokens.color.muted = n.muted, e.tokens.color.mutedForeground = n.mutedForeground, e.tokens.color.border = n.border, e.tokens.color.input = n.border, e.tokens.color.primary = n.primary, e.tokens.color.primaryForeground = n.primaryForeground, e.tokens.color.accent = n.accent, e.tokens.color.accentForeground = n.accentForeground, e.tokens.color.selection = n.selection, e.tokens.color.card = n.card, e.tokens.color.cardForeground = n.cardForeground, e.components.dashboard.background = n.background, e.components.dashboard.foreground = n.foreground, e.components.dashboard.borderColor = n.border, e.components.card.background = n.card, e.components.card.foreground = n.cardForeground, e.components.card.borderColor = n.border, e.components.interactive.toolbarBackground = n.background, e.components.interactive.background = n.card, e.components.interactive.foreground = n.foreground, e.components.interactive.borderColor = n.border, e.components.chart.palette = [...n.chartPalette], e.components.chart.background = n.card, e.components.chart.foreground = n.foreground, e.components.chart.gridColor = n.border, e.components.chart.axisColor = n.mutedForeground, e.components.table.container.background = n.card, e.components.table.container.borderColor = n.border, e.components.table.header.background = n.muted, e.components.table.header.foreground = n.mutedForeground, e.components.table.header.dividerColor = n.border, e.components.table.row.dividerColor = n.border, e.components.table.row.zebraBackground = n.muted, e.components.table.pagination.background = n.card, e.components.table.pagination.foreground = n.foreground, e.components.table.pagination.borderColor = n.border, p(e, "aggregateTable"), p(e, "pivotTable");
235
255
  }
236
- function s(e, n) {
256
+ function p(e, n) {
237
257
  e.components[n] = O(e.components.table);
238
258
  }
239
- function pe(e, n, t) {
259
+ function W(e, n, t) {
240
260
  switch (e.tokens.color[n] = t, n) {
241
261
  case "background":
242
262
  e.components.dashboard.background = t, e.components.interactive.toolbarBackground = t;
243
263
  break;
244
264
  case "foreground":
245
- e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t, s(e, "aggregateTable"), s(e, "pivotTable");
265
+ e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t, p(e, "aggregateTable"), p(e, "pivotTable");
246
266
  break;
247
267
  case "card":
248
- e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t, s(e, "aggregateTable"), s(e, "pivotTable");
268
+ e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t, p(e, "aggregateTable"), p(e, "pivotTable");
249
269
  break;
250
270
  case "cardForeground":
251
271
  e.components.card.foreground = t;
252
272
  break;
253
273
  case "muted":
254
- e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t, s(e, "aggregateTable"), s(e, "pivotTable");
274
+ e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t, p(e, "aggregateTable"), p(e, "pivotTable");
255
275
  break;
256
276
  case "mutedForeground":
257
- e.components.table.header.foreground = t, e.components.chart.axisColor = t, s(e, "aggregateTable"), s(e, "pivotTable");
277
+ e.components.table.header.foreground = t, e.components.chart.axisColor = t, p(e, "aggregateTable"), p(e, "pivotTable");
258
278
  break;
259
279
  case "border":
260
- e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t, s(e, "aggregateTable"), s(e, "pivotTable");
280
+ e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t, p(e, "aggregateTable"), p(e, "pivotTable");
261
281
  break;
262
282
  case "accent":
263
- e.components.table.row.hoverBackground = t, e.components.table.row.selectedBackground = t, s(e, "aggregateTable"), s(e, "pivotTable");
283
+ e.components.table.row.hoverBackground = t, p(e, "aggregateTable"), p(e, "pivotTable");
264
284
  break;
265
285
  }
266
286
  }
267
- function W(e, n, t) {
287
+ function H(e, n, t) {
268
288
  switch (e.tokens.radius[n] = t, n) {
269
289
  case "control":
270
290
  e.components.interactive.borderRadius = t, e.components.pagination.borderRadius = t;
@@ -273,29 +293,29 @@ function W(e, n, t) {
273
293
  e.components.card.borderRadius = t;
274
294
  break;
275
295
  case "table":
276
- e.components.table.container.borderRadius = t, s(e, "aggregateTable"), s(e, "pivotTable");
296
+ e.components.table.container.borderRadius = t, p(e, "aggregateTable"), p(e, "pivotTable");
277
297
  break;
278
298
  }
279
299
  }
280
- function tr(e) {
300
+ function dr(e) {
281
301
  var n, t;
282
- for (const u of ["light", "dark"]) {
283
- const c = e.schemes[u], l = c.tokens, i = l.color, y = (n = c.components) == null ? void 0 : n.aggregateTable, x = (t = c.components) == null ? void 0 : t.pivotTable, S = {
302
+ for (const c of ["light", "dark"]) {
303
+ const l = e.schemes[c], s = l.tokens, i = s.color, v = (n = l.components) == null ? void 0 : n.aggregateTable, x = (t = l.components) == null ? void 0 : t.pivotTable, S = {
284
304
  fontFamily: "",
285
305
  headingFontFamily: "",
286
306
  monoFontFamily: "",
287
307
  baseFontSize: 14,
288
308
  density: "comfortable"
289
309
  };
290
- l.typography = { ...S, ...l.typography };
310
+ s.typography = { ...S, ...s.typography };
291
311
  const f = {
292
312
  control: 5,
293
313
  card: 5,
294
314
  table: 5,
295
315
  badge: 999
296
316
  };
297
- l.radius = { ...f, ...l.radius };
298
- const g = {
317
+ s.radius = { ...f, ...s.radius };
318
+ const b = {
299
319
  dashboardPadding: 16,
300
320
  gridGap: 12,
301
321
  cardPadding: 16,
@@ -303,34 +323,34 @@ function tr(e) {
303
323
  tableCellX: 12,
304
324
  tableCellY: 8
305
325
  };
306
- l.spacing = { ...g, ...l.spacing };
326
+ s.spacing = { ...b, ...s.spacing };
307
327
  const T = {
308
328
  card: "none",
309
329
  popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
310
330
  focusRing: "0 0 0 2px rgba(37, 99, 235, 0.35)"
311
331
  };
312
- l.shadow = { ...T, ...l.shadow };
332
+ s.shadow = { ...T, ...s.shadow };
313
333
  const F = {
314
334
  dashboard: {
315
335
  background: i.background,
316
336
  foreground: i.foreground,
317
337
  borderColor: i.border,
318
- padding: l.spacing.dashboardPadding
338
+ padding: s.spacing.dashboardPadding
319
339
  },
320
340
  card: {
321
341
  background: i.card,
322
342
  foreground: i.cardForeground,
323
343
  borderColor: i.border,
324
- borderRadius: l.radius.card,
325
- padding: l.spacing.cardPadding,
326
- shadow: l.shadow.card
344
+ borderRadius: s.radius.card,
345
+ padding: s.spacing.cardPadding,
346
+ shadow: s.shadow.card
327
347
  },
328
348
  interactive: {
329
349
  toolbarBackground: i.background,
330
350
  background: i.card,
331
351
  foreground: i.foreground,
332
352
  borderColor: i.border,
333
- borderRadius: l.radius.control
353
+ borderRadius: s.radius.control
334
354
  },
335
355
  chart: {
336
356
  palette: [],
@@ -339,17 +359,17 @@ function tr(e) {
339
359
  gridColor: i.border,
340
360
  axisColor: i.mutedForeground
341
361
  },
342
- table: B(i, l),
343
- aggregateTable: B(i, l),
344
- pivotTable: B(i, l),
362
+ table: B(i, s),
363
+ aggregateTable: B(i, s),
364
+ pivotTable: B(i, s),
345
365
  pagination: {
346
366
  background: i.card,
347
367
  foreground: i.foreground,
348
368
  borderColor: i.border,
349
- borderRadius: l.radius.control
369
+ borderRadius: s.radius.control
350
370
  }
351
371
  };
352
- c.components = { ...F, ...c.components };
372
+ l.components = { ...F, ...l.components };
353
373
  const $ = {
354
374
  palette: [],
355
375
  background: i.card,
@@ -357,16 +377,16 @@ function tr(e) {
357
377
  gridColor: i.border,
358
378
  axisColor: i.mutedForeground
359
379
  };
360
- c.components.chart = { ...$, ...c.components.chart }, c.components.table = {
361
- ...B(i, l),
362
- ...c.components.table
363
- }, c.components.aggregateTable = y ? {
364
- ...B(i, l),
365
- ...y
366
- } : O(c.components.table), c.components.pivotTable = x ? {
367
- ...B(i, l),
380
+ l.components.chart = { ...$, ...l.components.chart }, l.components.table = {
381
+ ...B(i, s),
382
+ ...l.components.table
383
+ }, l.components.aggregateTable = v ? {
384
+ ...B(i, s),
385
+ ...v
386
+ } : O(l.components.table), l.components.pivotTable = x ? {
387
+ ...B(i, s),
368
388
  ...x
369
- } : O(c.components.table);
389
+ } : O(l.components.table);
370
390
  }
371
391
  return e;
372
392
  }
@@ -392,8 +412,7 @@ function B(e, n) {
392
412
  dividerColor: e.border,
393
413
  zebra: !1,
394
414
  zebraBackground: e.muted,
395
- hoverBackground: e.accent,
396
- selectedBackground: e.accent
415
+ hoverBackground: e.accent
397
416
  },
398
417
  cell: {
399
418
  paddingX: n.spacing.tableCellX,
@@ -422,7 +441,7 @@ function B(e, n) {
422
441
  function O(e) {
423
442
  return JSON.parse(JSON.stringify(e));
424
443
  }
425
- const dr = [
444
+ const ir = [
426
445
  ["background", "Canvas"],
427
446
  ["foreground", "Text"],
428
447
  ["card", "Card"],
@@ -438,7 +457,7 @@ const dr = [
438
457
  ["negative", "Negative"],
439
458
  ["warning", "Warning"],
440
459
  ["info", "Info"]
441
- ], ir = [0, 1, 2, 3, 4, 5], H = We, cr = [
460
+ ], cr = [0, 1, 2, 3, 4, 5], X = We, lr = [
442
461
  "#ffffff",
443
462
  "#f8fafc",
444
463
  "#f4f4f5",
@@ -452,30 +471,30 @@ const dr = [
452
471
  "#dc2626",
453
472
  "#7c3aed"
454
473
  ];
455
- function Pr({
474
+ function Br({
456
475
  appearance: e,
457
476
  previewTitle: n,
458
477
  isLoading: t = !1,
459
- isSaving: u = !1,
460
- error: c = null,
461
- className: l,
478
+ isSaving: c = !1,
479
+ error: l = null,
480
+ className: s,
462
481
  onDraftChange: i,
463
- onSave: y,
482
+ onSave: v,
464
483
  onClearConfig: x,
465
484
  onCancel: S
466
485
  }) {
467
- const [f, g] = m.useState(null), [T, F] = m.useState("light"), [$, z] = m.useState(!1), [we, R] = m.useState(
486
+ const [f, b] = m.useState(null), [T, F] = m.useState("light"), [$, z] = m.useState(!1), [we, R] = m.useState(
468
487
  "idle"
469
- ), [ne, Se] = m.useState(!1), [D, _] = m.useState(""), [I, h] = m.useState(null), te = m.useRef(null), J = m.useRef(i), A = m.useRef(!1);
488
+ ), [te, Se] = m.useState(!1), [D, _] = m.useState(""), [I, h] = m.useState(null), de = m.useRef(null), j = m.useRef(i), A = m.useRef(!1);
470
489
  m.useEffect(() => {
471
- J.current = i;
490
+ j.current = i;
472
491
  }, [i]), m.useEffect(() => {
473
492
  if (e === void 0) {
474
- A.current = !0, g(null);
493
+ A.current = !0, b(null);
475
494
  return;
476
495
  }
477
- const o = j(e);
478
- A.current = !0, g(o), F("light"), h(null);
496
+ const o = J(e);
497
+ A.current = !0, b(o), F("light"), h(null);
479
498
  }, [e]), m.useEffect(() => {
480
499
  var o;
481
500
  if (f) {
@@ -485,7 +504,7 @@ function Pr({
485
504
  }
486
505
  try {
487
506
  const a = L(f);
488
- (o = J.current) == null || o.call(J, a), h(null);
507
+ (o = j.current) == null || o.call(j, a), h(null);
489
508
  } catch (a) {
490
509
  h(
491
510
  a instanceof Error ? a.message : "Appearance is invalid"
@@ -493,21 +512,21 @@ function Pr({
493
512
  }
494
513
  }
495
514
  }, [f]);
496
- const p = f == null ? void 0 : f.schemes[T], V = u || $, Te = m.useMemo(
497
- () => p ? ur(p.tokens.radius.control) : void 0,
498
- [p]
515
+ const u = f == null ? void 0 : f.schemes[T], V = c || $, Te = m.useMemo(
516
+ () => u ? pr(u.tokens.radius.control) : void 0,
517
+ [u]
499
518
  ), Fe = (o) => {
500
- g((a) => {
519
+ b((a) => {
501
520
  if (!a) return a;
502
- const k = pr(a);
521
+ const k = gr(a);
503
522
  return o(k), k;
504
523
  });
505
- }, b = (o) => {
524
+ }, g = (o) => {
506
525
  Fe((a) => {
507
526
  o(a.schemes[T]);
508
527
  });
509
528
  }, Pe = async () => {
510
- if (!f || !y) return;
529
+ if (!f || !v) return;
511
530
  let o;
512
531
  try {
513
532
  o = L(f);
@@ -519,18 +538,18 @@ function Pr({
519
538
  }
520
539
  z(!0);
521
540
  try {
522
- await y(o);
541
+ await v(o);
523
542
  } finally {
524
543
  z(!1);
525
544
  }
526
545
  }, Be = () => {
527
- const o = j(null);
528
- R("idle"), g(o);
546
+ const o = J(null);
547
+ R("idle"), b(o);
529
548
  }, Oe = async () => {
530
549
  if (x) {
531
550
  z(!0), h(null), R("idle");
532
551
  try {
533
- await x(), A.current = !0, g(j(null)), F("light");
552
+ await x(), A.current = !0, b(J(null)), F("light");
534
553
  } catch (o) {
535
554
  h(
536
555
  o instanceof Error ? o.message : "Unable to clear organization appearance"
@@ -539,10 +558,10 @@ function Pr({
539
558
  z(!1);
540
559
  }
541
560
  }
542
- }, de = m.useCallback(() => f ? JSON.stringify(L(f), null, 2) : "", [f]), Re = (o) => {
561
+ }, ie = m.useCallback(() => f ? JSON.stringify(L(f), null, 2) : "", [f]), Re = (o) => {
543
562
  if (Se(o), o)
544
563
  try {
545
- _(de()), h(null);
564
+ _(ie()), h(null);
546
565
  } catch (a) {
547
566
  h(
548
567
  a instanceof Error ? a.message : "Appearance is invalid"
@@ -551,19 +570,19 @@ function Pr({
551
570
  }, Ae = async () => {
552
571
  if (f)
553
572
  try {
554
- const o = ne && D ? D : de();
573
+ const o = te && D ? D : ie();
555
574
  await navigator.clipboard.writeText(o), h(null), R("copied");
556
575
  } catch (o) {
557
576
  h(
558
577
  o instanceof Error ? o.message : "Unable to copy brand spec"
559
578
  );
560
579
  }
561
- }, ie = (o) => {
562
- const a = JSON.parse(o), k = j(a), P = L(k);
563
- R("idle"), F("light"), g(k), _(JSON.stringify(P, null, 2));
580
+ }, ce = (o) => {
581
+ const a = JSON.parse(o), k = J(a), P = L(k);
582
+ R("idle"), F("light"), b(k), _(JSON.stringify(P, null, 2));
564
583
  }, Ee = () => {
565
584
  try {
566
- ie(D);
585
+ ce(D);
567
586
  } catch (o) {
568
587
  h(
569
588
  o instanceof Error ? o.message : "Brand spec must be valid JSON"
@@ -574,7 +593,7 @@ function Pr({
574
593
  const a = (k = o.target.files) == null ? void 0 : k[0];
575
594
  if (o.target.value = "", !!a)
576
595
  try {
577
- ie(await gr(a));
596
+ ce(await br(a));
578
597
  } catch (P) {
579
598
  h(
580
599
  P instanceof Error ? P.message : "Uploaded file must be a valid brand spec"
@@ -584,9 +603,9 @@ function Pr({
584
603
  return /* @__PURE__ */ d(
585
604
  "div",
586
605
  {
587
- className: q(
606
+ className: K(
588
607
  "flex min-h-0 flex-1 flex-col bg-background text-foreground",
589
- l
608
+ s
590
609
  ),
591
610
  style: Te,
592
611
  children: [
@@ -602,7 +621,7 @@ function Pr({
602
621
  /* @__PURE__ */ d(
603
622
  ge,
604
623
  {
605
- open: ne,
624
+ open: te,
606
625
  onOpenChange: Re,
607
626
  children: [
608
627
  /* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ d(C, { type: "button", size: "xs", variant: "ghost", disabled: !f, children: [
@@ -643,7 +662,7 @@ function Pr({
643
662
  variant: "ghost",
644
663
  onClick: () => {
645
664
  var o;
646
- return (o = te.current) == null ? void 0 : o.click();
665
+ return (o = de.current) == null ? void 0 : o.click();
647
666
  },
648
667
  children: [
649
668
  /* @__PURE__ */ r(De, { className: "h-3.5 w-3.5" }),
@@ -677,7 +696,7 @@ function Pr({
677
696
  /* @__PURE__ */ r(
678
697
  "input",
679
698
  {
680
- ref: te,
699
+ ref: de,
681
700
  "aria-label": "Upload brand spec",
682
701
  type: "file",
683
702
  accept: "application/json,.json",
@@ -719,9 +738,9 @@ function Pr({
719
738
  type: "button",
720
739
  size: "xs",
721
740
  onClick: Pe,
722
- disabled: !f || V || !!I || !y,
741
+ disabled: !f || V || !!I || !v,
723
742
  children: [
724
- V ? /* @__PURE__ */ r(le, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }),
743
+ V ? /* @__PURE__ */ r(se, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }),
725
744
  "Save"
726
745
  ]
727
746
  }
@@ -738,18 +757,18 @@ function Pr({
738
757
  )
739
758
  ] }),
740
759
  /* @__PURE__ */ d("div", { className: "flex shrink-0 items-center justify-between border-b border-border/60 px-4 py-2", children: [
741
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: I ? /* @__PURE__ */ d(ce, { children: [
742
- /* @__PURE__ */ r(se, { className: "h-3.5 w-3.5 text-destructive" }),
760
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: I ? /* @__PURE__ */ d(le, { children: [
761
+ /* @__PURE__ */ r(ue, { className: "h-3.5 w-3.5 text-destructive" }),
743
762
  "Preview keeps the last valid draft"
744
- ] }) : /* @__PURE__ */ d(ce, { children: [
745
- /* @__PURE__ */ r(Je, { className: "h-3.5 w-3.5 text-emerald-500" }),
763
+ ] }) : /* @__PURE__ */ d(le, { children: [
764
+ /* @__PURE__ */ r(je, { className: "h-3.5 w-3.5 text-emerald-500" }),
746
765
  "Draft is applied to the live dashboard preview"
747
766
  ] }) }),
748
767
  /* @__PURE__ */ r("div", { className: "inline-flex h-7 items-center overflow-hidden rounded-control border border-border/70", children: ["light", "dark"].map((o) => /* @__PURE__ */ r(
749
768
  "button",
750
769
  {
751
770
  type: "button",
752
- className: q(
771
+ className: K(
753
772
  "h-full px-2.5 text-[12px] capitalize transition-colors",
754
773
  T === o ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
755
774
  ),
@@ -760,7 +779,7 @@ function Pr({
760
779
  )) })
761
780
  ] }),
762
781
  I && /* @__PURE__ */ r("div", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-[12px] text-destructive", children: I }),
763
- t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(le, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : c ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: c }) : f && p ? /* @__PURE__ */ d(je, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
782
+ t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(se, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : l ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: l }) : f && u ? /* @__PURE__ */ d(Je, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
764
783
  /* @__PURE__ */ r("div", { className: "shrink-0 px-4 pt-3", children: /* @__PURE__ */ d(Le, { variant: "underline", className: "w-full gap-5", children: [
765
784
  /* @__PURE__ */ r(U, { value: "style", children: "Style" }),
766
785
  /* @__PURE__ */ r(U, { value: "surfaces", children: "Surfaces" }),
@@ -780,8 +799,8 @@ function Pr({
780
799
  type: "button",
781
800
  className: "flex items-center gap-3 rounded-control border border-border/70 px-3 py-2 text-left hover:bg-muted/60",
782
801
  onClick: () => {
783
- const a = nr(f, o.id);
784
- g(a);
802
+ const a = tr(f, o.id);
803
+ b(a);
785
804
  },
786
805
  children: [
787
806
  /* @__PURE__ */ d("div", { className: "flex h-7 w-10 overflow-hidden rounded-control border border-border/70", children: [
@@ -816,13 +835,13 @@ function Pr({
816
835
  icon: G,
817
836
  title: "Color",
818
837
  description: `Editing the ${T} scheme.`,
819
- children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: dr.map(([o, a]) => /* @__PURE__ */ r(
820
- v,
838
+ children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: ir.map(([o, a]) => /* @__PURE__ */ r(
839
+ y,
821
840
  {
822
841
  label: a,
823
- value: p.tokens.color[o],
824
- onChange: (k) => b((P) => {
825
- pe(P, o, k);
842
+ value: u.tokens.color[o],
843
+ onChange: (k) => g((P) => {
844
+ W(P, o, k);
826
845
  })
827
846
  },
828
847
  o
@@ -837,10 +856,10 @@ function Pr({
837
856
  description: "Fonts and density used by dashboard and workflow chrome.",
838
857
  children: [
839
858
  /* @__PURE__ */ r(
840
- lr,
859
+ sr,
841
860
  {
842
- value: p.tokens.typography.fontFamily,
843
- onChange: (o) => b((a) => {
861
+ value: u.tokens.typography.fontFamily,
862
+ onChange: (o) => g((a) => {
844
863
  a.tokens.typography.fontFamily = o, a.tokens.typography.headingFontFamily = o;
845
864
  })
846
865
  }
@@ -850,26 +869,26 @@ function Pr({
850
869
  w,
851
870
  {
852
871
  label: "Base size",
853
- value: p.tokens.typography.baseFontSize,
872
+ value: u.tokens.typography.baseFontSize,
854
873
  min: 11,
855
874
  max: 18,
856
- onChange: (o) => b((a) => {
875
+ onChange: (o) => g((a) => {
857
876
  a.tokens.typography.baseFontSize = o;
858
877
  })
859
878
  }
860
879
  ),
861
880
  /* @__PURE__ */ r(
862
- Y,
881
+ Z,
863
882
  {
864
883
  label: "Density",
865
- value: p.tokens.typography.density,
884
+ value: u.tokens.typography.density,
866
885
  options: [
867
886
  ["compact", "Compact"],
868
887
  ["comfortable", "Comfortable"],
869
888
  ["spacious", "Spacious"]
870
889
  ],
871
- onChange: (o) => b((a) => {
872
- a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, s(a, "aggregateTable"), s(a, "pivotTable");
890
+ onChange: (o) => g((a) => {
891
+ a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, p(a, "aggregateTable"), p(a, "pivotTable");
873
892
  })
874
893
  }
875
894
  )
@@ -892,10 +911,10 @@ function Pr({
892
911
  {
893
912
  label: "Canvas pad",
894
913
  tooltip: "Outer padding around the dashboard canvas before cards begin.",
895
- value: p.tokens.spacing.dashboardPadding,
914
+ value: u.tokens.spacing.dashboardPadding,
896
915
  min: 0,
897
916
  max: 48,
898
- onChange: (o) => b((a) => {
917
+ onChange: (o) => g((a) => {
899
918
  a.tokens.spacing.dashboardPadding = o, a.components.dashboard.padding = o;
900
919
  })
901
920
  }
@@ -905,10 +924,10 @@ function Pr({
905
924
  {
906
925
  label: "Grid gap",
907
926
  tooltip: "Spacing between dashboard cards in the grid.",
908
- value: p.tokens.spacing.gridGap,
927
+ value: u.tokens.spacing.gridGap,
909
928
  min: 0,
910
929
  max: 32,
911
- onChange: (o) => b((a) => {
930
+ onChange: (o) => g((a) => {
912
931
  a.tokens.spacing.gridGap = o;
913
932
  })
914
933
  }
@@ -918,10 +937,10 @@ function Pr({
918
937
  {
919
938
  label: "Card pad",
920
939
  tooltip: "Inner padding inside card/widget frames around titles, controls, and visual content.",
921
- value: p.tokens.spacing.cardPadding,
940
+ value: u.tokens.spacing.cardPadding,
922
941
  min: 0,
923
942
  max: 32,
924
- onChange: (o) => b((a) => {
943
+ onChange: (o) => g((a) => {
925
944
  a.tokens.spacing.cardPadding = o, a.components.card.padding = o;
926
945
  })
927
946
  }
@@ -933,11 +952,11 @@ function Pr({
933
952
  {
934
953
  label: "Control radius",
935
954
  tooltip: "Corner radius for buttons, inputs, selects, checkboxes, segmented controls, and similar interactive controls.",
936
- value: p.tokens.radius.control,
955
+ value: u.tokens.radius.control,
937
956
  min: 0,
938
957
  max: 12,
939
- onChange: (o) => b((a) => {
940
- W(a, "control", o);
958
+ onChange: (o) => g((a) => {
959
+ H(a, "control", o);
941
960
  })
942
961
  }
943
962
  ),
@@ -946,11 +965,11 @@ function Pr({
946
965
  {
947
966
  label: "Card/widget radius",
948
967
  tooltip: "Corner radius for dashboard card frames and widget containers.",
949
- value: p.tokens.radius.card,
968
+ value: u.tokens.radius.card,
950
969
  min: 0,
951
970
  max: 12,
952
- onChange: (o) => b((a) => {
953
- W(a, "card", o);
971
+ onChange: (o) => g((a) => {
972
+ H(a, "card", o);
954
973
  })
955
974
  }
956
975
  ),
@@ -959,11 +978,11 @@ function Pr({
959
978
  {
960
979
  label: "Table radius",
961
980
  tooltip: "Corner radius for table containers, table chrome, and table pagination surfaces.",
962
- value: p.tokens.radius.table,
981
+ value: u.tokens.radius.table,
963
982
  min: 0,
964
983
  max: 12,
965
- onChange: (o) => b((a) => {
966
- W(a, "table", o);
984
+ onChange: (o) => g((a) => {
985
+ H(a, "table", o);
967
986
  })
968
987
  }
969
988
  )
@@ -974,51 +993,51 @@ function Pr({
974
993
  /* @__PURE__ */ r(
975
994
  N,
976
995
  {
977
- icon: se,
996
+ icon: ue,
978
997
  title: "Filters and Controls",
979
998
  description: "Dashboard filter/control toolbar, chip states, menus, and settings panels.",
980
999
  children: /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
981
1000
  /* @__PURE__ */ r(
982
- v,
1001
+ y,
983
1002
  {
984
1003
  label: "Toolbar background",
985
1004
  tooltip: "Background color for the dashboard filter/control toolbar strip. This is separate from chip state colors.",
986
- value: p.components.interactive.toolbarBackground || p.tokens.color.background,
987
- onChange: (o) => b((a) => {
1005
+ value: u.components.interactive.toolbarBackground || u.tokens.color.background,
1006
+ onChange: (o) => g((a) => {
988
1007
  a.components.interactive.toolbarBackground = o;
989
1008
  })
990
1009
  }
991
1010
  ),
992
1011
  /* @__PURE__ */ r(
993
- v,
1012
+ y,
994
1013
  {
995
1014
  label: "Default state",
996
1015
  tooltip: "Unselected filter/control chips plus the base surface for their menus, dialogs, and pagination fallback.",
997
- value: p.components.interactive.background || p.tokens.color.card,
998
- onChange: (o) => b((a) => {
1016
+ value: u.components.interactive.background || u.tokens.color.card,
1017
+ onChange: (o) => g((a) => {
999
1018
  a.components.interactive.background = o, a.components.pagination.background = o;
1000
1019
  })
1001
1020
  }
1002
1021
  ),
1003
1022
  /* @__PURE__ */ r(
1004
- v,
1023
+ y,
1005
1024
  {
1006
1025
  label: "Border",
1007
1026
  tooltip: "Border color for filter/control chips, runtime inputs, settings panels, and related popover chrome.",
1008
- value: p.components.interactive.borderColor || p.tokens.color.border,
1009
- onChange: (o) => b((a) => {
1027
+ value: u.components.interactive.borderColor || u.tokens.color.border,
1028
+ onChange: (o) => g((a) => {
1010
1029
  a.components.interactive.borderColor = o, a.components.pagination.borderColor = o;
1011
1030
  })
1012
1031
  }
1013
1032
  ),
1014
1033
  /* @__PURE__ */ r(
1015
- v,
1034
+ y,
1016
1035
  {
1017
1036
  label: "Selected state",
1018
1037
  tooltip: "Selected filter/control chips and hover feedback. This keeps a lighter default state and a stronger selected state.",
1019
- value: p.tokens.color.accent,
1020
- onChange: (o) => b((a) => {
1021
- pe(a, "accent", o);
1038
+ value: u.tokens.color.accent,
1039
+ onChange: (o) => g((a) => {
1040
+ W(a, "accent", o);
1022
1041
  })
1023
1042
  }
1024
1043
  )
@@ -1034,12 +1053,12 @@ function Pr({
1034
1053
  title: "Charts",
1035
1054
  description: "Palette and semantic chart text/grid colors.",
1036
1055
  children: [
1037
- /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: ir.map((o) => /* @__PURE__ */ r(
1038
- v,
1056
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: cr.map((o) => /* @__PURE__ */ r(
1057
+ y,
1039
1058
  {
1040
1059
  label: `Series ${o + 1}`,
1041
- value: p.components.chart.palette[o] || "#000000",
1042
- onChange: (a) => b((k) => {
1060
+ value: u.components.chart.palette[o] || "#000000",
1061
+ onChange: (a) => g((k) => {
1043
1062
  k.components.chart.palette[o] = a;
1044
1063
  })
1045
1064
  },
@@ -1047,21 +1066,21 @@ function Pr({
1047
1066
  )) }),
1048
1067
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1049
1068
  /* @__PURE__ */ r(
1050
- v,
1069
+ y,
1051
1070
  {
1052
1071
  label: "Grid",
1053
- value: p.components.chart.gridColor,
1054
- onChange: (o) => b((a) => {
1072
+ value: u.components.chart.gridColor,
1073
+ onChange: (o) => g((a) => {
1055
1074
  a.components.chart.gridColor = o;
1056
1075
  })
1057
1076
  }
1058
1077
  ),
1059
1078
  /* @__PURE__ */ r(
1060
- v,
1079
+ y,
1061
1080
  {
1062
1081
  label: "Axis",
1063
- value: p.components.chart.axisColor,
1064
- onChange: (o) => b((a) => {
1082
+ value: u.components.chart.axisColor,
1083
+ onChange: (o) => g((a) => {
1065
1084
  a.components.chart.axisColor = o;
1066
1085
  })
1067
1086
  }
@@ -1079,84 +1098,94 @@ function Pr({
1079
1098
  children: [
1080
1099
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1081
1100
  /* @__PURE__ */ r(
1082
- Y,
1101
+ Z,
1083
1102
  {
1084
1103
  label: "Density",
1085
- value: p.components.table.density,
1104
+ value: u.components.table.density,
1086
1105
  options: [
1087
1106
  ["compact", "Compact"],
1088
1107
  ["comfortable", "Comfortable"],
1089
1108
  ["spacious", "Spacious"]
1090
1109
  ],
1091
- onChange: (o) => b((a) => {
1092
- a.components.table.density = o, s(a, "aggregateTable"), s(a, "pivotTable");
1110
+ onChange: (o) => g((a) => {
1111
+ a.components.table.density = o, p(a, "aggregateTable"), p(a, "pivotTable");
1093
1112
  })
1094
1113
  }
1095
1114
  ),
1096
1115
  /* @__PURE__ */ r(
1097
- Y,
1116
+ Z,
1098
1117
  {
1099
1118
  label: "Cell wrap",
1100
- value: p.components.table.cell.wrap,
1119
+ value: u.components.table.cell.wrap,
1101
1120
  options: [
1102
1121
  ["nowrap", "No wrap"],
1103
1122
  ["wrap", "Wrap"]
1104
1123
  ],
1105
- onChange: (o) => b((a) => {
1106
- a.components.table.cell.wrap = o, s(a, "aggregateTable"), s(a, "pivotTable");
1124
+ onChange: (o) => g((a) => {
1125
+ a.components.table.cell.wrap = o, p(a, "aggregateTable"), p(a, "pivotTable");
1107
1126
  })
1108
1127
  }
1109
1128
  )
1110
1129
  ] }),
1111
1130
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1112
1131
  /* @__PURE__ */ r(
1113
- v,
1132
+ y,
1114
1133
  {
1115
1134
  label: "Header",
1116
- value: p.components.table.header.background,
1117
- onChange: (o) => b((a) => {
1118
- a.components.table.header.background = o, s(a, "aggregateTable"), s(a, "pivotTable");
1135
+ value: u.components.table.header.background,
1136
+ onChange: (o) => g((a) => {
1137
+ a.components.table.header.background = o, p(a, "aggregateTable"), p(a, "pivotTable");
1119
1138
  })
1120
1139
  }
1121
1140
  ),
1122
1141
  /* @__PURE__ */ r(
1123
- v,
1142
+ y,
1124
1143
  {
1125
1144
  label: "Divider",
1126
- value: p.components.table.row.dividerColor,
1127
- onChange: (o) => b((a) => {
1128
- a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, s(a, "aggregateTable"), s(a, "pivotTable");
1145
+ value: u.components.table.row.dividerColor,
1146
+ onChange: (o) => g((a) => {
1147
+ a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, p(a, "aggregateTable"), p(a, "pivotTable");
1148
+ })
1149
+ }
1150
+ ),
1151
+ /* @__PURE__ */ r(
1152
+ y,
1153
+ {
1154
+ label: "Selection",
1155
+ value: u.tokens.color.selection,
1156
+ onChange: (o) => g((a) => {
1157
+ W(a, "selection", o);
1129
1158
  })
1130
1159
  }
1131
1160
  )
1132
1161
  ] }),
1133
1162
  /* @__PURE__ */ r(
1134
- Z,
1163
+ q,
1135
1164
  {
1136
1165
  label: "Zebra rows",
1137
- checked: p.components.table.row.zebra,
1138
- onCheckedChange: (o) => b((a) => {
1139
- a.components.table.row.zebra = o, s(a, "aggregateTable"), s(a, "pivotTable");
1166
+ checked: u.components.table.row.zebra,
1167
+ onCheckedChange: (o) => g((a) => {
1168
+ a.components.table.row.zebra = o, p(a, "aggregateTable"), p(a, "pivotTable");
1140
1169
  })
1141
1170
  }
1142
1171
  ),
1143
1172
  /* @__PURE__ */ r(
1144
- Z,
1173
+ q,
1145
1174
  {
1146
1175
  label: "Sticky headers",
1147
- checked: p.components.table.header.sticky,
1148
- onCheckedChange: (o) => b((a) => {
1149
- a.components.table.header.sticky = o, s(a, "aggregateTable"), s(a, "pivotTable");
1176
+ checked: u.components.table.header.sticky,
1177
+ onCheckedChange: (o) => g((a) => {
1178
+ a.components.table.header.sticky = o, p(a, "aggregateTable"), p(a, "pivotTable");
1150
1179
  })
1151
1180
  }
1152
1181
  ),
1153
1182
  /* @__PURE__ */ r(
1154
- Z,
1183
+ q,
1155
1184
  {
1156
1185
  label: "Uppercase headers",
1157
- checked: p.components.table.header.uppercase,
1158
- onCheckedChange: (o) => b((a) => {
1159
- a.components.table.header.uppercase = o, s(a, "aggregateTable"), s(a, "pivotTable");
1186
+ checked: u.components.table.header.uppercase,
1187
+ onCheckedChange: (o) => g((a) => {
1188
+ a.components.table.header.uppercase = o, p(a, "aggregateTable"), p(a, "pivotTable");
1160
1189
  })
1161
1190
  }
1162
1191
  )
@@ -1174,7 +1203,7 @@ function N({
1174
1203
  icon: e,
1175
1204
  title: n,
1176
1205
  description: t,
1177
- children: u
1206
+ children: c
1178
1207
  }) {
1179
1208
  return /* @__PURE__ */ d("section", { className: "mb-6 last:mb-0", children: [
1180
1209
  /* @__PURE__ */ d("div", { className: "mb-3 flex items-start gap-2", children: [
@@ -1184,16 +1213,16 @@ function N({
1184
1213
  /* @__PURE__ */ r("p", { className: "mt-0.5 text-[12px] leading-4 text-muted-foreground", children: t })
1185
1214
  ] })
1186
1215
  ] }),
1187
- /* @__PURE__ */ r("div", { className: "space-y-2", children: u }),
1216
+ /* @__PURE__ */ r("div", { className: "space-y-2", children: c }),
1188
1217
  /* @__PURE__ */ r(Me, { className: "mt-5 bg-border/60" })
1189
1218
  ] });
1190
1219
  }
1191
- function lr({
1220
+ function sr({
1192
1221
  value: e,
1193
1222
  onChange: n
1194
1223
  }) {
1195
- var u;
1196
- const t = (u = H.find((c) => c.value === e)) == null ? void 0 : u.id;
1224
+ var c;
1225
+ const t = (c = X.find((l) => l.value === e)) == null ? void 0 : c.id;
1197
1226
  return /* @__PURE__ */ d("div", { children: [
1198
1227
  /* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
1199
1228
  /* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_150px] gap-2", children: [
@@ -1201,15 +1230,15 @@ function lr({
1201
1230
  ke,
1202
1231
  {
1203
1232
  value: t,
1204
- onValueChange: (c) => {
1205
- const l = H.find(
1206
- (i) => i.id === c
1233
+ onValueChange: (l) => {
1234
+ const s = X.find(
1235
+ (i) => i.id === l
1207
1236
  );
1208
- l && n(l.value);
1237
+ s && n(s.value);
1209
1238
  },
1210
1239
  children: [
1211
1240
  /* @__PURE__ */ r(xe, { size: "xs", "aria-label": "Font family preset", children: /* @__PURE__ */ r(ye, { placeholder: "Select font" }) }),
1212
- /* @__PURE__ */ r(ve, { children: H.map((c) => /* @__PURE__ */ r(Ce, { value: c.id, children: c.label }, c.id)) })
1241
+ /* @__PURE__ */ r(ve, { children: X.map((l) => /* @__PURE__ */ r(Ce, { value: l.id, children: l.label }, l.id)) })
1213
1242
  ]
1214
1243
  }
1215
1244
  ),
@@ -1224,20 +1253,20 @@ function lr({
1224
1253
  ] })
1225
1254
  ] });
1226
1255
  }
1227
- function v({
1256
+ function y({
1228
1257
  label: e,
1229
1258
  tooltip: n,
1230
1259
  value: t,
1231
- onChange: u
1260
+ onChange: c
1232
1261
  }) {
1233
- const [c, l] = m.useState(!1), [i, y] = m.useState(t), x = sr(t), S = t !== i, f = (g) => {
1234
- l(g), g && y(t);
1262
+ const [l, s] = m.useState(!1), [i, v] = m.useState(t), x = ur(t), S = t !== i, f = (b) => {
1263
+ s(b), b && v(t);
1235
1264
  };
1236
1265
  return /* @__PURE__ */ d("div", { className: "block", children: [
1237
1266
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
1238
1267
  /* @__PURE__ */ r(E, { className: "text-[11px] font-normal text-muted-foreground", children: e }),
1239
- n ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ d(Q, { children: [
1240
- /* @__PURE__ */ r(ee, { asChild: !0, children: /* @__PURE__ */ r(
1268
+ n ? /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
1269
+ /* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
1241
1270
  "button",
1242
1271
  {
1243
1272
  type: "button",
@@ -1246,11 +1275,11 @@ function v({
1246
1275
  children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
1247
1276
  }
1248
1277
  ) }),
1249
- /* @__PURE__ */ r(re, { side: "top", className: "max-w-64", children: n })
1278
+ /* @__PURE__ */ r(oe, { side: "top", className: "max-w-64", children: n })
1250
1279
  ] }) }) : null
1251
1280
  ] }),
1252
1281
  /* @__PURE__ */ d("div", { className: "flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: [
1253
- /* @__PURE__ */ d(ge, { open: c, onOpenChange: f, children: [
1282
+ /* @__PURE__ */ d(ge, { open: l, onOpenChange: f, children: [
1254
1283
  /* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ r(
1255
1284
  "button",
1256
1285
  {
@@ -1281,7 +1310,7 @@ function v({
1281
1310
  "aria-label": `${e} native color picker`,
1282
1311
  type: "color",
1283
1312
  value: x,
1284
- onChange: (g) => u(g.target.value),
1313
+ onChange: (b) => c(b.target.value),
1285
1314
  className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
1286
1315
  }
1287
1316
  ),
@@ -1292,78 +1321,78 @@ function v({
1292
1321
  /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
1293
1322
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
1294
1323
  /* @__PURE__ */ r(E, { className: "block text-[11px] font-normal text-muted-foreground", children: "Color value" }),
1295
- /* @__PURE__ */ r(K, { children: /* @__PURE__ */ d(Q, { children: [
1296
- /* @__PURE__ */ r(ee, { asChild: !0, children: /* @__PURE__ */ r(
1324
+ /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
1325
+ /* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
1297
1326
  "button",
1298
1327
  {
1299
1328
  type: "button",
1300
1329
  "aria-label": `Reset ${e} color to previous value`,
1301
1330
  disabled: !S,
1302
1331
  className: "inline-flex h-5 w-5 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-35",
1303
- onClick: () => u(i),
1332
+ onClick: () => c(i),
1304
1333
  children: /* @__PURE__ */ r(me, { className: "h-3 w-3" })
1305
1334
  }
1306
1335
  ) }),
1307
- /* @__PURE__ */ r(re, { side: "top", children: "Reset to previous value" })
1336
+ /* @__PURE__ */ r(oe, { side: "top", children: "Reset to previous value" })
1308
1337
  ] }) })
1309
1338
  ] }),
1310
1339
  /* @__PURE__ */ r(
1311
- oe,
1340
+ ae,
1312
1341
  {
1313
1342
  size: "xs",
1314
1343
  "aria-label": `${e} popover color value`,
1315
1344
  value: t,
1316
- onChange: (g) => u(g.target.value),
1345
+ onChange: (b) => c(b.target.value),
1317
1346
  className: "font-mono"
1318
1347
  }
1319
1348
  )
1320
1349
  ] })
1321
1350
  ] }),
1322
- /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: cr.map((g) => /* @__PURE__ */ r(
1351
+ /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: lr.map((b) => /* @__PURE__ */ r(
1323
1352
  "button",
1324
1353
  {
1325
1354
  type: "button",
1326
- "aria-label": `Set ${e} to ${g}`,
1327
- className: q(
1355
+ "aria-label": `Set ${e} to ${b}`,
1356
+ className: K(
1328
1357
  "h-6 rounded-control border border-border/70 shadow-sm",
1329
- t.toLowerCase() === g && "ring-2 ring-ring"
1358
+ t.toLowerCase() === b && "ring-2 ring-ring"
1330
1359
  ),
1331
- style: { backgroundColor: g },
1332
- onClick: () => u(g)
1360
+ style: { backgroundColor: b },
1361
+ onClick: () => c(b)
1333
1362
  },
1334
- g
1363
+ b
1335
1364
  )) })
1336
1365
  ]
1337
1366
  }
1338
1367
  )
1339
1368
  ] }),
1340
1369
  /* @__PURE__ */ r(
1341
- oe,
1370
+ ae,
1342
1371
  {
1343
1372
  size: "xs",
1344
1373
  "aria-label": `${e} color value`,
1345
1374
  value: t,
1346
- onChange: (g) => u(g.target.value),
1375
+ onChange: (b) => c(b.target.value),
1347
1376
  className: "h-full border-0 px-2 font-mono shadow-none focus-visible:border-0"
1348
1377
  }
1349
1378
  )
1350
1379
  ] })
1351
1380
  ] });
1352
1381
  }
1353
- function sr(e) {
1382
+ function ur(e) {
1354
1383
  const n = He(e);
1355
- return n ? `#${X(n.r)}${X(n.g)}${X(n.b)}` : "#000000";
1384
+ return n ? `#${Y(n.r)}${Y(n.g)}${Y(n.b)}` : "#000000";
1356
1385
  }
1357
- function X(e) {
1386
+ function Y(e) {
1358
1387
  return Math.round(e).toString(16).padStart(2, "0");
1359
1388
  }
1360
1389
  function w({
1361
1390
  label: e,
1362
1391
  tooltip: n,
1363
1392
  value: t,
1364
- min: u,
1365
- max: c,
1366
- onChange: l
1393
+ min: c,
1394
+ max: l,
1395
+ onChange: s
1367
1396
  }) {
1368
1397
  const i = m.useId();
1369
1398
  return /* @__PURE__ */ d("div", { className: "block", children: [
@@ -1376,8 +1405,8 @@ function w({
1376
1405
  children: e
1377
1406
  }
1378
1407
  ),
1379
- n ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ d(Q, { children: [
1380
- /* @__PURE__ */ r(ee, { asChild: !0, children: /* @__PURE__ */ r(
1408
+ n ? /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
1409
+ /* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
1381
1410
  "button",
1382
1411
  {
1383
1412
  type: "button",
@@ -1386,41 +1415,41 @@ function w({
1386
1415
  children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
1387
1416
  }
1388
1417
  ) }),
1389
- /* @__PURE__ */ r(re, { side: "top", className: "max-w-56", children: n })
1418
+ /* @__PURE__ */ r(oe, { side: "top", className: "max-w-56", children: n })
1390
1419
  ] }) }) : null
1391
1420
  ] }),
1392
1421
  /* @__PURE__ */ r(
1393
- oe,
1422
+ ae,
1394
1423
  {
1395
1424
  id: i,
1396
1425
  size: "xs",
1397
1426
  type: "number",
1398
- min: u,
1399
- max: c,
1427
+ min: c,
1428
+ max: l,
1400
1429
  value: t,
1401
- onChange: (y) => {
1402
- const x = Number(y.target.value);
1403
- Number.isNaN(x) || l(x);
1430
+ onChange: (v) => {
1431
+ const x = Number(v.target.value);
1432
+ Number.isNaN(x) || s(x);
1404
1433
  }
1405
1434
  }
1406
1435
  )
1407
1436
  ] });
1408
1437
  }
1409
- function Y({
1438
+ function Z({
1410
1439
  label: e,
1411
1440
  value: n,
1412
1441
  options: t,
1413
- onChange: u
1442
+ onChange: c
1414
1443
  }) {
1415
1444
  return /* @__PURE__ */ d("div", { children: [
1416
1445
  /* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: e }),
1417
- /* @__PURE__ */ d(ke, { value: n, onValueChange: u, children: [
1446
+ /* @__PURE__ */ d(ke, { value: n, onValueChange: c, children: [
1418
1447
  /* @__PURE__ */ r(xe, { size: "xs", children: /* @__PURE__ */ r(ye, {}) }),
1419
- /* @__PURE__ */ r(ve, { children: t.map(([c, l]) => /* @__PURE__ */ r(Ce, { value: c, children: l }, c)) })
1448
+ /* @__PURE__ */ r(ve, { children: t.map(([l, s]) => /* @__PURE__ */ r(Ce, { value: l, children: s }, l)) })
1420
1449
  ] })
1421
1450
  ] });
1422
1451
  }
1423
- function Z({
1452
+ function q({
1424
1453
  label: e,
1425
1454
  checked: n,
1426
1455
  onCheckedChange: t
@@ -1430,27 +1459,27 @@ function Z({
1430
1459
  /* @__PURE__ */ r(Ge, { size: "xs", checked: n, onCheckedChange: t })
1431
1460
  ] });
1432
1461
  }
1433
- function ur(e) {
1462
+ function pr(e) {
1434
1463
  const n = `${Number((e / 16).toFixed(4))}rem`;
1435
1464
  return {
1436
1465
  "--semaphor-radius": n,
1437
1466
  "--semaphor-control-radius": n
1438
1467
  };
1439
1468
  }
1440
- function pr(e) {
1469
+ function gr(e) {
1441
1470
  return JSON.parse(JSON.stringify(e));
1442
1471
  }
1443
- function gr(e) {
1472
+ function br(e) {
1444
1473
  return typeof e.text == "function" ? e.text() : new Promise((n, t) => {
1445
- const u = new FileReader();
1446
- u.onload = () => n(String(u.result ?? "")), u.onerror = () => t(u.error ?? new Error("Unable to read file")), u.readAsText(e);
1474
+ const c = new FileReader();
1475
+ c.onload = () => n(String(c.result ?? "")), c.onerror = () => t(c.error ?? new Error("Unable to read file")), c.readAsText(e);
1447
1476
  });
1448
1477
  }
1449
1478
  export {
1450
1479
  Ne as BRAND_STUDIO_PRESETS,
1451
- Pr as BrandStudioEditor,
1452
- nr as applyBrandStudioPreset,
1480
+ Br as BrandStudioEditor,
1481
+ tr as applyBrandStudioPreset,
1453
1482
  L as buildAppearanceSpecFromDraft,
1454
- j as createBrandStudioDraft,
1455
- s as mirrorTableAppearance
1483
+ J as createBrandStudioDraft,
1484
+ p as mirrorTableAppearance
1456
1485
  };