@oomol-lab/open-flow 0.1.0-beta.3 → 0.1.0-beta.5

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 (47) hide show
  1. package/dist/browser/DesignerIcon-XKBRy_0Q.js +2066 -0
  2. package/dist/browser/{createResourceDialog-BkZns-oZ.js → createResourceDialog-Cf7QpXp6.js} +161 -160
  3. package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
  4. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  5. package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
  6. package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
  7. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  8. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  9. package/dist/browser/dist-DxahK_I8.js +2688 -0
  10. package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
  11. package/dist/browser/{esm-C2UUqIUP.js → esm-xWDFFpGd.js} +5 -6
  12. package/dist/browser/flow-authoring-module.d.ts +2 -2
  13. package/dist/browser/flow-authoring-node.d.ts +5 -2
  14. package/dist/browser/flow-authoring.d.ts +1 -1
  15. package/dist/browser/flow-authoring.js +489 -209
  16. package/dist/browser/flow-change.d.ts +110 -9
  17. package/dist/browser/flow-change.js +319 -96
  18. package/dist/browser/flow-notifications.d.ts +5 -0
  19. package/dist/browser/{diagnostics-SDCyFuxm.js → flowChanges-CeMiiZIO.js} +4234 -3825
  20. package/dist/browser/{flowRunInputEditorStore-CwvOiIiU.js → flowRunInputEditorStore-DDidwd8h.js} +10 -2
  21. package/dist/browser/{flowWorkspace-BZ_eiQNR.js → flowWorkspace-VnS8nLMT.js} +35268 -35081
  22. package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-5LArT6Xc.js} +1827 -2322
  23. package/dist/browser/icons-CRxvozBE.js +726 -0
  24. package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-Bj2HDFRd.js} +256 -257
  25. package/dist/browser/waitNotificationInputs-ClCAEIAM.js +26 -0
  26. package/dist/browser/workbench.css +1 -1
  27. package/dist/browser/workbench.d.ts +1 -0
  28. package/dist/browser/workbench.js +851 -840
  29. package/dist/browser/{workbenchSelect-B2s1HV-Y.js → workbenchSelect-Cf1zlVm9.js} +479 -478
  30. package/dist/common/control-api-conformance.d.ts +1 -0
  31. package/dist/common/control-api-conformance.js +80 -19
  32. package/dist/common/control-api-errors.d.ts +4 -0
  33. package/dist/common/control-api.d.ts +26 -14
  34. package/dist/common/control-api.js +138 -89
  35. package/dist/common/flow-encoding.js +20 -8
  36. package/dist/common/flow-notifications.d.ts +5 -0
  37. package/dist/common/flow-semantics.d.ts +1 -0
  38. package/dist/common/flow-semantics.js +467 -381
  39. package/dist/common/run-events.js +2 -1
  40. package/dist/common/run-lifecycle.d.ts +17 -2
  41. package/dist/common/run-lifecycle.js +53 -2
  42. package/dist/common/scheduler.d.ts +64 -3
  43. package/dist/common/scheduler.js +417 -142
  44. package/dist/index.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/dist/browser/dist-BpopSHwP.js +0 -1543
  47. package/dist/browser/dist-CUSrALSX.js +0 -1620
@@ -1,11 +1,12 @@
1
1
  import { a as e } from "./main-DmjVyuWr.js";
2
- import { B as t, Ct as n, F as r, Ft as i, It as a, Jn as o, Kn as s, L as c, Lt as l, M as u, Mt as d, Nn as f, Ot as p, P as m, Pn as h, Qn as g, R as _, Tt as v, Ut as y, V as b, Vn as x, W as S, Xn as C, Yn as w, Z as T, an as E, c as D, er as O, et as ee, fr as k, i as A, lr as j, lt as M, n as te, nn as N, nt as P, o as ne, p as F, qn as I, rr as L, vr as re, x as ie, z as ae, zt as oe } from "./getPseudoElementBounds-ESJExRFX.js";
3
- import { t as se } from "./workbenchSelect-B2s1HV-Y.js";
2
+ import { At as t, B as n, Ct as r, F as i, In as a, Kn as o, L as s, M as c, Mt as l, On as u, P as d, Pt as f, Qn as p, R as m, Rt as h, Tt as g, Un as _, V as v, Vn as y, W as b, Z as x, Zt as S, c as C, en as w, et as T, i as E, jt as D, kn as ee, lt as O, n as te, nt as k, o as ne, p as A, sr as j, tr as M, x as N, z as P } from "./getPseudoElementBounds-5LArT6Xc.js";
3
+ import { c as F, d as re, f as I, l as L, o as ie, t as ae, u as oe } from "./icons-CRxvozBE.js";
4
+ import { t as se } from "./workbenchSelect-Cf1zlVm9.js";
4
5
  import * as R from "react";
