react-semaphor 0.1.506 → 0.1.508

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 (247) 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 +139 -119
  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-B9l0ZAbv.js} +12 -12
  21. package/dist/chunks/{dashboard-briefing-launcher-C8nDSDnV.cjs → dashboard-briefing-launcher-C4zsM3Hd.cjs} +1 -1
  22. package/dist/chunks/{dashboard-controls-CyL0yimg.js → dashboard-controls-BCQv4xWM.js} +16 -14
  23. package/dist/chunks/dashboard-controls-CWwllVOe.cjs +52 -0
  24. package/dist/chunks/{dashboard-json-5Jr3RudV.js → dashboard-json-BtU_q_0A.js} +9 -9
  25. package/dist/chunks/dashboard-json-DVj2xLsH.cjs +1 -0
  26. package/dist/chunks/edit-dashboard-visual-CO2IVBOq.cjs +172 -0
  27. package/dist/chunks/{edit-dashboard-visual-C7X-um9g.js → edit-dashboard-visual-RgFUx-py.js} +1986 -1990
  28. package/dist/chunks/{editor-action-buttons-CcDm8nA5.cjs → editor-action-buttons-BE8Fby6n.cjs} +2 -2
  29. package/dist/chunks/{editor-action-buttons-C5Wja_J4.js → editor-action-buttons-D-MaqTIs.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-BaIrLSBb.cjs +1422 -0
  36. package/dist/chunks/{index-De2QNsqV.js → index-ByiS9sB4.js} +45343 -43665
  37. package/dist/chunks/{index-C9KXfCkC.js → index-CLIro-EG.js} +3 -0
  38. package/dist/chunks/index-Cx3qmRUB.cjs +1 -0
  39. package/dist/chunks/{index-BlYf8gNa.cjs → index-DhlVxvyI.cjs} +1 -1
  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-BbkXcnnn.js} +4 -4
  55. package/dist/chunks/report-preferences-dialog-C9rpWgQZ.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 +13 -1
  115. package/dist/types/components/visual/matrix-table/matrix-selection-click.d.ts +6 -0
  116. package/dist/types/data-app-sdk/adapters.d.ts +3 -2
  117. package/dist/types/data-app-sdk/builders.d.ts +2 -1
  118. package/dist/types/data-app-sdk/contracts.d.ts +44 -2
  119. package/dist/types/data-app-sdk/index.d.ts +1 -0
  120. package/dist/types/data-app-sdk/query-request.d.ts +7 -2
  121. package/dist/types/data-app-sdk/selection.d.ts +2 -0
  122. package/dist/types/index.cjs +1 -1
  123. package/dist/types/index.js +24 -23
  124. package/dist/types/lib/appearance/types.d.ts +3 -1
  125. package/dist/types/lib/briefings/briefing-attachment-model.d.ts +0 -2
  126. package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -8
  127. package/dist/types/lib/dashboard/click-to-filter-card-references.d.ts +23 -0
  128. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +16 -2
  129. package/dist/types/lib/dashboard-inputs/build-selection-dashboard-inputs.d.ts +31 -0
  130. package/dist/types/lib/dashboard-inputs/click-to-filter-emitted-fields.d.ts +17 -0
  131. package/dist/types/lib/dashboard-inputs/click-to-filter-mapping-draft.d.ts +99 -0
  132. package/dist/types/lib/dashboard-inputs/click-to-filter-sheet-reach.d.ts +12 -0
  133. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +18 -1
  134. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-candidate-metadata.d.ts +4 -1
  135. package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +10 -0
  136. package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +8 -1
  137. package/dist/types/lib/dashboard-inputs/index.d.ts +1 -0
  138. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +18 -7
  139. package/dist/types/lib/dashboard-inputs/resolve-field-date-comparison-coverage.d.ts +5 -2
  140. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +77 -0
  141. package/dist/types/lib/dashboard-inputs/selection-targets.d.ts +26 -0
  142. package/dist/types/lib/dashboard-inputs/transient-input-context.d.ts +102 -0
  143. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +50 -0
  144. package/dist/types/lib/dashboard-navigation/describe-carried-context.d.ts +11 -0
  145. package/dist/types/lib/dashboard-navigation/index.d.ts +1 -0
  146. package/dist/types/lib/dashboard-navigation/navigation-state.d.ts +120 -0
  147. package/dist/types/lib/dashboard-navigation/run-one-off-drill.d.ts +11 -0
  148. package/dist/types/lib/dashboard-navigation/use-transient-contexts.d.ts +17 -0
  149. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +48 -0
  150. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +20 -0
  151. package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
  152. package/dist/types/lib/download-pdf.d.ts +0 -3
  153. package/dist/types/lib/formatters/metric-formatting.d.ts +1 -1
  154. package/dist/types/lib/hooks/ai/dashboard-context.d.ts +15 -8
  155. package/dist/types/lib/hooks/chartjs/use-chart-blur.d.ts +10 -2
  156. package/dist/types/lib/hooks/interactions/{use-event-engine.d.ts → use-drill-actions.d.ts} +28 -7
  157. package/dist/types/lib/hooks/selection/use-active-selections.d.ts +15 -0
  158. package/dist/types/lib/hooks/selection/use-click-to-filter-mapping-draft.d.ts +20 -0
  159. package/dist/types/lib/hooks/selection/use-selection-click.d.ts +34 -0
  160. package/dist/types/lib/hooks/selection/use-selection-gestures.d.ts +38 -0
  161. package/dist/types/lib/hooks/selection/use-table-row-selection.d.ts +46 -0
  162. package/dist/types/lib/hooks/use-dashboard-card.d.ts +0 -2
  163. package/dist/types/lib/hooks/use-dashboard-filter-mapping-candidates.d.ts +18 -0
  164. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +0 -1
  165. package/dist/types/lib/hooks/use-dashboard.d.ts +1 -3
  166. package/dist/types/lib/hooks/use-interactions-popover.d.ts +1 -8
  167. package/dist/types/lib/hooks/use-resolved-card-config.d.ts +6 -0
  168. package/dist/types/lib/interactions/click-outcome.d.ts +25 -0
  169. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +3 -1
  170. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +1 -1
  171. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +7 -0
  172. package/dist/types/lib/interactions/interaction-utils.d.ts +17 -1
  173. package/dist/types/lib/matrix-table/build-matrix-drill-to-detail.d.ts +15 -0
  174. package/dist/types/lib/matrix-table/matrix-card-interactions.d.ts +14 -3
  175. package/dist/types/lib/query-context/build-card-query-context.d.ts +19 -8
  176. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -3
  177. package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +12 -4
  178. package/dist/types/lib/query-context/compile-selection-filters.d.ts +5 -0
  179. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +46 -0
  180. package/dist/types/lib/query-context/filter-group-utils.d.ts +3 -0
  181. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +29 -0
  182. package/dist/types/lib/selection/click-to-filter-authoring-support.d.ts +9 -0
  183. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  184. package/dist/types/lib/selection/selection-labels.d.ts +3 -0
  185. package/dist/types/lib/selection/selection-notices.d.ts +9 -0
  186. package/dist/types/lib/selection/selection-reducer.d.ts +46 -0
  187. package/dist/types/lib/stores/dashboard-store.d.ts +62 -17
  188. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  189. package/dist/types/lib/stores/index.d.ts +0 -2
  190. package/dist/types/lib/types/common-types.d.ts +60 -6
  191. package/dist/types/lib/types/explorer-types.d.ts +1 -22
  192. package/dist/types/lib/types/interaction-types.d.ts +6 -198
  193. package/dist/types/lib/utils/calculate-context-aware-filters.d.ts +21 -12
  194. package/dist/types/lib/utils/card-utils.d.ts +11 -0
  195. package/dist/types/lib/utils/date-hierarchy-utils.d.ts +3 -1
  196. package/dist/types/lib/utils/drag-and-drop-utils.d.ts +1 -1
  197. package/dist/types/lib/utils/interaction-icons.d.ts +1 -1
  198. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +32 -32
  199. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  200. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +100 -0
  201. package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +12 -0
  202. package/dist/types/shared/dashboard-authoring/apply-group-by-override.d.ts +19 -0
  203. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +88 -0
  204. package/dist/types/shared/dashboard-authoring/contracts.d.ts +8 -0
  205. package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
  206. package/dist/types/shared/dashboard-authoring/linked-click-to-filter-overrides.d.ts +32 -0
  207. package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
  208. package/package.json +1 -1
  209. package/src/data-app-sdk/README.md +58 -1
  210. package/dist/chunks/appearance-context-tNjvTJj3.cjs +0 -1
  211. package/dist/chunks/calculated-field-identity-BTpUqfEu.js +0 -1276
  212. package/dist/chunks/calculated-field-identity-rMuXuzEY.cjs +0 -1
  213. package/dist/chunks/constants-vtu7_IUo.cjs +0 -1
  214. package/dist/chunks/dashboard-controls-DlxeddZN.cjs +0 -52
  215. package/dist/chunks/dashboard-json-DhS4yJfc.cjs +0 -1
  216. package/dist/chunks/edit-dashboard-visual-X3OCnivL.cjs +0 -172
  217. package/dist/chunks/field-aggregations-BU_3gHKR.js +0 -957
  218. package/dist/chunks/field-aggregations-CDCamEsQ.cjs +0 -1
  219. package/dist/chunks/index-C8XCKzB6.cjs +0 -1
  220. package/dist/chunks/index-DSa6RSdg.cjs +0 -1417
  221. package/dist/chunks/matrix-control-sources-CeC5EMyq.cjs +0 -1
  222. package/dist/chunks/matrix-member-presentation-E2B4k3ws.cjs +0 -1
  223. package/dist/chunks/matrix-member-presentation-qiHxv67e.js +0 -105
  224. package/dist/chunks/matrix-operation-contract-Cqy4EW2H.js +0 -1638
  225. package/dist/chunks/matrix-operation-contract-D9dLX-Wr.cjs +0 -1
  226. package/dist/chunks/report-preferences-dialog-7Vsc_fsG.cjs +0 -1
  227. package/dist/chunks/search-BqqhaMx9.cjs +0 -26
  228. package/dist/chunks/switch-BytP6QY8.cjs +0 -139
  229. package/dist/types/components/interactions/configuration-popover.d.ts +0 -1
  230. package/dist/types/components/interactions/interaction-card.d.ts +0 -59
  231. package/dist/types/components/interactions/interaction-event-handler.d.ts +0 -11
  232. package/dist/types/components/interactions/interactions-list.d.ts +0 -50
  233. package/dist/types/components/interactions/panels/cross-filter-panel.d.ts +0 -24
  234. package/dist/types/components/interactions/panels/inline-drill-panel.d.ts +0 -24
  235. package/dist/types/components/interactions/selectors/action-selector.d.ts +0 -31
  236. package/dist/types/components/interactions/selectors/trigger-selector.d.ts +0 -38
  237. package/dist/types/components/surfboard/filter/click-filter-section.d.ts +0 -5
  238. package/dist/types/lib/interactions/build-interaction-event.d.ts +0 -25
  239. package/dist/types/lib/interactions/convert-click-filters-to-filter-group.d.ts +0 -10
  240. package/dist/types/lib/interactions/execute-interaction-event.d.ts +0 -80
  241. package/dist/types/lib/interactions/field-utils.d.ts +0 -11
  242. package/dist/types/lib/interactions/handle-chart-click.d.ts +0 -75
  243. package/dist/types/lib/interactions/linked-interaction-utils.d.ts +0 -14
  244. package/dist/types/lib/interactions/source-card-filter-utils.d.ts +0 -9
  245. package/dist/types/lib/stores/drill-actions.d.ts +0 -139
  246. package/dist/types/lib/stores/interaction-store.d.ts +0 -113
  247. package/dist/types/lib/stores/pointer-interaction-store.d.ts +0 -18
