@oomol-lab/open-flow 0.1.0-beta.4 → 0.1.0-beta.6
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.
- package/dist/browser/{DesignerIcon-DdfuH2jW.js → DesignerIcon-XKBRy_0Q.js} +640 -640
- package/dist/browser/createResourceDialog-Cf7QpXp6.js +505 -0
- package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
- package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
- package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
- package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
- package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
- package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
- package/dist/browser/dist-DxahK_I8.js +2688 -0
- package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
- package/dist/browser/{esm-C9jQK70n.js → esm-CTcBY7hh.js} +5 -6
- package/dist/browser/flow-authoring-module.d.ts +2 -2
- package/dist/browser/flow-authoring-node.d.ts +2 -2
- package/dist/browser/flow-authoring.js +475 -209
- package/dist/browser/flow-change.d.ts +98 -8
- package/dist/browser/flow-change.js +319 -96
- package/dist/browser/{flowChanges-Bs-ZcJV8.js → flowChanges-BDqD_Q4G.js} +1628 -1555
- package/dist/browser/{flowRunInputEditorStore-BYa8zFLC.js → flowRunInputEditorStore-DDidwd8h.js} +9 -1
- package/dist/browser/{flowWorkspace-BewofPeU.js → flowWorkspace-CPBHm14t.js} +9803 -9769
- package/dist/browser/{getPseudoElementBounds-qDxSDwzN.js → getPseudoElementBounds-5LArT6Xc.js} +494 -474
- package/dist/browser/icons-CRxvozBE.js +726 -0
- package/dist/browser/{typeScriptSession-CwMPjseS.js → typeScriptSession-_TgJ_7Oq.js} +256 -257
- package/dist/browser/{waitNotificationInputs-DtrPBwA1.js → waitNotificationInputs-lPrLDTOd.js} +2 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +573 -578
- package/dist/browser/{workbenchSelect-CX8KtT7L.js → workbenchSelect-Cf1zlVm9.js} +398 -398
- package/dist/common/control-api-conformance.js +27 -19
- package/dist/common/control-api.d.ts +4 -11
- package/dist/common/control-api.js +6 -18
- package/dist/common/flow-encoding.js +4 -0
- package/dist/common/flow-semantics.js +8 -10
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/runtime-contract.js +27 -0
- package/dist/common/scheduler.d.ts +1 -1
- package/dist/common/scheduler.js +17 -18
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/browser/createResourceDialog-4YQKl8lG.js +0 -505
- package/dist/browser/dist-BpopSHwP.js +0 -1543
- package/dist/browser/dist-CUSrALSX.js +0 -1620
- package/dist/browser/icons-DRoMXL5h.js +0 -521
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
import { a as e } from "./main-DmjVyuWr.js";
|
|
2
|
-
import { $t as t, At as n, B as r, Bn as i, Ct as a, Dn as o, F as s, Fn as c, Gn as l, Hn as u, L as d, Lt as f, M as p, Nt as m, On as h, P as g, R as _, Tt as v, V as y, W as b, Xt as x, Z as S, Zn as C, c as w, er as T, et as E, i as D, jt as O, kt as k, lt as A, n as ee, nt as j, o as te, or as M, p as N, x as P, z as F } from "./getPseudoElementBounds-qDxSDwzN.js";
|
|
3
|
-
import { a as I, c as L, d as R, l as ne, s as z, t as re, u as ie } from "./icons-DRoMXL5h.js";
|
|
4
|
-
import { t as ae } from "./workbenchSelect-CX8KtT7L.js";
|
|
5
|
-
import * as B from "react";
|
|
6
|
-
import { useEffect as oe, useRef as V, useState as se } from "react";
|
|
7
|
-
import { Fragment as ce, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
8
|
-
//#region ../../node_modules/.bun/lucide-react@0.468.0+f4eacebf2041cd4f/node_modules/lucide-react/dist/esm/icons/x.js
|
|
9
|
-
var le = k("X", [["path", {
|
|
10
|
-
d: "M18 6 6 18",
|
|
11
|
-
key: "1bl5f8"
|
|
12
|
-
}], ["path", {
|
|
13
|
-
d: "m6 6 12 12",
|
|
14
|
-
key: "d8bk6v"
|
|
15
|
-
}]]), W = /*#__PURE__*/ B.createContext(void 0);
|
|
16
|
-
process.env.NODE_ENV !== "production" && (W.displayName = "DialogRootContext");
|
|
17
|
-
function G(e) {
|
|
18
|
-
let t = B.useContext(W);
|
|
19
|
-
if (e === !1 && t === void 0) throw Error(process.env.NODE_ENV === "production" ? T(27) : "Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
|
|
20
|
-
return t;
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop.js
|
|
24
|
-
var ue = {
|
|
25
|
-
...v,
|
|
26
|
-
...t
|
|
27
|
-
}, K = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
28
|
-
let { render: n, className: r, style: i, forceRender: a = !1, ...o } = e, { store: s } = G(), c = s.useState("open"), u = s.useState("nested"), d = s.useState("mounted"), f = {
|
|
29
|
-
open: c,
|
|
30
|
-
transitionStatus: s.useState("transitionStatus")
|
|
31
|
-
};
|
|
32
|
-
return l("div", e, {
|
|
33
|
-
state: f,
|
|
34
|
-
ref: [s.context.backdropRef, t],
|
|
35
|
-
stateAttributesMapping: ue,
|
|
36
|
-
props: [{
|
|
37
|
-
role: "presentation",
|
|
38
|
-
hidden: !d,
|
|
39
|
-
style: {
|
|
40
|
-
userSelect: "none",
|
|
41
|
-
WebkitUserSelect: "none"
|
|
42
|
-
}
|
|
43
|
-
}, o],
|
|
44
|
-
enabled: a || !u
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
process.env.NODE_ENV !== "production" && (K.displayName = "DialogBackdrop");
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/close/DialogClose.js
|
|
50
|
-
var q = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
51
|
-
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, { store: c } = G(), u = c.useState("open");
|
|
52
|
-
function d(e) {
|
|
53
|
-
u && c.setOpen(!1, O(m, e.nativeEvent));
|
|
54
|
-
}
|
|
55
|
-
let { getButtonProps: f, buttonRef: p } = C({
|
|
56
|
-
disabled: i,
|
|
57
|
-
native: a
|
|
58
|
-
});
|
|
59
|
-
return l("button", e, {
|
|
60
|
-
state: { disabled: i },
|
|
61
|
-
ref: [t, p],
|
|
62
|
-
props: [
|
|
63
|
-
{ onClick: d },
|
|
64
|
-
s,
|
|
65
|
-
f
|
|
66
|
-
]
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
process.env.NODE_ENV !== "production" && (q.displayName = "DialogClose");
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/popup/DialogPopupCssVars.js
|
|
72
|
-
var de = /*#__PURE__*/ function(e) {
|
|
73
|
-
return e.nestedDialogs = "--nested-dialogs", e;
|
|
74
|
-
}({}), fe = function(e) {
|
|
75
|
-
return e[e.open = a.open] = "open", e[e.closed = a.closed] = "closed", e[e.startingStyle = a.startingStyle] = "startingStyle", e[e.endingStyle = a.endingStyle] = "endingStyle", e.nested = "data-nested", e.nestedDialogOpen = "data-nested-dialog-open", e;
|
|
76
|
-
}({}), J = /*#__PURE__*/ B.createContext(void 0);
|
|
77
|
-
process.env.NODE_ENV !== "production" && (J.displayName = "DialogPortalContext");
|
|
78
|
-
function pe() {
|
|
79
|
-
let e = B.useContext(J);
|
|
80
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? T(26) : "Base UI: <Dialog.Portal> is missing.");
|
|
81
|
-
return e;
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/popup/DialogPopup.js
|
|
85
|
-
var me = {
|
|
86
|
-
...v,
|
|
87
|
-
...t,
|
|
88
|
-
nestedDialogOpen(e) {
|
|
89
|
-
return e ? { [fe.nestedDialogOpen]: "" } : null;
|
|
90
|
-
}
|
|
91
|
-
}, Y = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
92
|
-
let { className: n, finalFocus: r, initialFocus: i, render: a, style: o, ...s } = e, { store: c } = G(), u = c.useState("descriptionElementId"), d = c.useState("disablePointerDismissal"), f = c.useState("floatingRootContext"), p = c.useState("popupProps"), m = c.useState("modal"), h = c.useState("mounted"), g = c.useState("nested"), _ = c.useState("nestedOpenDialogCount"), v = c.useState("open"), y = c.useState("openMethod"), b = c.useState("titleElementId"), S = c.useState("transitionStatus"), C = c.useState("role");
|
|
93
|
-
pe(), x({
|
|
94
|
-
open: v,
|
|
95
|
-
ref: c.context.popupRef,
|
|
96
|
-
onComplete() {
|
|
97
|
-
v && c.context.onOpenChangeComplete?.(!0);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
function w(e) {
|
|
101
|
-
return e !== "touch" || c.context.popupRef.current;
|
|
102
|
-
}
|
|
103
|
-
let T = i === void 0 ? w : i, E = l("div", e, {
|
|
104
|
-
state: {
|
|
105
|
-
open: v,
|
|
106
|
-
nested: g,
|
|
107
|
-
transitionStatus: S,
|
|
108
|
-
nestedDialogOpen: _ > 0
|
|
109
|
-
},
|
|
110
|
-
props: [
|
|
111
|
-
p,
|
|
112
|
-
{
|
|
113
|
-
"aria-labelledby": b ?? void 0,
|
|
114
|
-
"aria-describedby": u ?? void 0,
|
|
115
|
-
role: C,
|
|
116
|
-
tabIndex: -1,
|
|
117
|
-
hidden: !h,
|
|
118
|
-
onKeyDown(e) {
|
|
119
|
-
P.has(e.key) && e.stopPropagation();
|
|
120
|
-
},
|
|
121
|
-
style: { [de.nestedDialogs]: _ }
|
|
122
|
-
},
|
|
123
|
-
s
|
|
124
|
-
],
|
|
125
|
-
ref: [
|
|
126
|
-
t,
|
|
127
|
-
c.context.popupRef,
|
|
128
|
-
c.useStateSetter("popupElement")
|
|
129
|
-
],
|
|
130
|
-
stateAttributesMapping: me
|
|
131
|
-
});
|
|
132
|
-
return /*#__PURE__*/ H(j, {
|
|
133
|
-
context: f,
|
|
134
|
-
openInteractionType: y,
|
|
135
|
-
disabled: !h,
|
|
136
|
-
closeOnFocusOut: !d,
|
|
137
|
-
initialFocus: T,
|
|
138
|
-
returnFocus: r,
|
|
139
|
-
modal: m !== !1,
|
|
140
|
-
restoreFocus: "popup",
|
|
141
|
-
children: E
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
process.env.NODE_ENV !== "production" && (Y.displayName = "DialogPopup");
|
|
145
|
-
//#endregion
|
|
146
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/portal/DialogPortal.js
|
|
147
|
-
var X = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
148
|
-
let { keepMounted: n = !1, ...r } = e, { store: i } = G(), a = i.useState("mounted"), o = i.useState("modal"), s = i.useState("open");
|
|
149
|
-
return a || n ? /*#__PURE__*/ H(J.Provider, {
|
|
150
|
-
value: n,
|
|
151
|
-
children: /*#__PURE__*/ U(A, {
|
|
152
|
-
ref: t,
|
|
153
|
-
...r,
|
|
154
|
-
children: [a && o === !0 && /*#__PURE__*/ H(w, {
|
|
155
|
-
ref: i.context.internalBackdropRef,
|
|
156
|
-
inert: N(!s)
|
|
157
|
-
}), e.children]
|
|
158
|
-
})
|
|
159
|
-
}) : null;
|
|
160
|
-
});
|
|
161
|
-
process.env.NODE_ENV !== "production" && (X.displayName = "DialogPortal");
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/root/useDialogRoot.js
|
|
164
|
-
function he(e) {
|
|
165
|
-
let { store: t, parentContext: n, actionsRef: i, isDrawer: a } = e, c = t.useState("open"), l = t.useState("disablePointerDismissal"), u = t.useState("modal"), d = t.useState("popupElement"), { openMethod: m, triggerProps: _ } = ee(c);
|
|
166
|
-
r(t);
|
|
167
|
-
let { forceUnmount: v } = y(c, t), b = B.useCallback(() => {
|
|
168
|
-
t.setOpen(!1, O(f));
|
|
169
|
-
}, [t]);
|
|
170
|
-
B.useImperativeHandle(i, () => ({
|
|
171
|
-
unmount: v,
|
|
172
|
-
close: b
|
|
173
|
-
}), [v, b]);
|
|
174
|
-
let x = s({
|
|
175
|
-
popupStore: t,
|
|
176
|
-
onOpenChange: t.setOpen,
|
|
177
|
-
treatPopupAsFloatingElement: !0
|
|
178
|
-
}), [S, C] = B.useState(0), [w, T] = B.useState(0), D = S === 0, k = p(x), A = E(x, {
|
|
179
|
-
outsidePressEvent() {
|
|
180
|
-
return t.context.internalBackdropRef.current || t.context.backdropRef.current ? "intentional" : {
|
|
181
|
-
mouse: u === "trap-focus" ? "sloppy" : "intentional",
|
|
182
|
-
touch: "sloppy"
|
|
183
|
-
};
|
|
184
|
-
},
|
|
185
|
-
outsidePress(e) {
|
|
186
|
-
if (!t.context.outsidePressEnabledRef.current || "button" in e && e.button !== 0 || "touches" in e && e.touches.length !== 1) return !1;
|
|
187
|
-
let n = h(e);
|
|
188
|
-
if (D && !l) {
|
|
189
|
-
let e = n;
|
|
190
|
-
return u && (t.context.internalBackdropRef.current || t.context.backdropRef.current) ? t.context.internalBackdropRef.current === e || t.context.backdropRef.current === e || o(e, d) && !e?.hasAttribute("data-base-ui-portal") : !0;
|
|
191
|
-
}
|
|
192
|
-
return !1;
|
|
193
|
-
},
|
|
194
|
-
escapeKey: D
|
|
195
|
-
});
|
|
196
|
-
te(c && u === !0, d);
|
|
197
|
-
let { getReferenceProps: j, getFloatingProps: M, getTriggerProps: N } = g([k, A]);
|
|
198
|
-
t.useContextCallback("onNestedDialogOpen", (e, t) => {
|
|
199
|
-
C(e), T(t);
|
|
200
|
-
}), t.useContextCallback("onNestedDialogClose", () => {
|
|
201
|
-
C(0), T(0);
|
|
202
|
-
}), B.useEffect(() => (n?.onNestedDialogOpen && c && n.onNestedDialogOpen(S + 1, w + +!!a), n?.onNestedDialogClose && !c && n.onNestedDialogClose(), () => {
|
|
203
|
-
n?.onNestedDialogClose && c && n.onNestedDialogClose();
|
|
204
|
-
}), [
|
|
205
|
-
a,
|
|
206
|
-
c,
|
|
207
|
-
S,
|
|
208
|
-
w,
|
|
209
|
-
n
|
|
210
|
-
]);
|
|
211
|
-
let P = B.useMemo(() => j(_), [j, _]), F = B.useMemo(() => N(_), [N, _]), I = B.useMemo(() => M(), [M]);
|
|
212
|
-
t.useSyncedValues({
|
|
213
|
-
openMethod: m,
|
|
214
|
-
activeTriggerProps: P,
|
|
215
|
-
inactiveTriggerProps: F,
|
|
216
|
-
popupProps: I,
|
|
217
|
-
floatingRootContext: x,
|
|
218
|
-
nestedOpenDialogCount: S,
|
|
219
|
-
nestedOpenDrawerCount: w
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
//#endregion
|
|
223
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/store/DialogStore.js
|
|
224
|
-
var ge = {
|
|
225
|
-
..._,
|
|
226
|
-
modal: S((e) => e.modal),
|
|
227
|
-
nested: S((e) => e.nested),
|
|
228
|
-
nestedOpenDialogCount: S((e) => e.nestedOpenDialogCount),
|
|
229
|
-
nestedOpenDrawerCount: S((e) => e.nestedOpenDrawerCount),
|
|
230
|
-
disablePointerDismissal: S((e) => e.disablePointerDismissal),
|
|
231
|
-
openMethod: S((e) => e.openMethod),
|
|
232
|
-
descriptionElementId: S((e) => e.descriptionElementId),
|
|
233
|
-
titleElementId: S((e) => e.titleElementId),
|
|
234
|
-
viewportElement: S((e) => e.viewportElement),
|
|
235
|
-
role: S((e) => e.role)
|
|
236
|
-
}, _e = class e extends b {
|
|
237
|
-
constructor(e) {
|
|
238
|
-
super(ve(e), {
|
|
239
|
-
popupRef: /*#__PURE__*/ B.createRef(),
|
|
240
|
-
backdropRef: /*#__PURE__*/ B.createRef(),
|
|
241
|
-
internalBackdropRef: /*#__PURE__*/ B.createRef(),
|
|
242
|
-
outsidePressEnabledRef: { current: !0 },
|
|
243
|
-
triggerElements: new F(),
|
|
244
|
-
onOpenChange: void 0,
|
|
245
|
-
onOpenChangeComplete: void 0
|
|
246
|
-
}, ge);
|
|
247
|
-
}
|
|
248
|
-
setOpen = (e, t) => {
|
|
249
|
-
if (t.preventUnmountOnClose = () => {
|
|
250
|
-
this.set("preventUnmountingOnClose", !0);
|
|
251
|
-
}, !e && t.trigger == null && this.state.activeTriggerId != null && (t.trigger = this.state.activeTriggerElement ?? void 0), this.context.onOpenChange?.(e, t), t.isCanceled) return;
|
|
252
|
-
this.state.floatingRootContext.dispatchOpenChange(e, t);
|
|
253
|
-
let n = { open: e }, r = t.trigger?.id ?? null;
|
|
254
|
-
(r || e) && (n.activeTriggerId = r, n.activeTriggerElement = t.trigger ?? null), this.update(n);
|
|
255
|
-
};
|
|
256
|
-
static useStore(t, n) {
|
|
257
|
-
let r = M(() => new e(n)).current;
|
|
258
|
-
return t ?? r;
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
function ve(e = {}) {
|
|
262
|
-
return {
|
|
263
|
-
...d(),
|
|
264
|
-
modal: !0,
|
|
265
|
-
disablePointerDismissal: !1,
|
|
266
|
-
popupElement: null,
|
|
267
|
-
viewportElement: null,
|
|
268
|
-
descriptionElementId: void 0,
|
|
269
|
-
titleElementId: void 0,
|
|
270
|
-
openMethod: null,
|
|
271
|
-
nested: !1,
|
|
272
|
-
nestedOpenDialogCount: 0,
|
|
273
|
-
nestedOpenDrawerCount: 0,
|
|
274
|
-
role: "dialog",
|
|
275
|
-
...e
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/root/DialogRoot.js
|
|
280
|
-
var Z = /*#__PURE__*/ B.createContext(!1);
|
|
281
|
-
process.env.NODE_ENV !== "production" && (Z.displayName = "IsDrawerContext");
|
|
282
|
-
function ye(e) {
|
|
283
|
-
let { children: t, open: n, defaultOpen: r = !1, onOpenChange: i, onOpenChangeComplete: a, disablePointerDismissal: o = !1, modal: s = !0, actionsRef: c, handle: l, triggerId: u, defaultTriggerId: d = null } = e, f = G(!0), p = B.useContext(Z), m = !!f, h = _e.useStore(l?.store, {
|
|
284
|
-
open: r,
|
|
285
|
-
openProp: n,
|
|
286
|
-
activeTriggerId: d,
|
|
287
|
-
triggerIdProp: u,
|
|
288
|
-
modal: s,
|
|
289
|
-
disablePointerDismissal: o,
|
|
290
|
-
nested: m
|
|
291
|
-
});
|
|
292
|
-
D(() => {
|
|
293
|
-
n === void 0 && h.state.open === !1 && r === !0 && h.update({
|
|
294
|
-
open: !0,
|
|
295
|
-
activeTriggerId: d
|
|
296
|
-
});
|
|
297
|
-
}), h.useControlledProp("openProp", n), h.useControlledProp("triggerIdProp", u), h.useSyncedValues({
|
|
298
|
-
disablePointerDismissal: o,
|
|
299
|
-
nested: m,
|
|
300
|
-
modal: s
|
|
301
|
-
}), h.useContextCallback("onOpenChange", i), h.useContextCallback("onOpenChangeComplete", a);
|
|
302
|
-
let g = h.useState("payload");
|
|
303
|
-
he({
|
|
304
|
-
store: h,
|
|
305
|
-
actionsRef: c,
|
|
306
|
-
parentContext: f?.store.context,
|
|
307
|
-
isDrawer: p,
|
|
308
|
-
onOpenChange: i,
|
|
309
|
-
triggerIdProp: u
|
|
310
|
-
});
|
|
311
|
-
let _ = B.useMemo(() => ({ store: h }), [h]);
|
|
312
|
-
return /*#__PURE__*/ H(Z.Provider, {
|
|
313
|
-
value: !1,
|
|
314
|
-
children: /*#__PURE__*/ H(W.Provider, {
|
|
315
|
-
value: _,
|
|
316
|
-
children: typeof t == "function" ? t({ payload: g }) : t
|
|
317
|
-
})
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
//#endregion
|
|
321
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/title/DialogTitle.js
|
|
322
|
-
var Q = /*#__PURE__*/ B.forwardRef(function(e, t) {
|
|
323
|
-
let { render: n, className: r, style: i, id: a, ...o } = e, { store: s } = G(), u = c(a);
|
|
324
|
-
return s.useSyncedValueWithCleanup("titleElementId", u), l("h2", e, {
|
|
325
|
-
ref: t,
|
|
326
|
-
props: [{ id: u }, o]
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
process.env.NODE_ENV !== "production" && (Q.displayName = "DialogTitle");
|
|
330
|
-
//#endregion
|
|
331
|
-
//#region src/ui/browser/dialog.tsx
|
|
332
|
-
function be(e) {
|
|
333
|
-
return /* @__PURE__ */ H(ye, {
|
|
334
|
-
"data-slot": "dialog",
|
|
335
|
-
...e
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
function xe(e) {
|
|
339
|
-
return /* @__PURE__ */ H(X, {
|
|
340
|
-
"data-slot": "dialog-portal",
|
|
341
|
-
...e
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
function $(e) {
|
|
345
|
-
return /* @__PURE__ */ H(q, {
|
|
346
|
-
"data-slot": "dialog-close",
|
|
347
|
-
...e
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
function Se({ className: e, ...t }) {
|
|
351
|
-
return /* @__PURE__ */ H(K, {
|
|
352
|
-
"data-slot": "dialog-overlay",
|
|
353
|
-
className: u("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),
|
|
354
|
-
...t
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
function Ce({ children: e, className: t, closeLabel: n = "Close", container: r, showCloseButton: a = !0, ...o }) {
|
|
358
|
-
return /* @__PURE__ */ U(xe, {
|
|
359
|
-
container: r,
|
|
360
|
-
children: [/* @__PURE__ */ H(Se, {}), /* @__PURE__ */ U(Y, {
|
|
361
|
-
"data-slot": "dialog-content",
|
|
362
|
-
className: u("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),
|
|
363
|
-
...o,
|
|
364
|
-
children: [e, a && /* @__PURE__ */ U(q, {
|
|
365
|
-
"data-slot": "dialog-close",
|
|
366
|
-
render: /* @__PURE__ */ H(i, {
|
|
367
|
-
className: "absolute top-2 right-2",
|
|
368
|
-
size: "icon-sm",
|
|
369
|
-
variant: "ghost"
|
|
370
|
-
}),
|
|
371
|
-
children: [/* @__PURE__ */ H(le, {}), /* @__PURE__ */ H("span", {
|
|
372
|
-
className: "sr-only",
|
|
373
|
-
children: n
|
|
374
|
-
})]
|
|
375
|
-
})]
|
|
376
|
-
})]
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
function we({ className: e, ...t }) {
|
|
380
|
-
return /* @__PURE__ */ H("div", {
|
|
381
|
-
"data-slot": "dialog-header",
|
|
382
|
-
className: u("flex flex-col gap-2", e),
|
|
383
|
-
...t
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
function Te({ className: e, ...t }) {
|
|
387
|
-
return /* @__PURE__ */ H("div", {
|
|
388
|
-
"data-slot": "dialog-footer",
|
|
389
|
-
className: u("-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),
|
|
390
|
-
...t
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
function Ee({ className: e, ...t }) {
|
|
394
|
-
return /* @__PURE__ */ H(Q, {
|
|
395
|
-
"data-slot": "dialog-title",
|
|
396
|
-
className: u("text-base leading-none font-medium", e),
|
|
397
|
-
...t
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
//#endregion
|
|
401
|
-
//#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
|
|
402
|
-
function De({ disabled: t, field: r, id: a, issue: o, label: s, name: c, onNameChange: l, onOpenChange: u, onSubmit: d, pending: f, title: p }) {
|
|
403
|
-
let m = e(), h = V(null), g = V(null), [_, v] = se(!1), y = c.length > 0 && o != null, b = m(y ? `resource.nameIssue.${o}` : "resource.nameHint", { max: 80 }), x = `${a}-message`, S = `${a}-option`;
|
|
404
|
-
return oe(() => v(!0), []), /* @__PURE__ */ U(ce, { children: [/* @__PURE__ */ H("div", { ref: g }), /* @__PURE__ */ H(be, {
|
|
405
|
-
onOpenChange: v,
|
|
406
|
-
onOpenChangeComplete: (e) => {
|
|
407
|
-
e || u(!1);
|
|
408
|
-
},
|
|
409
|
-
open: _,
|
|
410
|
-
children: /* @__PURE__ */ H(Ce, {
|
|
411
|
-
container: g.current,
|
|
412
|
-
initialFocus: () => h.current,
|
|
413
|
-
showCloseButton: !1,
|
|
414
|
-
children: /* @__PURE__ */ U("form", {
|
|
415
|
-
className: "flex flex-col gap-4",
|
|
416
|
-
onSubmit: d,
|
|
417
|
-
children: [
|
|
418
|
-
/* @__PURE__ */ U(we, {
|
|
419
|
-
className: "flex-row items-center justify-between",
|
|
420
|
-
children: [/* @__PURE__ */ H(Ee, { children: p }), /* @__PURE__ */ H($, {
|
|
421
|
-
"aria-label": m("common.cancel"),
|
|
422
|
-
render: /* @__PURE__ */ H(i, {
|
|
423
|
-
size: "icon-sm",
|
|
424
|
-
variant: "ghost"
|
|
425
|
-
}),
|
|
426
|
-
type: "button",
|
|
427
|
-
children: /* @__PURE__ */ H(re, { name: "close" })
|
|
428
|
-
})]
|
|
429
|
-
}),
|
|
430
|
-
/* @__PURE__ */ U(ie, {
|
|
431
|
-
className: "gap-4",
|
|
432
|
-
children: [/* @__PURE__ */ U(z, {
|
|
433
|
-
"data-invalid": y,
|
|
434
|
-
children: [
|
|
435
|
-
/* @__PURE__ */ H(R, {
|
|
436
|
-
htmlFor: a,
|
|
437
|
-
children: s
|
|
438
|
-
}),
|
|
439
|
-
/* @__PURE__ */ H(n, {
|
|
440
|
-
autoComplete: "off",
|
|
441
|
-
"aria-describedby": x,
|
|
442
|
-
"aria-invalid": y,
|
|
443
|
-
id: a,
|
|
444
|
-
name: "resource-name",
|
|
445
|
-
onChange: (e) => l(e.target.value),
|
|
446
|
-
ref: h,
|
|
447
|
-
required: !0,
|
|
448
|
-
value: c
|
|
449
|
-
}),
|
|
450
|
-
H(y ? ne : L, {
|
|
451
|
-
id: x,
|
|
452
|
-
children: b
|
|
453
|
-
})
|
|
454
|
-
]
|
|
455
|
-
}), r != null && /* @__PURE__ */ U(z, { children: [
|
|
456
|
-
/* @__PURE__ */ H(R, {
|
|
457
|
-
htmlFor: r.state == "ready" ? S : void 0,
|
|
458
|
-
children: r.label
|
|
459
|
-
}),
|
|
460
|
-
r.state == "ready" ? /* @__PURE__ */ H(ae, {
|
|
461
|
-
ariaLabel: r.ariaLabel,
|
|
462
|
-
className: "w-full",
|
|
463
|
-
id: S,
|
|
464
|
-
onValueChange: r.onValueChange,
|
|
465
|
-
options: r.options,
|
|
466
|
-
portalRoot: g.current,
|
|
467
|
-
value: r.value
|
|
468
|
-
}) : /* @__PURE__ */ U("div", {
|
|
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",
|
|
470
|
-
role: r.state == "error" ? "alert" : "status",
|
|
471
|
-
children: [
|
|
472
|
-
r.state == "loading" && /* @__PURE__ */ H(I, { "aria-hidden": "true" }),
|
|
473
|
-
/* @__PURE__ */ H("span", { children: r.status }),
|
|
474
|
-
r.state == "error" && /* @__PURE__ */ H(i, {
|
|
475
|
-
className: "ml-auto bg-background",
|
|
476
|
-
onClick: r.onRetry,
|
|
477
|
-
size: "sm",
|
|
478
|
-
type: "button",
|
|
479
|
-
variant: "outline",
|
|
480
|
-
children: r.retry
|
|
481
|
-
})
|
|
482
|
-
]
|
|
483
|
-
}),
|
|
484
|
-
/* @__PURE__ */ H(L, { children: r.description })
|
|
485
|
-
] })]
|
|
486
|
-
}),
|
|
487
|
-
/* @__PURE__ */ U(Te, {
|
|
488
|
-
className: "mx-0 mb-0 border-0 bg-transparent p-0 pt-1",
|
|
489
|
-
children: [/* @__PURE__ */ H($, {
|
|
490
|
-
render: /* @__PURE__ */ H(i, { variant: "outline" }),
|
|
491
|
-
type: "button",
|
|
492
|
-
children: m("common.cancel")
|
|
493
|
-
}), /* @__PURE__ */ H(i, {
|
|
494
|
-
disabled: t || f || o != null,
|
|
495
|
-
type: "submit",
|
|
496
|
-
children: m(f ? "common.creating" : "common.create")
|
|
497
|
-
})]
|
|
498
|
-
})
|
|
499
|
-
]
|
|
500
|
-
})
|
|
501
|
-
})
|
|
502
|
-
})] });
|
|
503
|
-
}
|
|
504
|
-
//#endregion
|
|
505
|
-
export { De as default };
|