react-semaphor 0.1.525 → 0.1.526

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 (54) hide show
  1. package/dist/brand-studio/index.js +37 -37
  2. package/dist/briefings/index.js +3 -3
  3. package/dist/chunks/{calculated-field-identity-Dy_WpDdo.js → calculated-field-identity-D1ofR4KJ.js} +28 -28
  4. package/dist/chunks/{card-config-utils-CAyjC5Tp.js → card-config-utils-9sv4e-Vb.js} +15 -15
  5. package/dist/chunks/{switch-CWPcwAZ4.js → code-highlight-994tgM9v.js} +6309 -8642
  6. package/dist/chunks/dashboard-CsHvEtjN.js +15 -0
  7. package/dist/chunks/{dashboard-briefing-launcher-BilVIEyw.js → dashboard-briefing-launcher-DXz1GhFZ.js} +364 -370
  8. package/dist/chunks/{dashboard-controls-DyLPcvCK.js → dashboard-controls-Df8qOSrs.js} +163 -168
  9. package/dist/chunks/dashboard-json-Xldp0qww.js +65 -0
  10. package/dist/chunks/{edit-dashboard-visual-DtmKNNdE.js → edit-dashboard-visual-COHBqyic.js} +1108 -1107
  11. package/dist/chunks/editor-action-buttons-DahlP57T.js +2071 -0
  12. package/dist/chunks/{index-ON7Gpvcv.js → index-CbjuruKe.js} +40 -40
  13. package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-2VAzGlt8.js} +29 -29
  14. package/dist/chunks/pre-block-Cq1RqhZX.js +3987 -0
  15. package/dist/chunks/report-preferences-dialog-BcH-0lR-.js +1232 -0
  16. package/dist/chunks/search-CJz-QQ0Q.js +24 -0
  17. package/dist/chunks/{selection-reducer-CvCBQbl2.js → selection-reducer-NF5C07yM.js} +25 -46
  18. package/dist/chunks/{index-DYOaHuLS.js → semaphor-ready-indicator-BLRDuLr4.js} +142229 -147767
  19. package/dist/chunks/slider-BYIH4icg.js +877 -0
  20. package/dist/chunks/switch-XaAACBrJ.js +2234 -0
  21. package/dist/dashboard/index.js +1 -1
  22. package/dist/dashboard-authoring/index.js +4 -4
  23. package/dist/data-app-builder/index.js +67 -67
  24. package/dist/data-app-sdk/index.js +33 -32
  25. package/dist/index.js +435 -243
  26. package/dist/surfboard/index.js +4 -5
  27. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  28. package/dist/types/components/dashboard/sheet/layout-change-guard.d.ts +1 -1
  29. package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +1 -1
  30. package/dist/types/components/editor/editor-main/text-card.d.ts +1 -1
  31. package/dist/types/components/editor/editor.d.ts +1 -1
  32. package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
  33. package/dist/types/components/providers/theme-provider-context.d.ts +1 -1
  34. package/dist/types/components/providers/theme-provider.d.ts +1 -1
  35. package/dist/types/components/shared/unsaved-changes/use-pristine-snapshot-initializer.d.ts +1 -1
  36. package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
  37. package/dist/types/components/visual/column-display-utils.d.ts +1 -1
  38. package/dist/types/components/visual/kpi-visual/kpi-utils.d.ts +1 -1
  39. package/dist/types/components/visual/settings/color-format.d.ts +1 -1
  40. package/dist/types/components/visual/visual-utils.d.ts +1 -1
  41. package/dist/types/lib/actions/data-point-click-action.d.ts +2 -1
  42. package/dist/types/lib/dashboard/normalize-dashboard-for-dirty-check.d.ts +1 -1
  43. package/dist/types/lib/hooks/explorer/use-schemas.d.ts +1 -1
  44. package/dist/types/lib/hooks/use-dashboard.d.ts +2 -2
  45. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +1 -2
  46. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  47. package/dist/types/lib/stores/table-actions.d.ts +2 -1
  48. package/dist/types/lib/types/token-types.d.ts +0 -12
  49. package/dist/types/lib/utils.d.ts +0 -2
  50. package/package.json +2 -1
  51. package/dist/chunks/dashboard-json-QEoU-mx4.js +0 -75
  52. package/dist/chunks/editor-action-buttons-B9VRW3Bh.js +0 -2019
  53. package/dist/chunks/report-preferences-dialog-BLaFmlE2.js +0 -723
  54. package/dist/types/lib/encrypt-utils.d.ts +0 -9
@@ -1,4 +1,4 @@
1
- import { D as o } from "../chunks/index-DYOaHuLS.js";
1
+ import { D as o } from "../chunks/dashboard-CsHvEtjN.js";
2
2
  import { C as s, E as C } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  s as CONTROL_CARD_DEFAULT_VALUE,