@@ -1,13 +1,13 @@
1
1
  import { jsxs as d, jsx as r, Fragment as ce } 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 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-CD4uGTZI.js";
4
4
  import { A as We, p as He } from "../chunks/color-CJvdlFM_.js";
5
5
  import { c as ae, X as Xe } from "../chunks/x-CXDkqdur.js";
6
- import "../chunks/constants-NUleP4DY.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";
@@ -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,24 +236,24 @@ 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 ue(c.schemes.light, t.light), ue(c.schemes.dark, t.dark), c;
232
252
  }
233
253
  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");
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, u(e, "aggregateTable"), u(e, "pivotTable");
235
255
  }
236
- function s(e, n) {
256
+ function u(e, n) {
237
257
  e.components[n] = O(e.components.table);
238
258
  }
239
259
  function pe(e, n, t) {
@@ -242,25 +262,25 @@ function pe(e, n, t) {
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, u(e, "aggregateTable"), u(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, u(e, "aggregateTable"), u(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, u(e, "aggregateTable"), u(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, u(e, "aggregateTable"), u(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, u(e, "aggregateTable"), u(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, u(e, "aggregateTable"), u(e, "pivotTable");
264
284
  break;
265
285
  }
266
286
  }
@@ -273,28 +293,28 @@ 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, u(e, "aggregateTable"), u(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, y = (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 };
317
+ s.radius = { ...f, ...s.radius };
298
318
  const g = {
299
319
  dashboardPadding: 16,
300
320
  gridGap: 12,
@@ -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 = { ...g, ...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),
380
+ l.components.chart = { ...$, ...l.components.chart }, l.components.table = {
381
+ ...B(i, s),
382
+ ...l.components.table
383
+ }, l.components.aggregateTable = y ? {
384
+ ...B(i, s),
365
385
  ...y
366
- } : O(c.components.table), c.components.pivotTable = x ? {
367
- ...B(i, l),
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"],
@@ -431,6 +450,7 @@ const dr = [
431
450
  ["primaryForeground", "Primary text"],
432
451
  ["accent", "Accent"],
433
452
  ["accentForeground", "Accent text"],
453
+ ["selection", "Selection"],
434
454
  ["muted", "Muted"],
435
455
  ["mutedForeground", "Muted text"],
436
456
  ["border", "Border"],
@@ -438,7 +458,7 @@ const dr = [
438
458
  ["negative", "Negative"],
439
459
  ["warning", "Warning"],
440
460
  ["info", "Info"]
441
- ], ir = [0, 1, 2, 3, 4, 5], H = We, cr = [
461
+ ], cr = [0, 1, 2, 3, 4, 5], H = We, lr = [
442
462
  "#ffffff",
443
463
  "#f8fafc",
444
464
  "#f4f4f5",
@@ -452,13 +472,13 @@ const dr = [
452
472
  "#dc2626",
453
473
  "#7c3aed"
454
474
  ];
455
- function Pr({
475
+ function Br({
456
476
  appearance: e,
457
477
  previewTitle: n,
458
478
  isLoading: t = !1,
459
- isSaving: u = !1,
460
- error: c = null,
461
- className: l,
479
+ isSaving: c = !1,
480
+ error: l = null,
481
+ className: s,
462
482
  onDraftChange: i,
463
483
  onSave: y,
464
484
  onClearConfig: x,
@@ -466,15 +486,15 @@ function Pr({
466
486
  }) {
467
487
  const [f, g] = m.useState(null), [T, F] = m.useState("light"), [$, z] = m.useState(!1), [we, R] = m.useState(
468
488
  "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);
489
+ ), [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);
470
490
  m.useEffect(() => {
471
- J.current = i;
491
+ j.current = i;
472
492
  }, [i]), m.useEffect(() => {
473
493
  if (e === void 0) {
474
494
  A.current = !0, g(null);
475
495
  return;
476
496
  }
477
- const o = j(e);
497
+ const o = J(e);
478
498
  A.current = !0, g(o), F("light"), h(null);
479
499
  }, [e]), m.useEffect(() => {
480
500
  var o;
@@ -485,7 +505,7 @@ function Pr({
485
505
  }
486
506
  try {
487
507
  const a = L(f);
488
- (o = J.current) == null || o.call(J, a), h(null);
508
+ (o = j.current) == null || o.call(j, a), h(null);
489
509
  } catch (a) {
490
510
  h(
491
511
  a instanceof Error ? a.message : "Appearance is invalid"
@@ -493,13 +513,13 @@ function Pr({
493
513
  }
494
514
  }
495
515
  }, [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,
516
+ const p = f == null ? void 0 : f.schemes[T], V = c || $, Te = m.useMemo(
517
+ () => p ? pr(p.tokens.radius.control) : void 0,
498
518
  [p]
499
519
  ), Fe = (o) => {
500
520
  g((a) => {
501
521
  if (!a) return a;
502
- const k = pr(a);
522
+ const k = gr(a);
503
523
  return o(k), k;
504
524
  });
505
525
  }, b = (o) => {
@@ -524,13 +544,13 @@ function Pr({
524
544
  z(!1);
525
545
  }
526
546
  }, Be = () => {
527
- const o = j(null);
547
+ const o = J(null);
528
548
  R("idle"), g(o);
529
549
  }, Oe = async () => {
530
550
  if (x) {
531
551
  z(!0), h(null), R("idle");
532
552
  try {
533
- await x(), A.current = !0, g(j(null)), F("light");
553
+ await x(), A.current = !0, g(J(null)), F("light");
534
554
  } catch (o) {
535
555
  h(
536
556
  o instanceof Error ? o.message : "Unable to clear organization appearance"
@@ -559,7 +579,7 @@ function Pr({
559
579
  );
560
580
  }
561
581
  }, ie = (o) => {
562
- const a = JSON.parse(o), k = j(a), P = L(k);
582
+ const a = JSON.parse(o), k = J(a), P = L(k);
563
583
  R("idle"), F("light"), g(k), _(JSON.stringify(P, null, 2));
564
584
  }, Ee = () => {
565
585
  try {
@@ -574,7 +594,7 @@ function Pr({
574
594
  const a = (k = o.target.files) == null ? void 0 : k[0];
575
595
  if (o.target.value = "", !!a)
576
596
  try {
577
- ie(await gr(a));
597
+ ie(await br(a));
578
598
  } catch (P) {
579
599
  h(
580
600
  P instanceof Error ? P.message : "Uploaded file must be a valid brand spec"
@@ -586,7 +606,7 @@ function Pr({
586
606
  {
587
607
  className: q(
588
608
  "flex min-h-0 flex-1 flex-col bg-background text-foreground",
589
- l
609
+ s
590
610
  ),
591
611
  style: Te,
592
612
  children: [
@@ -742,7 +762,7 @@ function Pr({
742
762
  /* @__PURE__ */ r(se, { className: "h-3.5 w-3.5 text-destructive" }),
743
763
  "Preview keeps the last valid draft"
744
764
  ] }) : /* @__PURE__ */ d(ce, { children: [
745
- /* @__PURE__ */ r(Je, { className: "h-3.5 w-3.5 text-emerald-500" }),
765
+ /* @__PURE__ */ r(je, { className: "h-3.5 w-3.5 text-emerald-500" }),
746
766
  "Draft is applied to the live dashboard preview"
747
767
  ] }) }),
748
768
  /* @__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(
@@ -760,7 +780,7 @@ function Pr({
760
780
  )) })
761
781
  ] }),
762
782
  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: [
783
+ 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" }) }) : l ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: l }) : f && p ? /* @__PURE__ */ d(Je, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
764
784
  /* @__PURE__ */ r("div", { className: "shrink-0 px-4 pt-3", children: /* @__PURE__ */ d(Le, { variant: "underline", className: "w-full gap-5", children: [
765
785
  /* @__PURE__ */ r(U, { value: "style", children: "Style" }),
766
786
  /* @__PURE__ */ r(U, { value: "surfaces", children: "Surfaces" }),
@@ -780,7 +800,7 @@ function Pr({
780
800
  type: "button",
781
801
  className: "flex items-center gap-3 rounded-control border border-border/70 px-3 py-2 text-left hover:bg-muted/60",
782
802
  onClick: () => {
783
- const a = nr(f, o.id);
803
+ const a = tr(f, o.id);
784
804
  g(a);
785
805
  },
786
806
  children: [
@@ -816,7 +836,7 @@ function Pr({
816
836
  icon: G,
817
837
  title: "Color",
818
838
  description: `Editing the ${T} scheme.`,
819
- children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: dr.map(([o, a]) => /* @__PURE__ */ r(
839
+ children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: ir.map(([o, a]) => /* @__PURE__ */ r(
820
840
  v,
821
841
  {
822
842
  label: a,
@@ -837,7 +857,7 @@ function Pr({
837
857
  description: "Fonts and density used by dashboard and workflow chrome.",
838
858
  children: [
839
859
  /* @__PURE__ */ r(
840
- lr,
860
+ sr,
841
861
  {
842
862
  value: p.tokens.typography.fontFamily,
843
863
  onChange: (o) => b((a) => {
@@ -869,7 +889,7 @@ function Pr({
869
889
  ["spacious", "Spacious"]
870
890
  ],
871
891
  onChange: (o) => b((a) => {
872
- a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, s(a, "aggregateTable"), s(a, "pivotTable");
892
+ a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, u(a, "aggregateTable"), u(a, "pivotTable");
873
893
  })
874
894
  }
875
895
  )
@@ -1034,7 +1054,7 @@ function Pr({
1034
1054
  title: "Charts",
1035
1055
  description: "Palette and semantic chart text/grid colors.",
1036
1056
  children: [
1037
- /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: ir.map((o) => /* @__PURE__ */ r(
1057
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: cr.map((o) => /* @__PURE__ */ r(
1038
1058
  v,
1039
1059
  {
1040
1060
  label: `Series ${o + 1}`,
@@ -1089,7 +1109,7 @@ function Pr({
1089
1109
  ["spacious", "Spacious"]
1090
1110
  ],
1091
1111
  onChange: (o) => b((a) => {
1092
- a.components.table.density = o, s(a, "aggregateTable"), s(a, "pivotTable");
1112
+ a.components.table.density = o, u(a, "aggregateTable"), u(a, "pivotTable");
1093
1113
  })
1094
1114
  }
1095
1115
  ),
@@ -1103,7 +1123,7 @@ function Pr({
1103
1123
  ["wrap", "Wrap"]
1104
1124
  ],
1105
1125
  onChange: (o) => b((a) => {
1106
- a.components.table.cell.wrap = o, s(a, "aggregateTable"), s(a, "pivotTable");
1126
+ a.components.table.cell.wrap = o, u(a, "aggregateTable"), u(a, "pivotTable");
1107
1127
  })
1108
1128
  }
1109
1129
  )
@@ -1115,7 +1135,7 @@ function Pr({
1115
1135
  label: "Header",
1116
1136
  value: p.components.table.header.background,
1117
1137
  onChange: (o) => b((a) => {
1118
- a.components.table.header.background = o, s(a, "aggregateTable"), s(a, "pivotTable");
1138
+ a.components.table.header.background = o, u(a, "aggregateTable"), u(a, "pivotTable");
1119
1139
  })
1120
1140
  }
1121
1141
  ),
@@ -1125,7 +1145,7 @@ function Pr({
1125
1145
  label: "Divider",
1126
1146
  value: p.components.table.row.dividerColor,
1127
1147
  onChange: (o) => b((a) => {
1128
- a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, s(a, "aggregateTable"), s(a, "pivotTable");
1148
+ a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, u(a, "aggregateTable"), u(a, "pivotTable");
1129
1149
  })
1130
1150
  }
1131
1151
  )
@@ -1136,7 +1156,7 @@ function Pr({
1136
1156
  label: "Zebra rows",
1137
1157
  checked: p.components.table.row.zebra,
1138
1158
  onCheckedChange: (o) => b((a) => {
1139
- a.components.table.row.zebra = o, s(a, "aggregateTable"), s(a, "pivotTable");
1159
+ a.components.table.row.zebra = o, u(a, "aggregateTable"), u(a, "pivotTable");
1140
1160
  })
1141
1161
  }
1142
1162
  ),
@@ -1146,7 +1166,7 @@ function Pr({
1146
1166
  label: "Sticky headers",
1147
1167
  checked: p.components.table.header.sticky,
1148
1168
  onCheckedChange: (o) => b((a) => {
1149
- a.components.table.header.sticky = o, s(a, "aggregateTable"), s(a, "pivotTable");
1169
+ a.components.table.header.sticky = o, u(a, "aggregateTable"), u(a, "pivotTable");
1150
1170
  })
1151
1171
  }
1152
1172
  ),
@@ -1156,7 +1176,7 @@ function Pr({
1156
1176
  label: "Uppercase headers",
1157
1177
  checked: p.components.table.header.uppercase,
1158
1178
  onCheckedChange: (o) => b((a) => {
1159
- a.components.table.header.uppercase = o, s(a, "aggregateTable"), s(a, "pivotTable");
1179
+ a.components.table.header.uppercase = o, u(a, "aggregateTable"), u(a, "pivotTable");
1160
1180
  })
1161
1181
  }
1162
1182
  )
@@ -1174,7 +1194,7 @@ function N({
1174
1194
  icon: e,
1175
1195
  title: n,
1176
1196
  description: t,
1177
- children: u
1197
+ children: c
1178
1198
  }) {
1179
1199
  return /* @__PURE__ */ d("section", { className: "mb-6 last:mb-0", children: [
1180
1200
  /* @__PURE__ */ d("div", { className: "mb-3 flex items-start gap-2", children: [
@@ -1184,16 +1204,16 @@ function N({
1184
1204
  /* @__PURE__ */ r("p", { className: "mt-0.5 text-[12px] leading-4 text-muted-foreground", children: t })
1185
1205
  ] })
1186
1206
  ] }),
1187
- /* @__PURE__ */ r("div", { className: "space-y-2", children: u }),
1207
+ /* @__PURE__ */ r("div", { className: "space-y-2", children: c }),
1188
1208
  /* @__PURE__ */ r(Me, { className: "mt-5 bg-border/60" })
1189
1209
  ] });
1190
1210
  }
1191
- function lr({
1211
+ function sr({
1192
1212
  value: e,
1193
1213
  onChange: n
1194
1214
  }) {
1195
- var u;
1196
- const t = (u = H.find((c) => c.value === e)) == null ? void 0 : u.id;
1215
+ var c;
1216
+ const t = (c = H.find((l) => l.value === e)) == null ? void 0 : c.id;
1197
1217
  return /* @__PURE__ */ d("div", { children: [
1198
1218
  /* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
1199
1219
  /* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_150px] gap-2", children: [
@@ -1201,15 +1221,15 @@ function lr({
1201
1221
  ke,
1202
1222
  {
1203
1223
  value: t,
1204
- onValueChange: (c) => {
1205
- const l = H.find(
1206
- (i) => i.id === c
1224
+ onValueChange: (l) => {
1225
+ const s = H.find(
1226
+ (i) => i.id === l
1207
1227
  );
1208
- l && n(l.value);
1228
+ s && n(s.value);
1209
1229
  },
1210
1230
  children: [
1211
1231
  /* @__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)) })
1232
+ /* @__PURE__ */ r(ve, { children: H.map((l) => /* @__PURE__ */ r(Ce, { value: l.id, children: l.label }, l.id)) })
1213
1233
  ]
1214
1234
  }
1215
1235
  ),
@@ -1228,10 +1248,10 @@ function v({
1228
1248
  label: e,
1229
1249
  tooltip: n,
1230
1250
  value: t,
1231
- onChange: u
1251
+ onChange: c
1232
1252
  }) {
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);
1253
+ const [l, s] = m.useState(!1), [i, y] = m.useState(t), x = ur(t), S = t !== i, f = (g) => {
1254
+ s(g), g && y(t);
1235
1255
  };
1236
1256
  return /* @__PURE__ */ d("div", { className: "block", children: [
1237
1257
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
@@ -1250,7 +1270,7 @@ function v({
1250
1270
  ] }) }) : null
1251
1271
  ] }),
1252
1272
  /* @__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: [
1273
+ /* @__PURE__ */ d(ge, { open: l, onOpenChange: f, children: [
1254
1274
  /* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ r(
1255
1275
  "button",
1256
1276
  {
@@ -1281,7 +1301,7 @@ function v({
1281
1301
  "aria-label": `${e} native color picker`,
1282
1302
  type: "color",
1283
1303
  value: x,
1284
- onChange: (g) => u(g.target.value),
1304
+ onChange: (g) => c(g.target.value),
1285
1305
  className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
1286
1306
  }
1287
1307
  ),
@@ -1300,7 +1320,7 @@ function v({
1300
1320
  "aria-label": `Reset ${e} color to previous value`,
1301
1321
  disabled: !S,
1302
1322
  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),
1323
+ onClick: () => c(i),
1304
1324
  children: /* @__PURE__ */ r(me, { className: "h-3 w-3" })
1305
1325
  }
1306
1326
  ) }),
@@ -1313,13 +1333,13 @@ function v({
1313
1333
  size: "xs",
1314
1334
  "aria-label": `${e} popover color value`,
1315
1335
  value: t,
1316
- onChange: (g) => u(g.target.value),
1336
+ onChange: (g) => c(g.target.value),
1317
1337
  className: "font-mono"
1318
1338
  }
1319
1339
  )
1320
1340
  ] })
1321
1341
  ] }),
1322
- /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: cr.map((g) => /* @__PURE__ */ r(
1342
+ /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: lr.map((g) => /* @__PURE__ */ r(
1323
1343
  "button",
1324
1344
  {
1325
1345
  type: "button",
@@ -1329,7 +1349,7 @@ function v({
1329
1349
  t.toLowerCase() === g && "ring-2 ring-ring"
1330
1350
  ),
1331
1351
  style: { backgroundColor: g },
1332
- onClick: () => u(g)
1352
+ onClick: () => c(g)
1333
1353
  },
1334
1354
  g
1335
1355
  )) })
@@ -1343,14 +1363,14 @@ function v({
1343
1363
  size: "xs",
1344
1364
  "aria-label": `${e} color value`,
1345
1365
  value: t,
1346
- onChange: (g) => u(g.target.value),
1366
+ onChange: (g) => c(g.target.value),
1347
1367
  className: "h-full border-0 px-2 font-mono shadow-none focus-visible:border-0"
1348
1368
  }
1349
1369
  )
1350
1370
  ] })
1351
1371
  ] });
1352
1372
  }
1353
- function sr(e) {
1373
+ function ur(e) {
1354
1374
  const n = He(e);
1355
1375
  return n ? `#${X(n.r)}${X(n.g)}${X(n.b)}` : "#000000";
1356
1376
  }
@@ -1361,9 +1381,9 @@ function w({
1361
1381
  label: e,
1362
1382
  tooltip: n,
1363
1383
  value: t,
1364
- min: u,
1365
- max: c,
1366
- onChange: l
1384
+ min: c,
1385
+ max: l,
1386
+ onChange: s
1367
1387
  }) {
1368
1388
  const i = m.useId();
1369
1389
  return /* @__PURE__ */ d("div", { className: "block", children: [
@@ -1395,12 +1415,12 @@ function w({
1395
1415
  id: i,
1396
1416
  size: "xs",
1397
1417
  type: "number",
1398
- min: u,
1399
- max: c,
1418
+ min: c,
1419
+ max: l,
1400
1420
  value: t,
1401
1421
  onChange: (y) => {
1402
1422
  const x = Number(y.target.value);
1403
- Number.isNaN(x) || l(x);
1423
+ Number.isNaN(x) || s(x);
1404
1424
  }
1405
1425
  }
1406
1426
  )
@@ -1410,13 +1430,13 @@ function Y({
1410
1430
  label: e,
1411
1431
  value: n,
1412
1432
  options: t,
1413
- onChange: u
1433
+ onChange: c
1414
1434
  }) {
1415
1435
  return /* @__PURE__ */ d("div", { children: [
1416
1436
  /* @__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: [
1437
+ /* @__PURE__ */ d(ke, { value: n, onValueChange: c, children: [
1418
1438
  /* @__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)) })
1439
+ /* @__PURE__ */ r(ve, { children: t.map(([l, s]) => /* @__PURE__ */ r(Ce, { value: l, children: s }, l)) })
1420
1440
  ] })
1421
1441
  ] });
1422
1442
  }
@@ -1430,27 +1450,27 @@ function Z({
1430
1450
  /* @__PURE__ */ r(Ge, { size: "xs", checked: n, onCheckedChange: t })
1431
1451
  ] });
1432
1452
  }
1433
- function ur(e) {
1453
+ function pr(e) {
1434
1454
  const n = `${Number((e / 16).toFixed(4))}rem`;
1435
1455
  return {
1436
1456
  "--semaphor-radius": n,
1437
1457
  "--semaphor-control-radius": n
1438
1458
  };
1439
1459
  }
1440
- function pr(e) {
1460
+ function gr(e) {
1441
1461
  return JSON.parse(JSON.stringify(e));
1442
1462
  }
1443
- function gr(e) {
1463
+ function br(e) {
1444
1464
  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);
1465
+ const c = new FileReader();
1466
+ c.onload = () => n(String(c.result ?? "")), c.onerror = () => t(c.error ?? new Error("Unable to read file")), c.readAsText(e);
1447
1467
  });
1448
1468
  }
1449
1469
  export {
1450
1470
  Ne as BRAND_STUDIO_PRESETS,
1451
- Pr as BrandStudioEditor,
1452
- nr as applyBrandStudioPreset,
1471
+ Br as BrandStudioEditor,
1472
+ tr as applyBrandStudioPreset,
1453
1473
  L as buildAppearanceSpecFromDraft,
1454
- j as createBrandStudioDraft,
1455
- s as mirrorTableAppearance
1474
+ J as createBrandStudioDraft,
1475
+ u as mirrorTableAppearance
1456
1476
  };