react-semaphor 0.1.545 → 0.1.546

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 (141) hide show
  1. package/dist/analytics-protocol/index.js +405 -442
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +100 -76
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.js +6 -6
  6. package/dist/chunks/{add-to-dashboard-BuAqfA2Y.js → add-to-dashboard-BQRAAnc3.js} +55 -33
  7. package/dist/chunks/{analytics-base-schemas-BFAoRlkU.js → analytics-base-schemas-BKs3flFS.js} +2 -2
  8. package/dist/chunks/{assistant-chat-D7sWTypJ.js → assistant-chat-BPXhulAx.js} +2826 -2595
  9. package/dist/chunks/{bookmark-state-CXw7lZ50.js → bookmark-state-C4vetoa0.js} +7 -8
  10. package/dist/chunks/column-catalog-BYnochWQ.js +3363 -0
  11. package/dist/chunks/comparison-window-caption-C2xF-eWw.js +1433 -0
  12. package/dist/chunks/{context-ClREvqCZ.js → context-BerEBuFR.js} +11 -6
  13. package/dist/chunks/custom-visual-inputs-CkJW9pBS.js +295 -0
  14. package/dist/chunks/{dashboard-B1tMju0u.js → dashboard-C3CoKbGY.js} +1 -1
  15. package/dist/chunks/dashboard-briefing-launcher-Be4h-7My.js +3734 -0
  16. package/dist/chunks/dashboard-controls-bxPrlSyp.js +2307 -0
  17. package/dist/chunks/{dashboard-json-CoYRPqxx.js → dashboard-json-BrjxIiRt.js} +5 -5
  18. package/dist/chunks/{document-dashboard-inputs-BesAHZvB.js → document-dashboard-inputs-CRVHpIHp.js} +872 -974
  19. package/dist/chunks/{edit-dashboard-visual-JPtNfJRb.js → edit-dashboard-visual-DYYYDjY6.js} +2361 -2447
  20. package/dist/chunks/{filter-value-text-ff7osJr7.js → filter-value-text-Ddf55Ku1.js} +9 -9
  21. package/dist/chunks/global-date-filter-utils-9d6m9-FE.js +11859 -0
  22. package/dist/chunks/index-CtoK1Lgu.js +586 -0
  23. package/dist/chunks/{index-DRWiuqyd.js → index-DkQkMKa1.js} +80 -79
  24. package/dist/chunks/list-filter-DsaTbM3J.js +15 -0
  25. package/dist/chunks/matrix-analytical-definition-B9vW-osb.js +717 -0
  26. package/dist/chunks/{matrix-card-DjwWcCo8.js → matrix-card-LiMEipvq.js} +3 -3
  27. package/dist/chunks/{matrix-formatter-DnCyRXJE.js → matrix-formatter-DWEeC0_c.js} +44 -44
  28. package/dist/chunks/{matrix-member-presentation-CQGdVks6.js → matrix-member-presentation-DqzG-UhQ.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-8OIO4gob.js → matrix-operation-contract-D6vYkZK4.js} +72 -72
  30. package/dist/chunks/{metric-comparison-DEwi9uc2.js → metric-comparison-zpGw4lD6.js} +2 -2
  31. package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
  32. package/dist/chunks/{pivot-header-presentation-DHcx1XGQ.js → pivot-header-presentation-CQnIDtUv.js} +1 -1
  33. package/dist/chunks/{pivot-result-identity-DJhXXcns.js → pivot-result-identity-C-Q1j1Wb.js} +1 -1
  34. package/dist/chunks/{pivot-result-lifecycle-DM4CyGKs.js → pivot-result-lifecycle-pwq3b7LC.js} +571 -380
  35. package/dist/chunks/{raw-temporal-contract-C51YG48G.js → raw-temporal-contract-WuXA8jBP.js} +1 -1
  36. package/dist/chunks/{raw-temporal-presentation-C3mUgnEx.js → raw-temporal-presentation-CBzrDOjM.js} +8 -8
  37. package/dist/chunks/{report-preferences-dialog-DUtuUL_5.js → report-preferences-dialog-4QEZWe5U.js} +111 -112
  38. package/dist/chunks/{report-runtime-context-Dq8XyODK.js → report-runtime-context-hWiTCzFV.js} +2 -2
  39. package/dist/chunks/resolve-dashboard-input-context-UpK_LBpL.js +5677 -0
  40. package/dist/chunks/{saved-dashboard-context-LrF_kW0l.js → saved-dashboard-context-D_I3Lxk0.js} +34 -34
  41. package/dist/chunks/{selection-reducer-Dj_8xD69.js → selection-reducer-CJzkTZio.js} +15 -15
  42. package/dist/chunks/{semaphor-ready-indicator-BxF96Yhv.js → semaphor-ready-indicator-4zpRHE-X.js} +45823 -47304
  43. package/dist/chunks/{shelf-drop-preview-context-CNaM_Gmh.js → shelf-drop-preview-context-Cfw7TRAx.js} +84 -84
  44. package/dist/chunks/{source-entity-resolution-BYn9giz3.js → source-entity-resolution-BIGRvtbG.js} +13 -13
  45. package/dist/chunks/{switch-uDtPgQlQ.js → switch-CEBOR4n7.js} +3 -3
  46. package/dist/chunks/{table-export-sheet-YzMioA7Y.js → table-export-sheet-4X9mAG3V.js} +1 -1
  47. package/dist/chunks/table-settings-CunhoDUi.js +605 -0
  48. package/dist/chunks/{temporal-bucket-D7NBrrtL.js → temporal-bucket-CQOSbv9-.js} +26 -26
  49. package/dist/chunks/{token-types-DBbZVQsm.js → token-types-BMqRmT-C.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-CjB7ig1o.js → use-create-flow-overlay-state-DZBZiiD-.js} +101 -101
  51. package/dist/chunks/{validators-DMHTpf7a.js → validators-C-aOQlTB.js} +713 -658
  52. package/dist/chunks/{relative-date-label-Bk2j94pA.js → zoned-wall-clock-MulfA26h.js} +64 -21
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +1802 -1149
  55. package/dist/data-app-sdk/index.js +6 -6
  56. package/dist/data-app-sdk-adapters/index.js +3 -3
  57. package/dist/data-app-sdk-validation/index.js +14 -14
  58. package/dist/format-utils/index.js +133 -133
  59. package/dist/index.js +192 -186
  60. package/dist/layouts/index.js +5 -242
  61. package/dist/report-runtime-context/index.js +2 -2
  62. package/dist/shared/index.js +4 -5
  63. package/dist/style.css +1 -1
  64. package/dist/surfboard/index.js +2 -2
  65. package/dist/types/components/index.d.ts +2 -0
  66. package/dist/types/components/surfboard/arrange-layout-button.d.ts +8 -0
  67. package/dist/types/components/surfboard/screen-size-preview-button.d.ts +7 -0
  68. package/dist/types/index.js +6 -6
  69. package/dist/types/lib/charts/table-chart-types.d.ts +4 -0
  70. package/dist/types/lib/charts/types.d.ts +2 -2
  71. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +6 -0
  72. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +2 -0
  73. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +15 -0
  74. package/dist/types/lib/matrix-table/matrix-editor.d.ts +52 -0
  75. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +69 -0
  76. package/dist/types/lib/stores/dashboard-store.d.ts +125 -6
  77. package/dist/types/lib/types/common-types.d.ts +8 -0
  78. package/dist/types/lib/types/explorer-types.d.ts +10 -0
  79. package/dist/types/lib/types/semantic-types.d.ts +84 -0
  80. package/dist/types/lib/utils/build-saved-editor-card.d.ts +20 -0
  81. package/dist/types/lib/utils/card-type-change.d.ts +16 -0
  82. package/dist/types/lib/utils/field-availability-context.d.ts +25 -0
  83. package/dist/types/lib/utils/field-placement.d.ts +96 -0
  84. package/dist/types/lib/utils/field-state-calculator.d.ts +161 -0
  85. package/dist/types/lib/utils/qualified-entity-name.d.ts +2 -0
  86. package/dist/types/shared/analytics-protocol/field-provenance.d.ts +89 -0
  87. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  88. package/dist/types/shared/analytics-protocol/query-policies.d.ts +52 -0
  89. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +1 -1
  90. package/dist/types/shared/analytics-protocol/time-window.d.ts +40 -1
  91. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -1
  92. package/dist/types/shared/assistant-protocol/answer-text.d.ts +20 -0
  93. package/dist/types/shared/assistant-protocol/context.d.ts +21 -21
  94. package/dist/types/shared/assistant-protocol/index.d.ts +1 -0
  95. package/dist/types/shared/assistant-protocol/limits.d.ts +6 -1
  96. package/dist/types/shared/assistant-protocol/parts.d.ts +43 -3
  97. package/dist/types/shared/assistant-protocol/request.d.ts +14 -2
  98. package/dist/types/shared/dashboard-authoring/calculated-field-identity.d.ts +3 -0
  99. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +487 -0
  100. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +34 -0
  101. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +7886 -0
  102. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +43 -0
  103. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +54 -0
  104. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +89 -0
  105. package/dist/types/shared/dashboard-authoring/column-catalog.d.ts +32 -0
  106. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -55
  107. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +24 -14
  108. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +9 -1
  109. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +26 -0
  110. package/dist/types/shared/dashboard-authoring/filter-applicability.d.ts +75 -0
  111. package/dist/types/shared/dashboard-authoring/index.d.ts +18 -2
  112. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +10 -37
  113. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +189 -0
  114. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +94 -0
  115. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +78 -0
  116. package/dist/types/shared/dashboard-authoring/validators.d.ts +1 -2
  117. package/dist/types/shared/layouts/engine/grid.d.ts +25 -0
  118. package/dist/types/shared/layouts/engine/index.d.ts +4 -0
  119. package/dist/types/shared/layouts/engine/sheet-layout.d.ts +7 -0
  120. package/dist/types/shared/layouts/engine/types.d.ts +125 -0
  121. package/dist/types/shared/layouts/index.d.ts +1 -2
  122. package/package.json +2 -2
  123. package/dist/chunks/apply-dashboard-operations-CZEMsx8E.js +0 -2080
  124. package/dist/chunks/calendar-day-equality-dvoQp1xW.js +0 -410
  125. package/dist/chunks/comparison-window-caption-D4E6IHPD.js +0 -1624
  126. package/dist/chunks/custom-visual-inputs-DLCD9Y5V.js +0 -329
  127. package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +0 -3720
  128. package/dist/chunks/dashboard-controls-Cq05n3e0.js +0 -2315
  129. package/dist/chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js +0 -108
  130. package/dist/chunks/matrix-analytical-definition-C7Gb0e12.js +0 -117
  131. package/dist/chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js +0 -67
  132. package/dist/chunks/numeric-presentation-7X_IrD58.js +0 -5226
  133. package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +0 -9415
  134. package/dist/chunks/stable-serialize-CfqXeiBP.js +0 -6
  135. package/dist/chunks/table-settings-CLZocegs.js +0 -501
  136. package/dist/chunks/use-debounced-dirty-check-BwAbnX_5.js +0 -59
  137. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +0 -46
  138. package/dist/types/shared/dashboard-authoring/change-compiler.d.ts +0 -7
  139. package/dist/types/shared/dashboard-authoring/layout-compiler.d.ts +0 -2
  140. package/dist/types/shared/layouts/create-frame-layouts.d.ts +0 -27
  141. package/dist/types/shared/layouts/frame-layouts.d.ts +0 -23
