@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.
- package/dist/browser/DesignerIcon-XKBRy_0Q.js +2066 -0
- package/dist/browser/{createResourceDialog-BkZns-oZ.js → createResourceDialog-Cf7QpXp6.js} +161 -160
- 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-C2UUqIUP.js → esm-xWDFFpGd.js} +5 -6
- package/dist/browser/flow-authoring-module.d.ts +2 -2
- package/dist/browser/flow-authoring-node.d.ts +5 -2
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +489 -209
- package/dist/browser/flow-change.d.ts +110 -9
- package/dist/browser/flow-change.js +319 -96
- package/dist/browser/flow-notifications.d.ts +5 -0
- package/dist/browser/{diagnostics-SDCyFuxm.js → flowChanges-CeMiiZIO.js} +4234 -3825
- package/dist/browser/{flowRunInputEditorStore-CwvOiIiU.js → flowRunInputEditorStore-DDidwd8h.js} +10 -2
- package/dist/browser/{flowWorkspace-BZ_eiQNR.js → flowWorkspace-VnS8nLMT.js} +35268 -35081
- package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-5LArT6Xc.js} +1827 -2322
- package/dist/browser/icons-CRxvozBE.js +726 -0
- package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-Bj2HDFRd.js} +256 -257
- package/dist/browser/waitNotificationInputs-ClCAEIAM.js +26 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -0
- package/dist/browser/workbench.js +851 -840
- package/dist/browser/{workbenchSelect-B2s1HV-Y.js → workbenchSelect-Cf1zlVm9.js} +479 -478
- package/dist/common/control-api-conformance.d.ts +1 -0
- package/dist/common/control-api-conformance.js +80 -19
- package/dist/common/control-api-errors.d.ts +4 -0
- package/dist/common/control-api.d.ts +26 -14
- package/dist/common/control-api.js +138 -89
- package/dist/common/flow-encoding.js +20 -8
- package/dist/common/flow-notifications.d.ts +5 -0
- package/dist/common/flow-semantics.d.ts +1 -0
- package/dist/common/flow-semantics.js +467 -381
- package/dist/common/run-events.js +2 -1
- package/dist/common/run-lifecycle.d.ts +17 -2
- package/dist/common/run-lifecycle.js +53 -2
- package/dist/common/scheduler.d.ts +64 -3
- package/dist/common/scheduler.js +417 -142
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/browser/dist-BpopSHwP.js +0 -1543
- package/dist/browser/dist-CUSrALSX.js +0 -1620
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { a as e } from "./main-DmjVyuWr.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
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 =
|
|
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" ?
|
|
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
|
-
...
|
|
25
|
-
...
|
|
25
|
+
...g,
|
|
26
|
+
...w
|
|
26
27
|
}, G = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
27
|
-
let { render: n, className: r, style: i, forceRender: a = !1, ...
|
|
28
|
-
open:
|
|
29
|
-
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
|
|
32
|
-
state:
|
|
33
|
-
ref: [
|
|
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: !
|
|
38
|
+
hidden: !d,
|
|
38
39
|
style: {
|
|
39
40
|
userSelect: "none",
|
|
40
41
|
WebkitUserSelect: "none"
|
|
41
42
|
}
|
|
42
|
-
},
|
|
43
|
-
enabled: a || !
|
|
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:
|
|
51
|
-
function
|
|
52
|
-
|
|
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:
|
|
55
|
+
let { getButtonProps: h, buttonRef: g } = p({
|
|
55
56
|
disabled: i,
|
|
56
57
|
native: a
|
|
57
58
|
});
|
|
58
|
-
return
|
|
59
|
+
return o("button", e, {
|
|
59
60
|
state: { disabled: i },
|
|
60
|
-
ref: [t,
|
|
61
|
+
ref: [t, g],
|
|
61
62
|
props: [
|
|
62
|
-
{ onClick:
|
|
63
|
-
|
|
64
|
-
|
|
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 =
|
|
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" ?
|
|
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
|
-
...
|
|
86
|
-
...
|
|
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:
|
|
92
|
-
me(),
|
|
93
|
-
open:
|
|
94
|
-
ref:
|
|
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
|
-
|
|
97
|
+
v && l.context.onOpenChangeComplete?.(!0);
|
|
97
98
|
}
|
|
98
99
|
});
|
|
99
|
-
function
|
|
100
|
-
return e !== "touch" ||
|
|
100
|
+
function w(e) {
|
|
101
|
+
return e !== "touch" || l.context.popupRef.current;
|
|
101
102
|
}
|
|
102
|
-
let
|
|
103
|
+
let T = i === void 0 ? w : i, E = o("div", e, {
|
|
103
104
|
state: {
|
|
104
|
-
open:
|
|
105
|
-
nested:
|
|
106
|
-
transitionStatus:
|
|
107
|
-
nestedDialogOpen:
|
|
105
|
+
open: v,
|
|
106
|
+
nested: g,
|
|
107
|
+
transitionStatus: x,
|
|
108
|
+
nestedDialogOpen: _ > 0
|
|
108
109
|
},
|
|
109
110
|
props: [
|
|
110
|
-
|
|
111
|
+
p,
|
|
111
112
|
{
|
|
112
|
-
"aria-labelledby":
|
|
113
|
-
"aria-describedby":
|
|
114
|
-
role:
|
|
113
|
+
"aria-labelledby": b ?? void 0,
|
|
114
|
+
"aria-describedby": u ?? void 0,
|
|
115
|
+
role: C,
|
|
115
116
|
tabIndex: -1,
|
|
116
|
-
hidden: !
|
|
117
|
+
hidden: !h,
|
|
117
118
|
onKeyDown(e) {
|
|
118
|
-
|
|
119
|
+
N.has(e.key) && e.stopPropagation();
|
|
119
120
|
},
|
|
120
|
-
style: { [fe.nestedDialogs]:
|
|
121
|
+
style: { [fe.nestedDialogs]: _ }
|
|
121
122
|
},
|
|
122
|
-
|
|
123
|
+
c
|
|
123
124
|
],
|
|
124
125
|
ref: [
|
|
125
126
|
t,
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
l.context.popupRef,
|
|
128
|
+
l.useStateSetter("popupElement")
|
|
128
129
|
],
|
|
129
130
|
stateAttributesMapping: he
|
|
130
131
|
});
|
|
131
|
-
return /*#__PURE__*/ B(
|
|
132
|
-
context:
|
|
133
|
-
openInteractionType:
|
|
134
|
-
disabled: !
|
|
135
|
-
closeOnFocusOut: !
|
|
136
|
-
initialFocus:
|
|
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:
|
|
139
|
+
modal: m !== !1,
|
|
139
140
|
restoreFocus: "popup",
|
|
140
|
-
children:
|
|
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(
|
|
151
|
+
children: /*#__PURE__*/ V(O, {
|
|
151
152
|
ref: t,
|
|
152
153
|
...r,
|
|
153
|
-
children: [a && o === !0 && /*#__PURE__*/ B(
|
|
154
|
+
children: [a && o === !0 && /*#__PURE__*/ B(C, {
|
|
154
155
|
ref: i.context.internalBackdropRef,
|
|
155
|
-
inert:
|
|
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:
|
|
165
|
-
t
|
|
166
|
-
let { forceUnmount:
|
|
167
|
-
|
|
168
|
-
}, [
|
|
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:
|
|
171
|
-
close:
|
|
172
|
-
}), [
|
|
173
|
-
let
|
|
174
|
-
popupStore:
|
|
175
|
-
onOpenChange:
|
|
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
|
-
}), [
|
|
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
|
|
180
|
-
mouse:
|
|
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 (!
|
|
186
|
-
let
|
|
187
|
-
if (D && !
|
|
188
|
-
let e =
|
|
189
|
-
return
|
|
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 &&
|
|
196
|
-
let { getReferenceProps: A, getFloatingProps: j, getTriggerProps: M } =
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}),
|
|
200
|
-
|
|
201
|
-
}), R.useEffect(() => (
|
|
202
|
-
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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
|
-
|
|
212
|
+
t.useSyncedValues({
|
|
212
213
|
openMethod: g,
|
|
213
214
|
activeTriggerProps: N,
|
|
214
215
|
inactiveTriggerProps: P,
|
|
215
216
|
popupProps: F,
|
|
216
|
-
floatingRootContext:
|
|
217
|
-
nestedOpenDialogCount:
|
|
218
|
-
nestedOpenDrawerCount:
|
|
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:
|
|
226
|
-
nested:
|
|
227
|
-
nestedOpenDialogCount:
|
|
228
|
-
nestedOpenDrawerCount:
|
|
229
|
-
disablePointerDismissal:
|
|
230
|
-
openMethod:
|
|
231
|
-
descriptionElementId:
|
|
232
|
-
titleElementId:
|
|
233
|
-
viewportElement:
|
|
234
|
-
role:
|
|
235
|
-
}, ve = class e extends
|
|
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
|
|
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 =
|
|
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
|
-
...
|
|
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
|
-
|
|
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:
|
|
323
|
-
return
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
402
|
-
let
|
|
403
|
-
return ce(() =>
|
|
404
|
-
onOpenChange:
|
|
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 ||
|
|
407
|
+
e || c(!1);
|
|
407
408
|
},
|
|
408
|
-
open:
|
|
409
|
+
open: h,
|
|
409
410
|
children: /* @__PURE__ */ B($, {
|
|
410
|
-
container:
|
|
411
|
-
initialFocus: () =>
|
|
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:
|
|
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:
|
|
420
|
-
"aria-label":
|
|
421
|
-
render: /* @__PURE__ */ B(
|
|
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(
|
|
427
|
+
children: /* @__PURE__ */ B(ae, { name: "close" })
|
|
427
428
|
})]
|
|
428
429
|
}),
|
|
429
|
-
/* @__PURE__ */ V(
|
|
430
|
+
/* @__PURE__ */ V(re, {
|
|
430
431
|
className: "gap-4",
|
|
431
|
-
children: [/* @__PURE__ */ V(
|
|
432
|
-
"data-invalid":
|
|
432
|
+
children: [/* @__PURE__ */ V(F, {
|
|
433
|
+
"data-invalid": _,
|
|
433
434
|
children: [
|
|
434
|
-
/* @__PURE__ */ B(
|
|
435
|
+
/* @__PURE__ */ B(I, {
|
|
435
436
|
htmlFor: r,
|
|
436
|
-
children:
|
|
437
|
+
children: a
|
|
437
438
|
}),
|
|
438
|
-
/* @__PURE__ */ B(
|
|
439
|
+
/* @__PURE__ */ B(D, {
|
|
439
440
|
autoComplete: "off",
|
|
440
|
-
"aria-describedby":
|
|
441
|
-
"aria-invalid":
|
|
441
|
+
"aria-describedby": b,
|
|
442
|
+
"aria-invalid": _,
|
|
442
443
|
id: r,
|
|
443
444
|
name: "resource-name",
|
|
444
|
-
onChange: (e) =>
|
|
445
|
-
ref:
|
|
445
|
+
onChange: (e) => s(e.target.value),
|
|
446
|
+
ref: p,
|
|
446
447
|
required: !0,
|
|
447
|
-
value:
|
|
448
|
+
value: o
|
|
448
449
|
}),
|
|
449
|
-
B(
|
|
450
|
-
id:
|
|
451
|
-
children:
|
|
450
|
+
B(_ ? oe : L, {
|
|
451
|
+
id: b,
|
|
452
|
+
children: v
|
|
452
453
|
})
|
|
453
454
|
]
|
|
454
|
-
}), n != null && /* @__PURE__ */ V(
|
|
455
|
-
/* @__PURE__ */ B(
|
|
456
|
-
htmlFor: n.state == "ready" ?
|
|
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:
|
|
463
|
+
id: x,
|
|
463
464
|
onValueChange: n.onValueChange,
|
|
464
465
|
options: n.options,
|
|
465
|
-
portalRoot:
|
|
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(
|
|
472
|
+
n.state == "loading" && /* @__PURE__ */ B(ie, { "aria-hidden": "true" }),
|
|
472
473
|
/* @__PURE__ */ B("span", { children: n.status }),
|
|
473
|
-
n.state == "error" && /* @__PURE__ */ B(
|
|
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(
|
|
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(
|
|
490
|
+
render: /* @__PURE__ */ B(y, { variant: "outline" }),
|
|
490
491
|
type: "button",
|
|
491
|
-
children:
|
|
492
|
-
}), /* @__PURE__ */ B(
|
|
493
|
-
disabled: t ||
|
|
492
|
+
children: f("common.cancel")
|
|
493
|
+
}), /* @__PURE__ */ B(y, {
|
|
494
|
+
disabled: t || u || i != null,
|
|
494
495
|
type: "submit",
|
|
495
|
-
children:
|
|
496
|
+
children: f(u ? "common.creating" : "common.create")
|
|
496
497
|
})]
|
|
497
498
|
})
|
|
498
499
|
]
|