5
6
  import { useEffect as ce, useRef as z, useState as le } from "react";
6
7
  import { Fragment as ue, jsx as B, jsxs as V } from "react/jsx-runtime";
7
8
  //#region ../../node_modules/.bun/lucide-react@0.468.0+f4eacebf2041cd4f/node_modules/lucide-react/dist/esm/icons/x.js
8
- var H = i("X", [["path", {
9
+ var H = t("X", [["path", {
9
10
  d: "M18 6 6 18",
10
11
  key: "1bl5f8"
11
12
  }], ["path", {
@@ -15,53 +16,53 @@ var H = i("X", [["path", {
15
16
  process.env.NODE_ENV !== "production" && (U.displayName = "DialogRootContext");
16
17
  function W(e) {
17
18
  let t = R.useContext(U);
18
- if (e === !1 && t === void 0) throw Error(process.env.NODE_ENV === "production" ? k(27) : "Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
19
+ if (e === !1 && t === void 0) throw Error(process.env.NODE_ENV === "production" ? M(27) : "Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
19
20
  return t;
20
21
  }
21
22
  //#endregion
22
23
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop.js
23
24
  var de = {
24
- ...v,
25
- ...E
25
+ ...g,
26
+ ...w
26
27
  }, G = /*#__PURE__*/ R.forwardRef(function(e, t) {
27
- let { render: n, className: r, style: i, forceRender: a = !1, ...o } = e, { store: s } = W(), c = s.useState("open"), l = s.useState("nested"), u = s.useState("mounted"), d = {
28
- open: c,
29
- transitionStatus: s.useState("transitionStatus")
28
+ let { render: n, className: r, style: i, forceRender: a = !1, ...s } = e, { store: c } = W(), l = c.useState("open"), u = c.useState("nested"), d = c.useState("mounted"), f = {
29
+ open: l,
30
+ transitionStatus: c.useState("transitionStatus")
30
31
  };
31
- return L("div", e, {
32
- state: d,
33
- ref: [s.context.backdropRef, t],
32
+ return o("div", e, {
33
+ state: f,
34
+ ref: [c.context.backdropRef, t],
34
35
  stateAttributesMapping: de,
35
36
  props: [{
36
37
  role: "presentation",
37
- hidden: !u,
38
+ hidden: !d,
38
39
  style: {
39
40
  userSelect: "none",
40
41
  WebkitUserSelect: "none"
41
42
  }
42
- }, o],
43
- enabled: a || !l
43
+ }, s],
44
+ enabled: a || !u
44
45
  });
45
46
  });
46
47
  process.env.NODE_ENV !== "production" && (G.displayName = "DialogBackdrop");
47
48
  //#endregion
48
49
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/close/DialogClose.js
49
50
  var K = /*#__PURE__*/ R.forwardRef(function(e, t) {
50
- let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, { store: c } = W(), u = c.useState("open");
51
- function d(e) {
52
- u && c.setOpen(!1, l(oe, e.nativeEvent));
51
+ let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: s, ...c } = e, { store: u } = W(), d = u.useState("open");
52
+ function m(e) {
53
+ d && u.setOpen(!1, l(f, e.nativeEvent));
53
54
  }
54
- let { getButtonProps: f, buttonRef: p } = j({
55
+ let { getButtonProps: h, buttonRef: g } = p({
55
56
  disabled: i,
56
57
  native: a
57
58
  });
58
- return L("button", e, {
59
+ return o("button", e, {
59
60
  state: { disabled: i },
60
- ref: [t, p],
61
+ ref: [t, g],
61
62
  props: [
62
- { onClick: d },
63
- s,
64
- f
63
+ { onClick: m },
64
+ c,
65
+ h
65
66
  ]
66
67
  });
67
68
  });
@@ -71,73 +72,73 @@ process.env.NODE_ENV !== "production" && (K.displayName = "DialogClose");
71
72
  var fe = /*#__PURE__*/ function(e) {
72
73
  return e.nestedDialogs = "--nested-dialogs", e;
73
74
  }({}), pe = function(e) {
74
- return e[e.open = n.open] = "open", e[e.closed = n.closed] = "closed", e[e.startingStyle = n.startingStyle] = "startingStyle", e[e.endingStyle = n.endingStyle] = "endingStyle", e.nested = "data-nested", e.nestedDialogOpen = "data-nested-dialog-open", e;
75
+ return e[e.open = r.open] = "open", e[e.closed = r.closed] = "closed", e[e.startingStyle = r.startingStyle] = "startingStyle", e[e.endingStyle = r.endingStyle] = "endingStyle", e.nested = "data-nested", e.nestedDialogOpen = "data-nested-dialog-open", e;
75
76
  }({}), q = /*#__PURE__*/ R.createContext(void 0);
76
77
  process.env.NODE_ENV !== "production" && (q.displayName = "DialogPortalContext");
77
78
  function me() {
78
79
  let e = R.useContext(q);
79
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? k(26) : "Base UI: <Dialog.Portal> is missing.");
80
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? M(26) : "Base UI: <Dialog.Portal> is missing.");
80
81
  return e;
81
82
  }
82
83
  //#endregion
83
84
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/popup/DialogPopup.js
84
85
  var he = {
85
- ...v,
86
- ...E,
86
+ ...g,
87
+ ...w,
87
88
  nestedDialogOpen(e) {
88
89
  return e ? { [pe.nestedDialogOpen]: "" } : null;
89
90
  }
90
91
  }, J = /*#__PURE__*/ R.forwardRef(function(e, t) {
91
- let { className: n, finalFocus: r, initialFocus: i, render: a, style: o, ...s } = e, { store: c } = W(), l = c.useState("descriptionElementId"), u = c.useState("disablePointerDismissal"), d = c.useState("floatingRootContext"), f = c.useState("popupProps"), p = c.useState("modal"), m = c.useState("mounted"), h = c.useState("nested"), g = c.useState("nestedOpenDialogCount"), _ = c.useState("open"), v = c.useState("openMethod"), y = c.useState("titleElementId"), b = c.useState("transitionStatus"), x = c.useState("role");
92
- me(), N({
93
- open: _,
94
- ref: c.context.popupRef,
92
+ let { className: n, finalFocus: r, initialFocus: i, render: a, style: s, ...c } = e, { store: l } = W(), u = l.useState("descriptionElementId"), d = l.useState("disablePointerDismissal"), f = l.useState("floatingRootContext"), p = l.useState("popupProps"), m = l.useState("modal"), h = l.useState("mounted"), g = l.useState("nested"), _ = l.useState("nestedOpenDialogCount"), v = l.useState("open"), y = l.useState("openMethod"), b = l.useState("titleElementId"), x = l.useState("transitionStatus"), C = l.useState("role");
93
+ me(), S({
94
+ open: v,
95
+ ref: l.context.popupRef,
95
96
  onComplete() {
96
- _ && c.context.onOpenChangeComplete?.(!0);
97
+ v && l.context.onOpenChangeComplete?.(!0);
97
98
  }
98
99
  });
99
- function S(e) {
100
- return e !== "touch" || c.context.popupRef.current;
100
+ function w(e) {
101
+ return e !== "touch" || l.context.popupRef.current;
101
102
  }
102
- let C = i === void 0 ? S : i, w = L("div", e, {
103
+ let T = i === void 0 ? w : i, E = o("div", e, {
103
104
  state: {
104
- open: _,
105
- nested: h,
106
- transitionStatus: b,
107
- nestedDialogOpen: g > 0
105
+ open: v,
106
+ nested: g,
107
+ transitionStatus: x,
108
+ nestedDialogOpen: _ > 0
108
109
  },
109
110
  props: [
110
- f,
111
+ p,
111
112
  {
112
- "aria-labelledby": y ?? void 0,
113
- "aria-describedby": l ?? void 0,
114
- role: x,
113
+ "aria-labelledby": b ?? void 0,
114
+ "aria-describedby": u ?? void 0,
115
+ role: C,
115
116
  tabIndex: -1,
116
- hidden: !m,
117
+ hidden: !h,
117
118
  onKeyDown(e) {
118
- ie.has(e.key) && e.stopPropagation();
119
+ N.has(e.key) && e.stopPropagation();
119
120
  },
120
- style: { [fe.nestedDialogs]: g }
121
+ style: { [fe.nestedDialogs]: _ }
121
122
  },
122
- s
123
+ c
123
124
  ],
124
125
  ref: [
125
126
  t,
126
- c.context.popupRef,
127
- c.useStateSetter("popupElement")
127
+ l.context.popupRef,
128
+ l.useStateSetter("popupElement")
128
129
  ],
129
130
  stateAttributesMapping: he
130
131
  });
131
- return /*#__PURE__*/ B(P, {
132
- context: d,
133
- openInteractionType: v,
134
- disabled: !m,
135
- closeOnFocusOut: !u,
136
- initialFocus: C,
132
+ return /*#__PURE__*/ B(k, {
133
+ context: f,
134
+ openInteractionType: y,
135
+ disabled: !h,
136
+ closeOnFocusOut: !d,
137
+ initialFocus: T,
137
138
  returnFocus: r,
138
- modal: p !== !1,
139
+ modal: m !== !1,
139
140
  restoreFocus: "popup",
140
- children: w
141
+ children: E
141
142
  });
142
143
  });
143
144
  process.env.NODE_ENV !== "production" && (J.displayName = "DialogPopup");
@@ -147,12 +148,12 @@ var Y = /*#__PURE__*/ R.forwardRef(function(e, t) {
147
148
  let { keepMounted: n = !1, ...r } = e, { store: i } = W(), a = i.useState("mounted"), o = i.useState("modal"), s = i.useState("open");
148
149
  return a || n ? /*#__PURE__*/ B(q.Provider, {
149
150
  value: n,
150
- children: /*#__PURE__*/ V(M, {
151
+ children: /*#__PURE__*/ V(O, {
151
152
  ref: t,
152
153
  ...r,
153
- children: [a && o === !0 && /*#__PURE__*/ B(D, {
154
+ children: [a && o === !0 && /*#__PURE__*/ B(C, {
154
155
  ref: i.context.internalBackdropRef,
155
- inert: F(!s)
156
+ inert: A(!s)
156
157
  }), e.children]
157
158
  })
158
159
  }) : null;
@@ -161,85 +162,85 @@ process.env.NODE_ENV !== "production" && (Y.displayName = "DialogPortal");
161
162
  //#endregion
162
163
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/root/useDialogRoot.js
163
164
  function ge(e) {
164
- let { store: n, parentContext: i, actionsRef: a, isDrawer: o } = e, s = n.useState("open"), c = n.useState("disablePointerDismissal"), d = n.useState("modal"), p = n.useState("popupElement"), { openMethod: g, triggerProps: _ } = te(s);
165
- t(n);
166
- let { forceUnmount: v } = b(s, n), x = R.useCallback(() => {
167
- n.setOpen(!1, l(y));
168
- }, [n]);
165
+ let { store: t, parentContext: r, actionsRef: a, isDrawer: o } = e, s = t.useState("open"), f = t.useState("disablePointerDismissal"), p = t.useState("modal"), m = t.useState("popupElement"), { openMethod: g, triggerProps: _ } = te(s);
166
+ n(t);
167
+ let { forceUnmount: y } = v(s, t), b = R.useCallback(() => {
168
+ t.setOpen(!1, l(h));
169
+ }, [t]);
169
170
  R.useImperativeHandle(a, () => ({
170
- unmount: v,
171
- close: x
172
- }), [v, x]);
173
- let S = r({
174
- popupStore: n,
175
- onOpenChange: n.setOpen,
171
+ unmount: y,
172
+ close: b
173
+ }), [y, b]);
174
+ let x = i({
175
+ popupStore: t,
176
+ onOpenChange: t.setOpen,
176
177
  treatPopupAsFloatingElement: !0
177
- }), [C, w] = R.useState(0), [T, E] = R.useState(0), D = C === 0, O = u(S), k = ee(S, {
178
+ }), [S, C] = R.useState(0), [w, E] = R.useState(0), D = S === 0, O = c(x), k = T(x, {
178
179
  outsidePressEvent() {
179
- return n.context.internalBackdropRef.current || n.context.backdropRef.current ? "intentional" : {
180
- mouse: d === "trap-focus" ? "sloppy" : "intentional",
180
+ return t.context.internalBackdropRef.current || t.context.backdropRef.current ? "intentional" : {
181
+ mouse: p === "trap-focus" ? "sloppy" : "intentional",
181
182
  touch: "sloppy"
182
183
  };
183
184
  },
184
185
  outsidePress(e) {
185
- if (!n.context.outsidePressEnabledRef.current || "button" in e && e.button !== 0 || "touches" in e && e.touches.length !== 1) return !1;
186
- let t = h(e);
187
- if (D && !c) {
188
- let e = t;
189
- return d && (n.context.internalBackdropRef.current || n.context.backdropRef.current) ? n.context.internalBackdropRef.current === e || n.context.backdropRef.current === e || f(e, p) && !e?.hasAttribute("data-base-ui-portal") : !0;
186
+ if (!t.context.outsidePressEnabledRef.current || "button" in e && e.button !== 0 || "touches" in e && e.touches.length !== 1) return !1;
187
+ let n = ee(e);
188
+ if (D && !f) {
189
+ let e = n;
190
+ return p && (t.context.internalBackdropRef.current || t.context.backdropRef.current) ? t.context.internalBackdropRef.current === e || t.context.backdropRef.current === e || u(e, m) && !e?.hasAttribute("data-base-ui-portal") : !0;
190
191
  }
191
192
  return !1;
192
193
  },
193
194
  escapeKey: D
194
195
  });
195
- ne(s && d === !0, p);
196
- let { getReferenceProps: A, getFloatingProps: j, getTriggerProps: M } = m([O, k]);
197
- n.useContextCallback("onNestedDialogOpen", (e, t) => {
198
- w(e), E(t);
199
- }), n.useContextCallback("onNestedDialogClose", () => {
200
- w(0), E(0);
201
- }), R.useEffect(() => (i?.onNestedDialogOpen && s && i.onNestedDialogOpen(C + 1, T + +!!o), i?.onNestedDialogClose && !s && i.onNestedDialogClose(), () => {
202
- i?.onNestedDialogClose && s && i.onNestedDialogClose();
196
+ ne(s && p === !0, m);
197
+ let { getReferenceProps: A, getFloatingProps: j, getTriggerProps: M } = d([O, k]);
198
+ t.useContextCallback("onNestedDialogOpen", (e, t) => {
199
+ C(e), E(t);
200
+ }), t.useContextCallback("onNestedDialogClose", () => {
201
+ C(0), E(0);
202
+ }), R.useEffect(() => (r?.onNestedDialogOpen && s && r.onNestedDialogOpen(S + 1, w + +!!o), r?.onNestedDialogClose && !s && r.onNestedDialogClose(), () => {
203
+ r?.onNestedDialogClose && s && r.onNestedDialogClose();
203
204
  }), [
204
205
  o,
205
206
  s,
206
- C,
207
- T,
208
- i
207
+ S,
208
+ w,
209
+ r
209
210
  ]);
210
211
  let N = R.useMemo(() => A(_), [A, _]), P = R.useMemo(() => M(_), [M, _]), F = R.useMemo(() => j(), [j]);
211
- n.useSyncedValues({
212
+ t.useSyncedValues({
212
213
  openMethod: g,
213
214
  activeTriggerProps: N,
214
215
  inactiveTriggerProps: P,
215
216
  popupProps: F,
216
- floatingRootContext: S,
217
- nestedOpenDialogCount: C,
218
- nestedOpenDrawerCount: T
217
+ floatingRootContext: x,
218
+ nestedOpenDialogCount: S,
219
+ nestedOpenDrawerCount: w
219
220
  });
220
221
  }
221
222
  //#endregion
222
223
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/store/DialogStore.js
223
224
  var _e = {
224
- ..._,
225
- modal: T((e) => e.modal),
226
- nested: T((e) => e.nested),
227
- nestedOpenDialogCount: T((e) => e.nestedOpenDialogCount),
228
- nestedOpenDrawerCount: T((e) => e.nestedOpenDrawerCount),
229
- disablePointerDismissal: T((e) => e.disablePointerDismissal),
230
- openMethod: T((e) => e.openMethod),
231
- descriptionElementId: T((e) => e.descriptionElementId),
232
- titleElementId: T((e) => e.titleElementId),
233
- viewportElement: T((e) => e.viewportElement),
234
- role: T((e) => e.role)
235
- }, ve = class e extends S {
225
+ ...m,
226
+ modal: x((e) => e.modal),
227
+ nested: x((e) => e.nested),
228
+ nestedOpenDialogCount: x((e) => e.nestedOpenDialogCount),
229
+ nestedOpenDrawerCount: x((e) => e.nestedOpenDrawerCount),
230
+ disablePointerDismissal: x((e) => e.disablePointerDismissal),
231
+ openMethod: x((e) => e.openMethod),
232
+ descriptionElementId: x((e) => e.descriptionElementId),
233
+ titleElementId: x((e) => e.titleElementId),
234
+ viewportElement: x((e) => e.viewportElement),
235
+ role: x((e) => e.role)
236
+ }, ve = class e extends b {
236
237
  constructor(e) {
237
238
  super(ye(e), {
238
239
  popupRef: /*#__PURE__*/ R.createRef(),
239
240
  backdropRef: /*#__PURE__*/ R.createRef(),
240
241
  internalBackdropRef: /*#__PURE__*/ R.createRef(),
241
242
  outsidePressEnabledRef: { current: !0 },
242
- triggerElements: new ae(),
243
+ triggerElements: new P(),
243
244
  onOpenChange: void 0,
244
245
  onOpenChangeComplete: void 0
245
246
  }, _e);
@@ -253,13 +254,13 @@ var _e = {
253
254
  (r || e) && (n.activeTriggerId = r, n.activeTriggerElement = t.trigger ?? null), this.update(n);
254
255
  };
255
256
  static useStore(t, n) {
256
- let r = re(() => new e(n)).current;
257
+ let r = j(() => new e(n)).current;
257
258
  return t ?? r;
258
259
  }
259
260
  };
260
261
  function ye(e = {}) {
261
262
  return {
262
- ...c(),
263
+ ...s(),
263
264
  modal: !0,
264
265
  disablePointerDismissal: !1,
265
266
  popupElement: null,
@@ -288,7 +289,7 @@ function be(e) {
288
289
  disablePointerDismissal: o,
289
290
  nested: m
290
291
  });
291
- A(() => {
292
+ E(() => {
292
293
  n === void 0 && h.state.open === !1 && r === !0 && h.update({
293
294
  open: !0,
294
295
  activeTriggerId: d
@@ -319,10 +320,10 @@ function be(e) {
319
320
  //#endregion
320
321
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/title/DialogTitle.js
321
322
  var Z = /*#__PURE__*/ R.forwardRef(function(e, t) {
322
- let { render: n, className: r, style: i, id: a, ...o } = e, { store: s } = W(), c = x(a);
323
- return s.useSyncedValueWithCleanup("titleElementId", c), L("h2", e, {
323
+ let { render: n, className: r, style: i, id: s, ...c } = e, { store: l } = W(), u = a(s);
324
+ return l.useSyncedValueWithCleanup("titleElementId", u), o("h2", e, {
324
325
  ref: t,
325
- props: [{ id: c }, o]
326
+ props: [{ id: u }, c]
326
327
  });
327
328
  });
328
329
  process.env.NODE_ENV !== "production" && (Z.displayName = "DialogTitle");
@@ -349,7 +350,7 @@ function Q(e) {
349
350
  function Ce({ className: e, ...t }) {
350
351
  return /* @__PURE__ */ B(G, {
351
352
  "data-slot": "dialog-overlay",
352
- className: O("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:animate-none motion-reduce:transition-none", e),
353
+ className: _("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:animate-none motion-reduce:transition-none", e),
353
354
  ...t
354
355
  });
355
356
  }
@@ -358,11 +359,11 @@ function $({ children: e, className: t, closeLabel: n = "Close", container: r, s
358
359
  container: r,
359
360
  children: [/* @__PURE__ */ B(Ce, {}), /* @__PURE__ */ V(J, {
360
361
  "data-slot": "dialog-content",
361
- className: O("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", t),
362
+ className: _("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", t),
362
363
  ...a,
363
364
  children: [e, i && /* @__PURE__ */ V(K, {
364
365
  "data-slot": "dialog-close",
365
- render: /* @__PURE__ */ B(g, {
366
+ render: /* @__PURE__ */ B(y, {
366
367
  className: "absolute top-2 right-2",
367
368
  size: "icon-sm",
368
369
  variant: "ghost"
@@ -378,99 +379,99 @@ function $({ children: e, className: t, closeLabel: n = "Close", container: r, s
378
379
  function we({ className: e, ...t }) {
379
380
  return /* @__PURE__ */ B("div", {
380
381
  "data-slot": "dialog-header",
381
- className: O("flex flex-col gap-2", e),
382
+ className: _("flex flex-col gap-2", e),
382
383
  ...t
383
384
  });
384
385
  }
385
386
  function Te({ className: e, ...t }) {
386
387
  return /* @__PURE__ */ B("div", {
387
388
  "data-slot": "dialog-footer",
388
- className: O("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-border bg-muted/50 p-4 sm:flex-row sm:justify-end", e),
389
+ className: _("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-border bg-muted/50 p-4 sm:flex-row sm:justify-end", e),
389
390
  ...t
390
391
  });
391
392
  }
392
393
  function Ee({ className: e, ...t }) {
393
394
  return /* @__PURE__ */ B(Z, {
394
395
  "data-slot": "dialog-title",
395
- className: O("text-base leading-none font-medium", e),
396
+ className: _("text-base leading-none font-medium", e),
396
397
  ...t
397
398
  });
398
399
  }
399
400
  //#endregion
400
401
  //#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
401
- function De({ disabled: t, field: n, id: r, issue: i, label: c, name: l, onNameChange: u, onOpenChange: f, onSubmit: m, pending: h, title: _ }) {
402
- let v = e(), y = z(null), b = z(null), [x, S] = le(!1), T = l.length > 0 && i != null, E = v(T ? `resource.nameIssue.${i}` : "resource.nameHint", { max: 80 }), D = `${r}-message`, O = `${r}-option`;
403
- return ce(() => S(!0), []), /* @__PURE__ */ V(ue, { children: [/* @__PURE__ */ B("div", { ref: b }), /* @__PURE__ */ B(xe, {
404
- onOpenChange: S,
402
+ function De({ disabled: t, field: n, id: r, issue: i, label: a, name: o, onNameChange: s, onOpenChange: c, onSubmit: l, pending: u, title: d }) {
403
+ let f = e(), p = z(null), m = z(null), [h, g] = le(!1), _ = o.length > 0 && i != null, v = f(_ ? `resource.nameIssue.${i}` : "resource.nameHint", { max: 80 }), b = `${r}-message`, x = `${r}-option`;
404
+ return ce(() => g(!0), []), /* @__PURE__ */ V(ue, { children: [/* @__PURE__ */ B("div", { ref: m }), /* @__PURE__ */ B(xe, {
405
+ onOpenChange: g,
405
406
  onOpenChangeComplete: (e) => {
406
- e || f(!1);
407
+ e || c(!1);
407
408
  },
408
- open: x,
409
+ open: h,
409
410
  children: /* @__PURE__ */ B($, {
410
- container: b.current,
411
- initialFocus: () => y.current,
411
+ container: m.current,
412
+ initialFocus: () => p.current,
412
413
  showCloseButton: !1,
413
414
  children: /* @__PURE__ */ V("form", {
414
415
  className: "flex flex-col gap-4",
415
- onSubmit: m,
416
+ onSubmit: l,
416
417
  children: [
417
418
  /* @__PURE__ */ V(we, {
418
419
  className: "flex-row items-center justify-between",
419
- children: [/* @__PURE__ */ B(Ee, { children: _ }), /* @__PURE__ */ B(Q, {
420
- "aria-label": v("common.cancel"),
421
- render: /* @__PURE__ */ B(g, {
420
+ children: [/* @__PURE__ */ B(Ee, { children: d }), /* @__PURE__ */ B(Q, {
421
+ "aria-label": f("common.cancel"),
422
+ render: /* @__PURE__ */ B(y, {
422
423
  size: "icon-sm",
423
424
  variant: "ghost"
424
425
  }),
425
426
  type: "button",
426
- children: /* @__PURE__ */ B(p, { name: "close" })
427
+ children: /* @__PURE__ */ B(ae, { name: "close" })
427
428
  })]
428
429
  }),
429
- /* @__PURE__ */ V(w, {
430
+ /* @__PURE__ */ V(re, {
430
431
  className: "gap-4",
431
- children: [/* @__PURE__ */ V(s, {
432
- "data-invalid": T,
432
+ children: [/* @__PURE__ */ V(F, {
433
+ "data-invalid": _,
433
434
  children: [
434
- /* @__PURE__ */ B(C, {
435
+ /* @__PURE__ */ B(I, {
435
436
  htmlFor: r,
436
- children: c
437
+ children: a
437
438
  }),
438
- /* @__PURE__ */ B(a, {
439
+ /* @__PURE__ */ B(D, {
439
440
  autoComplete: "off",
440
- "aria-describedby": D,
441
- "aria-invalid": T,
441
+ "aria-describedby": b,
442
+ "aria-invalid": _,
442
443
  id: r,
443
444
  name: "resource-name",
444
- onChange: (e) => u(e.target.value),
445
- ref: y,
445
+ onChange: (e) => s(e.target.value),
446
+ ref: p,
446
447
  required: !0,
447
- value: l
448
+ value: o
448
449
  }),
449
- B(T ? o : I, {
450
- id: D,
451
- children: E
450
+ B(_ ? oe : L, {
451
+ id: b,
452
+ children: v
452
453
  })
453
454
  ]
454
- }), n != null && /* @__PURE__ */ V(s, { children: [
455
- /* @__PURE__ */ B(C, {
456
- htmlFor: n.state == "ready" ? O : void 0,
455
+ }), n != null && /* @__PURE__ */ V(F, { children: [
456
+ /* @__PURE__ */ B(I, {
457
+ htmlFor: n.state == "ready" ? x : void 0,
457
458
  children: n.label
458
459
  }),
459
460
  n.state == "ready" ? /* @__PURE__ */ B(se, {
460
461
  ariaLabel: n.ariaLabel,
461
462
  className: "w-full",
462
- id: O,
463
+ id: x,
463
464
  onValueChange: n.onValueChange,
464
465
  options: n.options,
465
- portalRoot: b.current,
466
+ portalRoot: m.current,
466
467
  value: n.value
467
468
  }) : /* @__PURE__ */ V("div", {
468
469
  className: "flex min-h-9 items-center gap-2 rounded-lg border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",
469
470
  role: n.state == "error" ? "alert" : "status",
470
471
  children: [
471
- n.state == "loading" && /* @__PURE__ */ B(d, { "aria-hidden": "true" }),
472
+ n.state == "loading" && /* @__PURE__ */ B(ie, { "aria-hidden": "true" }),
472
473
  /* @__PURE__ */ B("span", { children: n.status }),
473
- n.state == "error" && /* @__PURE__ */ B(g, {
474
+ n.state == "error" && /* @__PURE__ */ B(y, {
474
475
  className: "ml-auto bg-background",
475
476
  onClick: n.onRetry,
476
477
  size: "sm",
@@ -480,19 +481,19 @@ function De({ disabled: t, field: n, id: r, issue: i, label: c, name: l, onNameC
480
481
  })
481
482
  ]
482
483
  }),
483
- /* @__PURE__ */ B(I, { children: n.description })
484
+ /* @__PURE__ */ B(L, { children: n.description })
484
485
  ] })]
485
486
  }),
486
487
  /* @__PURE__ */ V(Te, {
487
488
  className: "mx-0 mb-0 border-0 bg-transparent p-0 pt-1",
488
489
  children: [/* @__PURE__ */ B(Q, {
489
- render: /* @__PURE__ */ B(g, { variant: "outline" }),
490
+ render: /* @__PURE__ */ B(y, { variant: "outline" }),
490
491
  type: "button",
491
- children: v("common.cancel")
492
- }), /* @__PURE__ */ B(g, {
493
- disabled: t || h || i != null,
492
+ children: f("common.cancel")
493
+ }), /* @__PURE__ */ B(y, {
494
+ disabled: t || u || i != null,
494
495
  type: "submit",
495
- children: v(h ? "common.creating" : "common.create")
496
+ children: f(u ? "common.creating" : "common.create")
496
497
  })]
497
498
  })
498
499
  ]