@@ -1,17 +1,17 @@
1
1
  import { c as fe, C as Se } from "./x-4f5U2XwU.js";
2
- import { useEffect as K, forwardRef as nt, useMemo as Y, useState as z, useRef as ne, useCallback as A, Fragment as st } from "react";
3
- import { $ as qe, a0 as ot, aG as dt, u as it, i as ct, aH as ut, aI as mt, aJ as De, aK as pt, aL as ft, aM as Me, aN as ze, aO as ht, aP as gt, aQ as bt, aR as xt, aS as vt, aT as yt, aU as Ct } from "./semaphor-ready-indicator-BxF96Yhv.js";
4
- import { jsx as t, jsxs as o, Fragment as G } from "react/jsx-runtime";
2
+ import { useEffect as K, forwardRef as nt, useMemo as H, useState as M, useRef as ne, useCallback as A, Fragment as st } from "react";
3
+ import { a3 as qe, a4 as ot, aK as dt, u as it, i as ct, aL as ut, aM as mt, aN as De, aO as pt, aP as ft, aQ as ze, aR as Me, aS as ht, aT as gt, aU as bt, aV as xt, aW as vt, aX as yt, aY as Ct } from "./semaphor-ready-indicator-4zpRHE-X.js";
4
+ import { jsx as t, jsxs as o, Fragment as X } from "react/jsx-runtime";
5
5
  import "./index-CuHybtft.js";