@@ -1,11 +1,11 @@
1
- import { D as L, a as Ce } from "../chunks/matrix-control-sources-B1K7x0SL.js";
2
- import { k as Bt, l as Vt, n as zt, h as qt, i as jt, j as Gt, C as Ht, d as Ut, f as Kt, e as Wt, o as Xt, c as Qt, p as Jt, u as Yt, w as Zt, y as ea, g as ta, x as aa, m as ra, b as na, r as ia, s as oa, z as sa, t as da, q as ca, v as la } from "../chunks/matrix-control-sources-B1K7x0SL.js";
1
+ import { D as L, a as Ce } from "../chunks/matrix-control-sources-2VAzGlt8.js";
2
+ import { k as Bt, l as Vt, n as zt, h as qt, i as jt, j as Gt, C as Ht, d as Ut, f as Kt, e as Wt, o as Xt, c as Qt, p as Jt, u as Yt, w as Zt, y as ea, g as ta, x as aa, m as ra, b as na, r as ia, s as oa, z as sa, t as da, q as ca, v as la } from "../chunks/matrix-control-sources-2VAzGlt8.js";
3
3
  import { c as Se, r as ve } from "../chunks/field-aggregations-BQjogiI1.js";
4
4
  import { A as pa, D as fa, n as ha, S as ma, h as ga, j as ba, w as Ia, k as _a, l as ya, m as Ca, v as Sa, o as va, B as Da, g as Ta, b as Fa, i as ka, z as wa, u as xa, q as Aa, y as Oa, p as Ra, e as Na, f as Ea, d as Ma, a as La, x as Pa, s as $a, t as Ba } from "../chunks/field-aggregations-BQjogiI1.js";
5
5
  import { q as De, a$ as K, b0 as Te, ad as se, al as Fe, ag as ke } from "../chunks/validators-CsdOtZI6.js";
6
6
  import "../chunks/matrix-operation-contract-D32U2CSw.js";
7
- import { m as B, r as q } from "../chunks/calculated-field-identity-Dy_WpDdo.js";
8
- import { E as za, D as qa, o as ja, q as Ga, K as Ha, s as Ua, l as Ka, i as Wa, d as Xa, j as Qa, A as Ja, g as Ya, v as Za, B as er, h as tr, k as ar, w as rr, n as nr, u as ir, C as or, I as sr, y as dr, p as cr, f as lr, a as ur, b as pr, F as fr, G as hr, e as mr, x as gr, H as br, t as Ir, z as _r, J as yr } from "../chunks/calculated-field-identity-Dy_WpDdo.js";
7
+ import { m as B, r as q } from "../chunks/calculated-field-identity-D1ofR4KJ.js";
8
+ import { C as za, D as qa, l as ja, p as Ga, J as Ha, q as Ua, k as Ka, f as Wa, d as Xa, i as Qa, z as Ja, g as Ya, u as Za, A as er, h as tr, j as ar, v as rr, n as nr, t as ir, B as or, H as sr, x as dr, o as cr, e as lr, a as ur, b as pr, E as fr, F as hr, c as mr, w as gr, G as br, s as Ir, y as _r, I as yr } from "../chunks/calculated-field-identity-D1ofR4KJ.js";
9
9
  import { n as we } from "../chunks/operators-B3zZoskU.js";
10
10
  import { a as Sr, b as vr, r as Dr } from "../chunks/canonical-result-keys-CEQefvdO.js";
11
11
  import { b as Fr, c as kr, g as wr, a as xr, m as Ar, r as Or } from "../chunks/matrix-definition-E5gXXSTZ.js";
@@ -1,14 +1,14 @@
1
1
  import { jsx as r, jsxs as c, Fragment as re } from "react/jsx-runtime";
2
- import * as Zn from "react";
3
- import { useContext as qn, useState as x, useRef as oe, useMemo as je, useEffect as W, useCallback as Ot } from "react";
2
+ import * as Yn from "react";
3
+ import { useContext as Zn, useState as x, useRef as oe, useMemo as je, useEffect as W, useCallback as Ot } from "react";
4
4
  import * as Xn from "react-dom/client";
5
- import { aL as ea, aM as ta, aN as Ir, aO as jr, aP as zr, aQ as ra, aR as Wr, aS as Hr, aT as Jr, aU as Vr, aV as _r, aW as Ur, aX as Gr, aY as na, aZ as aa, a_ as oa, a$ as Ht, b0 as on, R as Kr, b1 as sa, b2 as Vt, b3 as sn, b4 as ia, b5 as la } from "../chunks/index-DYOaHuLS.js";
6
- import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-CWPcwAZ4.js";
5
+ import { b as ea, c as ta, d as Ir, A as jr, e as zr, f as ra, g as Wr, h as Hr, i as Jr, j as Vr, k as _r, l as Ur, m as Gr, P as na, n as aa, o as oa, F as Ht, C as on, R as Kr, p as sa, q as Vt, D as sn, r as ia, s as la } from "../chunks/pre-block-Cq1RqhZX.js";
6
+ import { B as H, P as it, a as lt, b as dt, S as da, d as ca, e as ua, f as pa, g as ha, L as me, R as ma, C as _t } from "../chunks/code-highlight-994tgM9v.js";
7
7
  import { loadSemaphorBrowserRuntime as ot } from "../data-app-builder-browser-runtime/index.js";
