superleap-code-editor 1.0.6 → 1.0.7
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/components/layout/editorLayout.d.ts +2 -1
- package/dist/components/layout/editorLayout.d.ts.map +1 -1
- package/dist/components/layout/sidebar.d.ts +2 -1
- package/dist/components/layout/sidebar.d.ts.map +1 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +383 -380
- package/dist/types/fileTypes.d.ts +7 -0
- package/dist/types/fileTypes.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { Alert as
|
|
5
|
-
import { IconFolderOpen as
|
|
6
|
-
var
|
|
1
|
+
import se, { useState as I, useCallback as z, useEffect as Pe, useMemo as Ct } from "react";
|
|
2
|
+
import Ft from "@monaco-editor/react";
|
|
3
|
+
import { Tooltip as Oe, Button as ne, Splitter as O, Alert as Rt, Tree as _t } from "antd";
|
|
4
|
+
import { Alert as yr, Button as jr, Splitter as wr, Tooltip as Er, Tree as Nr } from "antd";
|
|
5
|
+
import { IconFolderOpen as Ae, IconDatabase as ze, IconCode as $e, IconHistory as Le, IconFlask as Tt, IconSettings as Me, IconPlus as St, IconFile as Pt, IconEyeOff as Ot, IconEye as It, IconPlayerPlay as Be, IconDownload as kt, IconDeviceFloppy as Dt, IconSearch as Ve, IconChevronRight as At, IconBook as zt, IconRefresh as $t, IconAlertTriangle as Lt, IconCircleCheck as Mt, IconCircleX as Bt, IconUser as Vt, IconClock as Wt, IconRotate as Yt } from "@tabler/icons-react";
|
|
6
|
+
var H = { exports: {} }, L = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,21 +13,21 @@ var q = { exports: {} }, $ = {};
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
var
|
|
16
|
+
var Ie;
|
|
17
|
+
function Ut() {
|
|
18
|
+
if (Ie) return L;
|
|
19
|
+
Ie = 1;
|
|
20
|
+
var i = se, r = Symbol.for("react.element"), s = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, c = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
21
|
function y(w, x, N) {
|
|
22
|
-
var d, E = {}, C = null,
|
|
23
|
-
N !== void 0 && (C = "" + N), x.key !== void 0 && (C = "" + x.key), x.ref !== void 0 && (
|
|
24
|
-
for (d in x)
|
|
22
|
+
var d, E = {}, C = null, T = null;
|
|
23
|
+
N !== void 0 && (C = "" + N), x.key !== void 0 && (C = "" + x.key), x.ref !== void 0 && (T = x.ref);
|
|
24
|
+
for (d in x) o.call(x, d) && !g.hasOwnProperty(d) && (E[d] = x[d]);
|
|
25
25
|
if (w && w.defaultProps) for (d in x = w.defaultProps, x) E[d] === void 0 && (E[d] = x[d]);
|
|
26
|
-
return { $$typeof: r, type: w, key: C, ref:
|
|
26
|
+
return { $$typeof: r, type: w, key: C, ref: T, props: E, _owner: c.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return L.Fragment = s, L.jsx = y, L.jsxs = y, L;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var M = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -37,25 +37,25 @@ var L = {};
|
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
var
|
|
44
|
-
function
|
|
40
|
+
var ke;
|
|
41
|
+
function qt() {
|
|
42
|
+
return ke || (ke = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
43
|
+
var i = se, r = Symbol.for("react.element"), s = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), w = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), B = Symbol.iterator, J = "@@iterator";
|
|
44
|
+
function G(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var n =
|
|
47
|
+
var n = B && e[B] || e[J];
|
|
48
48
|
return typeof n == "function" ? n : null;
|
|
49
49
|
}
|
|
50
|
-
var v =
|
|
50
|
+
var v = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
51
|
function h(e) {
|
|
52
52
|
{
|
|
53
53
|
for (var n = arguments.length, a = new Array(n > 1 ? n - 1 : 0), l = 1; l < n; l++)
|
|
54
54
|
a[l - 1] = arguments[l];
|
|
55
|
-
|
|
55
|
+
qe("error", e, a);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function qe(e, n, a) {
|
|
59
59
|
{
|
|
60
60
|
var l = v.ReactDebugCurrentFrame, m = l.getStackAddendum();
|
|
61
61
|
m !== "" && (n += "%s", a = a.concat([m]));
|
|
@@ -65,26 +65,26 @@ function Ut() {
|
|
|
65
65
|
p.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, p);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
68
|
+
var He = !1, Je = !1, Ge = !1, Ke = !1, Xe = !1, ie;
|
|
69
|
+
ie = Symbol.for("react.module.reference");
|
|
70
|
+
function Ze(e) {
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === o || e === g || Xe || e === c || e === N || e === d || Ke || e === T || He || Je || Ge || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === E || e.$$typeof === y || e.$$typeof === w || e.$$typeof === x || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
|
-
e.$$typeof ===
|
|
75
|
+
e.$$typeof === ie || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Qe(e, n, a) {
|
|
78
78
|
var l = e.displayName;
|
|
79
79
|
if (l)
|
|
80
80
|
return l;
|
|
81
81
|
var m = n.displayName || n.name || "";
|
|
82
82
|
return m !== "" ? a + "(" + m + ")" : a;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function oe(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function S(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
90
|
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -92,7 +92,7 @@ function Ut() {
|
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
94
94
|
switch (e) {
|
|
95
|
-
case
|
|
95
|
+
case o:
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case s:
|
|
98
98
|
return "Portal";
|
|
@@ -109,19 +109,19 @@ function Ut() {
|
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
110
|
case w:
|
|
111
111
|
var n = e;
|
|
112
|
-
return
|
|
112
|
+
return oe(n) + ".Consumer";
|
|
113
113
|
case y:
|
|
114
114
|
var a = e;
|
|
115
|
-
return
|
|
115
|
+
return oe(a._context) + ".Provider";
|
|
116
116
|
case x:
|
|
117
|
-
return
|
|
117
|
+
return Qe(e, e.render, "ForwardRef");
|
|
118
118
|
case E:
|
|
119
119
|
var l = e.displayName || null;
|
|
120
|
-
return l !== null ? l :
|
|
120
|
+
return l !== null ? l : S(e.type) || "Memo";
|
|
121
121
|
case C: {
|
|
122
122
|
var m = e, p = m._payload, f = m._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return S(f(p));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,18 +129,18 @@ function Ut() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var P = Object.assign,
|
|
133
|
-
function
|
|
132
|
+
var P = Object.assign, $ = 0, le, ce, de, ue, fe, me, he;
|
|
133
|
+
function pe() {
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
function
|
|
135
|
+
pe.__reactDisabledLog = !0;
|
|
136
|
+
function et() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if ($ === 0) {
|
|
139
|
+
le = console.log, ce = console.info, de = console.warn, ue = console.error, fe = console.group, me = console.groupCollapsed, he = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: pe,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -153,12 +153,12 @@ function Ut() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
$++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function tt() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if ($--, $ === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
@@ -166,52 +166,52 @@ function Ut() {
|
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
168
|
log: P({}, e, {
|
|
169
|
-
value:
|
|
169
|
+
value: le
|
|
170
170
|
}),
|
|
171
171
|
info: P({}, e, {
|
|
172
|
-
value:
|
|
172
|
+
value: ce
|
|
173
173
|
}),
|
|
174
174
|
warn: P({}, e, {
|
|
175
|
-
value:
|
|
175
|
+
value: de
|
|
176
176
|
}),
|
|
177
177
|
error: P({}, e, {
|
|
178
|
-
value:
|
|
178
|
+
value: ue
|
|
179
179
|
}),
|
|
180
180
|
group: P({}, e, {
|
|
181
|
-
value:
|
|
181
|
+
value: fe
|
|
182
182
|
}),
|
|
183
183
|
groupCollapsed: P({}, e, {
|
|
184
|
-
value:
|
|
184
|
+
value: me
|
|
185
185
|
}),
|
|
186
186
|
groupEnd: P({}, e, {
|
|
187
|
-
value:
|
|
187
|
+
value: he
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
$ < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var K = v.ReactCurrentDispatcher, X;
|
|
195
|
+
function V(e, n, a) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (X === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
200
|
} catch (m) {
|
|
201
201
|
var l = m.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
-
|
|
202
|
+
X = l && l[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + X + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var Z = !1, W;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
W = new
|
|
210
|
+
var rt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
W = new rt();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
213
|
+
function xe(e, n) {
|
|
214
|
+
if (!e || Z)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
217
|
var a = W.get(e);
|
|
@@ -219,11 +219,11 @@ function Ut() {
|
|
|
219
219
|
return a;
|
|
220
220
|
}
|
|
221
221
|
var l;
|
|
222
|
-
|
|
222
|
+
Z = !0;
|
|
223
223
|
var m = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
225
|
var p;
|
|
226
|
-
p =
|
|
226
|
+
p = K.current, K.current = null, et();
|
|
227
227
|
try {
|
|
228
228
|
if (n) {
|
|
229
229
|
var f = function() {
|
|
@@ -259,144 +259,144 @@ function Ut() {
|
|
|
259
259
|
} catch (_) {
|
|
260
260
|
if (_ && l && typeof _.stack == "string") {
|
|
261
261
|
for (var u = _.stack.split(`
|
|
262
|
-
`),
|
|
263
|
-
`), b = u.length - 1, j =
|
|
262
|
+
`), F = l.stack.split(`
|
|
263
|
+
`), b = u.length - 1, j = F.length - 1; b >= 1 && j >= 0 && u[b] !== F[j]; )
|
|
264
264
|
j--;
|
|
265
265
|
for (; b >= 1 && j >= 0; b--, j--)
|
|
266
|
-
if (u[b] !==
|
|
266
|
+
if (u[b] !== F[j]) {
|
|
267
267
|
if (b !== 1 || j !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (b--, j--, j < 0 || u[b] !==
|
|
270
|
-
var
|
|
269
|
+
if (b--, j--, j < 0 || u[b] !== F[j]) {
|
|
270
|
+
var R = `
|
|
271
271
|
` + u[b].replace(" at new ", " at ");
|
|
272
|
-
return e.displayName &&
|
|
272
|
+
return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && W.set(e, R), R;
|
|
273
273
|
}
|
|
274
274
|
while (b >= 1 && j >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
Z = !1, K.current = p, tt(), Error.prepareStackTrace = m;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
281
|
+
var A = e ? e.displayName || e.name : "", Se = A ? V(A) : "";
|
|
282
282
|
return typeof e == "function" && W.set(e, Se), Se;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
284
|
+
function nt(e, n, a) {
|
|
285
|
+
return xe(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function st(e) {
|
|
288
288
|
var n = e.prototype;
|
|
289
289
|
return !!(n && n.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Y(e, n, a) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return xe(e, st(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return V(e);
|
|
298
298
|
switch (e) {
|
|
299
299
|
case N:
|
|
300
|
-
return
|
|
300
|
+
return V("Suspense");
|
|
301
301
|
case d:
|
|
302
|
-
return
|
|
302
|
+
return V("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
306
|
case x:
|
|
307
|
-
return
|
|
307
|
+
return nt(e.render);
|
|
308
308
|
case E:
|
|
309
|
-
return
|
|
309
|
+
return Y(e.type, n, a);
|
|
310
310
|
case C: {
|
|
311
311
|
var l = e, m = l._payload, p = l._init;
|
|
312
312
|
try {
|
|
313
|
-
return
|
|
313
|
+
return Y(p(m), n, a);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var U = Object.prototype.hasOwnProperty, ve = {}, ge = v.ReactDebugCurrentFrame;
|
|
321
|
+
function q(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var n = e._owner, a =
|
|
324
|
-
|
|
323
|
+
var n = e._owner, a = Y(e.type, e._source, n ? n.type : null);
|
|
324
|
+
ge.setExtraStackFrame(a);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
ge.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function at(e, n, a, l, m) {
|
|
329
329
|
{
|
|
330
|
-
var p = Function.call.bind(
|
|
330
|
+
var p = Function.call.bind(U);
|
|
331
331
|
for (var f in e)
|
|
332
332
|
if (p(e, f)) {
|
|
333
333
|
var u = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof e[f] != "function") {
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
336
|
+
var F = Error((l || "React class") + ": " + a + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw F.name = "Invariant Violation", F;
|
|
338
338
|
}
|
|
339
339
|
u = e[f](n, f, l, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
340
|
} catch (b) {
|
|
341
341
|
u = b;
|
|
342
342
|
}
|
|
343
|
-
u && !(u instanceof Error) && (
|
|
343
|
+
u && !(u instanceof Error) && (q(m), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", a, f, typeof u), q(null)), u instanceof Error && !(u.message in ve) && (ve[u.message] = !0, q(m), h("Failed %s type: %s", a, u.message), q(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
return
|
|
347
|
+
var it = Array.isArray;
|
|
348
|
+
function Q(e) {
|
|
349
|
+
return it(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ot(e) {
|
|
352
352
|
{
|
|
353
353
|
var n = typeof Symbol == "function" && Symbol.toStringTag, a = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
354
|
return a;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function lt(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return be(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function be(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
367
|
+
function ye(e) {
|
|
368
|
+
if (lt(e))
|
|
369
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ot(e)), be(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var je = v.ReactCurrentOwner, ct = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
376
|
+
}, we, Ee;
|
|
377
|
+
function dt(e) {
|
|
378
|
+
if (U.call(e, "ref")) {
|
|
379
379
|
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
380
380
|
if (n && n.isReactWarning)
|
|
381
381
|
return !1;
|
|
382
382
|
}
|
|
383
383
|
return e.ref !== void 0;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
385
|
+
function ut(e) {
|
|
386
|
+
if (U.call(e, "key")) {
|
|
387
387
|
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
388
388
|
if (n && n.isReactWarning)
|
|
389
389
|
return !1;
|
|
390
390
|
}
|
|
391
391
|
return e.key !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function ut(e, n) {
|
|
394
|
-
typeof e.ref == "string" && ye.current;
|
|
395
|
-
}
|
|
396
393
|
function ft(e, n) {
|
|
394
|
+
typeof e.ref == "string" && je.current;
|
|
395
|
+
}
|
|
396
|
+
function mt(e, n) {
|
|
397
397
|
{
|
|
398
398
|
var a = function() {
|
|
399
|
-
|
|
399
|
+
we || (we = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
400
400
|
};
|
|
401
401
|
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
402
402
|
get: a,
|
|
@@ -404,10 +404,10 @@ function Ut() {
|
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function ht(e, n) {
|
|
408
408
|
{
|
|
409
409
|
var a = function() {
|
|
410
|
-
|
|
410
|
+
Ee || (Ee = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
411
411
|
};
|
|
412
412
|
a.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
413
413
|
get: a,
|
|
@@ -415,7 +415,7 @@ function Ut() {
|
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var
|
|
418
|
+
var pt = function(e, n, a, l, m, p, f) {
|
|
419
419
|
var u = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
421
|
$$typeof: r,
|
|
@@ -444,41 +444,41 @@ function Ut() {
|
|
|
444
444
|
value: m
|
|
445
445
|
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
446
446
|
};
|
|
447
|
-
function
|
|
447
|
+
function xt(e, n, a, l, m) {
|
|
448
448
|
{
|
|
449
|
-
var p, f = {}, u = null,
|
|
450
|
-
a !== void 0 && (
|
|
449
|
+
var p, f = {}, u = null, F = null;
|
|
450
|
+
a !== void 0 && (ye(a), u = "" + a), ut(n) && (ye(n.key), u = "" + n.key), dt(n) && (F = n.ref, ft(n, m));
|
|
451
451
|
for (p in n)
|
|
452
|
-
|
|
452
|
+
U.call(n, p) && !ct.hasOwnProperty(p) && (f[p] = n[p]);
|
|
453
453
|
if (e && e.defaultProps) {
|
|
454
454
|
var b = e.defaultProps;
|
|
455
455
|
for (p in b)
|
|
456
456
|
f[p] === void 0 && (f[p] = b[p]);
|
|
457
457
|
}
|
|
458
|
-
if (u ||
|
|
458
|
+
if (u || F) {
|
|
459
459
|
var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
460
|
-
u &&
|
|
460
|
+
u && mt(f, j), F && ht(f, j);
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return pt(e, u, F, m, l, je.current, f);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var
|
|
466
|
-
function
|
|
465
|
+
var ee = v.ReactCurrentOwner, Ne = v.ReactDebugCurrentFrame;
|
|
466
|
+
function D(e) {
|
|
467
467
|
if (e) {
|
|
468
|
-
var n = e._owner, a =
|
|
469
|
-
|
|
468
|
+
var n = e._owner, a = Y(e.type, e._source, n ? n.type : null);
|
|
469
|
+
Ne.setExtraStackFrame(a);
|
|
470
470
|
} else
|
|
471
|
-
|
|
471
|
+
Ne.setExtraStackFrame(null);
|
|
472
472
|
}
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
-
function
|
|
473
|
+
var te;
|
|
474
|
+
te = !1;
|
|
475
|
+
function re(e) {
|
|
476
476
|
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Ce() {
|
|
479
479
|
{
|
|
480
|
-
if (
|
|
481
|
-
var e =
|
|
480
|
+
if (ee.current) {
|
|
481
|
+
var e = S(ee.current.type);
|
|
482
482
|
if (e)
|
|
483
483
|
return `
|
|
484
484
|
|
|
@@ -487,13 +487,13 @@ Check the render method of \`` + e + "`.";
|
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function vt(e) {
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
|
-
var
|
|
494
|
-
function
|
|
493
|
+
var Fe = {};
|
|
494
|
+
function gt(e) {
|
|
495
495
|
{
|
|
496
|
-
var n =
|
|
496
|
+
var n = Ce();
|
|
497
497
|
if (!n) {
|
|
498
498
|
var a = typeof e == "string" ? e : e.displayName || e.name;
|
|
499
499
|
a && (n = `
|
|
@@ -508,34 +508,34 @@ Check the top-level render call using <` + a + ">.");
|
|
|
508
508
|
if (!e._store || e._store.validated || e.key != null)
|
|
509
509
|
return;
|
|
510
510
|
e._store.validated = !0;
|
|
511
|
-
var a =
|
|
512
|
-
if (
|
|
511
|
+
var a = gt(n);
|
|
512
|
+
if (Fe[a])
|
|
513
513
|
return;
|
|
514
|
-
|
|
514
|
+
Fe[a] = !0;
|
|
515
515
|
var l = "";
|
|
516
|
-
e && e._owner && e._owner !==
|
|
516
|
+
e && e._owner && e._owner !== ee.current && (l = " It was passed a child from " + S(e._owner.type) + "."), D(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, l), D(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function _e(e, n) {
|
|
520
520
|
{
|
|
521
521
|
if (typeof e != "object")
|
|
522
522
|
return;
|
|
523
|
-
if (
|
|
523
|
+
if (Q(e))
|
|
524
524
|
for (var a = 0; a < e.length; a++) {
|
|
525
525
|
var l = e[a];
|
|
526
|
-
|
|
526
|
+
re(l) && Re(l, n);
|
|
527
527
|
}
|
|
528
|
-
else if (
|
|
528
|
+
else if (re(e))
|
|
529
529
|
e._store && (e._store.validated = !0);
|
|
530
530
|
else if (e) {
|
|
531
|
-
var m =
|
|
531
|
+
var m = G(e);
|
|
532
532
|
if (typeof m == "function" && m !== e.entries)
|
|
533
533
|
for (var p = m.call(e), f; !(f = p.next()).done; )
|
|
534
|
-
|
|
534
|
+
re(f.value) && Re(f.value, n);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function bt(e) {
|
|
539
539
|
{
|
|
540
540
|
var n = e.type;
|
|
541
541
|
if (n == null || typeof n == "string")
|
|
@@ -550,79 +550,79 @@ Check the top-level render call using <` + a + ">.");
|
|
|
550
550
|
else
|
|
551
551
|
return;
|
|
552
552
|
if (a) {
|
|
553
|
-
var l =
|
|
554
|
-
|
|
555
|
-
} else if (n.PropTypes !== void 0 && !
|
|
556
|
-
|
|
557
|
-
var m =
|
|
553
|
+
var l = S(n);
|
|
554
|
+
at(a, e.props, "prop", l, e);
|
|
555
|
+
} else if (n.PropTypes !== void 0 && !te) {
|
|
556
|
+
te = !0;
|
|
557
|
+
var m = S(n);
|
|
558
558
|
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
|
|
559
559
|
}
|
|
560
560
|
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function yt(e) {
|
|
564
564
|
{
|
|
565
565
|
for (var n = Object.keys(e.props), a = 0; a < n.length; a++) {
|
|
566
566
|
var l = n[a];
|
|
567
567
|
if (l !== "children" && l !== "key") {
|
|
568
|
-
|
|
568
|
+
D(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), D(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
e.ref !== null && (
|
|
572
|
+
e.ref !== null && (D(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Te(e, n, a, l, m, p) {
|
|
576
576
|
{
|
|
577
|
-
var f =
|
|
577
|
+
var f = Ze(e);
|
|
578
578
|
if (!f) {
|
|
579
579
|
var u = "";
|
|
580
580
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
581
|
-
var
|
|
582
|
-
|
|
581
|
+
var F = vt();
|
|
582
|
+
F ? u += F : u += Ce();
|
|
583
583
|
var b;
|
|
584
|
-
e === null ? b = "null" :
|
|
584
|
+
e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === r ? (b = "<" + (S(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, u);
|
|
585
585
|
}
|
|
586
|
-
var j =
|
|
586
|
+
var j = xt(e, n, a, m, p);
|
|
587
587
|
if (j == null)
|
|
588
588
|
return j;
|
|
589
589
|
if (f) {
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
590
|
+
var R = n.children;
|
|
591
|
+
if (R !== void 0)
|
|
592
592
|
if (l)
|
|
593
|
-
if (
|
|
594
|
-
for (var
|
|
595
|
-
|
|
596
|
-
Object.freeze && Object.freeze(
|
|
593
|
+
if (Q(R)) {
|
|
594
|
+
for (var A = 0; A < R.length; A++)
|
|
595
|
+
_e(R[A], e);
|
|
596
|
+
Object.freeze && Object.freeze(R);
|
|
597
597
|
} else
|
|
598
598
|
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
599
599
|
else
|
|
600
|
-
|
|
600
|
+
_e(R, e);
|
|
601
601
|
}
|
|
602
|
-
return e ===
|
|
602
|
+
return e === o ? yt(j) : bt(j), j;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function yt(e, n, a) {
|
|
606
|
-
return _e(e, n, a, !0);
|
|
607
|
-
}
|
|
608
605
|
function jt(e, n, a) {
|
|
609
|
-
return
|
|
606
|
+
return Te(e, n, a, !0);
|
|
610
607
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
608
|
+
function wt(e, n, a) {
|
|
609
|
+
return Te(e, n, a, !1);
|
|
610
|
+
}
|
|
611
|
+
var Et = wt, Nt = jt;
|
|
612
|
+
M.Fragment = o, M.jsx = Et, M.jsxs = Nt;
|
|
613
|
+
})()), M;
|
|
614
614
|
}
|
|
615
|
-
var
|
|
616
|
-
function
|
|
617
|
-
return
|
|
615
|
+
var De;
|
|
616
|
+
function Ht() {
|
|
617
|
+
return De || (De = 1, process.env.NODE_ENV === "production" ? H.exports = Ut() : H.exports = qt()), H.exports;
|
|
618
618
|
}
|
|
619
|
-
var t =
|
|
620
|
-
function
|
|
621
|
-
const [r, s] = I([]), [
|
|
619
|
+
var t = Ht();
|
|
620
|
+
function Jt(i) {
|
|
621
|
+
const [r, s] = I([]), [o, c] = I(null), [g, y] = I(""), [w, x] = I(!1), [N, d] = I(null), E = z(async () => {
|
|
622
622
|
try {
|
|
623
623
|
x(!0), d(null);
|
|
624
|
-
const v = await
|
|
625
|
-
if (s(v), !
|
|
624
|
+
const v = await i.getFiles();
|
|
625
|
+
if (s(v), !o && v.length > 0) {
|
|
626
626
|
const h = We(v);
|
|
627
627
|
h && c(h.id);
|
|
628
628
|
}
|
|
@@ -631,11 +631,11 @@ function Ht(o) {
|
|
|
631
631
|
} finally {
|
|
632
632
|
x(!1);
|
|
633
633
|
}
|
|
634
|
-
}, [
|
|
634
|
+
}, [i, o]), C = z(
|
|
635
635
|
async (v) => {
|
|
636
636
|
try {
|
|
637
637
|
x(!0), d(null);
|
|
638
|
-
const h = await
|
|
638
|
+
const h = await i.getFileContent(v);
|
|
639
639
|
y(h);
|
|
640
640
|
} catch (h) {
|
|
641
641
|
d(
|
|
@@ -645,13 +645,13 @@ function Ht(o) {
|
|
|
645
645
|
x(!1);
|
|
646
646
|
}
|
|
647
647
|
},
|
|
648
|
-
[
|
|
649
|
-
),
|
|
648
|
+
[i]
|
|
649
|
+
), T = z(
|
|
650
650
|
async (v) => {
|
|
651
|
-
if (
|
|
651
|
+
if (o)
|
|
652
652
|
try {
|
|
653
|
-
d(null), await
|
|
654
|
-
(h) =>
|
|
653
|
+
d(null), await i.updateFileContent(o, v), y(v), s(
|
|
654
|
+
(h) => Ue(h, o, { content: v })
|
|
655
655
|
);
|
|
656
656
|
} catch (h) {
|
|
657
657
|
d(
|
|
@@ -659,36 +659,36 @@ function Ht(o) {
|
|
|
659
659
|
);
|
|
660
660
|
}
|
|
661
661
|
},
|
|
662
|
-
[
|
|
663
|
-
),
|
|
662
|
+
[o, i]
|
|
663
|
+
), B = z(
|
|
664
664
|
(v) => {
|
|
665
665
|
c(v), C(v);
|
|
666
666
|
},
|
|
667
667
|
[C]
|
|
668
|
-
),
|
|
668
|
+
), J = z(() => {
|
|
669
669
|
E();
|
|
670
|
-
}, [E]),
|
|
671
|
-
(v) =>
|
|
670
|
+
}, [E]), G = z(
|
|
671
|
+
(v) => Ye(r, v),
|
|
672
672
|
[r]
|
|
673
673
|
);
|
|
674
|
-
return
|
|
674
|
+
return Pe(() => {
|
|
675
675
|
E();
|
|
676
|
-
}, [E]),
|
|
677
|
-
|
|
678
|
-
}, [
|
|
676
|
+
}, [E]), Pe(() => {
|
|
677
|
+
o && C(o);
|
|
678
|
+
}, [o, C]), {
|
|
679
679
|
files: r,
|
|
680
|
-
activeFile:
|
|
680
|
+
activeFile: o,
|
|
681
681
|
fileContent: g,
|
|
682
682
|
loading: w,
|
|
683
683
|
error: N,
|
|
684
|
-
setActiveFile:
|
|
685
|
-
updateFileContent:
|
|
686
|
-
refreshFiles:
|
|
687
|
-
getFileById:
|
|
684
|
+
setActiveFile: B,
|
|
685
|
+
updateFileContent: T,
|
|
686
|
+
refreshFiles: J,
|
|
687
|
+
getFileById: G
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
function We(
|
|
691
|
-
for (const r of
|
|
690
|
+
function We(i) {
|
|
691
|
+
for (const r of i) {
|
|
692
692
|
if (r.type === "file")
|
|
693
693
|
return r;
|
|
694
694
|
if (r.children) {
|
|
@@ -698,23 +698,23 @@ function We(o) {
|
|
|
698
698
|
}
|
|
699
699
|
return null;
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
for (const s of
|
|
701
|
+
function Ye(i, r) {
|
|
702
|
+
for (const s of i) {
|
|
703
703
|
if (s.id === r) return s;
|
|
704
704
|
if (s.children) {
|
|
705
|
-
const
|
|
706
|
-
if (
|
|
705
|
+
const o = Ye(s.children, r);
|
|
706
|
+
if (o) return o;
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
return null;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
712
|
-
return
|
|
713
|
-
...
|
|
714
|
-
children:
|
|
715
|
-
} :
|
|
711
|
+
function Ue(i, r, s) {
|
|
712
|
+
return i.map((o) => o.id === r ? { ...o, ...s } : o.children ? {
|
|
713
|
+
...o,
|
|
714
|
+
children: Ue(o.children, r, s)
|
|
715
|
+
} : o);
|
|
716
716
|
}
|
|
717
|
-
class
|
|
717
|
+
class Gt {
|
|
718
718
|
config;
|
|
719
719
|
files = [];
|
|
720
720
|
constructor(r) {
|
|
@@ -732,8 +732,8 @@ class Jt {
|
|
|
732
732
|
throw new Error(`File ${r} not found`);
|
|
733
733
|
}
|
|
734
734
|
async updateFileContent(r, s) {
|
|
735
|
-
const
|
|
736
|
-
|
|
735
|
+
const o = this.findFileById(r);
|
|
736
|
+
o && (o.content = s), console.log(`Updated file ${r} with content:`, s);
|
|
737
737
|
}
|
|
738
738
|
async getFileMetadata(r) {
|
|
739
739
|
return this.findFileById(r)?.metadata || {};
|
|
@@ -768,8 +768,8 @@ class Jt {
|
|
|
768
768
|
];
|
|
769
769
|
}
|
|
770
770
|
findFileById(r) {
|
|
771
|
-
const s = (
|
|
772
|
-
for (const c of
|
|
771
|
+
const s = (o) => {
|
|
772
|
+
for (const c of o) {
|
|
773
773
|
if (c.id === r) return c;
|
|
774
774
|
if (c.children) {
|
|
775
775
|
const g = s(c.children);
|
|
@@ -781,7 +781,7 @@ class Jt {
|
|
|
781
781
|
return s(this.files);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
class
|
|
784
|
+
class Kt {
|
|
785
785
|
config;
|
|
786
786
|
files = [];
|
|
787
787
|
constructor(r) {
|
|
@@ -798,8 +798,8 @@ class Gt {
|
|
|
798
798
|
async updateFileContent(r, s) {
|
|
799
799
|
if (r === "form-code") {
|
|
800
800
|
this.config.codeContent = s;
|
|
801
|
-
const
|
|
802
|
-
|
|
801
|
+
const o = this.files.find((c) => c.id === r);
|
|
802
|
+
o && (o.content = s);
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
async getFileMetadata(r) {
|
|
@@ -824,7 +824,7 @@ class Gt {
|
|
|
824
824
|
return this.files.find((s) => s.id === r) || null;
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
|
-
class
|
|
827
|
+
class Xt {
|
|
828
828
|
config;
|
|
829
829
|
files = [];
|
|
830
830
|
constructor(r) {
|
|
@@ -838,18 +838,18 @@ class Kt {
|
|
|
838
838
|
if (!s || !s.metadata?.url)
|
|
839
839
|
throw new Error(`File ${r} not found`);
|
|
840
840
|
try {
|
|
841
|
-
const
|
|
842
|
-
if (!
|
|
843
|
-
throw new Error(`Failed to fetch file: ${
|
|
844
|
-
return await
|
|
845
|
-
} catch (
|
|
846
|
-
throw new Error(`Error fetching file content: ${
|
|
841
|
+
const o = await fetch(s.metadata.url);
|
|
842
|
+
if (!o.ok)
|
|
843
|
+
throw new Error(`Failed to fetch file: ${o.statusText}`);
|
|
844
|
+
return await o.text();
|
|
845
|
+
} catch (o) {
|
|
846
|
+
throw new Error(`Error fetching file content: ${o}`);
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
async updateFileContent(r, s) {
|
|
850
850
|
console.log(`Would save file ${r} content to backend:`, s);
|
|
851
|
-
const
|
|
852
|
-
|
|
851
|
+
const o = this.findFileById(r);
|
|
852
|
+
o && (o.content = s);
|
|
853
853
|
}
|
|
854
854
|
async getFileMetadata(r) {
|
|
855
855
|
return this.findFileById(r)?.metadata || {};
|
|
@@ -871,20 +871,20 @@ class Kt {
|
|
|
871
871
|
return this.files.find((s) => s.id === r) || null;
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
if (
|
|
876
|
-
return new
|
|
877
|
-
if (
|
|
878
|
-
return new
|
|
879
|
-
if (
|
|
880
|
-
return new
|
|
874
|
+
function Zt(i) {
|
|
875
|
+
if (i.workflowConfig)
|
|
876
|
+
return new Gt(i.workflowConfig);
|
|
877
|
+
if (i.formConfig)
|
|
878
|
+
return new Kt(i.formConfig);
|
|
879
|
+
if (i.urlConfig)
|
|
880
|
+
return new Xt(i.urlConfig);
|
|
881
881
|
throw new Error("No valid configuration provided");
|
|
882
882
|
}
|
|
883
|
-
const
|
|
884
|
-
value:
|
|
883
|
+
const Qt = ({
|
|
884
|
+
value: i,
|
|
885
885
|
onChange: r,
|
|
886
886
|
language: s = "javascript",
|
|
887
|
-
filename:
|
|
887
|
+
filename: o,
|
|
888
888
|
readOnly: c = !1,
|
|
889
889
|
loading: g = !1
|
|
890
890
|
}) => {
|
|
@@ -892,11 +892,11 @@ const Zt = ({
|
|
|
892
892
|
w !== void 0 && r(w);
|
|
893
893
|
};
|
|
894
894
|
return /* @__PURE__ */ t.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ t.jsx(
|
|
895
|
-
|
|
895
|
+
Ft,
|
|
896
896
|
{
|
|
897
897
|
height: "100%",
|
|
898
898
|
defaultLanguage: s,
|
|
899
|
-
defaultValue:
|
|
899
|
+
defaultValue: i,
|
|
900
900
|
onChange: y,
|
|
901
901
|
theme: "vs-light",
|
|
902
902
|
options: {
|
|
@@ -914,67 +914,69 @@ const Zt = ({
|
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
) });
|
|
917
|
-
}
|
|
917
|
+
};
|
|
918
|
+
var k = /* @__PURE__ */ ((i) => (i.Explorer = "explorer", i.Data = "data", i.Functions = "functions", i.Versions = "versions", i.Tests = "tests", i))(k || {});
|
|
919
|
+
const er = [
|
|
918
920
|
{
|
|
919
|
-
id:
|
|
920
|
-
icon:
|
|
921
|
+
id: k.Explorer,
|
|
922
|
+
icon: Ae,
|
|
921
923
|
label: "Files"
|
|
922
924
|
},
|
|
923
925
|
{
|
|
924
|
-
id:
|
|
925
|
-
icon:
|
|
926
|
+
id: k.Data,
|
|
927
|
+
icon: ze,
|
|
926
928
|
label: "Data"
|
|
927
929
|
},
|
|
928
930
|
{
|
|
929
|
-
id:
|
|
930
|
-
icon:
|
|
931
|
+
id: k.Functions,
|
|
932
|
+
icon: $e,
|
|
931
933
|
label: "Functions"
|
|
932
934
|
},
|
|
933
935
|
{
|
|
934
|
-
id:
|
|
935
|
-
icon:
|
|
936
|
+
id: k.Versions,
|
|
937
|
+
icon: Le,
|
|
936
938
|
label: "Versions"
|
|
937
939
|
},
|
|
938
940
|
{
|
|
939
|
-
id:
|
|
940
|
-
icon:
|
|
941
|
+
id: k.Tests,
|
|
942
|
+
icon: Tt,
|
|
941
943
|
label: "Tests"
|
|
942
944
|
}
|
|
943
|
-
],
|
|
944
|
-
activePanel:
|
|
945
|
+
], tr = ({
|
|
946
|
+
activePanel: i,
|
|
945
947
|
setActivePanel: r,
|
|
946
948
|
allowedPannels: s
|
|
947
949
|
}) => {
|
|
948
|
-
const
|
|
949
|
-
() =>
|
|
950
|
+
const o = Ct(
|
|
951
|
+
() => er.filter((c) => s.includes(c.id)),
|
|
950
952
|
[s]
|
|
951
953
|
);
|
|
952
954
|
return /* @__PURE__ */ t.jsxs("div", { className: "w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4", children: [
|
|
953
|
-
|
|
955
|
+
o.map((c) => {
|
|
954
956
|
const g = c.icon;
|
|
955
|
-
return /* @__PURE__ */ t.jsx(
|
|
956
|
-
|
|
957
|
+
return /* @__PURE__ */ t.jsx(Oe, { title: c.label, placement: "right", children: /* @__PURE__ */ t.jsx(
|
|
958
|
+
ne,
|
|
957
959
|
{
|
|
958
|
-
type:
|
|
960
|
+
type: i === c.id ? "primary" : "text",
|
|
959
961
|
icon: /* @__PURE__ */ t.jsx(g, { size: 16 }),
|
|
960
962
|
onClick: () => r(c.id)
|
|
961
963
|
}
|
|
962
964
|
) }, c.id);
|
|
963
965
|
}),
|
|
964
|
-
/* @__PURE__ */ t.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ t.jsx(
|
|
966
|
+
/* @__PURE__ */ t.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ t.jsx(Oe, { title: "Settings", placement: "right", children: /* @__PURE__ */ t.jsx(ne, { type: "text", icon: /* @__PURE__ */ t.jsx(Me, { size: 20 }) }) }) })
|
|
965
967
|
] });
|
|
966
|
-
},
|
|
967
|
-
leftPanel:
|
|
968
|
+
}, rr = ({
|
|
969
|
+
leftPanel: i,
|
|
968
970
|
editor: r,
|
|
969
971
|
rightPanel: s,
|
|
970
|
-
activePanel:
|
|
972
|
+
activePanel: o,
|
|
971
973
|
setActivePanel: c,
|
|
972
|
-
allowedPannels: g = [
|
|
974
|
+
allowedPannels: g = [k.Explorer]
|
|
973
975
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
974
976
|
/* @__PURE__ */ t.jsx(
|
|
975
|
-
|
|
977
|
+
tr,
|
|
976
978
|
{
|
|
977
|
-
activePanel:
|
|
979
|
+
activePanel: o,
|
|
978
980
|
setActivePanel: c,
|
|
979
981
|
allowedPannels: g
|
|
980
982
|
}
|
|
@@ -993,7 +995,7 @@ const Zt = ({
|
|
|
993
995
|
max: "40%",
|
|
994
996
|
className: "bg-white border-r border-slate-200",
|
|
995
997
|
collapsible: !0,
|
|
996
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children:
|
|
998
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children: i })
|
|
997
999
|
}
|
|
998
1000
|
),
|
|
999
1001
|
/* @__PURE__ */ t.jsx(O.Panel, { defaultSize: "50%", min: "30%", children: r }),
|
|
@@ -1017,39 +1019,39 @@ const Zt = ({
|
|
|
1017
1019
|
min: "15%",
|
|
1018
1020
|
max: "40%",
|
|
1019
1021
|
className: "bg-white border-r border-slate-200",
|
|
1020
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children:
|
|
1022
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children: i })
|
|
1021
1023
|
}
|
|
1022
1024
|
),
|
|
1023
1025
|
/* @__PURE__ */ t.jsx(O.Panel, { defaultSize: "75%", min: "60%", children: r })
|
|
1024
1026
|
] }) })
|
|
1025
|
-
] }),
|
|
1026
|
-
files:
|
|
1027
|
+
] }), nr = ({
|
|
1028
|
+
files: i,
|
|
1027
1029
|
activeFile: r,
|
|
1028
1030
|
onFileSelect: s,
|
|
1029
|
-
loading:
|
|
1031
|
+
loading: o = !1,
|
|
1030
1032
|
error: c = null,
|
|
1031
1033
|
onRefresh: g
|
|
1032
1034
|
}) => {
|
|
1033
1035
|
const y = (N) => N.map((d) => ({
|
|
1034
1036
|
title: d.name,
|
|
1035
1037
|
key: d.id,
|
|
1036
|
-
icon: d.type === "file" ? /* @__PURE__ */ t.jsx(
|
|
1038
|
+
icon: d.type === "file" ? /* @__PURE__ */ t.jsx(Pt, { size: 16, className: "text-slate-500 flex" }) : /* @__PURE__ */ t.jsx(Ae, { size: 16, className: "text-slate-500 flex" }),
|
|
1037
1039
|
isLeaf: d.type === "file",
|
|
1038
1040
|
children: d.children ? y(d.children) : void 0,
|
|
1039
1041
|
metadata: d.metadata
|
|
1040
|
-
})), w = y(
|
|
1042
|
+
})), w = y(i), x = (N, d) => {
|
|
1041
1043
|
d?.node.isLeaf && d.node.key && s(d.node.key);
|
|
1042
1044
|
};
|
|
1043
1045
|
return /* @__PURE__ */ t.jsxs("div", { className: "h-full", children: [
|
|
1044
1046
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1045
1047
|
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Files" }),
|
|
1046
1048
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-2", children: g && /* @__PURE__ */ t.jsx(
|
|
1047
|
-
|
|
1049
|
+
ne,
|
|
1048
1050
|
{
|
|
1049
1051
|
type: "text",
|
|
1050
1052
|
icon: /* @__PURE__ */ t.jsx(St, { size: 16 }),
|
|
1051
1053
|
onClick: g,
|
|
1052
|
-
loading:
|
|
1054
|
+
loading: o,
|
|
1053
1055
|
title: "Refresh files"
|
|
1054
1056
|
}
|
|
1055
1057
|
) })
|
|
@@ -1065,7 +1067,7 @@ const Zt = ({
|
|
|
1065
1067
|
}
|
|
1066
1068
|
),
|
|
1067
1069
|
/* @__PURE__ */ t.jsx(
|
|
1068
|
-
|
|
1070
|
+
_t,
|
|
1069
1071
|
{
|
|
1070
1072
|
treeData: w,
|
|
1071
1073
|
onSelect: x,
|
|
@@ -1078,17 +1080,17 @@ const Zt = ({
|
|
|
1078
1080
|
)
|
|
1079
1081
|
] })
|
|
1080
1082
|
] });
|
|
1081
|
-
},
|
|
1082
|
-
config:
|
|
1083
|
+
}, ae = ({
|
|
1084
|
+
config: i,
|
|
1083
1085
|
rightPanel: r = !1
|
|
1084
1086
|
}) => {
|
|
1085
|
-
const s =
|
|
1086
|
-
() =>
|
|
1087
|
-
[
|
|
1087
|
+
const s = se.useMemo(
|
|
1088
|
+
() => Zt(i),
|
|
1089
|
+
[i]
|
|
1088
1090
|
);
|
|
1089
|
-
console.log({ config:
|
|
1091
|
+
console.log({ config: i });
|
|
1090
1092
|
const {
|
|
1091
|
-
files:
|
|
1093
|
+
files: o,
|
|
1092
1094
|
activeFile: c,
|
|
1093
1095
|
fileContent: g,
|
|
1094
1096
|
loading: y,
|
|
@@ -1097,14 +1099,14 @@ const Zt = ({
|
|
|
1097
1099
|
updateFileContent: N,
|
|
1098
1100
|
refreshFiles: d,
|
|
1099
1101
|
getFileById: E
|
|
1100
|
-
} =
|
|
1102
|
+
} = Jt(s), C = c ? E(c) : null, T = C?.metadata?.language || "javascript";
|
|
1101
1103
|
return /* @__PURE__ */ t.jsx(
|
|
1102
|
-
|
|
1104
|
+
rr,
|
|
1103
1105
|
{
|
|
1104
1106
|
leftPanel: /* @__PURE__ */ t.jsx(
|
|
1105
|
-
|
|
1107
|
+
nr,
|
|
1106
1108
|
{
|
|
1107
|
-
files:
|
|
1109
|
+
files: o,
|
|
1108
1110
|
activeFile: c,
|
|
1109
1111
|
onFileSelect: x,
|
|
1110
1112
|
loading: y,
|
|
@@ -1113,13 +1115,13 @@ const Zt = ({
|
|
|
1113
1115
|
}
|
|
1114
1116
|
),
|
|
1115
1117
|
editor: /* @__PURE__ */ t.jsx(
|
|
1116
|
-
|
|
1118
|
+
Qt,
|
|
1117
1119
|
{
|
|
1118
1120
|
value: g,
|
|
1119
1121
|
onChange: N,
|
|
1120
|
-
language:
|
|
1122
|
+
language: T,
|
|
1121
1123
|
filename: C?.name,
|
|
1122
|
-
readOnly:
|
|
1124
|
+
readOnly: i.settings?.readOnly,
|
|
1123
1125
|
loading: y
|
|
1124
1126
|
}
|
|
1125
1127
|
),
|
|
@@ -1129,55 +1131,55 @@ const Zt = ({
|
|
|
1129
1131
|
}
|
|
1130
1132
|
}
|
|
1131
1133
|
);
|
|
1132
|
-
},
|
|
1133
|
-
functionId:
|
|
1134
|
+
}, lr = ({
|
|
1135
|
+
functionId: i,
|
|
1134
1136
|
version: r,
|
|
1135
1137
|
versionList: s,
|
|
1136
|
-
fetchFunction:
|
|
1138
|
+
fetchFunction: o,
|
|
1137
1139
|
fetchVersionList: c
|
|
1138
1140
|
}) => {
|
|
1139
1141
|
const g = {
|
|
1140
1142
|
workflowConfig: {
|
|
1141
|
-
functionId:
|
|
1143
|
+
functionId: i,
|
|
1142
1144
|
version: r,
|
|
1143
1145
|
versionList: s,
|
|
1144
|
-
fetchFunction:
|
|
1146
|
+
fetchFunction: o,
|
|
1145
1147
|
fetchVersionList: c
|
|
1146
1148
|
}
|
|
1147
1149
|
};
|
|
1148
|
-
return /* @__PURE__ */ t.jsx(
|
|
1149
|
-
},
|
|
1150
|
-
codeContent:
|
|
1150
|
+
return /* @__PURE__ */ t.jsx(ae, { config: g });
|
|
1151
|
+
}, cr = ({
|
|
1152
|
+
codeContent: i,
|
|
1151
1153
|
fileName: r = "code.js",
|
|
1152
1154
|
language: s = "javascript",
|
|
1153
|
-
readOnly:
|
|
1155
|
+
readOnly: o = !1
|
|
1154
1156
|
}) => {
|
|
1155
1157
|
const c = {
|
|
1156
1158
|
formConfig: {
|
|
1157
|
-
codeContent:
|
|
1159
|
+
codeContent: i,
|
|
1158
1160
|
fileName: r,
|
|
1159
1161
|
language: s
|
|
1160
1162
|
},
|
|
1161
1163
|
settings: {
|
|
1162
|
-
readOnly:
|
|
1164
|
+
readOnly: o
|
|
1163
1165
|
}
|
|
1164
1166
|
};
|
|
1165
|
-
return /* @__PURE__ */ t.jsx(
|
|
1166
|
-
},
|
|
1167
|
+
return /* @__PURE__ */ t.jsx(ae, { config: c });
|
|
1168
|
+
}, dr = ({ fileUrls: i, rightPanel: r }) => {
|
|
1167
1169
|
const s = {
|
|
1168
1170
|
urlConfig: {
|
|
1169
|
-
fileUrls:
|
|
1171
|
+
fileUrls: i
|
|
1170
1172
|
}
|
|
1171
1173
|
};
|
|
1172
|
-
return /* @__PURE__ */ t.jsx(
|
|
1173
|
-
},
|
|
1174
|
-
activeFile:
|
|
1174
|
+
return /* @__PURE__ */ t.jsx(ae, { config: s, rightPanel: r });
|
|
1175
|
+
}, ur = ({
|
|
1176
|
+
activeFile: i,
|
|
1175
1177
|
showPreview: r,
|
|
1176
1178
|
setShowPreview: s
|
|
1177
1179
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "h-14 border-b border-slate-200 bg-white px-4 flex items-center justify-between", children: [
|
|
1178
1180
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1179
1181
|
/* @__PURE__ */ t.jsx("h1", { className: "text-lg font-semibold text-slate-900 mr-4", children: "CRM Code Editor" }),
|
|
1180
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-sm text-slate-500 px-2 py-1 bg-slate-100 rounded-md", children:
|
|
1182
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm text-slate-500 px-2 py-1 bg-slate-100 rounded-md", children: i })
|
|
1181
1183
|
] }),
|
|
1182
1184
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1183
1185
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1186,7 +1188,7 @@ const Zt = ({
|
|
|
1186
1188
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1187
1189
|
onClick: () => s(!r),
|
|
1188
1190
|
title: r ? "Hide Preview" : "Show Preview",
|
|
1189
|
-
children: r ? /* @__PURE__ */ t.jsx(
|
|
1191
|
+
children: r ? /* @__PURE__ */ t.jsx(Ot, { size: 18 }) : /* @__PURE__ */ t.jsx(It, { size: 18 })
|
|
1190
1192
|
}
|
|
1191
1193
|
),
|
|
1192
1194
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1194,7 +1196,7 @@ const Zt = ({
|
|
|
1194
1196
|
{
|
|
1195
1197
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1196
1198
|
title: "Version History",
|
|
1197
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1199
|
+
children: /* @__PURE__ */ t.jsx(Le, { size: 18 })
|
|
1198
1200
|
}
|
|
1199
1201
|
),
|
|
1200
1202
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1202,7 +1204,7 @@ const Zt = ({
|
|
|
1202
1204
|
{
|
|
1203
1205
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1204
1206
|
title: "Run Code",
|
|
1205
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1207
|
+
children: /* @__PURE__ */ t.jsx(Be, { size: 18 })
|
|
1206
1208
|
}
|
|
1207
1209
|
),
|
|
1208
1210
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1210,11 +1212,11 @@ const Zt = ({
|
|
|
1210
1212
|
{
|
|
1211
1213
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1212
1214
|
title: "Export",
|
|
1213
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1215
|
+
children: /* @__PURE__ */ t.jsx(kt, { size: 18 })
|
|
1214
1216
|
}
|
|
1215
1217
|
),
|
|
1216
1218
|
/* @__PURE__ */ t.jsxs("button", { className: "ml-2 px-3 py-1.5 bg-slate-900 text-white rounded-md flex items-center text-sm hover:bg-slate-800", children: [
|
|
1217
|
-
/* @__PURE__ */ t.jsx(
|
|
1219
|
+
/* @__PURE__ */ t.jsx(Dt, { size: 16, className: "mr-1.5" }),
|
|
1218
1220
|
" Save"
|
|
1219
1221
|
] }),
|
|
1220
1222
|
/* @__PURE__ */ t.jsxs("div", { className: "ml-2 px-3 py-1.5 bg-emerald-100 text-emerald-800 rounded-md flex items-center text-sm", children: [
|
|
@@ -1223,8 +1225,8 @@ const Zt = ({
|
|
|
1223
1225
|
"Draft"
|
|
1224
1226
|
] })
|
|
1225
1227
|
] })
|
|
1226
|
-
] }),
|
|
1227
|
-
const
|
|
1228
|
+
] }), fr = () => {
|
|
1229
|
+
const i = [
|
|
1228
1230
|
{
|
|
1229
1231
|
name: "Lead",
|
|
1230
1232
|
fields: ["id", "name", "email", "phone", "status", "createdAt"],
|
|
@@ -1251,7 +1253,7 @@ const Zt = ({
|
|
|
1251
1253
|
/* @__PURE__ */ t.jsxs("div", { className: "p-3", children: [
|
|
1252
1254
|
/* @__PURE__ */ t.jsxs("div", { className: "relative mb-3", children: [
|
|
1253
1255
|
/* @__PURE__ */ t.jsx(
|
|
1254
|
-
|
|
1256
|
+
Ve,
|
|
1255
1257
|
{
|
|
1256
1258
|
size: 16,
|
|
1257
1259
|
className: "absolute left-2.5 top-2.5 text-slate-400"
|
|
@@ -1266,16 +1268,16 @@ const Zt = ({
|
|
|
1266
1268
|
}
|
|
1267
1269
|
)
|
|
1268
1270
|
] }),
|
|
1269
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1271
|
+
/* @__PURE__ */ t.jsx("div", { children: i.map((r) => /* @__PURE__ */ t.jsxs("div", { className: "mb-1", children: [
|
|
1270
1272
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center p-2 hover:bg-slate-50 rounded-md cursor-pointer", children: [
|
|
1271
1273
|
/* @__PURE__ */ t.jsx(
|
|
1272
|
-
|
|
1274
|
+
At,
|
|
1273
1275
|
{
|
|
1274
1276
|
size: 16,
|
|
1275
1277
|
className: `mr-1 text-slate-400 transition-transform ${r.expanded ? "rotate-90" : ""}`
|
|
1276
1278
|
}
|
|
1277
1279
|
),
|
|
1278
|
-
/* @__PURE__ */ t.jsx(
|
|
1280
|
+
/* @__PURE__ */ t.jsx(ze, { size: 16, className: "mr-2 text-slate-500" }),
|
|
1279
1281
|
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: r.name })
|
|
1280
1282
|
] }),
|
|
1281
1283
|
r.expanded && /* @__PURE__ */ t.jsx("div", { className: "ml-7 border-l border-slate-200 pl-2", children: r.fields.map((s) => /* @__PURE__ */ t.jsx(
|
|
@@ -1289,8 +1291,8 @@ const Zt = ({
|
|
|
1289
1291
|
] }, r.name)) })
|
|
1290
1292
|
] })
|
|
1291
1293
|
] });
|
|
1292
|
-
},
|
|
1293
|
-
const
|
|
1294
|
+
}, mr = () => {
|
|
1295
|
+
const i = [
|
|
1294
1296
|
{
|
|
1295
1297
|
name: "formatCurrency",
|
|
1296
1298
|
description: "Format a number as currency",
|
|
@@ -1327,7 +1329,7 @@ const Zt = ({
|
|
|
1327
1329
|
/* @__PURE__ */ t.jsxs("div", { className: "p-3", children: [
|
|
1328
1330
|
/* @__PURE__ */ t.jsxs("div", { className: "relative mb-3", children: [
|
|
1329
1331
|
/* @__PURE__ */ t.jsx(
|
|
1330
|
-
|
|
1332
|
+
Ve,
|
|
1331
1333
|
{
|
|
1332
1334
|
size: 16,
|
|
1333
1335
|
className: "absolute left-2.5 top-2.5 text-slate-400"
|
|
@@ -1342,14 +1344,14 @@ const Zt = ({
|
|
|
1342
1344
|
}
|
|
1343
1345
|
)
|
|
1344
1346
|
] }),
|
|
1345
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1347
|
+
/* @__PURE__ */ t.jsx("div", { children: i.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1346
1348
|
"div",
|
|
1347
1349
|
{
|
|
1348
1350
|
className: "p-2 border border-slate-200 rounded-md mb-2 hover:bg-slate-50 cursor-pointer",
|
|
1349
1351
|
children: [
|
|
1350
1352
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1351
1353
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1352
|
-
/* @__PURE__ */ t.jsx(
|
|
1354
|
+
/* @__PURE__ */ t.jsx($e, { size: 16, className: "mr-2 text-slate-500" }),
|
|
1353
1355
|
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: r.name })
|
|
1354
1356
|
] }),
|
|
1355
1357
|
/* @__PURE__ */ t.jsx("span", { className: "text-xs bg-slate-100 px-2 py-0.5 rounded text-slate-600", children: r.category })
|
|
@@ -1360,16 +1362,16 @@ const Zt = ({
|
|
|
1360
1362
|
r.name
|
|
1361
1363
|
)) }),
|
|
1362
1364
|
/* @__PURE__ */ t.jsxs("div", { className: "mt-4 p-3 bg-slate-50 rounded-md border border-slate-200 flex items-center", children: [
|
|
1363
|
-
/* @__PURE__ */ t.jsx(
|
|
1365
|
+
/* @__PURE__ */ t.jsx(zt, { size: 16, className: "text-slate-500 mr-2" }),
|
|
1364
1366
|
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-slate-600", children: "Browse documentation for more functions and examples" })
|
|
1365
1367
|
] })
|
|
1366
1368
|
] })
|
|
1367
1369
|
] });
|
|
1368
|
-
},
|
|
1369
|
-
const [r, s] = I(null), [
|
|
1370
|
+
}, hr = ({ code: i }) => {
|
|
1371
|
+
const [r, s] = I(null), [o, c] = I(!1), g = "body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; padding: 1rem; }", w = ((d) => d.replace(
|
|
1370
1372
|
/import\s+.*axios.*from\s+['"]axios['"];?/g,
|
|
1371
1373
|
"// Axios imports removed for preview"
|
|
1372
|
-
).replace(/axios\./g, "/* axios. */").replace(/fetch\(/g, "/* fetch( */"))(
|
|
1374
|
+
).replace(/axios\./g, "/* axios. */").replace(/fetch\(/g, "/* fetch( */"))(i), x = `
|
|
1373
1375
|
<!DOCTYPE html>
|
|
1374
1376
|
<html>
|
|
1375
1377
|
<head>
|
|
@@ -1409,12 +1411,12 @@ const Zt = ({
|
|
|
1409
1411
|
{
|
|
1410
1412
|
className: "p-1 hover:bg-slate-100 rounded-md",
|
|
1411
1413
|
onClick: N,
|
|
1412
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1414
|
+
children: /* @__PURE__ */ t.jsx($t, { size: 16, className: o ? "animate-spin" : "" })
|
|
1413
1415
|
}
|
|
1414
1416
|
)
|
|
1415
1417
|
] }),
|
|
1416
1418
|
/* @__PURE__ */ t.jsx("div", { className: "flex-1 bg-white overflow-auto", children: r ? /* @__PURE__ */ t.jsxs("div", { className: "p-4 bg-red-50 border border-red-200 rounded-md flex items-start", children: [
|
|
1417
|
-
/* @__PURE__ */ t.jsx(
|
|
1419
|
+
/* @__PURE__ */ t.jsx(Lt, { size: 16, className: "text-red-500 mr-2 mt-0.5" }),
|
|
1418
1420
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1419
1421
|
/* @__PURE__ */ t.jsx("p", { className: "text-sm font-medium text-red-800", children: "Preview Error" }),
|
|
1420
1422
|
/* @__PURE__ */ t.jsx("p", { className: "text-xs text-red-600", children: r })
|
|
@@ -1430,8 +1432,8 @@ const Zt = ({
|
|
|
1430
1432
|
}
|
|
1431
1433
|
) })
|
|
1432
1434
|
] });
|
|
1433
|
-
},
|
|
1434
|
-
const
|
|
1435
|
+
}, pr = () => {
|
|
1436
|
+
const i = [
|
|
1435
1437
|
{
|
|
1436
1438
|
id: "1",
|
|
1437
1439
|
name: "Should format currency correctly",
|
|
@@ -1462,9 +1464,9 @@ const Zt = ({
|
|
|
1462
1464
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1463
1465
|
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Test Runner" }),
|
|
1464
1466
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1465
|
-
/* @__PURE__ */ t.jsx("button", { className: "p-1 hover:bg-slate-100 rounded-md mr-1", children: /* @__PURE__ */ t.jsx(
|
|
1467
|
+
/* @__PURE__ */ t.jsx("button", { className: "p-1 hover:bg-slate-100 rounded-md mr-1", children: /* @__PURE__ */ t.jsx(Me, { size: 14 }) }),
|
|
1466
1468
|
/* @__PURE__ */ t.jsxs("button", { className: "bg-slate-900 text-white text-xs px-2 py-1 rounded-md flex items-center", children: [
|
|
1467
|
-
/* @__PURE__ */ t.jsx(
|
|
1469
|
+
/* @__PURE__ */ t.jsx(Be, { size: 12, className: "mr-1" }),
|
|
1468
1470
|
" Run Tests"
|
|
1469
1471
|
] })
|
|
1470
1472
|
] })
|
|
@@ -1485,7 +1487,7 @@ const Zt = ({
|
|
|
1485
1487
|
}
|
|
1486
1488
|
) })
|
|
1487
1489
|
] }),
|
|
1488
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1490
|
+
/* @__PURE__ */ t.jsx("div", { children: i.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1489
1491
|
"div",
|
|
1490
1492
|
{
|
|
1491
1493
|
className: `p-2 mb-2 rounded-md ${r.status === "failed" ? "bg-red-50 border border-red-100" : "bg-slate-50 border border-slate-200"}`,
|
|
@@ -1493,12 +1495,12 @@ const Zt = ({
|
|
|
1493
1495
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1494
1496
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1495
1497
|
r.status === "passed" ? /* @__PURE__ */ t.jsx(
|
|
1496
|
-
|
|
1498
|
+
Mt,
|
|
1497
1499
|
{
|
|
1498
1500
|
size: 16,
|
|
1499
1501
|
className: "text-emerald-500 mr-2"
|
|
1500
1502
|
}
|
|
1501
|
-
) : /* @__PURE__ */ t.jsx(
|
|
1503
|
+
) : /* @__PURE__ */ t.jsx(Bt, { size: 16, className: "text-red-500 mr-2" }),
|
|
1502
1504
|
/* @__PURE__ */ t.jsx("span", { className: "text-sm", children: r.name })
|
|
1503
1505
|
] }),
|
|
1504
1506
|
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-slate-500", children: r.duration })
|
|
@@ -1511,8 +1513,8 @@ const Zt = ({
|
|
|
1511
1513
|
/* @__PURE__ */ t.jsx("div", { className: "mt-4", children: /* @__PURE__ */ t.jsx("button", { className: "w-full py-2 border border-dashed border-slate-300 rounded-md text-sm text-slate-500 hover:bg-slate-50", children: "+ Add New Test Case" }) })
|
|
1512
1514
|
] })
|
|
1513
1515
|
] });
|
|
1514
|
-
},
|
|
1515
|
-
const
|
|
1516
|
+
}, xr = () => {
|
|
1517
|
+
const i = [
|
|
1516
1518
|
{
|
|
1517
1519
|
id: "v1",
|
|
1518
1520
|
name: "Initial version",
|
|
@@ -1547,7 +1549,7 @@ const Zt = ({
|
|
|
1547
1549
|
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Version History" }),
|
|
1548
1550
|
/* @__PURE__ */ t.jsx("button", { className: "text-xs text-slate-500 hover:text-slate-800", children: "Save Version" })
|
|
1549
1551
|
] }),
|
|
1550
|
-
/* @__PURE__ */ t.jsx("div", { className: "p-2", children:
|
|
1552
|
+
/* @__PURE__ */ t.jsx("div", { className: "p-2", children: i.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1551
1553
|
"div",
|
|
1552
1554
|
{
|
|
1553
1555
|
className: `p-3 mb-2 rounded-md ${r.current ? "bg-slate-100 border border-slate-200" : "hover:bg-slate-50 cursor-pointer"}`,
|
|
@@ -1557,13 +1559,13 @@ const Zt = ({
|
|
|
1557
1559
|
r.current && /* @__PURE__ */ t.jsx("span", { className: "text-xs bg-emerald-100 text-emerald-800 px-2 py-0.5 rounded", children: "Current" })
|
|
1558
1560
|
] }),
|
|
1559
1561
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center mt-1 text-xs text-slate-500", children: [
|
|
1560
|
-
/* @__PURE__ */ t.jsx(
|
|
1562
|
+
/* @__PURE__ */ t.jsx(Vt, { size: 12, className: "mr-1" }),
|
|
1561
1563
|
/* @__PURE__ */ t.jsx("span", { className: "mr-3", children: r.author }),
|
|
1562
1564
|
/* @__PURE__ */ t.jsx(Wt, { size: 12, className: "mr-1" }),
|
|
1563
1565
|
/* @__PURE__ */ t.jsx("span", { children: r.timestamp })
|
|
1564
1566
|
] }),
|
|
1565
1567
|
!r.current && /* @__PURE__ */ t.jsx("div", { className: "mt-2", children: /* @__PURE__ */ t.jsxs("button", { className: "text-xs flex items-center text-slate-600 hover:text-slate-900", children: [
|
|
1566
|
-
/* @__PURE__ */ t.jsx(
|
|
1568
|
+
/* @__PURE__ */ t.jsx(Yt, { size: 12, className: "mr-1" }),
|
|
1567
1569
|
" Restore this version"
|
|
1568
1570
|
] }) })
|
|
1569
1571
|
]
|
|
@@ -1571,30 +1573,31 @@ const Zt = ({
|
|
|
1571
1573
|
r.id
|
|
1572
1574
|
)) })
|
|
1573
1575
|
] });
|
|
1574
|
-
},
|
|
1576
|
+
}, vr = "1.0.0";
|
|
1575
1577
|
export {
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
Er as
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1578
|
+
yr as Alert,
|
|
1579
|
+
jr as Button,
|
|
1580
|
+
Qt as CodeEditor,
|
|
1581
|
+
ae as CodeEditorWrapper,
|
|
1582
|
+
fr as DataExplorer,
|
|
1583
|
+
rr as EditorLayout,
|
|
1584
|
+
nr as FileExplorer,
|
|
1585
|
+
cr as FormCodeEditor,
|
|
1586
|
+
Kt as FormFileProvider,
|
|
1587
|
+
mr as FunctionLibrary,
|
|
1588
|
+
ur as Header,
|
|
1589
|
+
k as Panels,
|
|
1590
|
+
hr as PreviewPanel,
|
|
1591
|
+
wr as Splitter,
|
|
1592
|
+
pr as TestRunner,
|
|
1593
|
+
Er as Tooltip,
|
|
1594
|
+
Nr as Tree,
|
|
1595
|
+
dr as URLCodeEditor,
|
|
1596
|
+
Xt as URLFileProvider,
|
|
1597
|
+
vr as VERSION,
|
|
1598
|
+
xr as VersionHistory,
|
|
1599
|
+
lr as WorkflowCodeEditor,
|
|
1600
|
+
Gt as WorkflowFileProvider,
|
|
1601
|
+
Zt as createFileProvider,
|
|
1602
|
+
Jt as useFileManager
|
|
1600
1603
|
};
|