6
- import "./validators-DMHTpf7a.js";
7
- import "./matrix-operation-contract-8OIO4gob.js";
8
- import "./analytics-base-schemas-BFAoRlkU.js";
6
+ import "./validators-C-aOQlTB.js";
7
+ import "./matrix-operation-contract-D6vYkZK4.js";
8
+ import "./analytics-base-schemas-BKs3flFS.js";
9
9
  import "zod";
10
10
  import "../value-format-preferences/index.js";
11
11
  import { c as R } from "./_commonjsHelpers-DimLPMtv.js";
12
- import { m as Re, n as je, o as Be, p as $e, x as Qe, B as E, l as M, q as Ue, r as se, s as oe, t as de, u as ie, v as ce } from "./switch-uDtPgQlQ.js";
13
- import { ar as kt, as as Nt, at as J, au as we, av as Te, aw as ue, ax as me, ay as St, az as Dt, aA as _e, aB as wt, aC as Tt, aD as X, aE as _t, aF as Le, aG as He, aH as Ye, aI as Ge, aJ as Je, aK as Lt, aL as Vt, aM as Ve, aN as Et, aO as Ee, aP as It, aQ as At, aR as Ft, aS as Ot, aT as pe } from "./resolve-dashboard-input-context-DJ2tICwz.js";
14
- import { C as Ie } from "./selection-reducer-Dj_8xD69.js";
12
+ import { m as Re, n as je, o as Be, p as $e, x as Ue, B as E, l as z, q as Qe, r as se, s as oe, t as de, u as ie, v as ce } from "./switch-CEBOR4n7.js";
13
+ import { c as kt, e as Nt, f as G, h as we, j as Te, k as ue, l as me, m as St, o as Dt, p as _e, q as wt, t as Tt, u as J, w as _t, x as Ve, y as Ye, z as He, A as Xe, B as Ge, C as Vt, I as Lt, D as Le, E as Et, F as Ee, G as It, H as At, J as Ft, K as Ot, L as pe } from "./global-date-filter-utils-9d6m9-FE.js";
14
+ import { C as Ie } from "./selection-reducer-CJzkTZio.js";
15
15
  /**
16
16
  * @license lucide-react v0.453.0 - ISC
17
17
  *
@@ -41,7 +41,7 @@ const qt = fe("Library", [
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
43
  */
