react-semaphor 0.1.543 → 0.1.545

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 (125) hide show
  1. package/dist/activity/index.js +73 -0
  2. package/dist/analytics-protocol/index.js +35 -34
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/brand-studio/index.js +2 -2
  5. package/dist/briefings/index.js +56 -52
  6. package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
  7. package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
  8. package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
  9. package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
  10. package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
  11. package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
  12. package/dist/chunks/dashboard-B1tMju0u.js +14 -0
  13. package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
  14. package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
  15. package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
  16. package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
  17. package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
  18. package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
  19. package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
  20. package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
  21. package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
  22. package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
  23. package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
  24. package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
  25. package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
  26. package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
  27. package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
  28. package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
  29. package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
  30. package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
  31. package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
  32. package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
  33. package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
  34. package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
  35. package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
  36. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  37. package/dist/dashboard/index.js +1 -1
  38. package/dist/dashboard-authoring/index.js +553 -541
  39. package/dist/data-app-sdk/index.js +1 -1
  40. package/dist/format-utils/index.js +241 -227
  41. package/dist/index.js +354 -331
  42. package/dist/style.css +1 -1
  43. package/dist/surfboard/index.js +1 -1
  44. package/dist/types/activity.d.ts +2 -0
  45. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  46. package/dist/types/briefings/attachments.d.ts +33 -6
  47. package/dist/types/briefings/index.d.ts +6 -5
  48. package/dist/types/components/activity/activity-bell.d.ts +11 -0
  49. package/dist/types/components/activity/activity-instance.d.ts +50 -0
  50. package/dist/types/components/activity/activity-notices.d.ts +7 -0
  51. package/dist/types/components/activity/activity-provider.d.ts +21 -0
  52. package/dist/types/components/activity/activity-types.d.ts +177 -0
  53. package/dist/types/components/activity/index.d.ts +6 -0
  54. package/dist/types/components/activity/use-activity.d.ts +20 -0
  55. package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
  56. package/dist/types/components/briefings/briefing-author.d.ts +14 -12
  57. package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
  58. package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
  59. package/dist/types/components/index.d.ts +1 -4
  60. package/dist/types/components/surfboard/filter/types.d.ts +0 -14
  61. package/dist/types/lib/activity-identity.d.ts +21 -0
  62. package/dist/types/lib/api/exports-api.d.ts +4 -4
  63. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
  64. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
  65. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
  66. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
  67. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
  68. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
  69. package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
  70. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
  71. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
  72. package/dist/types/lib/download-pdf.d.ts +75 -1
  73. package/dist/types/lib/hooks/index.d.ts +1 -3
  74. package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
  75. package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
  76. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
  77. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
  78. package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
  79. package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
  80. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
  81. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
  82. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
  83. package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
  84. package/dist/types/lib/stores/editor-store.d.ts +0 -3
  85. package/dist/types/lib/types/common-types.d.ts +21 -6
  86. package/dist/types/shared/activity/activity-contract.d.ts +84 -0
  87. package/dist/types/shared/activity/index.d.ts +5 -0
  88. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
  89. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
  90. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
  91. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
  92. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
  93. package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
  94. package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
  95. package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
  96. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
  97. package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
  98. package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
  99. package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
  100. package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
  101. package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
  102. package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
  103. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
  104. package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
  105. package/package.json +6 -2
  106. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
  107. package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
  108. package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
  109. package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
  110. package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
  111. package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
  112. package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
  113. package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
  114. package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
  115. package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
  116. package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
  117. package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
  118. package/dist/types/components/notifications/index.d.ts +0 -3
  119. package/dist/types/components/notifications/notification-bell.d.ts +0 -13
  120. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
  121. package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
  122. package/dist/types/lib/exports/bounded-request.d.ts +0 -12
  123. package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
  124. package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
  125. package/dist/types/lib/stores/export-store.d.ts +0 -62
@@ -1,16 +1,16 @@
1
- import { c as W, C as Se } from "./x-4f5U2XwU.js";
2
- import { useEffect as K, forwardRef as nt, useMemo as H, useState as z, useRef as se, useCallback as F, Fragment as st } from "react";
3
- import { Z as qe, _ as ot, aE as dt, u as it, f as ct, aF as ut, aG as mt, aH as De, aI as pt, aJ as ft, aK as Me, aL as ze, aM as ht, aN as gt, aO as bt, aP as xt, aQ as vt, aR as yt } from "./semaphor-ready-indicator-CN2AHm2x.js";
4
- import { jsx as t, jsxs as o, Fragment as X } from "react/jsx-runtime";
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";
5
5
  import "./index-CuHybtft.js";
6
6
  import "./validators-DMHTpf7a.js";
7
7
  import "./matrix-operation-contract-8OIO4gob.js";
8
8
  import "./analytics-base-schemas-BFAoRlkU.js";
9
9
  import "zod";
10
10
  import "../value-format-preferences/index.js";
11
- import { c as R } from "./class-utils-Df1OVOT1.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 oe, s as de, t as ie, u as ce, v as ue } from "./switch-C3jLxlG0.js";
13
- import { D as Ct, E as kt, F as G, G as we, H as Te, I as me, J as pe, K as Nt, L as St, M as _e, N as Dt, O as wt, P as J, Q as Tt, R as Ve, S as Ye, T as He, U as Xe, V as Ge, W as _t, X as Vt, Y as Le, Z as Lt, _ as Ee, $ as Et, a0 as It, a1 as Ft, a2 as Ot, a3 as fe } from "./document-dashboard-inputs-OwqCbrVp.js";
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
14
  import { C as Ie } from "./selection-reducer-Dj_8xD69.js";
