@w6w/embed 0.2.28 → 0.2.30

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 (48) hide show
  1. package/dist/{ConfirmModal-Pv2-A_3U.js → ConfirmModal-WqBfWftD.js} +100 -83
  2. package/dist/{ConfirmModal-Pv2-A_3U.js.map → ConfirmModal-WqBfWftD.js.map} +1 -1
  3. package/dist/{CreateFunctionModal-B3LpcuI9.js → CreateFunctionModal-CCYi9deY.js} +2 -2
  4. package/dist/{CreateFunctionModal-B3LpcuI9.js.map → CreateFunctionModal-CCYi9deY.js.map} +1 -1
  5. package/dist/{DocumentFormModal-DieWYFi4.js → DocumentFormModal-B3VudaLb.js} +3 -3
  6. package/dist/{DocumentFormModal-DieWYFi4.js.map → DocumentFormModal-B3VudaLb.js.map} +1 -1
  7. package/dist/{ImportSpecModal-xwTzj4KB.js → ImportSpecModal-C-B8Jwxk.js} +3 -3
  8. package/dist/{ImportSpecModal-xwTzj4KB.js.map → ImportSpecModal-C-B8Jwxk.js.map} +1 -1
  9. package/dist/{ModelRoutesManager-DtByS4mE.js → ModelRoutesManager-DqeY1mdP.js} +110 -106
  10. package/dist/ModelRoutesManager-DqeY1mdP.js.map +1 -0
  11. package/dist/WorkflowEditor-8NAcpjO_.js +1140 -0
  12. package/dist/WorkflowEditor-8NAcpjO_.js.map +1 -0
  13. package/dist/chrome/CallFromCodeButton.d.ts +12 -0
  14. package/dist/chrome/index.d.ts +1 -1
  15. package/dist/{editor-tools-CVYTsVFN.js → editor-tools-BIAW-wzt.js} +53 -53
  16. package/dist/{editor-tools-CVYTsVFN.js.map → editor-tools-BIAW-wzt.js.map} +1 -1
  17. package/dist/editor.mjs +1 -1
  18. package/dist/editors.mjs +51 -52
  19. package/dist/editors.mjs.map +1 -1
  20. package/dist/forms.mjs +321 -297
  21. package/dist/forms.mjs.map +1 -1
  22. package/dist/lib/recent-activity.d.ts +2 -2
  23. package/dist/lib/workflow-version.d.ts +19 -2
  24. package/dist/lists/AiKeyCreate.d.ts +20 -0
  25. package/dist/lists/CallableKindList.d.ts +17 -1
  26. package/dist/lists/CallableRowParts.d.ts +33 -0
  27. package/dist/lists/CredentialCreate.d.ts +17 -17
  28. package/dist/lists/CredentialFields.d.ts +18 -0
  29. package/dist/lists/CredentialList.d.ts +35 -3
  30. package/dist/lists.d.ts +2 -0
  31. package/dist/lists.mjs +2038 -1517
  32. package/dist/lists.mjs.map +1 -1
  33. package/dist/rail.mjs +1 -1
  34. package/dist/repos/connections.d.ts +1 -0
  35. package/dist/repos.mjs +59 -59
  36. package/dist/spec-export-BtnoV0ex.js +33 -0
  37. package/dist/spec-export-BtnoV0ex.js.map +1 -0
  38. package/dist/spec-import-FygyV8sy.js +272 -0
  39. package/dist/spec-import-FygyV8sy.js.map +1 -0
  40. package/package.json +5 -5
  41. package/src/styles.css +56 -0
  42. package/dist/ModelRoutesManager-DtByS4mE.js.map +0 -1
  43. package/dist/WorkflowEditor-CvWkVmFn.js +0 -1117
  44. package/dist/WorkflowEditor-CvWkVmFn.js.map +0 -1
  45. package/dist/spec-export-DMMET5VM.js +0 -189
  46. package/dist/spec-export-DMMET5VM.js.map +0 -1
  47. package/dist/spec-import-0B6oUewa.js +0 -116
  48. package/dist/spec-import-0B6oUewa.js.map +0 -1