44
- const Mt = fe("Link2", [
44
+ const zt = fe("Link2", [
45
45
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
46
46
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
47
47
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
@@ -111,7 +111,7 @@ function na({
111
111
  library: "fill-blue-50 dark:fill-blue-950"
112
112
  }, T = {
113
113
  local: /* @__PURE__ */ t("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
114
- linked: /* @__PURE__ */ t(Mt, { className: "h-3.5 w-3.5" }),
114
+ linked: /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" }),
115
115
  library: /* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" })
116
116
  }, _ = {
117
117
  local: "Local",
@@ -140,14 +140,14 @@ function na({
140
140
  side: "bottom",
141
141
  className: R("max-w-xs", f[p]),
142
142
  children: [
143
- /* @__PURE__ */ t(Qe, { className: S[p] }),
143
+ /* @__PURE__ */ t(Ue, { className: S[p] }),
144
144
  /* @__PURE__ */ t("p", { children: x[p] })
145
145
  ]
146
146
  }
147
147
  )
148
148
  ] }) });
149
149
  }
150
- const zt = nt(
150
+ const Mt = nt(
151
151
  ({
152
152
  side: s = "bottom",
153
153
  children: n,
@@ -183,19 +183,19 @@ const zt = nt(
183
183
  ),
184
184
  children: [
185
185
  i,
186
- /* @__PURE__ */ t(Qe, { className: "fill-foreground" })
186
+ /* @__PURE__ */ t(Ue, { className: "fill-foreground" })
187
187
  ]
188
188
  }
189
189
  )
190
190
  ] }) })
191
191
  );