15
15
  /**
16
16
  * @license lucide-react v0.453.0 - ISC
@@ -18,17 +18,7 @@ import { C as Ie } from "./selection-reducer-Dj_8xD69.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 At = W("CircleCheck", [
22
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
23
- ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
24
- ]);
25
- /**
26
- * @license lucide-react v0.453.0 - ISC
27
- *
28
- * This source code is licensed under the ISC license.
29
- * See the LICENSE file in the root directory of this source tree.
30
- */
31
- const ra = W("FilterX", [
21
+ const ra = fe("FilterX", [
32
22
  ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
33
23
  ["path", { d: "m22 3-5 5", key: "12jva0" }],
34
24
  ["path", { d: "m17 3 5 5", key: "k36vhe" }]
@@ -39,7 +29,7 @@ const ra = W("FilterX", [
39
29
  * This source code is licensed under the ISC license.
40
30
  * See the LICENSE file in the root directory of this source tree.
41
31
  */
42
- const qt = W("Library", [
32
+ const qt = fe("Library", [
43
33
  ["path", { d: "m16 6 4 14", key: "ji33uf" }],
44
34
  ["path", { d: "M12 6v14", key: "1n7gus" }],
45
35
  ["path", { d: "M8 8v12", key: "1gg7y9" }],
@@ -51,7 +41,7 @@ const qt = W("Library", [
51
41
  * This source code is licensed under the ISC license.
52
42
  * See the LICENSE file in the root directory of this source tree.
53
43
  */
54
- const Mt = W("Link2", [
44
+ const Mt = fe("Link2", [
55
45
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
56
46
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
57
47
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
@@ -179,7 +169,7 @@ const zt = nt(
179
169
  onClick: k,
180
170
  ...p,
181
171
  ...g,
182
- className: R(`${Ct}`, u),
172
+ className: R(`${kt}`, u),
183
173
  children: n
184
174
  }
185
175
  ) }),
@@ -200,7 +190,7 @@ const zt = nt(
200
190
  ] }) })
201
191
  );
202
192
  zt.displayName = "IconButton";
203
- function Je(s) {
193
+ function Xe(s) {
204
194
  const { control: n, onChange: u } = s;
205
195
  return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
206
196
  /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
@@ -252,7 +242,7 @@ function Rt(s) {
252
242
  ] }, i);
253
243
  }) }) });
254
244
  }
255
- function Z(s) {
245
+ function W(s) {
256
246
  const { secondary: n, tertiary: u, primary: i } = s;
257
247
  return /* @__PURE__ */ o("div", { className: "sticky bottom-0 z-10 -mx-1 flex justify-end gap-2 border-t bg-background/95 px-1 pb-1 pt-3 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: [
258
248
  n,
@@ -263,23 +253,23 @@ function Z(s) {
263
253
  function jt(s) {
264
254
  const { control: n, scope: u, detail: i } = s;
265
255
  return /* @__PURE__ */ o("div", { className: "flex items-start gap-2.5 rounded-control border border-border/60 bg-muted/30 px-3 py-2.5", children: [
266
- /* @__PURE__ */ t(At, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
256
+ /* @__PURE__ */ t(Ct, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
267
257
  /* @__PURE__ */ o("div", { className: "min-w-0 space-y-0.5", children: [
268
258
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: n.label }),
269
259
  /* @__PURE__ */ o("div", { className: "text-[12px] text-muted-foreground", children: [
270
- Ye(n.type).label,
260
+ He(n.type).label,
271
261
  " ·",
272
262
  " ",
273
- Xe(n),
263
+ Ge(n),
274
264
  " ·",
275
265
  " ",
276
- He(u, n.placement)
266
+ Ye(u, n.placement)
277
267
  ] }),
278
268
  i ? /* @__PURE__ */ t("div", { className: "text-[12px] text-muted-foreground", children: i }) : null
279
269
  ] })
280
270
  ] });
281
271
  }
282
- function Fe(s) {
272
+ function Ae(s) {
283
273
  const {
284
274
  control: n,
285
275
  defaultValue: u,
@@ -295,7 +285,7 @@ function Fe(s) {
295
285
  nextDisabled: S
296
286
  } = s;
297
287
  return /* @__PURE__ */ o("div", { className: "space-y-3", children: [
298
- /* @__PURE__ */ t(Je, { control: n, onChange: p }),
288
+ /* @__PURE__ */ t(Xe, { control: n, onChange: p }),
299
289
  /* @__PURE__ */ t(
300
290
  Me,
301
291
  {
@@ -322,7 +312,7 @@ function Fe(s) {
322
312
  }
323
313
  ),
324
314
  /* @__PURE__ */ t(
325
- Z,
315
+ W,
326
316
  {
327
317
  secondary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: x, children: "Back" }),
328
318
  primary: /* @__PURE__ */ t(
@@ -345,7 +335,7 @@ const Bt = /* @__PURE__ */ new Set([
345
335
  "field_selector",
346
336
  "metric_selector"
347
337
  ]);
348
- function Oe(s) {
338
+ function Fe(s) {
349
339
  const { text: n, ariaLabel: u } = s, [i, k] = z(!1);
350
340
  return /* @__PURE__ */ o(
351
341
  "button",
@@ -367,7 +357,7 @@ function Oe(s) {
367
357
  }
368
358
  );
369
359
  }
370
- function Ae(s) {
360
+ function Oe(s) {
371
361
  const {
372
362
  control: n,
373
363
  scope: u,
@@ -398,14 +388,14 @@ function Ae(s) {
398
388
  /* @__PURE__ */ o("div", { className: "space-y-1.5 px-3 py-2.5", children: [
399
389
  /* @__PURE__ */ t("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
400
390
  /* @__PURE__ */ t(
401
- Oe,
391
+ Fe,
402
392
  {
403
393
  text: i,
404
394
  ariaLabel: "Copy SQL control reference"
405
395
  }
406
396
  ),
407
397
  S ? /* @__PURE__ */ t(
408
- Oe,
398
+ Fe,
409
399
  {
410
400
  text: S,
411
401
  ariaLabel: "Copy Jinja control reference"
@@ -430,7 +420,7 @@ function Ae(s) {
430
420
  ] })
431
421
  ] }),
432
422
  /* @__PURE__ */ t(
433
- Z,
423
+ W,
434
424
  {
435
425
  secondary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: v, children: "Back" }),
436
426
  tertiary: /* @__PURE__ */ t(E, { type: "button", variant: "outline", size: "xs", onClick: p, children: "Cancel" }),
@@ -440,30 +430,30 @@ function Ae(s) {
440
430
  ] });
441
431
  }
442
432
  function $t(s) {
443
- const n = G(
433
+ const n = J(
444
434
  s.scope,
445
435
  s.existingControls,
446
436
  s.reservedIds
447
437
  ), u = s.type === n.type ? {
448
438
  ...n,
449
- label: fe[s.type]
439
+ label: pe[s.type]
450
440
  } : {
451
- ...Ge({
441
+ ...Je({
452
442
  controls: [
453
443
  {
454
444
  ...n,
455
- label: fe[s.type]
445
+ label: pe[s.type]
456
446
  }
457
447
  ],
458
448
  controlId: n.id,
459
449
  nextType: s.type
460
450
  }).controls[0],
461
- label: fe[s.type]
451
+ label: pe[s.type]
462
452
  };
463
453
  return {
464
454
  step: 2,
465
455
  control: u,
466
- defaultValue: J(u, void 0)
456
+ defaultValue: X(u, void 0)
467
457
  };
468
458
  }
469
459
  function sa({
@@ -484,25 +474,25 @@ function sa({
484
474
  onCreateFlowActiveChange: _,
485
475
  onCreateFlowComplete: I
486
476
  }) {
487
- const O = H(
477
+ const F = Y(
488
478
  () => new Set(u || []),
489
479
  [u]
490
- ), Ke = _t(s), Ze = kt(s), [he, P] = z(
480
+ ), Ke = Lt(s), We = Nt(s), [he, Z] = z(
491
481
  null
492
- ), [We, Q] = z(
482
+ ), [Ze, Q] = z(
493
483
  null
494
484
  ), [a, D] = z(
495
485
  () => g ? {
496
486
  step: 1,
497
- control: G(s, n, Array.from(O))
487
+ control: J(s, n, Array.from(F))
498
488
  } : null
499
- ), U = se({}), j = se(void 0), ge = se(g), be = H(() => {
489
+ ), U = ne({}), j = ne(void 0), ge = ne(g), be = Y(() => {
500
490
  const e = we({ scope: s, card: S });
501
491
  if (!T)
502
492
  return e;
503
493
  const l = new Set(T);
504
494
  return e.filter((r) => l.has(r.value));
505
- }, [T, S, s]), Pe = F(
495
+ }, [T, S, s]), Pe = A(
506
496
  (e) => {
507
497
  const l = we({
508
498
  scope: s,
@@ -515,27 +505,27 @@ function sa({
515
505
  return l.filter((d) => r.has(d.value));
516
506
  },
517
507
  [T, S, s]
518
- ), L = F(
508
+ ), V = A(
519
509
  (e) => s === "dashboard" && (e === "field_selector" || e === "metric_selector"),
520
510
  [s]
521
- ), ee = H(
511
+ ), P = Y(
522
512
  () => a ? Te(
523
513
  x || [],
524
514
  a.control.type
525
515
  ) : [],
526
516
  [a, x]
527
- ), Y = H(() => {
517
+ ), H = Y(() => {
528
518
  if (!a)
529
519
  return {
530
520
  fields: p || [],
531
521
  metrics: N || []
532
522
  };
533
- if (!L(a.control.type))
523
+ if (!V(a.control.type))
534
524
  return {
535
525
  fields: p || [],
536
526
  metrics: N || []
537
527
  };
538
- const e = a.selectedCardIds || [], l = me({
528
+ const e = a.selectedCardIds || [], l = ue({
539
529
  controlType: a.control.type,
540
530
  participants: x || [],
541
531
  selectedCardIds: e
@@ -554,7 +544,7 @@ function sa({
554
544
  p,
555
545
  N,
556
546
  a,
557
- L,
547
+ V,
558
548
  x
559
549
  ]);
560
550
  K(() => {
@@ -563,11 +553,11 @@ function sa({
563
553
  const e = g && !ge.current;
564
554
  ge.current = g, e && (D({
565
555
  step: 1,
566
- control: G(s, n, Array.from(O))
567
- }), Q(null), P(null));
568
- }, [n, g, O, s]);
556
+ control: J(s, n, Array.from(F))
557
+ }), Q(null), Z(null));
558
+ }, [n, g, F, s]);
569
559
  const et = (e) => {
570
- if (!L(e.type))
560
+ if (!V(e.type))
571
561
  return {
572
562
  fields: p || [],
573
563
  metrics: N || []
@@ -578,7 +568,7 @@ function sa({
578
568
  fields: p || [],
579
569
  metrics: N || []
580
570
  };
581
- const r = me({
571
+ const r = ue({
582
572
  controlType: e.type,
583
573
  participants: x || [],
584
574
  selectedCardIds: l
@@ -593,13 +583,13 @@ function sa({
593
583
  target: r.metricTargetMap[d.value]
594
584
  })) : []
595
585
  };
596
- }, te = (e) => {
597
- if (!L(e.control.type))
586
+ }, ee = (e) => {
587
+ if (!V(e.control.type))
598
588
  return {
599
589
  nextControl: e.control,
600
590
  cardBindingsById: void 0
601
591
  };
602
- const l = (f == null ? void 0 : f[e.control.id]) || [], r = me({
592
+ const l = (f == null ? void 0 : f[e.control.id]) || [], r = ue({
603
593
  controlType: e.control.type,
604
594
  participants: x || [],
605
595
  selectedCardIds: e.nextSelectedCardIds
@@ -621,12 +611,12 @@ function sa({
621
611
  nextControl: d,
622
612
  cardBindingsById: m
623
613
  };
624
- }, V = F(
614
+ }, L = A(
625
615
  (e, l = i, r = { type: "update" }) => {
626
- const d = e.map((m) => (pe({
616
+ const d = e.map((m) => (me({
627
617
  control: m,
628
618
  defaultValues: l
629
- }), Nt(
619
+ }), St(
630
620
  m
631
621
  )));
632
622
  k(d, l, r);
@@ -641,15 +631,15 @@ function sa({
641
631
  (C) => C.id === e
642
632
  );
643
633
  let h, c;
644
- if (m && (!r || Et({ control: r }, { control: m })) && s === "dashboard" && (m.type === "field_selector" || m.type === "metric_selector")) {
645
- const C = (f == null ? void 0 : f[m.id]) || [], q = te({
634
+ if (m && (!r || It({ control: r }, { control: m })) && s === "dashboard" && (m.type === "field_selector" || m.type === "metric_selector")) {
635
+ const C = (f == null ? void 0 : f[m.id]) || [], q = ee({
646
636
  control: m,
647
637
  nextSelectedCardIds: C
648
638
  });
649
639
  d = d.map(
650
- (A) => A.id === e ? q.nextControl : A
640
+ (O) => O.id === e ? q.nextControl : O
651
641
  ), h = q.cardBindingsById, c = [m.id];
652
- } else if (r && (!m || !It(m.type)) && s === "dashboard" && (r.type === "field_selector" || r.type === "metric_selector")) {
642
+ } else if (r && (!m || !At(m.type)) && s === "dashboard" && (r.type === "field_selector" || r.type === "metric_selector")) {
653
643
  const C = (f == null ? void 0 : f[r.id]) || [];
654
644
  h = Object.fromEntries(
655
645
  C.map((q) => [q, void 0])
@@ -660,21 +650,21 @@ function sa({
660
650
  );
661
651
  let w = i;
662
652
  if (r && y) {
663
- const C = pe({
653
+ const C = me({
664
654
  control: r,
665
655
  defaultValues: i
666
656
  });
667
657
  r.source.kind === "manual" && y.source.kind === "sql_query" && (U.current[e] = C);
668
- const q = C === void 0 && r.source.kind === "sql_query" && y.source.kind === "manual" ? U.current[e] : C, A = Le({
658
+ const q = C === void 0 && r.source.kind === "sql_query" && y.source.kind === "manual" ? U.current[e] : C, O = Ve({
669
659
  previousControl: r,
670
660
  nextControl: y,
671
661
  currentDefaultValue: q
672
662
  });
673
- y.source.kind === "manual" && (U.current[e] = A), i && (w = { ...i }, A === void 0 ? delete w[e] : w[e] = A), d = d.map(
674
- (Ne) => Ne.id === e ? { ...y, defaultValue: A } : Ne
663
+ y.source.kind === "manual" && (U.current[e] = O), i && (w = { ...i }, O === void 0 ? delete w[e] : w[e] = O), d = d.map(
664
+ (Ne) => Ne.id === e ? { ...y, defaultValue: O } : Ne
675
665
  );
676
666
  }
677
- V(d, w, {
667
+ L(d, w, {
678
668
  type: "update",
679
669
  cardBindingsById: h,
680
670
  affectedBindingControlIds: c
@@ -683,7 +673,7 @@ function sa({
683
673
  if (!l.trim())
684
674
  return;
685
675
  const r = Ot(l);
686
- if (r === e || O.has(r) || n.some(
676
+ if (r === e || F.has(r) || n.some(
687
677
  (h) => h.id === r && h.id !== e
688
678
  ))
689
679
  return;
@@ -691,7 +681,7 @@ function sa({
691
681
  (h) => h.id === e ? { ...h, id: r } : h
692
682
  );
693
683
  if (!i) {
694
- V(d, void 0, {
684
+ L(d, void 0, {
695
685
  type: "rename",
696
686
  oldId: e,
697
687
  newId: r
@@ -699,7 +689,7 @@ function sa({
699
689
  return;
700
690
  }
701
691
  const m = { ...i };
702
- Object.prototype.hasOwnProperty.call(m, e) && (m[r] = m[e], delete m[e]), V(d, m, {
692
+ Object.prototype.hasOwnProperty.call(m, e) && (m[r] = m[e], delete m[e]), L(d, m, {
703
693
  type: "rename",
704
694
  oldId: e,
705
695
  newId: r
@@ -707,22 +697,22 @@ function sa({
707
697
  }, at = (e) => {
708
698
  const l = n.filter((d) => d.id !== e);
709
699
  if (!i) {
710
- V(l, void 0, { type: "remove", controlId: e });
700
+ L(l, void 0, { type: "remove", controlId: e });
711
701
  return;
712
702
  }
713
703
  const r = { ...i };
714
- delete r[e], V(l, r, { type: "remove", controlId: e });
715
- }, rt = F(() => {
704
+ delete r[e], L(l, r, { type: "remove", controlId: e });
705
+ }, rt = A(() => {
716
706
  j.current = void 0, D({
717
707
  step: 1,
718
- control: G(s, n, Array.from(O))
719
- }), Q(null), P(null);
720
- }, [n, O, s]), $ = (e) => {
708
+ control: J(s, n, Array.from(F))
709
+ }), Q(null), Z(null);
710
+ }, [n, F, s]), $ = (e) => {
721
711
  D(
722
712
  (l) => l && (() => {
723
713
  const r = e(l.control);
724
714
  l.control.source.kind === "manual" && r.source.kind === "sql_query" && (j.current = l.defaultValue);
725
- const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && r.source.kind === "manual" ? j.current : l.defaultValue, m = Le({
715
+ const d = l.defaultValue === void 0 && l.control.source.kind === "sql_query" && r.source.kind === "manual" ? j.current : l.defaultValue, m = Ve({
726
716
  previousControl: l.control,
727
717
  nextControl: r,
728
718
  currentDefaultValue: d
@@ -741,11 +731,11 @@ function sa({
741
731
  defaultValue: e
742
732
  })
743
733
  );
744
- }, ae = (() => {
734
+ }, te = (() => {
745
735
  if (!a)
746
736
  return !1;
747
- if (a.step === 2 && L(a.control.type))
748
- return (a.selectedCardIds || []).length > 0 && St({
737
+ if (a.step === 2 && V(a.control.type))
738
+ return (a.selectedCardIds || []).length > 0 && Dt({
749
739
  participants: x || [],
750
740
  selectedCardIds: a.selectedCardIds || [],
751
741
  control: a.control,
@@ -754,7 +744,7 @@ function sa({
754
744
  if (a.step !== 2 && a.step !== 3 || !a.control.label.trim())
755
745
  return !1;
756
746
  const l = a.control.source.kind === "sql_query" ? a.control : _e(a.control);
757
- if (l.source.kind === "manual" && (Dt(l) && l.source.options.length === 0 || l.source.options.some(
747
+ if (l.source.kind === "manual" && (wt(l) && l.source.options.length === 0 || l.source.options.some(
758
748
  (d) => d.label.trim().length === 0 || d.value.trim().length === 0
759
749
  )))
760
750
  return !1;
@@ -762,18 +752,18 @@ function sa({
762
752
  const { connectionId: r, sql: d, valueColumn: m } = l.source;
763
753
  return r.trim().length > 0 && d.trim().length > 0 && m.trim().length > 0;
764
754
  }
765
- return wt(
766
- J(l, a.defaultValue)
755
+ return Tt(
756
+ X(l, a.defaultValue)
767
757
  );
768
758
  })(), ve = () => {
769
759
  var h;
770
760
  if (!a)
771
761
  return;
772
- const e = _e(a.control), l = Lt({
762
+ const e = _e(a.control), l = Et({
773
763
  label: e.label,
774
764
  fallbackId: e.id,
775
765
  existingControls: n,
776
- reservedIds: Array.from(O)
766
+ reservedIds: Array.from(F)
777
767
  }), r = {
778
768
  ...e,
779
769
  id: l
@@ -782,7 +772,7 @@ function sa({
782
772
  participants: x || [],
783
773
  selectedCardIds: a.selectedCardIds,
784
774
  matrixTargetIds: a.matrixTargetIds
785
- }) : void 0, m = J(
775
+ }) : void 0, m = X(
786
776
  r,
787
777
  a.defaultValue
788
778
  );
@@ -795,20 +785,20 @@ function sa({
795
785
  matrixTargetIds: a.matrixTargetIds,
796
786
  cardBindingsById: d
797
787
  });
798
- }, re = F(() => {
788
+ }, ae = A(() => {
799
789
  D(null);
800
- }, []), ye = F(() => {
790
+ }, []), ye = A(() => {
801
791
  if (!(a != null && a.createdControlId)) {
802
792
  D(null);
803
793
  return;
804
794
  }
805
- const e = a.control, l = a.createdControlId, r = J(
795
+ const e = a.control, l = a.createdControlId, r = X(
806
796
  e,
807
797
  a.defaultValue
808
798
  );
809
799
  if (i) {
810
800
  const d = { ...i };
811
- r === void 0 ? delete d[l] : d[l] = r, V(
801
+ r === void 0 ? delete d[l] : d[l] = r, L(
812
802
  [
813
803
  ...n,
814
804
  {
@@ -823,7 +813,7 @@ function sa({
823
813
  }
824
814
  );
825
815
  } else
826
- V(
816
+ L(
827
817
  [
828
818
  ...n,
829
819
  {
@@ -838,11 +828,11 @@ function sa({
838
828
  }
839
829
  );
840
830
  Q(l), D(null), I == null || I();
841
- }, [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.${Tt(a.control.label) || a.control.id}]]` : "", le = Ve({
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({
842
832
  controls: n,
843
833
  defaultValues: i
844
- }), ne = a ? [...n, a.control] : n, ke = a ? Ve({
845
- controls: ne,
834
+ }), le = a ? [...n, a.control] : n, ke = a ? Le({
835
+ controls: le,
846
836
  defaultValues: i,
847
837
  overrides: [
848
838
  {
@@ -850,7 +840,7 @@ function sa({
850
840
  value: a.defaultValue
851
841
  }
852
842
  ]
853
- }) : le;
843
+ }) : re;
854
844
  return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
855
845
  a ? /* @__PURE__ */ o("div", { className: "space-y-4 pb-1", children: [
856
846
  /* @__PURE__ */ t(
@@ -884,7 +874,7 @@ function sa({
884
874
  $t({
885
875
  scope: s,
886
876
  existingControls: n,
887
- reservedIds: Array.from(O),
877
+ reservedIds: Array.from(F),
888
878
  type: h.value
889
879
  })
890
880
  ),
@@ -906,7 +896,7 @@ function sa({
906
896
  /* @__PURE__ */ t("div", { className: "grid gap-1.5 sm:grid-cols-2", children: d.map(m) })
907
897
  ] }),
908
898
  /* @__PURE__ */ t(
909
- Z,
899
+ W,
910
900
  {
911
901
  secondary: /* @__PURE__ */ t(
912
902
  E,
@@ -914,7 +904,7 @@ function sa({
914
904
  type: "button",
915
905
  variant: "outline",
916
906
  size: "xs",
917
- onClick: re,
907
+ onClick: ae,
918
908
  children: "Back to controls"
919
909
  }
920
910
  )
@@ -922,10 +912,10 @@ function sa({
922
912
  )
923
913
  ] });
924
914
  })(),
925
- a.step === 2 && L(a.control.type) && /* @__PURE__ */ o("div", { className: "space-y-3", children: [
915
+ a.step === 2 && V(a.control.type) && /* @__PURE__ */ o("div", { className: "space-y-3", children: [
926
916
  /* @__PURE__ */ o("div", { className: "space-y-3", children: [
927
917
  /* @__PURE__ */ t(
928
- Je,
918
+ Xe,
929
919
  {
930
920
  control: a.control,
931
921
  onChange: (e) => $((l) => ({
@@ -936,7 +926,7 @@ function sa({
936
926
  ),
937
927
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
938
928
  ] }),
939
- ee.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: ee.map((e) => {
929
+ P.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ t("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: P.map((e) => {
940
930
  const l = (a.selectedCardIds || []).includes(e.cardId);
941
931
  return /* @__PURE__ */ o(
942
932
  "label",
@@ -972,7 +962,7 @@ function sa({
972
962
  /* @__PURE__ */ t(
973
963
  De,
974
964
  {
975
- participants: ee,
965
+ participants: P,
976
966
  selectedCardIds: a.selectedCardIds || [],
977
967
  control: a.control,
978
968
  selected: a.matrixTargetIds,
@@ -980,7 +970,7 @@ function sa({
980
970
  }
981
971
  ),
982
972
  /* @__PURE__ */ t(
983
- Z,
973
+ W,
984
974
  {
985
975
  secondary: /* @__PURE__ */ t(
986
976
  E,
@@ -1009,21 +999,21 @@ function sa({
1009
999
  step: 3
1010
1000
  }
1011
1001
  ),
1012
- disabled: !ae,
1002
+ disabled: !te,
1013
1003
  children: "Next"
1014
1004
  }
1015
1005
  )
1016
1006
  }
1017
1007
  )
1018
1008
  ] }),
1019
- a.step === 2 && !L(a.control.type) && /* @__PURE__ */ t(
1020
- Fe,
1009
+ a.step === 2 && !V(a.control.type) && /* @__PURE__ */ t(
1010
+ Ae,
1021
1011
  {
1022
1012
  control: a.control,
1023
1013
  defaultValue: a.defaultValue,
1024
- availableFieldChoices: Y.fields,
1025
- availableMetricChoices: Y.metrics,
1026
- previewControlDefinitions: ne,
1014
+ availableFieldChoices: H.fields,
1015
+ availableMetricChoices: H.metrics,
1016
+ previewControlDefinitions: le,
1027
1017
  previewControlValues: ke,
1028
1018
  onControlChange: (e) => $(() => e),
1029
1019
  onLabelChange: (e) => $((l) => ({
@@ -1038,17 +1028,17 @@ function sa({
1038
1028
  }
1039
1029
  ),
1040
1030
  onNext: ve,
1041
- nextDisabled: !ae
1031
+ nextDisabled: !te
1042
1032
  }
1043
1033
  ),
1044
- a.step === 3 && L(a.control.type) && /* @__PURE__ */ t(
1045
- Fe,
1034
+ a.step === 3 && V(a.control.type) && /* @__PURE__ */ t(
1035
+ Ae,
1046
1036
  {
1047
1037
  control: a.control,
1048
1038
  defaultValue: a.defaultValue,
1049
- availableFieldChoices: Y.fields,
1050
- availableMetricChoices: Y.metrics,
1051
- previewControlDefinitions: ne,
1039
+ availableFieldChoices: H.fields,
1040
+ availableMetricChoices: H.metrics,
1041
+ previewControlDefinitions: le,
1052
1042
  previewControlValues: ke,
1053
1043
  onControlChange: (e) => $(() => e),
1054
1044
  onLabelChange: (e) => $((l) => ({
@@ -1063,16 +1053,16 @@ function sa({
1063
1053
  }
1064
1054
  ),
1065
1055
  onNext: ve,
1066
- nextDisabled: !ae
1056
+ nextDisabled: !te
1067
1057
  }
1068
1058
  ),
1069
- a.step === 3 && !L(a.control.type) && /* @__PURE__ */ t(
1070
- Ae,
1059
+ a.step === 3 && !V(a.control.type) && /* @__PURE__ */ t(
1060
+ Oe,
1071
1061
  {
1072
1062
  control: a.control,
1073
1063
  scope: s,
1074
1064
  createdReference: Ce,
1075
- explorerContent: /* @__PURE__ */ o(X, { children: [
1065
+ explorerContent: /* @__PURE__ */ o(G, { children: [
1076
1066
  "Open the card and use",
1077
1067
  " ",
1078
1068
  /* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
@@ -1086,23 +1076,23 @@ function sa({
1086
1076
  step: 2
1087
1077
  }
1088
1078
  ),
1089
- onCancel: re,
1079
+ onCancel: ae,
1090
1080
  onDone: ye
1091
1081
  }
1092
1082
  ),
1093
- a.step === 4 && L(a.control.type) && /* @__PURE__ */ t(
1094
- Ae,
1083
+ a.step === 4 && V(a.control.type) && /* @__PURE__ */ t(
1084
+ Oe,
1095
1085
  {
1096
1086
  control: a.control,
1097
1087
  scope: s,
1098
1088
  createdReference: Ce,
1099
- summaryDetail: /* @__PURE__ */ o(X, { children: [
1089
+ summaryDetail: /* @__PURE__ */ o(G, { children: [
1100
1090
  "Used by ",
1101
1091
  (a.selectedCardIds || []).length,
1102
1092
  " selected card",
1103
1093
  (a.selectedCardIds || []).length === 1 ? "" : "s"
1104
1094
  ] }),
1105
- explorerContent: /* @__PURE__ */ t(X, { children: "Selected cards have been set up to respond to this control automatically." }),
1095
+ explorerContent: /* @__PURE__ */ t(G, { children: "Selected cards have been set up to respond to this control automatically." }),
1106
1096
  sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
1107
1097
  onBack: () => D(
1108
1098
  (e) => e && {
@@ -1110,17 +1100,17 @@ function sa({
1110
1100
  step: 3
1111
1101
  }
1112
1102
  ),
1113
- onCancel: re,
1103
+ onCancel: ae,
1114
1104
  onDone: ye
1115
1105
  }
1116
1106
  )
1117
1107
  ] }) : null,
1118
1108
  !a && n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: b }) : null,
1119
1109
  !a && n.map((e) => {
1120
- const l = et(e), r = v == null ? void 0 : v[e.id], d = pe({
1110
+ const l = et(e), r = v == null ? void 0 : v[e.id], d = me({
1121
1111
  control: e,
1122
1112
  defaultValues: i
1123
- }), m = We === e.id, h = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
1113
+ }), m = Ze === e.id, h = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
1124
1114
  return /* @__PURE__ */ o(
1125
1115
  "div",
1126
1116
  {
@@ -1140,11 +1130,11 @@ function sa({
1140
1130
  /* @__PURE__ */ o("div", { className: "min-w-0", children: [
1141
1131
  /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1142
1132
  /* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
1143
- /* @__PURE__ */ t("span", { className: h, children: Ye(e.type).label }),
1144
- /* @__PURE__ */ t("span", { className: h, children: He(s, e.placement) })
1133
+ /* @__PURE__ */ t("span", { className: h, children: He(e.type).label }),
1134
+ /* @__PURE__ */ t("span", { className: h, children: Ye(s, e.placement) })
1145
1135
  ] }),
1146
1136
  /* @__PURE__ */ o("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
1147
- Xe(e),
1137
+ Ge(e),
1148
1138
  r != null && r.status ? ` · ${r.status}` : ""
1149
1139
  ] })
1150
1140
  ] })
@@ -1184,23 +1174,23 @@ function sa({
1184
1174
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1185
1175
  /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1186
1176
  /* @__PURE__ */ o(
1187
- oe,
1177
+ se,
1188
1178
  {
1189
1179
  value: e.type,
1190
1180
  onValueChange: (c) => {
1191
- const y = Ge({
1181
+ const y = Je({
1192
1182
  controls: n,
1193
1183
  controlId: e.id,
1194
1184
  nextType: c,
1195
1185
  defaultValues: i
1196
1186
  });
1197
- V(y.controls, y.defaultValues);
1187
+ L(y.controls, y.defaultValues);
1198
1188
  },
1199
1189
  children: [
1200
- /* @__PURE__ */ t(de, { size: "xs", children: /* @__PURE__ */ t(ie, {}) }),
1201
- /* @__PURE__ */ t(ce, { children: Pe(e.type).map(
1190
+ /* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
1191
+ /* @__PURE__ */ t(ie, { children: Pe(e.type).map(
1202
1192
  (c) => /* @__PURE__ */ t(
1203
- ue,
1193
+ ce,
1204
1194
  {
1205
1195
  value: c.value,
1206
1196
  children: c.label
@@ -1215,22 +1205,22 @@ function sa({
1215
1205
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1216
1206
  /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1217
1207
  /* @__PURE__ */ o(
1218
- oe,
1208
+ se,
1219
1209
  {
1220
- value: e.placement || Ze,
1210
+ value: e.placement || We,
1221
1211
  onValueChange: (c) => B(e.id, (y) => ({
1222
1212
  ...y,
1223
1213
  placement: c
1224
1214
  })),
1225
1215
  children: [
1226
- /* @__PURE__ */ t(de, { size: "xs", children: /* @__PURE__ */ t(ie, {}) }),
1227
- /* @__PURE__ */ t(ce, { children: Ke.map((c) => /* @__PURE__ */ t(ue, { value: c.value, children: c.label }, c.value)) })
1216
+ /* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
1217
+ /* @__PURE__ */ t(ie, { children: Ke.map((c) => /* @__PURE__ */ t(ce, { value: c.value, children: c.label }, c.value)) })
1228
1218
  ]
1229
1219
  }
1230
1220
  )
1231
1221
  ] })
1232
1222
  ] }),
1233
- L(e.type) ? /* @__PURE__ */ o(X, { children: [
1223
+ V(e.type) ? /* @__PURE__ */ o(G, { children: [
1234
1224
  /* @__PURE__ */ t(
1235
1225
  ft,
1236
1226
  {
@@ -1245,13 +1235,13 @@ function sa({
1245
1235
  })),
1246
1236
  selectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1247
1237
  onChange: (c) => {
1248
- const y = te({
1238
+ const y = ee({
1249
1239
  control: e,
1250
1240
  nextSelectedCardIds: c
1251
1241
  }), w = n.map(
1252
1242
  (C) => C.id === e.id ? y.nextControl : C
1253
1243
  );
1254
- V(w, i, {
1244
+ L(w, i, {
1255
1245
  type: "update",
1256
1246
  cardBindingsById: y.cardBindingsById
1257
1247
  });
@@ -1265,12 +1255,12 @@ function sa({
1265
1255
  selectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1266
1256
  control: e,
1267
1257
  onChange: (c, y) => {
1268
- const w = te({
1258
+ const w = ee({
1269
1259
  control: e,
1270
1260
  nextSelectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1271
1261
  matrixTargetIds: { [c]: y }
1272
1262
  });
1273
- V(
1263
+ L(
1274
1264
  n.map((C) => C.id === e.id ? w.nextControl : C),
1275
1265
  i,
1276
1266
  { type: "update", cardBindingsById: w.cardBindingsById }
@@ -1286,7 +1276,7 @@ function sa({
1286
1276
  availableFieldChoices: l.fields,
1287
1277
  availableMetricChoices: l.metrics,
1288
1278
  previewControlDefinitions: n,
1289
- previewControlValues: le,
1279
+ previewControlValues: re,
1290
1280
  controlLifecycle: "edit",
1291
1281
  onChange: (c) => B(e.id, () => c)
1292
1282
  }
@@ -1299,17 +1289,17 @@ function sa({
1299
1289
  allowNoDefault: !0,
1300
1290
  allowCardDefault: !0,
1301
1291
  previewControlDefinitions: n,
1302
- previewControlValues: le,
1292
+ previewControlValues: re,
1303
1293
  onChange: (c) => {
1304
1294
  const y = n.map(
1305
1295
  (w) => w.id === e.id ? { ...w, defaultValue: c } : w
1306
1296
  );
1307
1297
  if (e.source.kind === "manual" && (U.current[e.id] = c), i) {
1308
1298
  const w = { ...i };
1309
- c === void 0 ? delete w[e.id] : w[e.id] = c, V(y, w);
1299
+ c === void 0 ? delete w[e.id] : w[e.id] = c, L(y, w);
1310
1300
  return;
1311
1301
  }
1312
- V(y, void 0);
1302
+ L(y, void 0);
1313
1303
  }
1314
1304
  }
1315
1305
  ),
@@ -1317,7 +1307,7 @@ function sa({
1317
1307
  ht,
1318
1308
  {
1319
1309
  open: he === e.id,
1320
- onOpenChange: (c) => P(c ? e.id : null),
1310
+ onOpenChange: (c) => Z(c ? e.id : null),
1321
1311
  children: [
1322
1312
  /* @__PURE__ */ t(gt, { asChild: !0, children: /* @__PURE__ */ o(
1323
1313
  E,
@@ -1348,7 +1338,7 @@ function sa({
1348
1338
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
1349
1339
  /* @__PURE__ */ t(M, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1350
1340
  /* @__PURE__ */ o(
1351
- oe,
1341
+ se,
1352
1342
  {
1353
1343
  value: e.initialValueStrategy,
1354
1344
  onValueChange: (c) => B(e.id, (y) => ({
@@ -1356,9 +1346,9 @@ function sa({
1356
1346
  initialValueStrategy: c
1357
1347
  })),
1358
1348
  children: [
1359
- /* @__PURE__ */ t(de, { size: "xs", children: /* @__PURE__ */ t(ie, {}) }),
1360
- /* @__PURE__ */ t(ce, { children: Vt.map((c) => /* @__PURE__ */ t(
1361
- ue,
1349
+ /* @__PURE__ */ t(oe, { size: "xs", children: /* @__PURE__ */ t(de, {}) }),
1350
+ /* @__PURE__ */ t(ie, { children: Vt.map((c) => /* @__PURE__ */ t(
1351
+ ce,
1362
1352
  {
1363
1353
  value: c.value,
1364
1354
  children: c.label
@@ -1410,18 +1400,18 @@ function oa(s) {
1410
1400
  dismissMode: k = "passive"
1411
1401
  } = s, b = n !== void 0, [g, v] = z(!1), [p, N] = z(
1412
1402
  i
1413
- ), x = b ? n : g, f = F(
1403
+ ), x = b ? n : g, f = A(
1414
1404
  (_) => {
1415
1405
  !_ && p && k === "passive" || (b || v(_), _ || N(!1), u == null || u(_));
1416
1406
  },
1417
1407
  [b, p, k, u]
1418
- ), S = F(() => {
1408
+ ), S = A(() => {
1419
1409
  b || v(!1), N(!1), u == null || u(!1);
1420
1410
  }, [b, u]);
1421
1411
  K(() => {
1422
1412
  x || N(!1);
1423
1413
  }, [x]);
1424
- const T = F(
1414
+ const T = A(
1425
1415
  (_) => {
1426
1416
  p && _.preventDefault();
1427
1417
  },
@@ -1444,6 +1434,5 @@ export {
1444
1434
  na as V,
1445
1435
  Mt as a,
1446
1436
  la as b,
1447
- At as c,
1448
1437
  oa as u
1449
1438
  };