@@ -1,19 +1,19 @@
1
1
  import { jsx as n, jsxs as r, Fragment as V } from "react/jsx-runtime";
2
2
  import { r as En, l as We, m as Fe, d as Me, e as An, h as Le, c as Pn } from "./import-bindings-EUtxZ9Ti.js";
3
- import { useContext as ve, useState as u, useMemo as He, useEffect as be, createContext as $e, useRef as Be } from "react";
4
- import { ExpressionOptionsProvider as Je, Icon as q, RetryPolicyFields as Tn, StepBuilderModal as In, IconButton as Se, useEnterSubmit as Dn, CodeBlock as pe, DeleteButton as On, EditButton as Rn, ConfirmModal as je, JsonEditor as Mn, useExpressionOptions as Ln, ExpressionInput as jn, ResultViewer as Vn } from "@w6w/ui";
5
- import { d as Qn, p as Wn, i as Fn, t as Hn, e as Ve, a as $n, h as Bn, s as Jn } from "./document-sources-DNmBojx6.js";
6
- import { u as Kn, g as qn, d as Un, a as _n, f as Ke, h as qe, b as Ue, e as _e } from "./spec-export-DMMET5VM.js";
7
- import { i as zn, f as Gn, e as Yn, b as Zn, u as Xn } from "./vault-BSEWhMYC.js";
8
- import { k as xn } from "./spec-import-0B6oUewa.js";
9
- import { s as et, M as K, b as nt, C as tt } from "./ConfirmModal-Pv2-A_3U.js";
3
+ import { useContext as ve, useState as u, useMemo as He, useEffect as be, createContext as $e, useRef as qe } from "react";
4
+ import { ExpressionOptionsProvider as Be, Icon as K, RetryPolicyFields as Tn, StepBuilderModal as In, IconButton as Se, useEnterSubmit as Dn, CodeBlock as pe, DeleteButton as On, EditButton as Rn, ConfirmModal as je, JsonEditor as Mn, useExpressionOptions as Ln, ExpressionInput as jn, ResultViewer as Vn } from "@w6w/ui";
5
+ import { d as Qn, p as Wn, i as Fn, t as Hn, e as Ve, a as $n, h as qn, s as Bn } from "./document-sources-DNmBojx6.js";
6
+ import { u as Jn, a as Je } from "./spec-export-BtnoV0ex.js";
7
+ import { i as Kn, f as Un, e as _n, b as zn, u as Gn } from "./vault-BSEWhMYC.js";
8
+ import { k as Yn, q as Zn, n as Xn, l as xn, r as Ke, m as Ue, o as _e } from "./spec-import-FygyV8sy.js";
9
+ import { s as et, M as J, c as nt, C as tt } from "./ConfirmModal-WqBfWftD.js";
10
10
  import { u as it, i as st, f as at } from "./slug-BVdgiP_L.js";
11
11
  import { WorkflowConnectionsPanel as rt } from "@w6w/ui/flow";
12
12
  import { ApiError as L } from "@w6w/sdk";
13
13
  import { i as ot, p as ze, c as Ge, d as lt } from "./settings-rail--GdRMusb.js";
14
14
  import { w as Ye, v as Ze, y as Xe, x as xe, b as en, d as dt, f as ct, h as ut, u as ht, t as ft, s as mt, r as gt, q as pt } from "./endpoints-DArAqoLT.js";
15
15
  import { a1 as nn, a0 as vt, _ as bt, P as yt, U as kt, a3 as wt, Z as Nt, V as St, X as Ct, K as Et, I as At } from "./workflows-Dz8LMjnt.js";
16
- import { I as tn } from "./ImportSpecModal-xwTzj4KB.js";
16
+ import { I as tn } from "./ImportSpecModal-C-B8Jwxk.js";
17
17
  import { useQueryClient as Pt } from "@tanstack/react-query";
18
18
  import { foldStateLog as Tt } from "@w6w/expr";
19
19
  const ye = $e(null);
@@ -110,7 +110,7 @@ function Wi({
110
110
  } }) : /* @__PURE__ */ n(Ot, { storageKey: t, tools: s, ctx: i }, t);