192
- zt.displayName = "IconButton";
193
- function Xe(s) {
192
+ Mt.displayName = "IconButton";
193
+ function Je(s) {
194
194
  const { control: n, onChange: u } = s;
195
195
  return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
196
- /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
196
+ /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
197
197
  /* @__PURE__ */ t(
198
- Ue,
198
+ Qe,
199
199
  {
200
200
  size: "xs",
201
201
  value: n.label,
@@ -257,13 +257,13 @@ function jt(s) {
257
257
  /* @__PURE__ */ o("div", { className: "min-w-0 space-y-0.5", children: [
258
258
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: n.label }),
259
259
  /* @__PURE__ */ o("div", { className: "text-[12px] text-muted-foreground", children: [
260
- He(n.type).label,
260
+ Ye(n.type).label,
261
261
  " ·",
262
262
  " ",
263
- Ge(n),
263
+ Xe(n),
264
264
  " ·",
265
265
  " ",
266
- Ye(u, n.placement)
266
+ He(u, n.placement)
267
267
  ] }),
268
268
  i ? /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: i }) : null
269
269
  ] })
@@ -285,9 +285,9 @@ function Ae(s) {
285
285
  nextDisabled: S
286
286
  } = s;
287
287
  return /* @__PURE__ */ o("div", { className: "space-y-3", children: [
288
- /* @__PURE__ */ t(Xe, { control: n, onChange: p }),
288
+ /* @__PURE__ */ t(Je, { control: n, onChange: p }),
289
289
  /* @__PURE__ */ t(
290
- Me,
290
+ ze,
291
291
  {
292
292
  control: n,
293
293
  availableFieldChoices: i,
@@ -299,7 +299,7 @@ function Ae(s) {
299
299
  }
300
300
  ),
301
301
  /* @__PURE__ */ t(
302
- ze,
302
+ Me,
303
303
  {
304
304
  control: n,
305
305
  value: u,
@@ -336,7 +336,7 @@ const Bt = /* @__PURE__ */ new Set([
336
336
  "metric_selector"
337
337
  ]);
338
338
  function Fe(s) {
339
- const { text: n, ariaLabel: u } = s, [i, k] = z(!1);
339
+ const { text: n, ariaLabel: u } = s, [i, k] = M(!1);
340
340
  return /* @__PURE__ */ o(
341
341
  "button",
342
342
  {
@@ -430,7 +430,7 @@ function Oe(s) {
430
430
  ] });
431
431
  }
432
432
  function $t(s) {
433
- const n = J(
433
+ const n = G(
434
434
  s.scope,
435
435
  s.existingControls,
436
436
  s.reservedIds
@@ -438,7 +438,7 @@ function $t(s) {
438
438
  ...n,
439
439
  label: pe[s.type]
440
440
  } : {
441
- ...Je({
441
+ ...Ge({
442
442
  controls: [
443
443
  {
444
444
  ...n,
@@ -453,7 +453,7 @@ function $t(s) {
453
453
  return {
454
454
  step: 2,
455
455
  control: u,
456
- defaultValue: X(u, void 0)
456
+ defaultValue: J(u, void 0)
457
457
  };
458
458
  }
459
459
  function sa({
@@ -474,19 +474,19 @@ function sa({
474
474
  onCreateFlowActiveChange: _,
475
475
  onCreateFlowComplete: I
476
476
  }) {
477
- const F = Y(
477
+ const F = H(
478
478
  () => new Set(u || []),
479
479
  [u]
480
- ), Ke = Lt(s), We = Nt(s), [he, Z] = z(
480
+ ), Ke = Vt(s), We = Nt(s), [he, Z] = M(
481
481
  null
482
- ), [Ze, Q] = z(
482
+ ), [Ze, U] = M(
483
483
  null
484
- ), [a, D] = z(
484
+ ), [a, D] = M(
485
485
  () => g ? {
486
486
  step: 1,
487
- control: J(s, n, Array.from(F))
487
+ control: G(s, n, Array.from(F))
488
488
  } : null
489
- ), U = ne({}), j = ne(void 0), ge = ne(g), be = Y(() => {
489
+ ), Q = ne({}), j = ne(void 0), ge = ne(g), be = H(() => {
490
490
  const e = we({ scope: s, card: S });
491
491
  if (!T)
492
492
  return e;
@@ -505,22 +505,22 @@ function sa({
505
505
  return l.filter((d) => r.has(d.value));
506
506
  },
507
507
  [T, S, s]
508
- ), V = A(
508
+ ), L = A(
509
509
  (e) => s === "dashboard" && (e === "field_selector" || e === "metric_selector"),
510
510
  [s]
511
- ), P = Y(
511
+ ), P = H(
512
512
  () => a ? Te(
513
513
  x || [],
514
514
  a.control.type
515
515
  ) : [],
516
516
  [a, x]
517
- ), H = Y(() => {
517
+ ), Y = H(() => {
518
518
  if (!a)
519
519
  return {
520
520
  fields: p || [],
521
521
  metrics: N || []
522
522
  };
523
- if (!V(a.control.type))
523
+ if (!L(a.control.type))
524
524
  return {
525
525
  fields: p || [],
526
526
  metrics: N || []
@@ -544,7 +544,7 @@ function sa({
544
544
  p,
545
545
  N,
546
546
  a,
547
- V,
547
+ L,
548
548
  x
549
549
  ]);
550
550
  K(() => {
@@ -553,11 +553,11 @@ function sa({
553
553
  const e = g && !ge.current;
554
554
  ge.current = g, e && (D({
555
555
  step: 1,
556
- control: J(s, n, Array.from(F))
557
- }), Q(null), Z(null));
556
+ control: G(s, n, Array.from(F))
557
+ }), U(null), Z(null));
558
558
  }, [n, g, F, s]);
559
559
  const et = (e) => {
560
- if (!V(e.type))
560
+ if (!L(e.type))
561
561
  return {
562
562
  fields: p || [],
563
563
  metrics: N || []
@@ -584,7 +584,7 @@ function sa({
584
584
  })) : []
585
585
  };
586
586
  }, ee = (e) => {
587
- if (!V(e.control.type))
587
+ if (!L(e.control.type))
588
588
  return {
589
589
  nextControl: e.control,
590
590
  cardBindingsById: void 0
@@ -611,7 +611,7 @@ function sa({
611
611
  nextControl: d,
612
612
  cardBindingsById: m
613
613
  };
614
- }, L = A(
614
+ }, V = A(
615
615
  (e, l = i, r = { type: "update" }) => {
616
616
  const d = e.map((m) => (me({
617
617
  control: m,
@@ -654,17 +654,17 @@ function sa({
654
654
  control: r,
655
655
  defaultValues: i
656
656
  });
657
- r.source.kind === "manual" && y.source.kind === "sql_query" && (U.current[e] = C);
658
- const q = C === void 0 && r.source.kind === "sql_query" && y.source.kind === "manual" ? U.current[e] : C, O = Ve({
657
+ r.source.kind === "manual" && y.source.kind === "sql_query" && (Q.current[e] = C);
658
+ const q = C === void 0 && r.source.kind === "sql_query" && y.source.kind === "manual" ? Q.current[e] : C, O = Le({
659
659
  previousControl: r,
660
660
  nextControl: y,
661
661
  currentDefaultValue: q
662
662
  });
663
- y.source.kind === "manual" && (U.current[e] = O), i && (w = { ...i }, O === void 0 ? delete w[e] : w[e] = O), d = d.map(
663
+ y.source.kind === "manual" && (Q.current[e] = O), i && (w = { ...i }, O === void 0 ? delete w[e] : w[e] = O), d = d.map(
664
664
  (Ne) => Ne.id === e ? { ...y, defaultValue: O } : Ne
665
665
  );
666
666
  }
667
- L(d, w, {
667
+ V(d, w, {
668
668
  type: "update",
669
669
  cardBindingsById: h,
670
670
  affectedBindingControlIds: c
@@ -681,7 +681,7 @@ function sa({
681
681
  (h) => h.id === e ? { ...h, id: r } : h
682
682
  );
683
683
  if (!i) {
684
- L(d, void 0, {
684
+ V(d, void 0, {
685
685
  type: "rename",
686
686
  oldId: e,
687
687
  newId: r
@@ -689,7 +689,7 @@ function sa({
689
689
  return;
690
690
  }
691
691
  const m = { ...i };
692
- Object.prototype.hasOwnProperty.call(m, e) && (m[r] = m[e], delete m[e]), L(d, m, {
692
+ Object.prototype.hasOwnProperty.call(m, e) && (m[r] = m[e], delete m[e]), V(d, m, {
693
693
  type: "rename",
694
694
  oldId: e,
695
695
  newId: r
@@ -697,22 +697,22 @@ function sa({
697
697
  }, at = (e) => {
698
698
  const l = n.filter((d) => d.id !== e);
699
699
  if (!i) {
700
- L(l, void 0, { type: "remove", controlId: e });
700
+ V(l, void 0, { type: "remove", controlId: e });
701
701
  return;
702
702
  }
703
703
  const r = { ...i };
704
- delete r[e], L(l, r, { type: "remove", controlId: e });
704
+ delete r[e], V(l, r, { type: "remove", controlId: e });
705
705
  }, rt = A(() => {
706
706
  j.current = void 0, D({
707
707
  step: 1,
708
- control: J(s, n, Array.from(F))
709
- }), Q(null), Z(null);
708
+ control: G(s, n, Array.from(F))
709
+ }), U(null), Z(null);
710
710
  }, [n, F, s]), $ = (e) => {
711
711
  D(
712
712
  (l) => l && (() => {
713
713
  const r = e(l.control);
714
714
  l.control.source.kind === "manual" && r.source.kind === "sql_query" && (j.current = l.defaultValue);
715
- const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && r.source.kind === "manual" ? j.current : l.defaultValue, m = Ve({
715
+ const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && r.source.kind === "manual" ? j.current : l.defaultValue, m = Le({
716
716
  previousControl: l.control,
717
717
  nextControl: r,
718
718
  currentDefaultValue: d
@@ -734,7 +734,7 @@ function sa({
734
734
  }, te = (() => {
735
735
  if (!a)
736
736
  return !1;
737
- if (a.step === 2 && V(a.control.type))
737
+ if (a.step === 2 && L(a.control.type))
738
738
  return (a.selectedCardIds || []).length > 0 && Dt({
739
739
  participants: x || [],
740
740
  selectedCardIds: a.selectedCardIds || [],
@@ -753,7 +753,7 @@ function sa({
753
753
  return r.trim().length > 0 && d.trim().length > 0 && m.trim().length > 0;
754
754
  }
755
755
  return Tt(
756
- X(l, a.defaultValue)
756
+ J(l, a.defaultValue)
757
757
  );
758
758
  })(), ve = () => {
759
759
  var h;
@@ -772,7 +772,7 @@ function sa({
772
772
  participants: x || [],
773
773
  selectedCardIds: a.selectedCardIds,
774
774
  matrixTargetIds: a.matrixTargetIds
775
- }) : void 0, m = X(
775
+ }) : void 0, m = J(
776
776
  r,
777
777
  a.defaultValue
778
778
  );
@@ -792,13 +792,13 @@ function sa({
792
792
  D(null);
793
793
  return;
794
794
  }
795
- const e = a.control, l = a.createdControlId, r = X(
795
+ const e = a.control, l = a.createdControlId, r = J(
796
796
  e,
797
797
  a.defaultValue
798
798
  );
799
799
  if (i) {
800
800
  const d = { ...i };
801
- r === void 0 ? delete d[l] : d[l] = r, L(
801
+ r === void 0 ? delete d[l] : d[l] = r, V(
802
802
  [
803
803
  ...n,
804
804
  {
@@ -813,7 +813,7 @@ function sa({
813
813
  }
814
814
  );
815
815
  } else
816
- L(
816
+ V(
817
817
  [
818
818
  ...n,
819
819
  {
@@ -827,11 +827,11 @@ function sa({
827
827
  cardBindingsById: a.cardBindingsById
828
828
  }
829
829
  );
830
- Q(l), D(null), I == null || I();
831
- }, [n, a, i, L, I]), lt = a ? V(a.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ce = a != null && a.createdControlId ? `[[param.${a.createdControlId}]]` : a ? `[[param.${_t(a.control.label) || a.control.id}]]` : "", re = Le({
830
+ U(l), D(null), I == null || I();
831
+ }, [n, a, i, V, I]), lt = a ? L(a.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], Ce = a != null && a.createdControlId ? `[[param.${a.createdControlId}]]` : a ? `[[param.${_t(a.control.label) || a.control.id}]]` : "", re = Ve({
832
832
  controls: n,
833
833
  defaultValues: i
834
- }), le = a ? [...n, a.control] : n, ke = a ? Le({
834
+ }), le = a ? [...n, a.control] : n, ke = a ? Ve({
835
835
  controls: le,
836
836
  defaultValues: i,
837
837
  overrides: [
@@ -912,10 +912,10 @@ function sa({
912
912
  )
913
913
  ] });
914
914
  })(),
915
- a.step === 2 && V(a.control.type) && /* @__PURE__ */ o("div", { className: "space-y-3", children: [
915
+ a.step === 2 && L(a.control.type) && /* @__PURE__ */ o("div", { className: "space-y-3", children: [
916
916
  /* @__PURE__ */ o("div", { className: "space-y-3", children: [
917
917
  /* @__PURE__ */ t(
918
- Xe,
918
+ Je,
919
919
  {
920
920
  control: a.control,
921
921
  onChange: (e) => $((l) => ({
@@ -1006,13 +1006,13 @@ function sa({
1006
1006
  }
1007
1007
  )
1008
1008
  ] }),
1009
- a.step === 2 && !V(a.control.type) && /* @__PURE__ */ t(
1009
+ a.step === 2 && !L(a.control.type) && /* @__PURE__ */ t(
1010
1010
  Ae,
1011
1011
  {
1012
1012
  control: a.control,
1013
1013
  defaultValue: a.defaultValue,
1014
- availableFieldChoices: H.fields,
1015
- availableMetricChoices: H.metrics,
1014
+ availableFieldChoices: Y.fields,
1015
+ availableMetricChoices: Y.metrics,
1016
1016
  previewControlDefinitions: le,
1017
1017
  previewControlValues: ke,
1018
1018
  onControlChange: (e) => $(() => e),
@@ -1031,13 +1031,13 @@ function sa({
1031
1031
  nextDisabled: !te
1032
1032
  }
1033
1033
  ),
1034
- a.step === 3 && V(a.control.type) && /* @__PURE__ */ t(
1034
+ a.step === 3 && L(a.control.type) && /* @__PURE__ */ t(
1035
1035
  Ae,
1036
1036
  {
1037
1037
  control: a.control,
1038
1038
  defaultValue: a.defaultValue,
1039
- availableFieldChoices: H.fields,
1040
- availableMetricChoices: H.metrics,
1039
+ availableFieldChoices: Y.fields,
1040
+ availableMetricChoices: Y.metrics,
1041
1041
  previewControlDefinitions: le,
1042
1042
  previewControlValues: ke,
1043
1043
  onControlChange: (e) => $(() => e),
@@ -1056,13 +1056,13 @@ function sa({
1056
1056
  nextDisabled: !te
1057
1057
  }
1058
1058
  ),
1059
- a.step === 3 && !V(a.control.type) && /* @__PURE__ */ t(
1059
+ a.step === 3 && !L(a.control.type) && /* @__PURE__ */ t(
1060
1060
  Oe,
1061
1061
  {
1062
1062
  control: a.control,
1063
1063
  scope: s,
1064
1064
  createdReference: Ce,
1065
- explorerContent: /* @__PURE__ */ o(G, { children: [
1065
+ explorerContent: /* @__PURE__ */ o(X, { children: [
1066
1066
  "Open the card and use",
1067
1067
  " ",
1068
1068
  /* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
@@ -1080,19 +1080,19 @@ function sa({
1080
1080
  onDone: ye
1081
1081
  }
1082
1082
  ),
1083
- a.step === 4 && V(a.control.type) && /* @__PURE__ */ t(
1083
+ a.step === 4 && L(a.control.type) && /* @__PURE__ */ t(
1084
1084
  Oe,
1085
1085
  {
1086
1086
  control: a.control,
1087
1087
  scope: s,
1088
1088
  createdReference: Ce,
1089
- summaryDetail: /* @__PURE__ */ o(G, { children: [
1089
+ summaryDetail: /* @__PURE__ */ o(X, { children: [
1090
1090
  "Used by ",
1091
1091
  (a.selectedCardIds || []).length,
1092
1092
  " selected card",
1093
1093
  (a.selectedCardIds || []).length === 1 ? "" : "s"
1094
1094
  ] }),
1095
- explorerContent: /* @__PURE__ */ t(G, { children: "Selected cards have been set up to respond to this control automatically." }),
1095
+ explorerContent: /* @__PURE__ */ t(X, { children: "Selected cards have been set up to respond to this control automatically." }),
1096
1096
  sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
1097
1097
  onBack: () => D(
1098
1098
  (e) => e && {
@@ -1122,7 +1122,7 @@ function sa({
1122
1122
  {
1123
1123
  type: "button",
1124
1124
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
1125
- onClick: () => Q(
1125
+ onClick: () => U(
1126
1126
  (c) => c === e.id ? null : e.id
1127
1127
  ),
1128
1128
  children: [
@@ -1130,11 +1130,11 @@ function sa({
1130
1130
  /* @__PURE__ */ o("div", { className: "min-w-0", children: [
1131
1131
  /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1132
1132
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
1133
- /* @__PURE__ */ t("span", { className: h, children: He(e.type).label }),
1134
- /* @__PURE__ */ t("span", { className: h, children: Ye(s, e.placement) })
1133
+ /* @__PURE__ */ t("span", { className: h, children: Ye(e.type).label }),
1134
+ /* @__PURE__ */ t("span", { className: h, children: He(s, e.placement) })
1135
1135
  ] }),
1136
1136
  /* @__PURE__ */ o("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
1137
- Ge(e),
1137
+ Xe(e),
1138
1138
  r != null && r.status ? ` · ${r.status}` : ""
1139
1139
  ] })
1140
1140
  ] })
@@ -1157,9 +1157,9 @@ function sa({
1157
1157
  m && /* @__PURE__ */ o("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
1158
1158
  /* @__PURE__ */ o("div", { className: "grid gap-3 md:grid-cols-3", children: [
1159
1159
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1160
- /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1160
+ /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1161
1161
  /* @__PURE__ */ t(
1162
- Ue,
1162
+ Qe,
1163
1163
  {
1164
1164
  size: "xs",
1165
1165
  value: e.label,
@@ -1172,19 +1172,19 @@ function sa({
1172
1172
  )
1173
1173
  ] }),
1174
1174
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1175
- /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1175
+ /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1176
1176
  /* @__PURE__ */ o(
1177
1177
  se,
1178
1178
  {
1179
1179
  value: e.type,
1180
1180
  onValueChange: (c) => {
1181
- const y = Je({
1181
+ const y = Ge({
1182
1182
  controls: n,
1183
1183
  controlId: e.id,
1184
1184
  nextType: c,
1185
1185
  defaultValues: i
1186
1186
  });
1187
- L(y.controls, y.defaultValues);
1187
+ V(y.controls, y.defaultValues);
1188
1188
  },
1189
1189
  children: [
1190
1190
  /* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
@@ -1203,7 +1203,7 @@ function sa({
1203
1203
  )
1204
1204
  ] }),
1205
1205
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1206
- /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1206
+ /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1207
1207
  /* @__PURE__ */ o(
1208
1208
  se,
1209
1209
  {
@@ -1220,7 +1220,7 @@ function sa({
1220
1220
  )
1221
1221
  ] })
1222
1222
  ] }),
1223
- V(e.type) ? /* @__PURE__ */ o(G, { children: [
1223
+ L(e.type) ? /* @__PURE__ */ o(X, { children: [
1224
1224
  /* @__PURE__ */ t(
1225
1225
  ft,
1226
1226
  {
@@ -1241,7 +1241,7 @@ function sa({
1241
1241
  }), w = n.map(
1242
1242
  (C) => C.id === e.id ? y.nextControl : C
1243
1243
  );
1244
- L(w, i, {
1244
+ V(w, i, {
1245
1245
  type: "update",
1246
1246
  cardBindingsById: y.cardBindingsById
1247
1247
  });
@@ -1260,7 +1260,7 @@ function sa({
1260
1260
  nextSelectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1261
1261
  matrixTargetIds: { [c]: y }
1262
1262
  });
1263
- L(
1263
+ V(
1264
1264
  n.map((C) => C.id === e.id ? w.nextControl : C),
1265
1265
  i,
1266
1266
  { type: "update", cardBindingsById: w.cardBindingsById }
@@ -1270,7 +1270,7 @@ function sa({
1270
1270
  )
1271
1271
  ] }) : null,
1272
1272
  /* @__PURE__ */ t(
1273
- Me,
1273
+ ze,
1274
1274
  {
1275
1275
  control: e,
1276
1276
  availableFieldChoices: l.fields,
@@ -1282,7 +1282,7 @@ function sa({
1282
1282
  }
1283
1283
  ),
1284
1284
  e.initialValueStrategy === "saved_default" && /* @__PURE__ */ t(
1285
- ze,
1285
+ Me,
1286
1286
  {
1287
1287
  control: e,
1288
1288
  value: d,
@@ -1294,12 +1294,12 @@ function sa({
1294
1294
  const y = n.map(
1295
1295
  (w) => w.id === e.id ? { ...w, defaultValue: c } : w
1296
1296
  );
1297
- if (e.source.kind === "manual" && (U.current[e.id] = c), i) {
1297
+ if (e.source.kind === "manual" && (Q.current[e.id] = c), i) {
1298
1298
  const w = { ...i };
1299
- c === void 0 ? delete w[e.id] : w[e.id] = c, L(y, w);
1299
+ c === void 0 ? delete w[e.id] : w[e.id] = c, V(y, w);
1300
1300
  return;
1301
1301
  }
1302
- L(y, void 0);
1302
+ V(y, void 0);
1303
1303
  }
1304
1304
  }
1305
1305
  ),
@@ -1325,7 +1325,7 @@ function sa({
1325
1325
  /* @__PURE__ */ o(bt, { className: "space-y-3 pt-2", children: [
1326
1326
  /* @__PURE__ */ o("div", { className: "grid gap-3 md:grid-cols-2", children: [
1327
1327
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1328
- /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1328
+ /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1329
1329
  /* @__PURE__ */ t(
1330
1330
  xt,
1331
1331
  {
@@ -1336,7 +1336,7 @@ function sa({
1336
1336
  )
1337
1337
  ] }),
1338
1338
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1339
- /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1339
+ /* @__PURE__ */ t(z, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1340
1340
  /* @__PURE__ */ o(
1341
1341
  se,
1342
1342
  {
@@ -1347,7 +1347,7 @@ function sa({
1347
1347
  })),
1348
1348
  children: [
1349
1349
  /* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
1350
- /* @__PURE__ */ t(ie, { children: Vt.map((c) => /* @__PURE__ */ t(
1350
+ /* @__PURE__ */ t(ie, { children: Lt.map((c) => /* @__PURE__ */ t(
1351
1351
  ce,
1352
1352
  {
1353
1353
  value: c.value,
@@ -1398,7 +1398,7 @@ function oa(s) {
1398
1398
  onOpenChange: u,
1399
1399
  initialCreateFlowActive: i = !1,
1400
1400
  dismissMode: k = "passive"
1401
- } = s, b = n !== void 0, [g, v] = z(!1), [p, N] = z(
1401
+ } = s, b = n !== void 0, [g, v] = M(!1), [p, N] = M(
1402
1402
  i
1403
1403
  ), x = b ? n : g, f = A(
1404
1404
  (_) => {
@@ -1429,10 +1429,10 @@ function oa(s) {
1429
1429
  export {
1430
1430
  sa as C,
1431
1431
  ra as F,
1432
- zt as I,
1432
+ Mt as I,
1433
1433
  qt as L,
1434
1434
  na as V,
1435
- Mt as a,
1435
+ zt as a,
1436
1436
  la as b,
1437
1437
  oa as u
1438
1438
  };