superleap-code-editor 1.0.6 → 1.0.8
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/codeEditorWrapper.d.ts +1 -1
- package/dist/components/codeEditorWrapper.d.ts.map +1 -1
- package/dist/components/layout/editorLayout.d.ts +4 -3
- package/dist/components/layout/editorLayout.d.ts.map +1 -1
- package/dist/components/layout/sidebar.d.ts +4 -3
- 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 +392 -390
- 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 k, 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 I, 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 P(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 : P(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 P(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
|
|
133
|
-
function
|
|
132
|
+
var O = 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,65 +153,65 @@ 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,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
169
|
-
value: oe
|
|
170
|
-
}),
|
|
171
|
-
info: P({}, e, {
|
|
168
|
+
log: O({}, e, {
|
|
172
169
|
value: le
|
|
173
170
|
}),
|
|
174
|
-
|
|
171
|
+
info: O({}, e, {
|
|
175
172
|
value: ce
|
|
176
173
|
}),
|
|
177
|
-
|
|
174
|
+
warn: O({}, e, {
|
|
178
175
|
value: de
|
|
179
176
|
}),
|
|
180
|
-
|
|
177
|
+
error: O({}, e, {
|
|
181
178
|
value: ue
|
|
182
179
|
}),
|
|
183
|
-
|
|
180
|
+
group: O({}, e, {
|
|
184
181
|
value: fe
|
|
185
182
|
}),
|
|
186
|
-
|
|
183
|
+
groupCollapsed: O({}, e, {
|
|
187
184
|
value: me
|
|
185
|
+
}),
|
|
186
|
+
groupEnd: O({}, e, {
|
|
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 = P(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 " + P(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 = P(n);
|
|
554
|
+
at(a, e.props, "prop", l, e);
|
|
555
|
+
} else if (n.PropTypes !== void 0 && !te) {
|
|
556
|
+
te = !0;
|
|
557
|
+
var m = P(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 = "<" + (P(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] =
|
|
619
|
+
var t = Ht();
|
|
620
|
+
function Jt(i) {
|
|
621
|
+
const [r, s] = k([]), [o, c] = k(null), [g, y] = k(""), [w, x] = k(!1), [N, d] = k(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,21 @@ 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
|
-
|
|
884
|
-
|
|
883
|
+
var S = /* @__PURE__ */ ((i) => (i.Explorer = "explorer", i.Data = "data", i.Functions = "functions", i.Versions = "versions", i.Tests = "tests", i))(S || {});
|
|
884
|
+
const Qt = ({
|
|
885
|
+
value: i,
|
|
885
886
|
onChange: r,
|
|
886
887
|
language: s = "javascript",
|
|
887
|
-
filename:
|
|
888
|
+
filename: o,
|
|
888
889
|
readOnly: c = !1,
|
|
889
890
|
loading: g = !1
|
|
890
891
|
}) => {
|
|
@@ -892,11 +893,11 @@ const Zt = ({
|
|
|
892
893
|
w !== void 0 && r(w);
|
|
893
894
|
};
|
|
894
895
|
return /* @__PURE__ */ t.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ t.jsx(
|
|
895
|
-
|
|
896
|
+
Ft,
|
|
896
897
|
{
|
|
897
898
|
height: "100%",
|
|
898
899
|
defaultLanguage: s,
|
|
899
|
-
defaultValue:
|
|
900
|
+
defaultValue: i,
|
|
900
901
|
onChange: y,
|
|
901
902
|
theme: "vs-light",
|
|
902
903
|
options: {
|
|
@@ -914,91 +915,91 @@ const Zt = ({
|
|
|
914
915
|
}
|
|
915
916
|
}
|
|
916
917
|
) });
|
|
917
|
-
},
|
|
918
|
+
}, er = [
|
|
918
919
|
{
|
|
919
|
-
id:
|
|
920
|
-
icon:
|
|
920
|
+
id: S.Explorer,
|
|
921
|
+
icon: Ae,
|
|
921
922
|
label: "Files"
|
|
922
923
|
},
|
|
923
924
|
{
|
|
924
|
-
id:
|
|
925
|
-
icon:
|
|
925
|
+
id: S.Data,
|
|
926
|
+
icon: ze,
|
|
926
927
|
label: "Data"
|
|
927
928
|
},
|
|
928
929
|
{
|
|
929
|
-
id:
|
|
930
|
-
icon:
|
|
930
|
+
id: S.Functions,
|
|
931
|
+
icon: $e,
|
|
931
932
|
label: "Functions"
|
|
932
933
|
},
|
|
933
934
|
{
|
|
934
|
-
id:
|
|
935
|
-
icon:
|
|
935
|
+
id: S.Versions,
|
|
936
|
+
icon: Le,
|
|
936
937
|
label: "Versions"
|
|
937
938
|
},
|
|
938
939
|
{
|
|
939
|
-
id:
|
|
940
|
-
icon:
|
|
940
|
+
id: S.Tests,
|
|
941
|
+
icon: Tt,
|
|
941
942
|
label: "Tests"
|
|
942
943
|
}
|
|
943
|
-
],
|
|
944
|
-
activePanel:
|
|
944
|
+
], tr = ({
|
|
945
|
+
activePanel: i,
|
|
945
946
|
setActivePanel: r,
|
|
946
947
|
allowedPannels: s
|
|
947
948
|
}) => {
|
|
948
|
-
const
|
|
949
|
-
() =>
|
|
949
|
+
const o = Ct(
|
|
950
|
+
() => er.filter((c) => s.includes(c.id)),
|
|
950
951
|
[s]
|
|
951
952
|
);
|
|
952
953
|
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
|
-
|
|
954
|
+
o.map((c) => {
|
|
954
955
|
const g = c.icon;
|
|
955
|
-
return /* @__PURE__ */ t.jsx(
|
|
956
|
-
|
|
956
|
+
return /* @__PURE__ */ t.jsx(Oe, { title: c.label, placement: "right", children: /* @__PURE__ */ t.jsx(
|
|
957
|
+
ne,
|
|
957
958
|
{
|
|
958
|
-
type:
|
|
959
|
+
type: i === c.id ? "primary" : "text",
|
|
959
960
|
icon: /* @__PURE__ */ t.jsx(g, { size: 16 }),
|
|
960
961
|
onClick: () => r(c.id)
|
|
961
962
|
}
|
|
962
963
|
) }, c.id);
|
|
963
964
|
}),
|
|
964
|
-
/* @__PURE__ */ t.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ t.jsx(
|
|
965
|
+
/* @__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
966
|
] });
|
|
966
|
-
},
|
|
967
|
-
leftPanel:
|
|
967
|
+
}, rr = ({
|
|
968
|
+
leftPanel: i,
|
|
968
969
|
editor: r,
|
|
969
970
|
rightPanel: s,
|
|
970
|
-
activePanel:
|
|
971
|
+
activePanel: o,
|
|
971
972
|
setActivePanel: c,
|
|
972
|
-
allowedPannels: g = [
|
|
973
|
+
allowedPannels: g = [S.Explorer]
|
|
973
974
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
974
975
|
/* @__PURE__ */ t.jsx(
|
|
975
|
-
|
|
976
|
+
tr,
|
|
976
977
|
{
|
|
977
|
-
activePanel:
|
|
978
|
+
activePanel: o,
|
|
978
979
|
setActivePanel: c,
|
|
979
980
|
allowedPannels: g
|
|
980
981
|
}
|
|
981
982
|
),
|
|
982
983
|
/* @__PURE__ */ t.jsx("div", { className: "flex-1", children: s ? /* @__PURE__ */ t.jsxs(
|
|
983
|
-
|
|
984
|
+
I,
|
|
984
985
|
{
|
|
985
986
|
style: { height: "100%" },
|
|
986
987
|
onResize: (y) => console.log(y),
|
|
987
988
|
children: [
|
|
988
989
|
/* @__PURE__ */ t.jsx(
|
|
989
|
-
|
|
990
|
+
I.Panel,
|
|
990
991
|
{
|
|
991
992
|
defaultSize: "25%",
|
|
992
993
|
min: "15%",
|
|
993
994
|
max: "40%",
|
|
994
995
|
className: "bg-white border-r border-slate-200",
|
|
995
996
|
collapsible: !0,
|
|
996
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children:
|
|
997
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children: i })
|
|
997
998
|
}
|
|
998
999
|
),
|
|
999
|
-
/* @__PURE__ */ t.jsx(
|
|
1000
|
+
/* @__PURE__ */ t.jsx(I.Panel, { defaultSize: "50%", min: "30%", children: r }),
|
|
1000
1001
|
/* @__PURE__ */ t.jsx(
|
|
1001
|
-
|
|
1002
|
+
I.Panel,
|
|
1002
1003
|
{
|
|
1003
1004
|
defaultSize: "25%",
|
|
1004
1005
|
min: "20%",
|
|
@@ -1009,47 +1010,47 @@ const Zt = ({
|
|
|
1009
1010
|
)
|
|
1010
1011
|
]
|
|
1011
1012
|
}
|
|
1012
|
-
) : /* @__PURE__ */ t.jsxs(
|
|
1013
|
+
) : /* @__PURE__ */ t.jsxs(I, { style: { height: "100%" }, children: [
|
|
1013
1014
|
/* @__PURE__ */ t.jsx(
|
|
1014
|
-
|
|
1015
|
+
I.Panel,
|
|
1015
1016
|
{
|
|
1016
1017
|
defaultSize: "25%",
|
|
1017
1018
|
min: "15%",
|
|
1018
1019
|
max: "40%",
|
|
1019
1020
|
className: "bg-white border-r border-slate-200",
|
|
1020
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children:
|
|
1021
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children: i })
|
|
1021
1022
|
}
|
|
1022
1023
|
),
|
|
1023
|
-
/* @__PURE__ */ t.jsx(
|
|
1024
|
+
/* @__PURE__ */ t.jsx(I.Panel, { defaultSize: "75%", min: "60%", children: r })
|
|
1024
1025
|
] }) })
|
|
1025
|
-
] }),
|
|
1026
|
-
files:
|
|
1026
|
+
] }), nr = ({
|
|
1027
|
+
files: i,
|
|
1027
1028
|
activeFile: r,
|
|
1028
1029
|
onFileSelect: s,
|
|
1029
|
-
loading:
|
|
1030
|
+
loading: o = !1,
|
|
1030
1031
|
error: c = null,
|
|
1031
1032
|
onRefresh: g
|
|
1032
1033
|
}) => {
|
|
1033
1034
|
const y = (N) => N.map((d) => ({
|
|
1034
1035
|
title: d.name,
|
|
1035
1036
|
key: d.id,
|
|
1036
|
-
icon: d.type === "file" ? /* @__PURE__ */ t.jsx(
|
|
1037
|
+
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
1038
|
isLeaf: d.type === "file",
|
|
1038
1039
|
children: d.children ? y(d.children) : void 0,
|
|
1039
1040
|
metadata: d.metadata
|
|
1040
|
-
})), w = y(
|
|
1041
|
+
})), w = y(i), x = (N, d) => {
|
|
1041
1042
|
d?.node.isLeaf && d.node.key && s(d.node.key);
|
|
1042
1043
|
};
|
|
1043
1044
|
return /* @__PURE__ */ t.jsxs("div", { className: "h-full", children: [
|
|
1044
1045
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1045
1046
|
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Files" }),
|
|
1046
1047
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-2", children: g && /* @__PURE__ */ t.jsx(
|
|
1047
|
-
|
|
1048
|
+
ne,
|
|
1048
1049
|
{
|
|
1049
1050
|
type: "text",
|
|
1050
1051
|
icon: /* @__PURE__ */ t.jsx(St, { size: 16 }),
|
|
1051
1052
|
onClick: g,
|
|
1052
|
-
loading:
|
|
1053
|
+
loading: o,
|
|
1053
1054
|
title: "Refresh files"
|
|
1054
1055
|
}
|
|
1055
1056
|
) })
|
|
@@ -1065,7 +1066,7 @@ const Zt = ({
|
|
|
1065
1066
|
}
|
|
1066
1067
|
),
|
|
1067
1068
|
/* @__PURE__ */ t.jsx(
|
|
1068
|
-
|
|
1069
|
+
_t,
|
|
1069
1070
|
{
|
|
1070
1071
|
treeData: w,
|
|
1071
1072
|
onSelect: x,
|
|
@@ -1078,17 +1079,17 @@ const Zt = ({
|
|
|
1078
1079
|
)
|
|
1079
1080
|
] })
|
|
1080
1081
|
] });
|
|
1081
|
-
},
|
|
1082
|
-
config:
|
|
1082
|
+
}, ae = ({
|
|
1083
|
+
config: i,
|
|
1083
1084
|
rightPanel: r = !1
|
|
1084
1085
|
}) => {
|
|
1085
|
-
const s =
|
|
1086
|
-
() =>
|
|
1087
|
-
[
|
|
1086
|
+
const s = se.useMemo(
|
|
1087
|
+
() => Zt(i),
|
|
1088
|
+
[i]
|
|
1088
1089
|
);
|
|
1089
|
-
console.log({ config:
|
|
1090
|
+
console.log({ config: i });
|
|
1090
1091
|
const {
|
|
1091
|
-
files:
|
|
1092
|
+
files: o,
|
|
1092
1093
|
activeFile: c,
|
|
1093
1094
|
fileContent: g,
|
|
1094
1095
|
loading: y,
|
|
@@ -1097,14 +1098,14 @@ const Zt = ({
|
|
|
1097
1098
|
updateFileContent: N,
|
|
1098
1099
|
refreshFiles: d,
|
|
1099
1100
|
getFileById: E
|
|
1100
|
-
} =
|
|
1101
|
+
} = Jt(s), C = c ? E(c) : null, T = C?.metadata?.language || "javascript";
|
|
1101
1102
|
return /* @__PURE__ */ t.jsx(
|
|
1102
|
-
|
|
1103
|
+
rr,
|
|
1103
1104
|
{
|
|
1104
1105
|
leftPanel: /* @__PURE__ */ t.jsx(
|
|
1105
|
-
|
|
1106
|
+
nr,
|
|
1106
1107
|
{
|
|
1107
|
-
files:
|
|
1108
|
+
files: o,
|
|
1108
1109
|
activeFile: c,
|
|
1109
1110
|
onFileSelect: x,
|
|
1110
1111
|
loading: y,
|
|
@@ -1113,71 +1114,71 @@ const Zt = ({
|
|
|
1113
1114
|
}
|
|
1114
1115
|
),
|
|
1115
1116
|
editor: /* @__PURE__ */ t.jsx(
|
|
1116
|
-
|
|
1117
|
+
Qt,
|
|
1117
1118
|
{
|
|
1118
1119
|
value: g,
|
|
1119
1120
|
onChange: N,
|
|
1120
|
-
language:
|
|
1121
|
+
language: T,
|
|
1121
1122
|
filename: C?.name,
|
|
1122
|
-
readOnly:
|
|
1123
|
+
readOnly: i.settings?.readOnly,
|
|
1123
1124
|
loading: y
|
|
1124
1125
|
}
|
|
1125
1126
|
),
|
|
1126
1127
|
rightPanel: r,
|
|
1127
|
-
activePanel:
|
|
1128
|
+
activePanel: S.Explorer,
|
|
1128
1129
|
setActivePanel: () => {
|
|
1129
1130
|
}
|
|
1130
1131
|
}
|
|
1131
1132
|
);
|
|
1132
|
-
},
|
|
1133
|
-
functionId:
|
|
1133
|
+
}, lr = ({
|
|
1134
|
+
functionId: i,
|
|
1134
1135
|
version: r,
|
|
1135
1136
|
versionList: s,
|
|
1136
|
-
fetchFunction:
|
|
1137
|
+
fetchFunction: o,
|
|
1137
1138
|
fetchVersionList: c
|
|
1138
1139
|
}) => {
|
|
1139
1140
|
const g = {
|
|
1140
1141
|
workflowConfig: {
|
|
1141
|
-
functionId:
|
|
1142
|
+
functionId: i,
|
|
1142
1143
|
version: r,
|
|
1143
1144
|
versionList: s,
|
|
1144
|
-
fetchFunction:
|
|
1145
|
+
fetchFunction: o,
|
|
1145
1146
|
fetchVersionList: c
|
|
1146
1147
|
}
|
|
1147
1148
|
};
|
|
1148
|
-
return /* @__PURE__ */ t.jsx(
|
|
1149
|
-
},
|
|
1150
|
-
codeContent:
|
|
1149
|
+
return /* @__PURE__ */ t.jsx(ae, { config: g });
|
|
1150
|
+
}, cr = ({
|
|
1151
|
+
codeContent: i,
|
|
1151
1152
|
fileName: r = "code.js",
|
|
1152
1153
|
language: s = "javascript",
|
|
1153
|
-
readOnly:
|
|
1154
|
+
readOnly: o = !1
|
|
1154
1155
|
}) => {
|
|
1155
1156
|
const c = {
|
|
1156
1157
|
formConfig: {
|
|
1157
|
-
codeContent:
|
|
1158
|
+
codeContent: i,
|
|
1158
1159
|
fileName: r,
|
|
1159
1160
|
language: s
|
|
1160
1161
|
},
|
|
1161
1162
|
settings: {
|
|
1162
|
-
readOnly:
|
|
1163
|
+
readOnly: o
|
|
1163
1164
|
}
|
|
1164
1165
|
};
|
|
1165
|
-
return /* @__PURE__ */ t.jsx(
|
|
1166
|
-
},
|
|
1166
|
+
return /* @__PURE__ */ t.jsx(ae, { config: c });
|
|
1167
|
+
}, dr = ({ fileUrls: i, rightPanel: r }) => {
|
|
1167
1168
|
const s = {
|
|
1168
1169
|
urlConfig: {
|
|
1169
|
-
fileUrls:
|
|
1170
|
+
fileUrls: i
|
|
1170
1171
|
}
|
|
1171
1172
|
};
|
|
1172
|
-
return /* @__PURE__ */ t.jsx(
|
|
1173
|
-
},
|
|
1174
|
-
activeFile:
|
|
1173
|
+
return /* @__PURE__ */ t.jsx(ae, { config: s, rightPanel: r });
|
|
1174
|
+
}, ur = ({
|
|
1175
|
+
activeFile: i,
|
|
1175
1176
|
showPreview: r,
|
|
1176
1177
|
setShowPreview: s
|
|
1177
1178
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "h-14 border-b border-slate-200 bg-white px-4 flex items-center justify-between", children: [
|
|
1178
1179
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1179
1180
|
/* @__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:
|
|
1181
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm text-slate-500 px-2 py-1 bg-slate-100 rounded-md", children: i })
|
|
1181
1182
|
] }),
|
|
1182
1183
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1183
1184
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1186,7 +1187,7 @@ const Zt = ({
|
|
|
1186
1187
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1187
1188
|
onClick: () => s(!r),
|
|
1188
1189
|
title: r ? "Hide Preview" : "Show Preview",
|
|
1189
|
-
children: r ? /* @__PURE__ */ t.jsx(
|
|
1190
|
+
children: r ? /* @__PURE__ */ t.jsx(Ot, { size: 18 }) : /* @__PURE__ */ t.jsx(It, { size: 18 })
|
|
1190
1191
|
}
|
|
1191
1192
|
),
|
|
1192
1193
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1194,7 +1195,7 @@ const Zt = ({
|
|
|
1194
1195
|
{
|
|
1195
1196
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1196
1197
|
title: "Version History",
|
|
1197
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1198
|
+
children: /* @__PURE__ */ t.jsx(Le, { size: 18 })
|
|
1198
1199
|
}
|
|
1199
1200
|
),
|
|
1200
1201
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1202,7 +1203,7 @@ const Zt = ({
|
|
|
1202
1203
|
{
|
|
1203
1204
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1204
1205
|
title: "Run Code",
|
|
1205
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1206
|
+
children: /* @__PURE__ */ t.jsx(Be, { size: 18 })
|
|
1206
1207
|
}
|
|
1207
1208
|
),
|
|
1208
1209
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1210,11 +1211,11 @@ const Zt = ({
|
|
|
1210
1211
|
{
|
|
1211
1212
|
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1212
1213
|
title: "Export",
|
|
1213
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1214
|
+
children: /* @__PURE__ */ t.jsx(kt, { size: 18 })
|
|
1214
1215
|
}
|
|
1215
1216
|
),
|
|
1216
1217
|
/* @__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(
|
|
1218
|
+
/* @__PURE__ */ t.jsx(Dt, { size: 16, className: "mr-1.5" }),
|
|
1218
1219
|
" Save"
|
|
1219
1220
|
] }),
|
|
1220
1221
|
/* @__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 +1224,8 @@ const Zt = ({
|
|
|
1223
1224
|
"Draft"
|
|
1224
1225
|
] })
|
|
1225
1226
|
] })
|
|
1226
|
-
] }),
|
|
1227
|
-
const
|
|
1227
|
+
] }), fr = () => {
|
|
1228
|
+
const i = [
|
|
1228
1229
|
{
|
|
1229
1230
|
name: "Lead",
|
|
1230
1231
|
fields: ["id", "name", "email", "phone", "status", "createdAt"],
|
|
@@ -1251,7 +1252,7 @@ const Zt = ({
|
|
|
1251
1252
|
/* @__PURE__ */ t.jsxs("div", { className: "p-3", children: [
|
|
1252
1253
|
/* @__PURE__ */ t.jsxs("div", { className: "relative mb-3", children: [
|
|
1253
1254
|
/* @__PURE__ */ t.jsx(
|
|
1254
|
-
|
|
1255
|
+
Ve,
|
|
1255
1256
|
{
|
|
1256
1257
|
size: 16,
|
|
1257
1258
|
className: "absolute left-2.5 top-2.5 text-slate-400"
|
|
@@ -1266,16 +1267,16 @@ const Zt = ({
|
|
|
1266
1267
|
}
|
|
1267
1268
|
)
|
|
1268
1269
|
] }),
|
|
1269
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1270
|
+
/* @__PURE__ */ t.jsx("div", { children: i.map((r) => /* @__PURE__ */ t.jsxs("div", { className: "mb-1", children: [
|
|
1270
1271
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center p-2 hover:bg-slate-50 rounded-md cursor-pointer", children: [
|
|
1271
1272
|
/* @__PURE__ */ t.jsx(
|
|
1272
|
-
|
|
1273
|
+
At,
|
|
1273
1274
|
{
|
|
1274
1275
|
size: 16,
|
|
1275
1276
|
className: `mr-1 text-slate-400 transition-transform ${r.expanded ? "rotate-90" : ""}`
|
|
1276
1277
|
}
|
|
1277
1278
|
),
|
|
1278
|
-
/* @__PURE__ */ t.jsx(
|
|
1279
|
+
/* @__PURE__ */ t.jsx(ze, { size: 16, className: "mr-2 text-slate-500" }),
|
|
1279
1280
|
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: r.name })
|
|
1280
1281
|
] }),
|
|
1281
1282
|
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 +1290,8 @@ const Zt = ({
|
|
|
1289
1290
|
] }, r.name)) })
|
|
1290
1291
|
] })
|
|
1291
1292
|
] });
|
|
1292
|
-
},
|
|
1293
|
-
const
|
|
1293
|
+
}, mr = () => {
|
|
1294
|
+
const i = [
|
|
1294
1295
|
{
|
|
1295
1296
|
name: "formatCurrency",
|
|
1296
1297
|
description: "Format a number as currency",
|
|
@@ -1327,7 +1328,7 @@ const Zt = ({
|
|
|
1327
1328
|
/* @__PURE__ */ t.jsxs("div", { className: "p-3", children: [
|
|
1328
1329
|
/* @__PURE__ */ t.jsxs("div", { className: "relative mb-3", children: [
|
|
1329
1330
|
/* @__PURE__ */ t.jsx(
|
|
1330
|
-
|
|
1331
|
+
Ve,
|
|
1331
1332
|
{
|
|
1332
1333
|
size: 16,
|
|
1333
1334
|
className: "absolute left-2.5 top-2.5 text-slate-400"
|
|
@@ -1342,14 +1343,14 @@ const Zt = ({
|
|
|
1342
1343
|
}
|
|
1343
1344
|
)
|
|
1344
1345
|
] }),
|
|
1345
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1346
|
+
/* @__PURE__ */ t.jsx("div", { children: i.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1346
1347
|
"div",
|
|
1347
1348
|
{
|
|
1348
1349
|
className: "p-2 border border-slate-200 rounded-md mb-2 hover:bg-slate-50 cursor-pointer",
|
|
1349
1350
|
children: [
|
|
1350
1351
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1351
1352
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1352
|
-
/* @__PURE__ */ t.jsx(
|
|
1353
|
+
/* @__PURE__ */ t.jsx($e, { size: 16, className: "mr-2 text-slate-500" }),
|
|
1353
1354
|
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: r.name })
|
|
1354
1355
|
] }),
|
|
1355
1356
|
/* @__PURE__ */ t.jsx("span", { className: "text-xs bg-slate-100 px-2 py-0.5 rounded text-slate-600", children: r.category })
|
|
@@ -1360,16 +1361,16 @@ const Zt = ({
|
|
|
1360
1361
|
r.name
|
|
1361
1362
|
)) }),
|
|
1362
1363
|
/* @__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(
|
|
1364
|
+
/* @__PURE__ */ t.jsx(zt, { size: 16, className: "text-slate-500 mr-2" }),
|
|
1364
1365
|
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-slate-600", children: "Browse documentation for more functions and examples" })
|
|
1365
1366
|
] })
|
|
1366
1367
|
] })
|
|
1367
1368
|
] });
|
|
1368
|
-
},
|
|
1369
|
-
const [r, s] =
|
|
1369
|
+
}, hr = ({ code: i }) => {
|
|
1370
|
+
const [r, s] = k(null), [o, c] = k(!1), g = "body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; padding: 1rem; }", w = ((d) => d.replace(
|
|
1370
1371
|
/import\s+.*axios.*from\s+['"]axios['"];?/g,
|
|
1371
1372
|
"// Axios imports removed for preview"
|
|
1372
|
-
).replace(/axios\./g, "/* axios. */").replace(/fetch\(/g, "/* fetch( */"))(
|
|
1373
|
+
).replace(/axios\./g, "/* axios. */").replace(/fetch\(/g, "/* fetch( */"))(i), x = `
|
|
1373
1374
|
<!DOCTYPE html>
|
|
1374
1375
|
<html>
|
|
1375
1376
|
<head>
|
|
@@ -1409,12 +1410,12 @@ const Zt = ({
|
|
|
1409
1410
|
{
|
|
1410
1411
|
className: "p-1 hover:bg-slate-100 rounded-md",
|
|
1411
1412
|
onClick: N,
|
|
1412
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1413
|
+
children: /* @__PURE__ */ t.jsx($t, { size: 16, className: o ? "animate-spin" : "" })
|
|
1413
1414
|
}
|
|
1414
1415
|
)
|
|
1415
1416
|
] }),
|
|
1416
1417
|
/* @__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(
|
|
1418
|
+
/* @__PURE__ */ t.jsx(Lt, { size: 16, className: "text-red-500 mr-2 mt-0.5" }),
|
|
1418
1419
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1419
1420
|
/* @__PURE__ */ t.jsx("p", { className: "text-sm font-medium text-red-800", children: "Preview Error" }),
|
|
1420
1421
|
/* @__PURE__ */ t.jsx("p", { className: "text-xs text-red-600", children: r })
|
|
@@ -1430,8 +1431,8 @@ const Zt = ({
|
|
|
1430
1431
|
}
|
|
1431
1432
|
) })
|
|
1432
1433
|
] });
|
|
1433
|
-
},
|
|
1434
|
-
const
|
|
1434
|
+
}, pr = () => {
|
|
1435
|
+
const i = [
|
|
1435
1436
|
{
|
|
1436
1437
|
id: "1",
|
|
1437
1438
|
name: "Should format currency correctly",
|
|
@@ -1462,9 +1463,9 @@ const Zt = ({
|
|
|
1462
1463
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1463
1464
|
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Test Runner" }),
|
|
1464
1465
|
/* @__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(
|
|
1466
|
+
/* @__PURE__ */ t.jsx("button", { className: "p-1 hover:bg-slate-100 rounded-md mr-1", children: /* @__PURE__ */ t.jsx(Me, { size: 14 }) }),
|
|
1466
1467
|
/* @__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(
|
|
1468
|
+
/* @__PURE__ */ t.jsx(Be, { size: 12, className: "mr-1" }),
|
|
1468
1469
|
" Run Tests"
|
|
1469
1470
|
] })
|
|
1470
1471
|
] })
|
|
@@ -1485,7 +1486,7 @@ const Zt = ({
|
|
|
1485
1486
|
}
|
|
1486
1487
|
) })
|
|
1487
1488
|
] }),
|
|
1488
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1489
|
+
/* @__PURE__ */ t.jsx("div", { children: i.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1489
1490
|
"div",
|
|
1490
1491
|
{
|
|
1491
1492
|
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 +1494,12 @@ const Zt = ({
|
|
|
1493
1494
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1494
1495
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1495
1496
|
r.status === "passed" ? /* @__PURE__ */ t.jsx(
|
|
1496
|
-
|
|
1497
|
+
Mt,
|
|
1497
1498
|
{
|
|
1498
1499
|
size: 16,
|
|
1499
1500
|
className: "text-emerald-500 mr-2"
|
|
1500
1501
|
}
|
|
1501
|
-
) : /* @__PURE__ */ t.jsx(
|
|
1502
|
+
) : /* @__PURE__ */ t.jsx(Bt, { size: 16, className: "text-red-500 mr-2" }),
|
|
1502
1503
|
/* @__PURE__ */ t.jsx("span", { className: "text-sm", children: r.name })
|
|
1503
1504
|
] }),
|
|
1504
1505
|
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-slate-500", children: r.duration })
|
|
@@ -1511,8 +1512,8 @@ const Zt = ({
|
|
|
1511
1512
|
/* @__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
1513
|
] })
|
|
1513
1514
|
] });
|
|
1514
|
-
},
|
|
1515
|
-
const
|
|
1515
|
+
}, xr = () => {
|
|
1516
|
+
const i = [
|
|
1516
1517
|
{
|
|
1517
1518
|
id: "v1",
|
|
1518
1519
|
name: "Initial version",
|
|
@@ -1547,7 +1548,7 @@ const Zt = ({
|
|
|
1547
1548
|
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Version History" }),
|
|
1548
1549
|
/* @__PURE__ */ t.jsx("button", { className: "text-xs text-slate-500 hover:text-slate-800", children: "Save Version" })
|
|
1549
1550
|
] }),
|
|
1550
|
-
/* @__PURE__ */ t.jsx("div", { className: "p-2", children:
|
|
1551
|
+
/* @__PURE__ */ t.jsx("div", { className: "p-2", children: i.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1551
1552
|
"div",
|
|
1552
1553
|
{
|
|
1553
1554
|
className: `p-3 mb-2 rounded-md ${r.current ? "bg-slate-100 border border-slate-200" : "hover:bg-slate-50 cursor-pointer"}`,
|
|
@@ -1557,13 +1558,13 @@ const Zt = ({
|
|
|
1557
1558
|
r.current && /* @__PURE__ */ t.jsx("span", { className: "text-xs bg-emerald-100 text-emerald-800 px-2 py-0.5 rounded", children: "Current" })
|
|
1558
1559
|
] }),
|
|
1559
1560
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center mt-1 text-xs text-slate-500", children: [
|
|
1560
|
-
/* @__PURE__ */ t.jsx(
|
|
1561
|
+
/* @__PURE__ */ t.jsx(Vt, { size: 12, className: "mr-1" }),
|
|
1561
1562
|
/* @__PURE__ */ t.jsx("span", { className: "mr-3", children: r.author }),
|
|
1562
1563
|
/* @__PURE__ */ t.jsx(Wt, { size: 12, className: "mr-1" }),
|
|
1563
1564
|
/* @__PURE__ */ t.jsx("span", { children: r.timestamp })
|
|
1564
1565
|
] }),
|
|
1565
1566
|
!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(
|
|
1567
|
+
/* @__PURE__ */ t.jsx(Yt, { size: 12, className: "mr-1" }),
|
|
1567
1568
|
" Restore this version"
|
|
1568
1569
|
] }) })
|
|
1569
1570
|
]
|
|
@@ -1571,30 +1572,31 @@ const Zt = ({
|
|
|
1571
1572
|
r.id
|
|
1572
1573
|
)) })
|
|
1573
1574
|
] });
|
|
1574
|
-
},
|
|
1575
|
+
}, vr = "1.0.0";
|
|
1575
1576
|
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
|
-
|
|
1577
|
+
yr as Alert,
|
|
1578
|
+
jr as Button,
|
|
1579
|
+
Qt as CodeEditor,
|
|
1580
|
+
ae as CodeEditorWrapper,
|
|
1581
|
+
fr as DataExplorer,
|
|
1582
|
+
rr as EditorLayout,
|
|
1583
|
+
nr as FileExplorer,
|
|
1584
|
+
cr as FormCodeEditor,
|
|
1585
|
+
Kt as FormFileProvider,
|
|
1586
|
+
mr as FunctionLibrary,
|
|
1587
|
+
ur as Header,
|
|
1588
|
+
S as Panels,
|
|
1589
|
+
hr as PreviewPanel,
|
|
1590
|
+
wr as Splitter,
|
|
1591
|
+
pr as TestRunner,
|
|
1592
|
+
Er as Tooltip,
|
|
1593
|
+
Nr as Tree,
|
|
1594
|
+
dr as URLCodeEditor,
|
|
1595
|
+
Xt as URLFileProvider,
|
|
1596
|
+
vr as VERSION,
|
|
1597
|
+
xr as VersionHistory,
|
|
1598
|
+
lr as WorkflowCodeEditor,
|
|
1599
|
+
Gt as WorkflowFileProvider,
|
|
1600
|
+
Zt as createFileProvider,
|
|
1601
|
+
Jt as useFileManager
|
|
1600
1602
|
};
|