111
111
  }
112
112
  function Rt(e) {
113
- const t = e, i = zn(t ?? void 0, t != null), s = Gn(), a = Kn(), l = xn(t ?? void 0, t != null), o = Yn(), c = Zn(), h = Xn();
113
+ const t = e, i = Kn(t ?? void 0, t != null), s = Un(), a = Jn(), l = Yn(t ?? void 0, t != null), o = _n(), c = zn(), h = Gn();
114
114
  return He(
115
115
  () => ({
116
116
  vars: (i.data ?? []).map((d) => d.name),
@@ -167,7 +167,7 @@ function Fi({
167
167
  children: t
168
168
  }) {
169
169
  const i = Rt(e);
170
- return /* @__PURE__ */ n(Je, { value: i, children: t });
170
+ return /* @__PURE__ */ n(Be, { value: i, children: t });
171
171
  }
172
172
  function Mt({ ctx: e }) {
173
173
  const [t, i] = u(null), s = Hn(e);
@@ -185,17 +185,17 @@ function Mt({ ctx: e }) {
185
185
  "aria-label": `Show the ${c} snippet`,
186
186
  onClick: () => i(o),
187
187
  children: [
188
- /* @__PURE__ */ n(q, { name: h, size: 20 }),
188
+ /* @__PURE__ */ n(K, { name: h, size: 20 }),
189
189
  /* @__PURE__ */ n("span", { children: c })
190
190
  ]
191
191
  },
192
192
  o
193
193
  )) }),
194
- t !== null && /* @__PURE__ */ n(K, { title: "Call from code", wide: !0, onClose: () => i(null), children: /* @__PURE__ */ n("div", { style: { height: 450 }, children: /* @__PURE__ */ n(nt, { resource: s, triggers: a, initialTab: t }) }) })
194
+ t !== null && /* @__PURE__ */ n(J, { title: "Call from code", wide: !0, onClose: () => i(null), children: /* @__PURE__ */ n("div", { style: { height: 450 }, children: /* @__PURE__ */ n(nt, { resource: s, triggers: a, initialTab: t }) }) })
195
195
  ] });
196
196
  }
197
197
  function Lt() {
198
- return /* @__PURE__ */ n(q, { name: "code" });
198
+ return /* @__PURE__ */ n(K, { name: "code" });
199
199
  }