8
8
  import { c as Ve, X as He } from "../chunks/x-CXDkqdur.js";
9
9
  import { S as fa } from "../chunks/save-DgMfP0j8.js";
10
10
  import { M as ga } from "../chunks/mouse-pointer-2-BZvGk45-.js";
11
- import { C as Ut, S as ba } from "../chunks/selection-reducer-CvCBQbl2.js";
11
+ import { C as Ut, S as ba } from "../chunks/search-CJz-QQ0Q.js";
12
12
  /**
13
13
  * @license lucide-react v0.453.0 - ISC
14
14
  *
@@ -147,7 +147,7 @@ const ka = Ve("PanelLeft", [
147
147
  reasoningEffort: "low"
148
148
  },
149
149
  { id: "gpt-4.1-mini", label: "GPT-4.1 mini", model: "gpt-4.1-mini" }
150
- ], Qr = "semaphor-data-app-builder-transcript", Yr = "semaphor-data-app-builder-preview-url", Zr = "semaphor-data-app-builder-bridge-url", qr = "semaphor-data-app-builder-project-dir", Lt = "http://semaphor-data-app.localhost:8088", Xr = "http://localhost:8787", It = "/Users/rohit/code/sandbox/semaphor-data-apps/data-app", ze = 3, Aa = 18, jt = 12;
150
+ ], Qr = "semaphor-data-app-builder-transcript", qr = "semaphor-data-app-builder-preview-url", Yr = "semaphor-data-app-builder-bridge-url", Zr = "semaphor-data-app-builder-project-dir", Lt = "http://semaphor-data-app.localhost:8088", Xr = "http://localhost:8787", It = "/Users/rohit/code/sandbox/semaphor-data-apps/data-app", ze = 3, Aa = 18, jt = 12;
151
151
  function he(e, a) {
152
152
  return `${e}:${a}`;
153
153
  }
@@ -431,10 +431,10 @@ async function Fa(e, {
431
431
  contentType: z.contentType
432
432
  })
433
433
  }
434
- ), Z = await O(ve, "Data App publish upload");
434
+ ), Y = await O(ve, "Data App publish upload");
435
435
  if (!ve.ok)
436
436
  throw new Error(
437
- Z.error || `Upload failed for ${z.path}.`
437
+ Y.error || `Upload failed for ${z.path}.`
438
438
  );
439
439
  }
440
440
  l == null || l({
@@ -904,7 +904,7 @@ function Qa({
904
904
  ] })
905
905
  ] });
906
906
  }
907
- function Ya({
907
+ function qa({
908
908
  plan: e,
909
909
  changedFiles: a
910
910
  }) {
@@ -953,9 +953,9 @@ function No({
953
953
  adapters: l
954
954
  }) {
955
955
  var v, B;
956
- const p = qn(ea), h = typeof window > "u" ? void 0 : window.location.origin, g = d || ((v = p.tokenProps) == null ? void 0 : v.apiServiceUrl) || h, S = (B = p.authToken) == null ? void 0 : B.accessToken, [f, R] = x(() => fe("builder-session"));
956
+ const p = Zn(ea), h = typeof window > "u" ? void 0 : window.location.origin, g = d || ((v = p.tokenProps) == null ? void 0 : v.apiServiceUrl) || h, S = (B = p.authToken) == null ? void 0 : B.accessToken, [f, R] = x(() => fe("builder-session"));
957
957
  return /* @__PURE__ */ r("main", { className: "flex h-full min-h-0 w-full min-w-0 flex-1 flex-col self-stretch bg-muted/40 text-foreground", children: /* @__PURE__ */ r(
958
- Za,
958
+ Ya,
959
959
  {
960
960
  adapters: l,
961
961
  apiServiceUrl: g,
@@ -970,7 +970,7 @@ function No({
970
970
  f
971
971
  ) });
972
972
  }
973
- function Za({
973
+ function Ya({
974
974
  adapters: e,
975
975
  apiServiceUrl: a,
976
976
  accessToken: s,
@@ -982,22 +982,22 @@ function Za({
982
982
  onRestart: S
983
983
  }) {
984
984
  var Or, Lr;
985
- const [f, R] = x(Lt), [v, B] = x(Xr), [b, E] = x(It), [j, L] = x(!1), [F, z] = x(Lt), [ve, Z] = x(0), [A] = x(p), [_e, ct] = x(
985
+ const [f, R] = x(Lt), [v, B] = x(Xr), [b, E] = x(It), [j, L] = x(!1), [F, z] = x(Lt), [ve, Y] = x(0), [A] = x(p), [_e, ct] = x(
986
986
  l || ""
987
- ), [ut, Ue] = x([]), [$e, De] = x([]), [q, ge] = x([]), [Qt, Ge] = x(null), [X, Ke] = x(!1), [ee, Yt] = x(!1), [Pe, un] = x(!0), [pn, se] = x("idle"), [hn, ie] = x(null), [Zt, qt] = x(null), [Xt, Qe] = x(() => Date.now()), [Fe, er] = x(null), [pt, mn] = x("gpt-5.5-low"), Y = oe(null), G = oe(null), ht = oe([]), mt = oe(null), ft = oe(null), tr = oe(null), [be, ke] = x(!1), [rr, le] = x(null), [nr, gt] = x(!1), [ar, or] = x(!1), [Me, bt] = x("idle"), [sr, ir] = x(
987
+ ), [ut, Ue] = x([]), [$e, De] = x([]), [Z, ge] = x([]), [Qt, Ge] = x(null), [X, Ke] = x(!1), [ee, qt] = x(!1), [Pe, un] = x(!0), [pn, se] = x("idle"), [hn, ie] = x(null), [Yt, Zt] = x(null), [Xt, Qe] = x(() => Date.now()), [Fe, er] = x(null), [pt, mn] = x("gpt-5.5-low"), q = oe(null), G = oe(null), ht = oe([]), mt = oe(null), ft = oe(null), tr = oe(null), [be, ke] = x(!1), [rr, le] = x(null), [nr, gt] = x(!1), [ar, or] = x(!1), [Me, bt] = x("idle"), [sr, ir] = x(
988
988
  null
989
- ), [fn, lr] = x(""), [gn, dr] = x([]), [xt, cr] = x([]), [wt, ur] = x(null), [pr, bn] = x([]), [xn, wn] = x(null), [yt, hr] = x(null), [vt, mr] = x(null), [xe, Ye] = x(
989
+ ), [fn, lr] = x(""), [gn, dr] = x([]), [xt, cr] = x([]), [wt, ur] = x(null), [pr, bn] = x([]), [xn, wn] = x(null), [yt, hr] = x(null), [vt, mr] = x(null), [xe, qe] = x(
990
990
  d || null
991
- ), [Ze, kt] = x("idle"), [fr, Nt] = x("idle"), [gr, br] = x(null), [xr, wr] = x(null), [St, Ne] = x(null), [de, J] = x(null), [yr, qe] = x(null), [Xe, At] = x(null), [Ct, et] = x(!1), [Rt, vr] = x(""), [kr, Bt] = x(null), [Nr, Sr] = x(!1), Te = oe(
991
+ ), [Ye, kt] = x("idle"), [fr, Nt] = x("idle"), [gr, br] = x(null), [xr, wr] = x(null), [St, Ne] = x(null), [de, J] = x(null), [yr, Ze] = x(null), [Xe, At] = x(null), [Ct, et] = x(!1), [Rt, vr] = x(""), [kr, Bt] = x(null), [Nr, Sr] = x(!1), Te = oe(
992
992
  null
993
993
  ), $t = oe(null), Se = oe(null), Ar = (e == null ? void 0 : e.readStatus) || Ra, tt = (e == null ? void 0 : e.runTurn) || Ba, Dt = (e == null ? void 0 : e.saveDraft) || Da, yn = (e == null ? void 0 : e.loadApp) || Pa, Pt = (e == null ? void 0 : e.publish) || Fa, V = je(() => Ca(pt), [pt]), vn = je(
994
- () => q.find(
994
+ () => Z.find(
995
995
  (t) => t.type === "run" && t.id === Qt
996
996
  ),
997
- [Qt, q]
997
+ [Qt, Z]
998
998
  ), Ft = je(
999
- () => [...q].reverse().find((t) => t.type === "run"),
1000
- [q]
999
+ () => [...Z].reverse().find((t) => t.type === "run"),
1000
+ [Z]
1001
1001
  ), Mt = je(() => {
1002
1002
  const t = F.includes("?") ? "&" : "?";
1003
1003
  return `${F}${t}dataAppBuilderRefresh=${ve}`;
@@ -1006,8 +1006,8 @@ function Za({
1006
1006
  const t = window.setInterval(() => Qe(Date.now()), 500);
1007
1007
  return () => window.clearInterval(t);
1008
1008
  }, []), W(() => {
1009
- ht.current = q;
1010
- }, [q]), W(() => {
1009
+ ht.current = Z;
1010
+ }, [Z]), W(() => {
1011
1011
  if (!Ct) return;
1012
1012
  const t = () => {
1013
1013
  et(!1);
@@ -1017,7 +1017,7 @@ function Za({
1017
1017
  };
1018
1018
  }, [Ct]), W(() => {
1019
1019
  L(!1);
1020
- const t = window.localStorage.getItem(he(Yr, h)) || Lt, n = window.localStorage.getItem(he(Zr, h)) || Xr, i = window.localStorage.getItem(he(qr, h)) || It, o = window.localStorage.getItem(
1020
+ const t = window.localStorage.getItem(he(qr, h)) || Lt, n = window.localStorage.getItem(he(Yr, h)) || Xr, i = window.localStorage.getItem(he(Zr, h)) || It, o = window.localStorage.getItem(
1021
1021
  he(Qr, h)
1022
1022
  );
1023
1023
  if (R(t), z(t), B(n), E(i), L(!0), o)
@@ -1028,29 +1028,29 @@ function Za({
1028
1028
  }
1029
1029
  }, [h]), W(() => {
1030
1030
  window.localStorage.setItem(
1031
- he(Yr, h),
1031
+ he(qr, h),
1032
1032
  f
1033
1033
  );
1034
1034
  }, [f, h]), W(() => {
1035
1035
  window.localStorage.setItem(
1036
- he(Zr, h),
1036
+ he(Yr, h),
1037
1037
  v
1038
1038
  );
1039
1039
  }, [v, h]), W(() => {
1040
1040
  window.localStorage.setItem(
1041
- he(qr, h),
1041
+ he(Zr, h),
1042
1042
  b
1043
1043
  );
1044
1044
  }, [b, h]), W(() => {
1045
1045
  var t;
1046
1046
  window.localStorage.setItem(
1047
1047
  he(Qr, h),
1048
- JSON.stringify(q.map(oo))
1048
+ JSON.stringify(Z.map(oo))
1049
1049
  ), (t = mt.current) == null || t.scrollTo({
1050
1050
  top: mt.current.scrollHeight,
1051
1051
  behavior: "smooth"
1052
1052
  });
1053
- }, [q, h]), W(() => {
1053
+ }, [Z, h]), W(() => {
1054
1054
  Se.current = yt;
1055
1055
  }, [yt]);
1056
1056
  const Tt = Ot(
@@ -1077,14 +1077,14 @@ function Za({
1077
1077
  if (A !== "bridge" || !a) return;
1078
1078
  const t = new AbortController();
1079
1079
  return Tt(t.signal).then(() => {
1080
- Z((n) => n + 1);
1080
+ Y((n) => n + 1);
1081
1081
  }).catch((n) => {
1082
1082
  t.signal.aborted || (gt(!1), le(
1083
1083
  n instanceof Error ? n.message : "Bridge could not sync runtime context."
1084
1084
  ));
1085
1085
  }), () => t.abort();
1086
1086
  }, [a, A, Tt]), W(() => {
1087
- Ye(d || null);
1087
+ qe(d || null);
1088
1088
  }, [d]), W(() => {
1089
1089
  if (!d || !j || $t.current === `${d}:${A}:${b}`)
1090
1090
  return;
@@ -1101,7 +1101,7 @@ function Za({
1101
1101
  { apiServiceUrl: a, accessToken: s, signal: t.signal }
1102
1102
  );
1103
1103
  if (t.signal.aborted) return;
1104
- Ye(o.id);
1104
+ qe(o.id);
1105
1105
  const u = Ja(o);
1106
1106
  if (!u) {
1107
1107
  J({
@@ -1125,7 +1125,7 @@ function Za({
1125
1125
  snapshot: u.sourceSnapshot,
1126
1126
  targetProjectDir: k,
1127
1127
  signal: t.signal
1128
- }), w && Z((C) => C + 1)), A === "bridge" && k !== b && E(k), t.signal.aborted) return;
1128
+ }), w && Y((C) => C + 1)), A === "bridge" && k !== b && E(k), t.signal.aborted) return;
1129
1129
  J({
1130
1130
  state: "done",
1131
1131
  label: "Data App opened",
@@ -1196,7 +1196,7 @@ function Za({
1196
1196
  async (t = G.current) => {
1197
1197
  if (!t) return;
1198
1198
  const n = await t.compileBrowserSandboxPreviewHtml();
1199
- lr(n.html), dr(n.diagnostics), cr(n.warnings || []), ur(n.cssMode || null), Z((i) => i + 1);
1199
+ lr(n.html), dr(n.diagnostics), cr(n.warnings || []), ur(n.cssMode || null), Y((i) => i + 1);
1200
1200
  },
1201
1201
  []
1202
1202
  ), Ee = Ot(
@@ -1215,7 +1215,7 @@ function Za({
1215
1215
  let t = !1;
1216
1216
  async function n() {
1217
1217
  bt("loading"), ir(null), window.__SEMAPHOR_BROWSER_SANDBOX_VENDOR__ = {
1218
- React: Zn,
1218
+ React: Yn,
1219
1219
  ReactDOMClient: Xn
1220
1220
  };
1221
1221
  try {
@@ -1248,7 +1248,7 @@ function Za({
1248
1248
  }
1249
1249
  async function Nn() {
1250
1250
  if (X || ee) return;
1251
- if (At(null), qe(null), vr(""), Bt(null), A === "browser") {
1251
+ if (At(null), Ze(null), vr(""), Bt(null), A === "browser") {
1252
1252
  await Cr();
1253
1253
  return;
1254
1254
  }
@@ -1270,7 +1270,7 @@ function Za({
1270
1270
  );
1271
1271
  if (!i.ok || !o.ok)
1272
1272
  throw new Error(o.error || "Bridge could not reset the app.");
1273
- z(f), Z((u) => u + 1), J({
1273
+ z(f), Y((u) => u + 1), J({
1274
1274
  state: "done",
1275
1275
  label: "App reset",
1276
1276
  detail: "Blank template restored and typecheck passed."
@@ -1359,7 +1359,7 @@ function Za({
1359
1359
  const n = (i = t.artifacts) == null ? void 0 : i.find(
1360
1360
  (o) => o.type === "dataset_inspector"
1361
1361
  );
1362
- n && qe(n);
1362
+ n && Ze(n);
1363
1363
  }
1364
1364
  function Rr(t) {
1365
1365
  se({
@@ -1386,7 +1386,7 @@ function Za({
1386
1386
  createdAt: i,
1387
1387
  attachments: t.attachments
1388
1388
  }
1389
- ]), qt(i), se("context"), ie("Preparing app context and available files."), Kn({ ...t, prompt: n });
1389
+ ]), Zt(i), se("context"), ie("Preparing app context and available files."), Kn({ ...t, prompt: n });
1390
1390
  }
1391
1391
  async function Bn(t) {
1392
1392
  if (!t.type.startsWith("image/")) {
@@ -1463,7 +1463,7 @@ function Za({
1463
1463
  }
1464
1464
  ke(!0), le(
1465
1465
  t ? "Loading inspector in the preview…" : "Click an element in the preview. Press Esc to cancel."
1466
- ), t ? (z(f), Z((n) => n + 1)) : window.setTimeout(() => at("inspect-enable"), 50);
1466
+ ), t ? (z(f), Y((n) => n + 1)) : window.setTimeout(() => at("inspect-enable"), 50);
1467
1467
  } catch (t) {
1468
1468
  ke(!1), le(null), M(
1469
1469
  t instanceof Error ? t.message : String(t),
@@ -1567,9 +1567,9 @@ function Za({
1567
1567
  }
1568
1568
  async function Ln(t, n, i) {
1569
1569
  var k, w, C, y;
1570
- (k = Y.current) == null || k.abort();
1570
+ (k = q.current) == null || k.abort();
1571
1571
  const o = new AbortController(), u = Date.now();
1572
- Y.current = o, Ke(!0), Ge(n), Qe(u), K(n, "reading");
1572
+ q.current = o, Ke(!0), Ge(n), Qe(u), K(n, "reading");
1573
1573
  const m = window.setTimeout(() => {
1574
1574
  o.abort();
1575
1575
  }, 18e4);
@@ -1631,7 +1631,7 @@ function Za({
1631
1631
  };
1632
1632
  if (we.ok) {
1633
1633
  const P = await N.compileBrowserSandboxPreviewHtml();
1634
- if (lr(P.html), dr(P.diagnostics), cr(P.warnings || []), ur(P.cssMode || null), Z((U) => U + 1), Ee(N), P.diagnostics.length > 0) {
1634
+ if (lr(P.html), dr(P.diagnostics), cr(P.warnings || []), ur(P.cssMode || null), Y((U) => U + 1), Ee(N), P.diagnostics.length > 0) {
1635
1635
  const U = {
1636
1636
  command: "browser sandbox preview compile",
1637
1637
  durationMs: 0,
@@ -1690,14 +1690,14 @@ function Za({
1690
1690
  "blocked"
1691
1691
  ), K(n, "failed");
1692
1692
  } finally {
1693
- Ke(!1), Ge(null), Y.current = null, window.clearTimeout(m);
1693
+ Ke(!1), Ge(null), q.current = null, window.clearTimeout(m);
1694
1694
  }
1695
1695
  }
1696
1696
  async function In(t, n, i) {
1697
1697
  var k, w, C, y;
1698
- (k = Y.current) == null || k.abort();
1698
+ (k = q.current) == null || k.abort();
1699
1699
  const o = new AbortController(), u = Date.now();
1700
- Y.current = o, Ke(!0), Ge(n), Qe(u), K(n, "reading");
1700
+ q.current = o, Ke(!0), Ge(n), Qe(u), K(n, "reading");
1701
1701
  const m = window.setTimeout(() => {
1702
1702
  o.abort();
1703
1703
  }, 18e4);
@@ -1816,7 +1816,7 @@ function Za({
1816
1816
  ...U,
1817
1817
  attemptLabel: P
1818
1818
  });
1819
- if (z(f), Z((Ie) => Ie + 1), we.push(...ae.attempts || []), _ = {
1819
+ if (z(f), Y((Ie) => Ie + 1), we.push(...ae.attempts || []), _ = {
1820
1820
  ...ae,
1821
1821
  attempts: [...we],
1822
1822
  filePlan: U.plan,
@@ -1825,7 +1825,7 @@ function Za({
1825
1825
  contextChars: ne,
1826
1826
  generatedFileCount: U.files.length,
1827
1827
  generatedChars: U.files.reduce(
1828
- (Ie, Yn) => Ie + Yn.contents.length,
1828
+ (Ie, qn) => Ie + qn.contents.length,
1829
1829
  0
1830
1830
  ),
1831
1831
  repairAttempts: we.filter(
@@ -1870,7 +1870,7 @@ function Za({
1870
1870
  "blocked"
1871
1871
  ), K(n, "failed");
1872
1872
  } finally {
1873
- Ke(!1), Ge(null), Y.current = null, window.clearTimeout(m);
1873
+ Ke(!1), Ge(null), q.current = null, window.clearTimeout(m);
1874
1874
  }
1875
1875
  }
1876
1876
  async function jn(t) {
@@ -2172,7 +2172,7 @@ function Za({
2172
2172
  },
2173
2173
  { apiServiceUrl: a, accessToken: s, signal: t.signal }
2174
2174
  );
2175
- return Ye(w.dataAppId), br(w.savedAt || (/* @__PURE__ */ new Date()).toISOString()), kt("saved"), J({
2175
+ return qe(w.dataAppId), br(w.savedAt || (/* @__PURE__ */ new Date()).toISOString()), kt("saved"), J({
2176
2176
  state: "done",
2177
2177
  label: "Draft saved",
2178
2178
  detail: "Semaphor has the latest source snapshot."
@@ -2222,7 +2222,7 @@ function Za({
2222
2222
  );
2223
2223
  return;
2224
2224
  }
2225
- if (Ze === "saving" && !Te.current) {
2225
+ if (Ye === "saving" && !Te.current) {
2226
2226
  M("Save draft is already in progress.", "blocked");
2227
2227
  return;
2228
2228
  }
@@ -2288,7 +2288,7 @@ function Za({
2288
2288
  }
2289
2289
  }
2290
2290
  );
2291
- Ye(o.dataAppId), wr(o.publishedAt || (/* @__PURE__ */ new Date()).toISOString()), Nt("published"), J({
2291
+ qe(o.dataAppId), wr(o.publishedAt || (/* @__PURE__ */ new Date()).toISOString()), Nt("published"), J({
2292
2292
  state: "done",
2293
2293
  label: "Published",
2294
2294
  detail: `Version ${o.version ?? o.versionId} is ready.`
@@ -2308,7 +2308,7 @@ function Za({
2308
2308
  async function Kn(t) {
2309
2309
  var m, k;
2310
2310
  const { attachments: n, prompt: i } = t, o = new AbortController();
2311
- Y.current = o, Yt(!0);
2311
+ q.current = o, qt(!0);
2312
2312
  const u = window.setTimeout(() => {
2313
2313
  o.abort();
2314
2314
  }, 18e4);
@@ -2437,7 +2437,7 @@ function Za({
2437
2437
  createdAt: I,
2438
2438
  startedAt: I
2439
2439
  }
2440
- ]), Y.current = null, A === "browser" ? Ln(i, N, y.revision) : In(i, N, y.revision);
2440
+ ]), q.current = null, A === "browser" ? Ln(i, N, y.revision) : In(i, N, y.revision);
2441
2441
  } catch (w) {
2442
2442
  const C = w instanceof DOMException && w.name === "AbortError";
2443
2443
  M(
@@ -2445,7 +2445,7 @@ function Za({
2445
2445
  "blocked"
2446
2446
  );
2447
2447
  } finally {
2448
- Yt(!1), se("idle"), ie(null), qt(null), Y.current === o && (Y.current = null), window.clearTimeout(u);
2448
+ qt(!1), se("idle"), ie(null), Zt(null), q.current === o && (q.current = null), window.clearTimeout(u);
2449
2449
  }
2450
2450
  }
2451
2451
  function Qn(t) {
@@ -2516,7 +2516,7 @@ function Za({
2516
2516
  ref: mt,
2517
2517
  className: "min-h-0 flex-1 overflow-y-auto px-3 py-4",
2518
2518
  children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
2519
- q.length === 0 && /* @__PURE__ */ c("div", { children: [
2519
+ Z.length === 0 && /* @__PURE__ */ c("div", { children: [
2520
2520
  /* @__PURE__ */ r("p", { className: "text-[12.5px] font-medium text-foreground", children: "Start with a question or a build instruction" }),
2521
2521
  /* @__PURE__ */ r("p", { className: "mt-1 text-[11.5px] leading-relaxed text-muted-foreground", children: "Ask about the current files, or describe the app you want." }),
2522
2522
  /* @__PURE__ */ r("div", { className: "mt-3 grid gap-1.5", children: Na.slice(0, 3).map((t) => /* @__PURE__ */ c(
@@ -2533,12 +2533,12 @@ function Za({
2533
2533
  t.id
2534
2534
  )) })
2535
2535
  ] }),
2536
- q.map(
2536
+ Z.map(
2537
2537
  (t) => t.type === "user" ? /* @__PURE__ */ r(ao, { message: t }, t.id) : t.type === "assistant" ? /* @__PURE__ */ r(
2538
2538
  so,
2539
2539
  {
2540
2540
  message: t,
2541
- onOpenDatasetInspector: qe
2541
+ onOpenDatasetInspector: Ze
2542
2542
  },
2543
2543
  t.id
2544
2544
  ) : /* @__PURE__ */ r(
@@ -2555,7 +2555,7 @@ function Za({
2555
2555
  {
2556
2556
  phase: pn,
2557
2557
  detail: hn,
2558
- elapsedMs: Zt ? Math.max(0, Xt - Zt) : 0
2558
+ elapsedMs: Yt ? Math.max(0, Xt - Yt) : 0
2559
2559
  }
2560
2560
  )
2561
2561
  ] })
@@ -2699,7 +2699,7 @@ function Za({
2699
2699
  title: "Stop the current run",
2700
2700
  onClick: () => {
2701
2701
  var t;
2702
- return (t = Y.current) == null ? void 0 : t.abort();
2702
+ return (t = q.current) == null ? void 0 : t.abort();
2703
2703
  },
2704
2704
  children: [
2705
2705
  /* @__PURE__ */ r(He, { className: "h-3 w-3" }),
@@ -2899,11 +2899,11 @@ function Za({
2899
2899
  variant: "ghost",
2900
2900
  size: "xs",
2901
2901
  className: "gap-1.5 text-muted-foreground",
2902
- disabled: X || ee || Ze === "saving" || A !== "bridge" || !Dt,
2902
+ disabled: X || ee || Ye === "saving" || A !== "bridge" || !Dt,
2903
2903
  title: "Save the current local source snapshot as a Semaphor draft",
2904
2904
  onClick: () => void Er(),
2905
2905
  children: [
2906
- Ze === "saving" ? /* @__PURE__ */ r(me, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(fa, { className: "h-3.5 w-3.5" }),
2906
+ Ye === "saving" ? /* @__PURE__ */ r(me, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(fa, { className: "h-3.5 w-3.5" }),
2907
2907
  "Save draft"
2908
2908
  ]
2909
2909
  }
@@ -2915,7 +2915,7 @@ function Za({
2915
2915
  variant: "ghost",
2916
2916
  size: "xs",
2917
2917
  className: "gap-1.5 text-muted-foreground",
2918
- disabled: X || ee || Ze === "saving" || fr === "publishing" || A !== "bridge" || !Pt,
2918
+ disabled: X || ee || Ye === "saving" || fr === "publishing" || A !== "bridge" || !Pt,
2919
2919
  title: "Build, upload, and publish the current Data App",
2920
2920
  onClick: () => void Gn(),
2921
2921
  children: [
@@ -3018,7 +3018,7 @@ function Za({
3018
3018
  title: "Reload the live preview",
3019
3019
  "aria-label": "Reload the live preview",
3020
3020
  onClick: () => {
3021
- A === "browser" ? (rt(), Ee()) : (z(f), Z((t) => t + 1));
3021
+ A === "browser" ? (rt(), Ee()) : (z(f), Y((t) => t + 1));
3022
3022
  },
3023
3023
  children: /* @__PURE__ */ r(Kr, { className: "h-3.5 w-3.5" })
3024
3024
  }
@@ -3082,7 +3082,7 @@ function Za({
3082
3082
  lo,
3083
3083
  {
3084
3084
  artifact: yr,
3085
- onClose: () => qe(null)
3085
+ onClose: () => Ze(null)
3086
3086
  }
3087
3087
  ) : null
3088
3088
  ] })
@@ -3115,7 +3115,7 @@ function Wt({
3115
3115
  )
3116
3116
  ] });
3117
3117
  }
3118
- function qa({ code: e, lang: a }) {
3118
+ function Za({ code: e, lang: a }) {
3119
3119
  const [s, d] = x(!1);
3120
3120
  return /* @__PURE__ */ c("div", { className: "my-2 overflow-hidden rounded-[6px] border border-border", children: [
3121
3121
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-2 border-b border-border bg-muted/40 px-2.5 py-1", children: [
@@ -3189,7 +3189,7 @@ function ro(e) {
3189
3189
  const h = a.slice(0, p).trim();
3190
3190
  h && /^[A-Za-z0-9_.+-]{1,16}$/.test(h) && (d = h, l = a.slice(p + 1));
3191
3191
  }
3192
- return l = l.replace(/^\n/, "").replace(/\s+$/, ""), /* @__PURE__ */ r(qa, { code: l, lang: d }, s);
3192
+ return l = l.replace(/^\n/, "").replace(/\s+$/, ""), /* @__PURE__ */ r(Za, { code: l, lang: d }, s);
3193
3193
  }
3194
3194
  return /* @__PURE__ */ r("span", { children: to(a, s) }, s);
3195
3195
  });
@@ -3616,7 +3616,7 @@ function uo({
3616
3616
  e.result.changedFiles.join(", ")
3617
3617
  ] }) : null,
3618
3618
  /* @__PURE__ */ r(
3619
- Ya,
3619
+ qa,
3620
3620
  {
3621
3621
  plan: e.result.filePlan,
3622
3622
  changedFiles: e.result.changedFiles