200
200
  const jt = {
201
201
  id: "code",
@@ -207,7 +207,7 @@ const jt = {
207
207
  id: "connections",
208
208
  title: "Connections",
209
209
  rendersHeading: !0,
210
- Icon: () => /* @__PURE__ */ n(q, { name: "plug" }),
210
+ Icon: () => /* @__PURE__ */ n(K, { name: "plug" }),
211
211
  isAvailable: (e) => (e == null ? void 0 : e.kind) === "workflow" && !!e.connectionResources,
212
212
  hasIndicator: (e) => {
213
213
  var t;
@@ -248,7 +248,7 @@ function ln({
248
248
  hasAdapter: ((M = i.reroute) == null ? void 0 : M.with) !== void 0
249
249
  }) : "allow", O = (C == null ? void 0 : C.kind) === "workflow" ? ((N = (Q = h.data) == null ? void 0 : Q.find((p) => p.id === k)) == null ? void 0 : N.displayName) ?? void 0 : (() => {
250
250
  var P;
251
- const p = (P = o.data) == null ? void 0 : P.find((B) => B.id === k);
251
+ const p = (P = o.data) == null ? void 0 : P.find((q) => q.id === k);
252
252
  return p ? p.displayName || p.key : void 0;
253
253
  })();
254
254
  be(() => {
@@ -393,22 +393,22 @@ function $t({ id: e, kind: t }) {
393
393
  }
394
394
  );
395
395
  }
396
- function Bt({ ctx: e }) {
396
+ function qt({ ctx: e }) {
397
397
  return (e == null ? void 0 : e.kind) !== "workflow" && (e == null ? void 0 : e.kind) !== "function" && (e == null ? void 0 : e.kind) !== "endpoint" ? null : e.kind === "workflow" || typeof e.onPolicyChange == "function" ? /* @__PURE__ */ n(Ht, { ctx: e }) : /* @__PURE__ */ n($t, { id: e.id, kind: e.kind });
398
398
  }
399
- function Jt() {
400
- return /* @__PURE__ */ n(q, { name: "warning" });
399
+ function Bt() {
400
+ return /* @__PURE__ */ n(K, { name: "warning" });
401
401
  }
402
- const Kt = {
402
+ const Jt = {
403
403
  id: "error-handling",
404
404
  title: "Error handling",
405
- Icon: Jt,
405
+ Icon: Bt,
406
406
  isAvailable: (e) => ot(e),
407
- Panel: Bt
408
- }, qt = {
407
+ Panel: qt
408
+ }, Kt = {
409
409
  id: "history",
410
410
  title: "Execution history",
411
- Icon: () => /* @__PURE__ */ n(q, { name: "history" }),
411
+ Icon: () => /* @__PURE__ */ n(K, { name: "history" }),
412
412
  isAvailable: (e) => (e == null ? void 0 : e.kind) === "workflow" && !!e.onOpenHistory,
413
413
  onActivate: (e) => {
414
414
  var t;
@@ -478,7 +478,7 @@ function dn(e) {
478
478
  }
479
479
  }
480
480
  const Q = Dn(M, { enabled: y });
481
- return /* @__PURE__ */ r(K, { title: "Edit settings", onClose: e.onClose, children: [
481
+ return /* @__PURE__ */ r(J, { title: "Edit settings", onClose: e.onClose, children: [
482
482
  /* @__PURE__ */ r("div", { className: "modal-body", children: [
483
483
  /* @__PURE__ */ r("label", { className: "field", children: [
484
484
  /* @__PURE__ */ n("span", { children: "Name" }),
@@ -550,9 +550,9 @@ const Gt = {
550
550
  }
551
551
  };
552
552
  function cn(e) {
553
- const { kind: t, id: i, versionNumber: s } = e, a = Gt[t], l = qn(t, i, s, !0), o = Un(t), c = _n(t), [h, d] = u(!1), [v, b] = u(null);
553
+ const { kind: t, id: i, versionNumber: s } = e, a = Gt[t], l = Zn(t, i, s, !0), o = Xn(t), c = xn(t), [h, d] = u(!1), [v, b] = u(null);
554
554
  return /* @__PURE__ */ r(V, { children: [
555
- /* @__PURE__ */ r(K, { title: `Version ${s}`, onClose: e.onClose, wide: !0, children: [
555
+ /* @__PURE__ */ r(J, { title: `Version ${s}`, onClose: e.onClose, wide: !0, children: [
556
556
  /* @__PURE__ */ r("div", { className: "modal-body", children: [
557
557
  l.isLoading ? /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }) : l.isError ? /* @__PURE__ */ n("div", { className: "error", "data-testid": a.error, children: l.error instanceof Error ? l.error.message : String(l.error) }) : l.data ? /* @__PURE__ */ n("div", { "data-testid": a.json, children: /* @__PURE__ */ n(
558
558
  pe,
@@ -721,7 +721,7 @@ function fn(e) {
721
721
  }
722
722
  function mn(e) {
723
723
  const { kind: t, children: i, onImport: s, onClose: a } = e;
724
- return /* @__PURE__ */ r(K, { title: "Definition", onClose: a, children: [
724
+ return /* @__PURE__ */ r(J, { title: "Definition", onClose: a, children: [
725
725
  /* @__PURE__ */ r("div", { className: "modal-body", children: [
726
726
  i,
727
727
  /* @__PURE__ */ r("p", { className: "muted small", children: [
@@ -762,7 +762,7 @@ function gn(e) {
762
762
  title: "Version history",
763
763
  onClick: e.onShow,
764
764
  children: [
765
- /* @__PURE__ */ n(q, { name: "clock", size: 14 }),
765
+ /* @__PURE__ */ n(K, { name: "clock", size: 14 }),
766
766
  /* @__PURE__ */ n("span", { children: "Version history" })
767
767
  ]
768
768
  }
@@ -801,7 +801,7 @@ function gn(e) {
801
801
  }
802
802
  function pn(e) {
803
803
  const { loading: t, versions: i } = e;
804
- return /* @__PURE__ */ r(K, { title: "All versions", onClose: e.onClose, wide: !0, children: [
804
+ return /* @__PURE__ */ r(J, { title: "All versions", onClose: e.onClose, wide: !0, children: [
805
805
  /* @__PURE__ */ r("div", { className: "modal-body", children: [
806
806
  t && /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }),
807
807
  (i == null ? void 0 : i.length) === 0 && /* @__PURE__ */ n("p", { className: "muted small", children: "No versions yet." }),
@@ -913,7 +913,7 @@ function Xt({
913
913
  setHistoryOpen: c,
914
914
  versionListOpen: h,
915
915
  setVersionListOpen: d
916
- } = s, v = nn(t ?? void 0), b = (e == null ? void 0 : e.kind) === "workflow", m = (e == null ? void 0 : e.id) ?? "", C = vt(m, b), k = bt(t ?? void 0), D = yt(), O = kt(), E = Be(!1), [R, y] = u(!1), [M, Q] = u(!1), [N, p] = u(!1), [P, B] = u(!1), [U, W] = u(!1), [F, oe] = u(null), [_, le] = u(null), H = Ke(We("workflow"), m, N), z = qe("workflow", m, o && b), te = Ue("workflow"), de = _e("workflow"), [ke, G] = u(null), [ie, ce] = u(null), [se, ue] = u(
916
+ } = s, v = nn(t ?? void 0), b = (e == null ? void 0 : e.kind) === "workflow", m = (e == null ? void 0 : e.id) ?? "", C = vt(m, b), k = bt(t ?? void 0), D = yt(), O = kt(), E = qe(!1), [R, y] = u(!1), [M, Q] = u(!1), [N, p] = u(!1), [P, q] = u(!1), [U, W] = u(!1), [F, oe] = u(null), [_, le] = u(null), H = Je(We("workflow"), m, N), z = Ke("workflow", m, o && b), te = Ue("workflow"), de = _e("workflow"), [ke, G] = u(null), [ie, ce] = u(null), [se, ue] = u(
917
917
  null
918
918
  );
919
919
  if (!e || e.kind !== "workflow")
@@ -923,9 +923,9 @@ function Xt({
923
923
  if (!E.current) {
924
924
  E.current = !0, oe(null);
925
925
  try {
926
- Y || await D.mutateAsync(m), await O.mutateAsync(m), B(!1), i({ type: "list" });
926
+ Y || await D.mutateAsync(m), await O.mutateAsync(m), q(!1), i({ type: "list" });
927
927
  } catch (f) {
928
- B(!1), oe(f instanceof L ? f.message : String(f));
928
+ q(!1), oe(f instanceof L ? f.message : String(f));
929
929
  } finally {
930
930
  E.current = !1;
931
931
  }
@@ -1060,7 +1060,7 @@ function Xt({
1060
1060
  ]
1061
1061
  }
1062
1062
  ),
1063
- N && /* @__PURE__ */ r(K, { title: "Export spec document", onClose: () => p(!1), wide: !0, children: [
1063
+ N && /* @__PURE__ */ r(J, { title: "Export spec document", onClose: () => p(!1), wide: !0, children: [
1064
1064
  /* @__PURE__ */ n("div", { className: "modal-body", children: H.isLoading ? /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }) : H.isError ? /* @__PURE__ */ n("div", { className: "error", "data-testid": "rail-spec-error", children: H.error instanceof Error ? H.error.message : String(H.error) }) : H.data ? /* @__PURE__ */ n("div", { "data-testid": "rail-spec-json", children: /* @__PURE__ */ n(
1065
1065
  pe,
1066
1066
  {
@@ -1110,11 +1110,11 @@ function Xt({
1110
1110
  archiveConfirming: U,
1111
1111
  deleteError: F,
1112
1112
  archiveError: _,
1113
- onRequestDelete: () => B(!0),
1113
+ onRequestDelete: () => q(!0),
1114
1114
  onRequestArchive: () => W(!0),
1115
1115
  onConfirmDelete: Z,
1116
1116
  onConfirmArchive: fe,
1117
- onCloseDelete: () => B(!1),
1117
+ onCloseDelete: () => q(!1),
1118
1118
  onCloseArchive: () => W(!1)
1119
1119
  }
1120
1120
  ),
@@ -1155,14 +1155,14 @@ function ei({
1155
1155
  setHistoryOpen: c,
1156
1156
  versionListOpen: h,
1157
1157
  setVersionListOpen: d
1158
- } = s, v = e == null ? void 0 : e.kind, b = ht(v === "endpoint"), m = en(v === "function"), [C, k] = u(!1), [D, O] = u(""), [E, R] = u(null), [y, M] = u(null), [Q, N] = u(!1), [p, P] = u(!1), [B, U] = u(!1), [W, F] = u(!1), [oe, _] = u(!1), [le, H] = u(null), [z, te] = u(null), de = Ye((e == null ? void 0 : e.id) ?? "", (e == null ? void 0 : e.kind) === "function"), ke = Ze((e == null ? void 0 : e.id) ?? "", (e == null ? void 0 : e.kind) === "endpoint"), G = Xe(), ie = xe(), ce = ft(), se = mt(), ue = gt(), T = pt(), he = e ? We(e.kind) : null, $ = Ke(he, (e == null ? void 0 : e.id) ?? "", p), Y = e && Me(e.kind) ? e.kind : null, Z = qe(Y, (e == null ? void 0 : e.id) ?? "", o), fe = Ue(Y ?? "function"), ae = _e(Y ?? "function"), [me, f] = u(null), [A, ge] = u(null), [re, X] = u(
1158
+ } = s, v = e == null ? void 0 : e.kind, b = ht(v === "endpoint"), m = en(v === "function"), [C, k] = u(!1), [D, O] = u(""), [E, R] = u(null), [y, M] = u(null), [Q, N] = u(!1), [p, P] = u(!1), [q, U] = u(!1), [W, F] = u(!1), [oe, _] = u(!1), [le, H] = u(null), [z, te] = u(null), de = Ye((e == null ? void 0 : e.id) ?? "", (e == null ? void 0 : e.kind) === "function"), ke = Ze((e == null ? void 0 : e.id) ?? "", (e == null ? void 0 : e.kind) === "endpoint"), G = Xe(), ie = xe(), ce = ft(), se = mt(), ue = gt(), T = pt(), he = e ? We(e.kind) : null, $ = Je(he, (e == null ? void 0 : e.id) ?? "", p), Y = e && Me(e.kind) ? e.kind : null, Z = Ke(Y, (e == null ? void 0 : e.id) ?? "", o), fe = Ue(Y ?? "function"), ae = _e(Y ?? "function"), [me, f] = u(null), [A, ge] = u(null), [re, X] = u(
1159
1159
  null
1160
1160
  );
1161
1161
  if (!e || e.kind !== "function" && e.kind !== "endpoint")
1162
1162
  return /* @__PURE__ */ n("p", { className: "muted small", children: "Open a workflow, function, or endpoint to see its settings." });
1163
- const S = e.kind, I = e.id, j = S === "function" ? (Pe = m.data) == null ? void 0 : Pe.find((g) => g.id === I) : (Te = b.data) == null ? void 0 : Te.find((g) => g.id === I), J = Ge(S, S === "function" ? de.data : ke.data), x = (J == null ? void 0 : J.definition) ?? null, Ee = j && typeof j.displayName == "string" ? j.displayName : "", yn = x ? JSON.stringify(x, null, 2) : "";
1163
+ const S = e.kind, I = e.id, j = S === "function" ? (Pe = m.data) == null ? void 0 : Pe.find((g) => g.id === I) : (Te = b.data) == null ? void 0 : Te.find((g) => g.id === I), B = Ge(S, S === "function" ? de.data : ke.data), x = (B == null ? void 0 : B.definition) ?? null, Ee = j && typeof j.displayName == "string" ? j.displayName : "", yn = x ? JSON.stringify(x, null, 2) : "";
1164
1164
  function kn() {
1165
- R(null), O(yn), M((J == null ? void 0 : J.updatedAt) ?? null), k(!0);
1165
+ R(null), O(yn), M((B == null ? void 0 : B.updatedAt) ?? null), k(!0);
1166
1166
  }
1167
1167
  const ee = x ? An(D, { id: String(x.id), key: String(x.key) }) : { parsed: null, blockedReason: "No definition loaded yet." }, Ae = S === "function" ? G.isPending : ie.isPending;
1168
1168
  function wn() {
@@ -1296,7 +1296,7 @@ function ei({
1296
1296
  ] })
1297
1297
  }
1298
1298
  ),
1299
- p && /* @__PURE__ */ r(K, { title: "Export spec document", onClose: () => P(!1), wide: !0, children: [
1299
+ p && /* @__PURE__ */ r(J, { title: "Export spec document", onClose: () => P(!1), wide: !0, children: [
1300
1300
  /* @__PURE__ */ n("div", { className: "modal-body", children: $.isLoading ? /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" }) : $.isError ? /* @__PURE__ */ n("div", { className: "error", "data-testid": "rail-spec-error", children: $.error instanceof Error ? $.error.message : String($.error) }) : $.data ? /* @__PURE__ */ n("div", { "data-testid": "rail-spec-json", children: /* @__PURE__ */ n(
1301
1301
  pe,
1302
1302
  {
@@ -1308,7 +1308,7 @@ function ei({
1308
1308
  ) }) : null }),
1309
1309
  /* @__PURE__ */ n("div", { className: "modal-actions", children: /* @__PURE__ */ n("button", { type: "button", className: "btn ghost", onClick: () => P(!1), children: "Close" }) })
1310
1310
  ] }),
1311
- C && /* @__PURE__ */ r(K, { title: "Edit definition", onClose: () => k(!1), wide: !0, children: [
1311
+ C && /* @__PURE__ */ r(J, { title: "Edit definition", onClose: () => k(!1), wide: !0, children: [
1312
1312
  /* @__PURE__ */ r("div", { className: "modal-body", children: [
1313
1313
  /* @__PURE__ */ n(
1314
1314
  Mn,
@@ -1348,12 +1348,12 @@ function ei({
1348
1348
  tags: j.tags ?? []
1349
1349
  },
1350
1350
  onSave: async (g) => {
1351
- if (!J) throw new Error("Unable to save settings");
1352
- const w = J.definition, ne = j.tags ?? [], De = g.tags !== void 0 && (g.tags.length !== ne.length || g.tags.some((we, Ne) => we !== ne[Ne])) ? { tags: g.tags } : {}, Oe = { definition: S === "function" ? (
1351
+ if (!B) throw new Error("Unable to save settings");
1352
+ const w = B.definition, ne = j.tags ?? [], De = g.tags !== void 0 && (g.tags.length !== ne.length || g.tags.some((we, Ne) => we !== ne[Ne])) ? { tags: g.tags } : {}, Oe = { definition: S === "function" ? (
1353
1353
  // `canEditKey: true` for function (`callable-descriptors.ts`): `data.key` must
1354
1354
  // reach the server (the modal falls back to `initial.key` when unchanged).
1355
1355
  { ...w, displayName: g.displayName, key: g.key ?? w.key, ...De }
1356
- ) : { ...w, displayName: g.displayName, ...De }, ifUnmodifiedSince: J.updatedAt };
1356
+ ) : { ...w, displayName: g.displayName, ...De }, ifUnmodifiedSince: B.updatedAt };
1357
1357
  return new Promise((we, Ne) => {
1358
1358
  const Re = { onSuccess: () => we(), onError: Ne };
1359
1359
  S === "function" ? G.mutate(Oe, Re) : ie.mutate(Oe, Re);
@@ -1380,7 +1380,7 @@ function ei({
1380
1380
  onCloseArchive: () => _(!1)
1381
1381
  }
1382
1382
  ),
1383
- B && /* @__PURE__ */ n(
1383
+ q && /* @__PURE__ */ n(
1384
1384
  tn,
1385
1385
  {
1386
1386
  kind: S,
@@ -1393,7 +1393,7 @@ function ei({
1393
1393
  ] });
1394
1394
  }
1395
1395
  function ni() {
1396
- return /* @__PURE__ */ n(q, { name: "settings" });
1396
+ return /* @__PURE__ */ n(K, { name: "settings" });
1397
1397
  }
1398
1398
  const ti = {
1399
1399
  id: "settings",
@@ -1492,9 +1492,9 @@ function si({
1492
1492
  /* @__PURE__ */ r("div", { className: "workflow-variable-default", children: [
1493
1493
  /* @__PURE__ */ n("span", { className: "muted small", children: "Default" }),
1494
1494
  /* @__PURE__ */ n(
1495
- Je,
1495
+ Be,
1496
1496
  {
1497
- value: { vars: Bn(e, h, i) },
1497
+ value: { vars: qn(e, h, i) },
1498
1498
  children: /* @__PURE__ */ n(
1499
1499
  jn,
1500
1500
  {
@@ -1556,11 +1556,11 @@ function di(e) {
1556
1556
  return (e == null ? void 0 : e.kind) === "workflow" ? e.onOpenStartingState : void 0;
1557
1557
  }
1558
1558
  function ci() {
1559
- return /* @__PURE__ */ n(q, { name: "database" });
1559
+ return /* @__PURE__ */ n(K, { name: "database" });
1560
1560
  }
1561
1561
  function ui({ ctx: e }) {
1562
1562
  var k, D, O, E, R;
1563
- const t = Pt(), i = Nt(e.id), s = (k = i.data) == null ? void 0 : k[0], a = St((s == null ? void 0 : s.runId) ?? null), l = ((D = a.data) == null ? void 0 : D.status) ?? (s == null ? void 0 : s.status), o = Ct((s == null ? void 0 : s.runId) ?? null, l), c = l !== void 0 && !Et(l), h = Be(null);
1563
+ const t = Pt(), i = Nt(e.id), s = (k = i.data) == null ? void 0 : k[0], a = St((s == null ? void 0 : s.runId) ?? null), l = ((D = a.data) == null ? void 0 : D.status) ?? (s == null ? void 0 : s.status), o = Ct((s == null ? void 0 : s.runId) ?? null, l), c = l !== void 0 && !Et(l), h = qe(null);
1564
1564
  if (be(() => {
1565
1565
  !c || !s || s.finishedAt !== null || h.current !== s.runId && (h.current = s.runId, t.invalidateQueries({ queryKey: At(e.id) }));
1566
1566
  }, [c, s, t, e.id]), i.isLoading) return /* @__PURE__ */ n("p", { className: "muted small", children: "Loading…" });
@@ -1606,7 +1606,7 @@ function ui({ ctx: e }) {
1606
1606
  ] });
1607
1607
  }
1608
1608
  function hi({ ctx: e }) {
1609
- const t = li(e.startingState), i = Jn(e.startingState, e.variables ?? []);
1609
+ const t = li(e.startingState), i = Bn(e.startingState, e.variables ?? []);
1610
1610
  return /* @__PURE__ */ r("div", { className: "w6w-stack", "data-testid": "rail-state-starting", children: [
1611
1611
  /* @__PURE__ */ n("p", { className: "muted small", children: "Workflow inputs override starting state; starting state overrides project variables with the same name." }),
1612
1612
  i.length > 0 && /* @__PURE__ */ r("p", { className: "muted small", "data-testid": "starting-data-collision", children: [
@@ -1672,10 +1672,10 @@ const mi = {
1672
1672
  }, $i = [
1673
1673
  ti,
1674
1674
  jt,
1675
- Kt,
1675
+ Jt,
1676
1676
  mi,
1677
1677
  Vt,
1678
- qt
1678
+ Kt
1679
1679
  ];
1680
1680
  export {
1681
1681
  Wt as C,
@@ -1689,4 +1689,4 @@ export {
1689
1689
  $i as e,
1690
1690
  It as u
1691
1691
  };
1692
- //# sourceMappingURL=editor-tools-CVYTsVFN.js.map
1692
+ //# sourceMappingURL=editor-tools-BIAW-wzt.js.map