x-block-lib 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +379 -840
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1,646 +1,173 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import {
|
|
1
|
+
import { B as h } from "./blockly-ByC0ID0H.js";
|
|
2
|
+
import { openConfirmDlg as k, openPromptDlg as T, useViewStack as C } from "x-essential-lib";
|
|
3
|
+
import { getCurrentInstance as E, inject as m, defineComponent as S, ref as v, onMounted as M, nextTick as O, onBeforeUnmount as A, watch as d, openBlock as P, createElementBlock as w, withDirectives as B, createElementVNode as R } from "vue";
|
|
3
4
|
const {
|
|
4
|
-
ASTNode:
|
|
5
|
-
BasicCursor:
|
|
6
|
-
Block:
|
|
7
|
-
BlockSvg:
|
|
8
|
-
Blocks:
|
|
9
|
-
COLLAPSED_FIELD_NAME:
|
|
10
|
-
COLLAPSED_INPUT_NAME:
|
|
11
|
-
COLLAPSE_CHARS:
|
|
12
|
-
CodeGenerator:
|
|
13
|
-
CollapsibleToolboxCategory:
|
|
14
|
-
ComponentManager:
|
|
15
|
-
Connection:
|
|
16
|
-
ConnectionChecker:
|
|
17
|
-
ConnectionDB:
|
|
18
|
-
ConnectionType:
|
|
19
|
-
ContextMenu:
|
|
20
|
-
ContextMenuItems:
|
|
21
|
-
ContextMenuRegistry:
|
|
22
|
-
Css:
|
|
23
|
-
Cursor:
|
|
24
|
-
DELETE_VARIABLE_ID:
|
|
25
|
-
DeleteArea:
|
|
26
|
-
DragTarget:
|
|
27
|
-
DropDownDiv:
|
|
28
|
-
Events:
|
|
29
|
-
Extensions:
|
|
30
|
-
Field:
|
|
31
|
-
FieldCheckbox:
|
|
32
|
-
FieldDropdown:
|
|
33
|
-
FieldImage:
|
|
34
|
-
FieldLabel:
|
|
35
|
-
FieldLabelSerializable:
|
|
36
|
-
FieldNumber:
|
|
37
|
-
FieldTextInput:
|
|
38
|
-
FieldVariable:
|
|
39
|
-
Flyout:
|
|
40
|
-
FlyoutButton:
|
|
41
|
-
FlyoutMetricsManager:
|
|
42
|
-
Generator:
|
|
43
|
-
Gesture:
|
|
44
|
-
Grid:
|
|
45
|
-
HorizontalFlyout:
|
|
46
|
-
INPUT_VALUE:
|
|
47
|
-
Input:
|
|
48
|
-
InsertionMarkerManager:
|
|
49
|
-
InsertionMarkerPreviewer:
|
|
50
|
-
Marker:
|
|
51
|
-
MarkerManager:
|
|
52
|
-
Menu:
|
|
53
|
-
MenuItem:
|
|
54
|
-
MetricsManager:
|
|
55
|
-
Msg:
|
|
56
|
-
NEXT_STATEMENT:
|
|
57
|
-
Names:
|
|
58
|
-
OPPOSITE_TYPE:
|
|
59
|
-
OUTPUT_VALUE:
|
|
60
|
-
Options:
|
|
61
|
-
PREVIOUS_STATEMENT:
|
|
62
|
-
PROCEDURE_CATEGORY_NAME:
|
|
63
|
-
Procedures:
|
|
64
|
-
RENAME_VARIABLE_ID:
|
|
65
|
-
RenderedConnection:
|
|
66
|
-
Scrollbar:
|
|
67
|
-
ScrollbarPair:
|
|
68
|
-
ShortcutItems:
|
|
69
|
-
ShortcutRegistry:
|
|
70
|
-
TOOLBOX_AT_BOTTOM:
|
|
71
|
-
TOOLBOX_AT_LEFT:
|
|
72
|
-
TOOLBOX_AT_RIGHT:
|
|
73
|
-
TOOLBOX_AT_TOP:
|
|
74
|
-
TabNavigateCursor:
|
|
75
|
-
Theme:
|
|
76
|
-
ThemeManager:
|
|
77
|
-
Themes:
|
|
78
|
-
Toolbox:
|
|
79
|
-
ToolboxCategory:
|
|
80
|
-
ToolboxItem:
|
|
81
|
-
ToolboxSeparator:
|
|
82
|
-
Tooltip:
|
|
83
|
-
Touch:
|
|
84
|
-
Trashcan:
|
|
85
|
-
UnattachedFieldError:
|
|
86
|
-
VARIABLE_CATEGORY_NAME:
|
|
87
|
-
VARIABLE_DYNAMIC_CATEGORY_NAME:
|
|
88
|
-
VERSION:
|
|
89
|
-
VariableMap:
|
|
90
|
-
VariableModel:
|
|
91
|
-
Variables:
|
|
92
|
-
VariablesDynamic:
|
|
93
|
-
VerticalFlyout:
|
|
94
|
-
WidgetDiv:
|
|
95
|
-
Workspace:
|
|
96
|
-
WorkspaceAudio:
|
|
97
|
-
WorkspaceDragger:
|
|
98
|
-
WorkspaceSvg:
|
|
99
|
-
Xml:
|
|
100
|
-
ZoomControls:
|
|
101
|
-
blockAnimations:
|
|
102
|
-
blockRendering:
|
|
103
|
-
browserEvents:
|
|
104
|
-
bubbles:
|
|
105
|
-
bumpObjects:
|
|
106
|
-
clipboard:
|
|
107
|
-
comments:
|
|
108
|
-
common:
|
|
109
|
-
config:
|
|
110
|
-
constants:
|
|
111
|
-
defineBlocksWithJsonArray:
|
|
112
|
-
dialog:
|
|
113
|
-
dragging:
|
|
114
|
-
fieldRegistry:
|
|
115
|
-
geras:
|
|
116
|
-
getMainWorkspace:
|
|
117
|
-
getSelected:
|
|
118
|
-
hasBubble:
|
|
119
|
-
hideChaff:
|
|
120
|
-
icons:
|
|
121
|
-
inject:
|
|
122
|
-
inputs:
|
|
123
|
-
isCopyable:
|
|
124
|
-
isDeletable:
|
|
125
|
-
isDraggable:
|
|
126
|
-
isIcon:
|
|
127
|
-
isObservable:
|
|
128
|
-
isPaster:
|
|
129
|
-
isRenderedElement:
|
|
130
|
-
isSelectable:
|
|
131
|
-
isSerializable:
|
|
132
|
-
isVariableBackedParameterModel:
|
|
133
|
-
procedures:
|
|
134
|
-
registry:
|
|
135
|
-
renderManagement:
|
|
136
|
-
serialization:
|
|
137
|
-
setLocale:
|
|
138
|
-
setParentContainer:
|
|
139
|
-
svgResize:
|
|
140
|
-
thrasos:
|
|
141
|
-
uiPosition:
|
|
142
|
-
utils:
|
|
143
|
-
zelos:
|
|
144
|
-
} =
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
if (!o)
|
|
148
|
-
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
149
|
-
return o;
|
|
150
|
-
}
|
|
151
|
-
const Fe = Symbol.for("vuetify:locale");
|
|
152
|
-
function $e() {
|
|
153
|
-
const e = G(Fe);
|
|
154
|
-
if (!e)
|
|
155
|
-
throw new Error("[Vuetify] Could not find injected locale instance");
|
|
156
|
-
return e;
|
|
157
|
-
}
|
|
158
|
-
const ze = Symbol.for("vuetify:theme");
|
|
159
|
-
function de() {
|
|
160
|
-
Be("useTheme");
|
|
161
|
-
const e = G(ze, null);
|
|
162
|
-
if (!e)
|
|
163
|
-
throw new Error("Could not find Vuetify theme injection");
|
|
164
|
-
return e;
|
|
165
|
-
}
|
|
166
|
-
var Ue = !1;
|
|
167
|
-
function j(e, r, o) {
|
|
168
|
-
return Array.isArray(e) ? (e.length = Math.max(e.length, r), e.splice(r, 1, o), o) : (e[r] = o, o);
|
|
169
|
-
}
|
|
170
|
-
function $(e, r) {
|
|
171
|
-
if (Array.isArray(e)) {
|
|
172
|
-
e.splice(r, 1);
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
delete e[r];
|
|
176
|
-
}
|
|
177
|
-
var u = {};
|
|
178
|
-
let x;
|
|
179
|
-
const L = (e) => x = e, We = u.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
180
|
-
/* istanbul ignore next */
|
|
181
|
-
Symbol()
|
|
182
|
-
);
|
|
183
|
-
function T(e) {
|
|
184
|
-
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
185
|
-
}
|
|
186
|
-
var A;
|
|
187
|
-
(function(e) {
|
|
188
|
-
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
189
|
-
})(A || (A = {}));
|
|
190
|
-
const Y = typeof window < "u", z = (u.NODE_ENV !== "production" || !1) && u.NODE_ENV !== "test" && Y;
|
|
191
|
-
function fe(e, r) {
|
|
192
|
-
for (const o in r) {
|
|
193
|
-
const t = r[o];
|
|
194
|
-
if (!(o in e))
|
|
195
|
-
continue;
|
|
196
|
-
const n = e[o];
|
|
197
|
-
T(n) && T(t) && !R(t) && !H(t) ? e[o] = fe(n, t) : e[o] = t;
|
|
198
|
-
}
|
|
199
|
-
return e;
|
|
200
|
-
}
|
|
201
|
-
const me = () => {
|
|
202
|
-
};
|
|
203
|
-
function te(e, r, o, t = me) {
|
|
204
|
-
e.push(r);
|
|
205
|
-
const n = () => {
|
|
206
|
-
const i = e.indexOf(r);
|
|
207
|
-
i > -1 && (e.splice(i, 1), t());
|
|
208
|
-
};
|
|
209
|
-
return !o && Te() && Pe(n), n;
|
|
210
|
-
}
|
|
211
|
-
function P(e, ...r) {
|
|
212
|
-
e.slice().forEach((o) => {
|
|
213
|
-
o(...r);
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
const qe = (e) => e();
|
|
217
|
-
function W(e, r) {
|
|
218
|
-
e instanceof Map && r instanceof Map && r.forEach((o, t) => e.set(t, o)), e instanceof Set && r instanceof Set && r.forEach(e.add, e);
|
|
219
|
-
for (const o in r) {
|
|
220
|
-
if (!r.hasOwnProperty(o))
|
|
221
|
-
continue;
|
|
222
|
-
const t = r[o], n = e[o];
|
|
223
|
-
T(n) && T(t) && e.hasOwnProperty(o) && !R(t) && !H(t) ? e[o] = W(n, t) : e[o] = t;
|
|
224
|
-
}
|
|
225
|
-
return e;
|
|
226
|
-
}
|
|
227
|
-
const Ge = u.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
228
|
-
/* istanbul ignore next */
|
|
229
|
-
Symbol()
|
|
230
|
-
);
|
|
231
|
-
function He(e) {
|
|
232
|
-
return !T(e) || !e.hasOwnProperty(Ge);
|
|
233
|
-
}
|
|
234
|
-
const { assign: k } = Object;
|
|
235
|
-
function oe(e) {
|
|
236
|
-
return !!(R(e) && e.effect);
|
|
237
|
-
}
|
|
238
|
-
function re(e, r, o, t) {
|
|
239
|
-
const { state: n, actions: i, getters: h } = r, l = o.state.value[e];
|
|
240
|
-
let m;
|
|
241
|
-
function y() {
|
|
242
|
-
!l && (u.NODE_ENV === "production" || !t) && (o.state.value[e] = n ? n() : {});
|
|
243
|
-
const b = u.NODE_ENV !== "production" && t ? (
|
|
244
|
-
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
245
|
-
ee(O(n ? n() : {}).value)
|
|
246
|
-
) : ee(o.state.value[e]);
|
|
247
|
-
return k(b, i, Object.keys(h || {}).reduce((p, g) => (u.NODE_ENV !== "production" && g in b && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = V(X(() => {
|
|
248
|
-
L(o);
|
|
249
|
-
const d = o._s.get(e);
|
|
250
|
-
return h[g].call(d, d);
|
|
251
|
-
})), p), {}));
|
|
252
|
-
}
|
|
253
|
-
return m = q(e, y, r, o, t, !0), m;
|
|
254
|
-
}
|
|
255
|
-
function q(e, r, o = {}, t, n, i) {
|
|
256
|
-
let h;
|
|
257
|
-
const l = k({ actions: {} }, o);
|
|
258
|
-
if (u.NODE_ENV !== "production" && !t._e.active)
|
|
259
|
-
throw new Error("Pinia destroyed");
|
|
260
|
-
const m = {
|
|
261
|
-
deep: !0
|
|
262
|
-
// flush: 'post',
|
|
263
|
-
};
|
|
264
|
-
u.NODE_ENV !== "production" && !Ue && (m.onTrigger = (s) => {
|
|
265
|
-
y ? d = s : y == !1 && !c._hotUpdating && (Array.isArray(d) ? d.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
266
|
-
});
|
|
267
|
-
let y, b, p = [], g = [], d;
|
|
268
|
-
const _ = t.state.value[e];
|
|
269
|
-
!i && !_ && (u.NODE_ENV === "production" || !n) && (t.state.value[e] = {});
|
|
270
|
-
const S = O({});
|
|
271
|
-
let J;
|
|
272
|
-
function Q(s) {
|
|
273
|
-
let a;
|
|
274
|
-
y = b = !1, u.NODE_ENV !== "production" && (d = []), typeof s == "function" ? (s(t.state.value[e]), a = {
|
|
275
|
-
type: A.patchFunction,
|
|
276
|
-
storeId: e,
|
|
277
|
-
events: d
|
|
278
|
-
}) : (W(t.state.value[e], s), a = {
|
|
279
|
-
type: A.patchObject,
|
|
280
|
-
payload: s,
|
|
281
|
-
storeId: e,
|
|
282
|
-
events: d
|
|
283
|
-
});
|
|
284
|
-
const f = J = Symbol();
|
|
285
|
-
U().then(() => {
|
|
286
|
-
J === f && (y = !0);
|
|
287
|
-
}), b = !0, P(p, a, t.state.value[e]);
|
|
288
|
-
}
|
|
289
|
-
const ge = i ? function() {
|
|
290
|
-
const { state: a } = o, f = a ? a() : {};
|
|
291
|
-
this.$patch((v) => {
|
|
292
|
-
k(v, f);
|
|
293
|
-
});
|
|
294
|
-
} : (
|
|
295
|
-
/* istanbul ignore next */
|
|
296
|
-
u.NODE_ENV !== "production" ? () => {
|
|
297
|
-
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
298
|
-
} : me
|
|
299
|
-
);
|
|
300
|
-
function _e() {
|
|
301
|
-
h.stop(), p = [], g = [], t._s.delete(e);
|
|
302
|
-
}
|
|
303
|
-
function Z(s, a) {
|
|
304
|
-
return function() {
|
|
305
|
-
L(t);
|
|
306
|
-
const f = Array.from(arguments), v = [], w = [];
|
|
307
|
-
function ve(E) {
|
|
308
|
-
v.push(E);
|
|
309
|
-
}
|
|
310
|
-
function Ee(E) {
|
|
311
|
-
w.push(E);
|
|
312
|
-
}
|
|
313
|
-
P(g, {
|
|
314
|
-
args: f,
|
|
315
|
-
name: s,
|
|
316
|
-
store: c,
|
|
317
|
-
after: ve,
|
|
318
|
-
onError: Ee
|
|
319
|
-
});
|
|
320
|
-
let D;
|
|
321
|
-
try {
|
|
322
|
-
D = a.apply(this && this.$id === e ? this : c, f);
|
|
323
|
-
} catch (E) {
|
|
324
|
-
throw P(w, E), E;
|
|
325
|
-
}
|
|
326
|
-
return D instanceof Promise ? D.then((E) => (P(v, E), E)).catch((E) => (P(w, E), Promise.reject(E))) : (P(v, D), D);
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
const I = /* @__PURE__ */ V({
|
|
330
|
-
actions: {},
|
|
331
|
-
getters: {},
|
|
332
|
-
state: [],
|
|
333
|
-
hotState: S
|
|
334
|
-
}), K = {
|
|
335
|
-
_p: t,
|
|
336
|
-
// _s: scope,
|
|
337
|
-
$id: e,
|
|
338
|
-
$onAction: te.bind(null, g),
|
|
339
|
-
$patch: Q,
|
|
340
|
-
$reset: ge,
|
|
341
|
-
$subscribe(s, a = {}) {
|
|
342
|
-
const f = te(p, s, a.detached, () => v()), v = h.run(() => M(() => t.state.value[e], (w) => {
|
|
343
|
-
(a.flush === "sync" ? b : y) && s({
|
|
344
|
-
storeId: e,
|
|
345
|
-
type: A.direct,
|
|
346
|
-
events: d
|
|
347
|
-
}, w);
|
|
348
|
-
}, k({}, m, a)));
|
|
349
|
-
return f;
|
|
350
|
-
},
|
|
351
|
-
$dispose: _e
|
|
352
|
-
}, c = Ne(u.NODE_ENV !== "production" || z ? k(
|
|
353
|
-
{
|
|
354
|
-
_hmrPayload: I,
|
|
355
|
-
_customProperties: V(/* @__PURE__ */ new Set())
|
|
356
|
-
// devtools custom properties
|
|
357
|
-
},
|
|
358
|
-
K
|
|
359
|
-
// must be added later
|
|
360
|
-
// setupStore
|
|
361
|
-
) : K);
|
|
362
|
-
t._s.set(e, c);
|
|
363
|
-
const N = (t._a && t._a.runWithContext || qe)(() => t._e.run(() => (h = Ce()).run(r)));
|
|
364
|
-
for (const s in N) {
|
|
365
|
-
const a = N[s];
|
|
366
|
-
if (R(a) && !oe(a) || H(a))
|
|
367
|
-
u.NODE_ENV !== "production" && n ? j(S.value, s, F(N, s)) : i || (_ && He(a) && (R(a) ? a.value = _[s] : W(a, _[s])), t.state.value[e][s] = a), u.NODE_ENV !== "production" && I.state.push(s);
|
|
368
|
-
else if (typeof a == "function") {
|
|
369
|
-
const f = u.NODE_ENV !== "production" && n ? a : Z(s, a);
|
|
370
|
-
N[s] = f, u.NODE_ENV !== "production" && (I.actions[s] = a), l.actions[s] = a;
|
|
371
|
-
} else
|
|
372
|
-
u.NODE_ENV !== "production" && oe(a) && (I.getters[s] = i ? (
|
|
373
|
-
// @ts-expect-error
|
|
374
|
-
o.getters[s]
|
|
375
|
-
) : a, Y && (N._getters || // @ts-expect-error: same
|
|
376
|
-
(N._getters = V([]))).push(s));
|
|
377
|
-
}
|
|
378
|
-
if (k(c, N), k(Se(c), N), Object.defineProperty(c, "$state", {
|
|
379
|
-
get: () => u.NODE_ENV !== "production" && n ? S.value : t.state.value[e],
|
|
380
|
-
set: (s) => {
|
|
381
|
-
if (u.NODE_ENV !== "production" && n)
|
|
382
|
-
throw new Error("cannot set hotState");
|
|
383
|
-
Q((a) => {
|
|
384
|
-
k(a, s);
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
}), u.NODE_ENV !== "production" && (c._hotUpdate = V((s) => {
|
|
388
|
-
c._hotUpdating = !0, s._hmrPayload.state.forEach((a) => {
|
|
389
|
-
if (a in c.$state) {
|
|
390
|
-
const f = s.$state[a], v = c.$state[a];
|
|
391
|
-
typeof f == "object" && T(f) && T(v) ? fe(f, v) : s.$state[a] = v;
|
|
392
|
-
}
|
|
393
|
-
j(c, a, F(s.$state, a));
|
|
394
|
-
}), Object.keys(c.$state).forEach((a) => {
|
|
395
|
-
a in s.$state || $(c, a);
|
|
396
|
-
}), y = !1, b = !1, t.state.value[e] = F(s._hmrPayload, "hotState"), b = !0, U().then(() => {
|
|
397
|
-
y = !0;
|
|
398
|
-
});
|
|
399
|
-
for (const a in s._hmrPayload.actions) {
|
|
400
|
-
const f = s[a];
|
|
401
|
-
j(c, a, Z(a, f));
|
|
402
|
-
}
|
|
403
|
-
for (const a in s._hmrPayload.getters) {
|
|
404
|
-
const f = s._hmrPayload.getters[a], v = i ? (
|
|
405
|
-
// special handling of options api
|
|
406
|
-
X(() => (L(t), f.call(c, c)))
|
|
407
|
-
) : f;
|
|
408
|
-
j(c, a, v);
|
|
409
|
-
}
|
|
410
|
-
Object.keys(c._hmrPayload.getters).forEach((a) => {
|
|
411
|
-
a in s._hmrPayload.getters || $(c, a);
|
|
412
|
-
}), Object.keys(c._hmrPayload.actions).forEach((a) => {
|
|
413
|
-
a in s._hmrPayload.actions || $(c, a);
|
|
414
|
-
}), c._hmrPayload = s._hmrPayload, c._getters = s._getters, c._hotUpdating = !1;
|
|
415
|
-
})), z) {
|
|
416
|
-
const s = {
|
|
417
|
-
writable: !0,
|
|
418
|
-
configurable: !0,
|
|
419
|
-
// avoid warning on devtools trying to display this property
|
|
420
|
-
enumerable: !1
|
|
421
|
-
};
|
|
422
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((a) => {
|
|
423
|
-
Object.defineProperty(c, a, k({ value: c[a] }, s));
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
return t._p.forEach((s) => {
|
|
427
|
-
if (z) {
|
|
428
|
-
const a = h.run(() => s({
|
|
429
|
-
store: c,
|
|
430
|
-
app: t._a,
|
|
431
|
-
pinia: t,
|
|
432
|
-
options: l
|
|
433
|
-
}));
|
|
434
|
-
Object.keys(a || {}).forEach((f) => c._customProperties.add(f)), k(c, a);
|
|
435
|
-
} else
|
|
436
|
-
k(c, h.run(() => s({
|
|
437
|
-
store: c,
|
|
438
|
-
app: t._a,
|
|
439
|
-
pinia: t,
|
|
440
|
-
options: l
|
|
441
|
-
})));
|
|
442
|
-
}), u.NODE_ENV !== "production" && c.$state && typeof c.$state == "object" && typeof c.$state.constructor == "function" && !c.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
443
|
-
state: () => new MyClass()
|
|
444
|
-
Found in store "${c.$id}".`), _ && i && o.hydrate && o.hydrate(c.$state, _), y = !0, b = !0, c;
|
|
445
|
-
}
|
|
446
|
-
function ye(e, r, o) {
|
|
447
|
-
let t, n;
|
|
448
|
-
const i = typeof r == "function";
|
|
449
|
-
if (typeof e == "string")
|
|
450
|
-
t = e, n = i ? o : r;
|
|
451
|
-
else if (n = e, t = e.id, u.NODE_ENV !== "production" && typeof t != "string")
|
|
452
|
-
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
453
|
-
function h(l, m) {
|
|
454
|
-
const y = Oe();
|
|
455
|
-
if (l = // in test mode, ignore the argument provided as we can always retrieve a
|
|
456
|
-
// pinia instance with getActivePinia()
|
|
457
|
-
(u.NODE_ENV === "test" && x && x._testing ? null : l) || (y ? G(We, null) : null), l && L(l), u.NODE_ENV !== "production" && !x)
|
|
458
|
-
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
459
|
-
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
460
|
-
This will fail in production.`);
|
|
461
|
-
l = x, l._s.has(t) || (i ? q(t, r, n, l) : re(t, n, l), u.NODE_ENV !== "production" && (h._pinia = l));
|
|
462
|
-
const b = l._s.get(t);
|
|
463
|
-
if (u.NODE_ENV !== "production" && m) {
|
|
464
|
-
const p = "__hot:" + t, g = i ? q(p, r, n, l, !0) : re(p, k({}, n), l, !0);
|
|
465
|
-
m._hotUpdate(g), delete l.state.value[p], l._s.delete(p);
|
|
466
|
-
}
|
|
467
|
-
if (u.NODE_ENV !== "production" && Y) {
|
|
468
|
-
const p = se();
|
|
469
|
-
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
470
|
-
!m) {
|
|
471
|
-
const g = p.proxy, d = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
472
|
-
d[t] = b;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
return b;
|
|
476
|
-
}
|
|
477
|
-
return h.$id = t, h;
|
|
478
|
-
}
|
|
479
|
-
(function() {
|
|
480
|
-
try {
|
|
481
|
-
if (typeof document < "u") {
|
|
482
|
-
var e = document.createElement("style");
|
|
483
|
-
e.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-a8f3d91f]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-a8f3d91f]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-a8f3d91f]{transform-origin:20px 20px;animation:lds-spinner-a8f3d91f 1.2s linear infinite}.lds-spinner div[data-v-a8f3d91f]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-a8f3d91f]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-a8f3d91f]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-a8f3d91f]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-a8f3d91f]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-a8f3d91f]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-a8f3d91f]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-a8f3d91f]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-a8f3d91f]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-a8f3d91f]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-a8f3d91f{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')), document.head.appendChild(e);
|
|
484
|
-
}
|
|
485
|
-
} catch (r) {
|
|
486
|
-
console.error("vite-plugin-css-injected-by-js", r);
|
|
487
|
-
}
|
|
488
|
-
})();
|
|
489
|
-
const Xe = ye("viewMgr", () => {
|
|
490
|
-
const e = O([]);
|
|
491
|
-
function r() {
|
|
492
|
-
return e.value.length <= 0;
|
|
493
|
-
}
|
|
494
|
-
function o() {
|
|
495
|
-
const m = e.value.length;
|
|
496
|
-
if (m > 0)
|
|
497
|
-
return e.value[m - 1];
|
|
498
|
-
}
|
|
499
|
-
function t(m) {
|
|
500
|
-
return e.value.find((y) => y === m) !== void 0;
|
|
501
|
-
}
|
|
502
|
-
function n(m) {
|
|
503
|
-
i(m), e.value.push(m);
|
|
504
|
-
}
|
|
505
|
-
function i(m) {
|
|
506
|
-
const y = e.value.findIndex((b) => b === m);
|
|
507
|
-
y !== -1 && e.value.splice(y, 1);
|
|
508
|
-
}
|
|
509
|
-
function h() {
|
|
510
|
-
e.value.pop();
|
|
511
|
-
}
|
|
512
|
-
function l() {
|
|
513
|
-
e.value = [];
|
|
514
|
-
}
|
|
515
|
-
return { isEmpty: r, lastView: o, hasView: t, addView: n, delView: i, popView: h, clearViews: l };
|
|
516
|
-
});
|
|
517
|
-
function Ye(e) {
|
|
518
|
-
return { all: e = e || /* @__PURE__ */ new Map(), on: function(r, o) {
|
|
519
|
-
var t = e.get(r);
|
|
520
|
-
t ? t.push(o) : e.set(r, [o]);
|
|
521
|
-
}, off: function(r, o) {
|
|
522
|
-
var t = e.get(r);
|
|
523
|
-
t && (o ? t.splice(t.indexOf(o) >>> 0, 1) : e.set(r, []));
|
|
524
|
-
}, emit: function(r, o) {
|
|
525
|
-
var t = e.get(r);
|
|
526
|
-
t && t.slice().map(function(n) {
|
|
527
|
-
n(o);
|
|
528
|
-
}), (t = e.get("*")) && t.slice().map(function(n) {
|
|
529
|
-
n(r, o);
|
|
530
|
-
});
|
|
531
|
-
} };
|
|
532
|
-
}
|
|
533
|
-
const C = Ye();
|
|
534
|
-
async function he(e, r, o) {
|
|
535
|
-
return new Promise((t) => {
|
|
536
|
-
const n = async () => {
|
|
537
|
-
e() ? t(!0) : setTimeout(n, 30);
|
|
538
|
-
};
|
|
539
|
-
n();
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
function Je(e, r) {
|
|
543
|
-
const o = Xe(), t = X({
|
|
544
|
-
get() {
|
|
545
|
-
return o.hasView(e);
|
|
546
|
-
},
|
|
547
|
-
set(i) {
|
|
548
|
-
i ? o.addView(e) : o.delView(e);
|
|
549
|
-
}
|
|
550
|
-
}), n = (i) => {
|
|
551
|
-
t.value = !0;
|
|
552
|
-
};
|
|
553
|
-
return ce(() => {
|
|
554
|
-
C.on(e, n);
|
|
555
|
-
}), ie(() => {
|
|
556
|
-
C.off(e, n);
|
|
557
|
-
}), { open: t };
|
|
558
|
-
}
|
|
559
|
-
ye(
|
|
560
|
-
"global",
|
|
561
|
-
() => {
|
|
562
|
-
const e = de(), r = O();
|
|
563
|
-
M(
|
|
564
|
-
r,
|
|
565
|
-
(i) => {
|
|
566
|
-
e.global.name.value = i ? "dark" : "light";
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
immediate: !0
|
|
570
|
-
}
|
|
571
|
-
);
|
|
572
|
-
const o = O("en"), t = O({}), n = O("");
|
|
573
|
-
return {
|
|
574
|
-
dark: r,
|
|
575
|
-
locale: o,
|
|
576
|
-
permissionObjects: t,
|
|
577
|
-
permissionChecksum: n
|
|
578
|
-
};
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
persist: [
|
|
582
|
-
{
|
|
583
|
-
storage: localStorage,
|
|
584
|
-
paths: ["dark", "locale", "permissionObjects", "permissionChecksum"]
|
|
585
|
-
}
|
|
586
|
-
]
|
|
587
|
-
}
|
|
588
|
-
);
|
|
589
|
-
require("js-cookie");
|
|
590
|
-
let ne = Date.now();
|
|
591
|
-
function pe() {
|
|
592
|
-
const e = Date.now();
|
|
593
|
-
return e - ne > 500 ? (ne = e, !0) : !1;
|
|
594
|
-
}
|
|
595
|
-
let Qe = 0;
|
|
596
|
-
function be() {
|
|
597
|
-
return ++Qe;
|
|
598
|
-
}
|
|
599
|
-
async function Ze(e) {
|
|
600
|
-
if (!pe())
|
|
601
|
-
return;
|
|
602
|
-
let r = !1, o;
|
|
603
|
-
const t = (i) => {
|
|
604
|
-
o = i, r = !0;
|
|
605
|
-
}, n = be();
|
|
606
|
-
return C.on("confirmDlgResult" + n, t), C.emit("confirmDlg", { ...e, seq: n }), await he(() => r), C.off("confirmDlgResult" + n, t), o;
|
|
607
|
-
}
|
|
608
|
-
async function Ke(e) {
|
|
609
|
-
if (!pe())
|
|
610
|
-
return;
|
|
611
|
-
let r = !1, o;
|
|
612
|
-
const t = (i) => {
|
|
613
|
-
o = i, r = !0;
|
|
614
|
-
}, n = be();
|
|
615
|
-
return C.on("promptDlgResult" + n, t), C.emit("promptDlg", { ...e, seq: n }), await he(() => r), C.off("promptDlgResult" + n, t), o;
|
|
616
|
-
}
|
|
617
|
-
require("js-cookie");
|
|
618
|
-
O("");
|
|
619
|
-
ue.setConfirm(async (e, r) => {
|
|
620
|
-
const o = await Ze({
|
|
5
|
+
ASTNode: re,
|
|
6
|
+
BasicCursor: te,
|
|
7
|
+
Block: ae,
|
|
8
|
+
BlockSvg: ce,
|
|
9
|
+
Blocks: ne,
|
|
10
|
+
COLLAPSED_FIELD_NAME: le,
|
|
11
|
+
COLLAPSED_INPUT_NAME: ie,
|
|
12
|
+
COLLAPSE_CHARS: se,
|
|
13
|
+
CodeGenerator: ue,
|
|
14
|
+
CollapsibleToolboxCategory: de,
|
|
15
|
+
ComponentManager: ye,
|
|
16
|
+
Connection: me,
|
|
17
|
+
ConnectionChecker: be,
|
|
18
|
+
ConnectionDB: ge,
|
|
19
|
+
ConnectionType: _e,
|
|
20
|
+
ContextMenu: fe,
|
|
21
|
+
ContextMenuItems: pe,
|
|
22
|
+
ContextMenuRegistry: he,
|
|
23
|
+
Css: ke,
|
|
24
|
+
Cursor: Te,
|
|
25
|
+
DELETE_VARIABLE_ID: Ce,
|
|
26
|
+
DeleteArea: Ee,
|
|
27
|
+
DragTarget: Se,
|
|
28
|
+
DropDownDiv: ve,
|
|
29
|
+
Events: L,
|
|
30
|
+
Extensions: Me,
|
|
31
|
+
Field: Oe,
|
|
32
|
+
FieldCheckbox: Ae,
|
|
33
|
+
FieldDropdown: Pe,
|
|
34
|
+
FieldImage: we,
|
|
35
|
+
FieldLabel: Be,
|
|
36
|
+
FieldLabelSerializable: Re,
|
|
37
|
+
FieldNumber: Le,
|
|
38
|
+
FieldTextInput: Ie,
|
|
39
|
+
FieldVariable: xe,
|
|
40
|
+
Flyout: De,
|
|
41
|
+
FlyoutButton: Fe,
|
|
42
|
+
FlyoutMetricsManager: Ve,
|
|
43
|
+
Generator: ze,
|
|
44
|
+
Gesture: Ne,
|
|
45
|
+
Grid: Ue,
|
|
46
|
+
HorizontalFlyout: je,
|
|
47
|
+
INPUT_VALUE: $e,
|
|
48
|
+
Input: Ge,
|
|
49
|
+
InsertionMarkerManager: We,
|
|
50
|
+
InsertionMarkerPreviewer: Xe,
|
|
51
|
+
Marker: He,
|
|
52
|
+
MarkerManager: Ye,
|
|
53
|
+
Menu: qe,
|
|
54
|
+
MenuItem: Je,
|
|
55
|
+
MetricsManager: Ze,
|
|
56
|
+
Msg: Ke,
|
|
57
|
+
NEXT_STATEMENT: Qe,
|
|
58
|
+
Names: eo,
|
|
59
|
+
OPPOSITE_TYPE: oo,
|
|
60
|
+
OUTPUT_VALUE: ro,
|
|
61
|
+
Options: to,
|
|
62
|
+
PREVIOUS_STATEMENT: ao,
|
|
63
|
+
PROCEDURE_CATEGORY_NAME: co,
|
|
64
|
+
Procedures: no,
|
|
65
|
+
RENAME_VARIABLE_ID: lo,
|
|
66
|
+
RenderedConnection: io,
|
|
67
|
+
Scrollbar: so,
|
|
68
|
+
ScrollbarPair: uo,
|
|
69
|
+
ShortcutItems: yo,
|
|
70
|
+
ShortcutRegistry: mo,
|
|
71
|
+
TOOLBOX_AT_BOTTOM: bo,
|
|
72
|
+
TOOLBOX_AT_LEFT: go,
|
|
73
|
+
TOOLBOX_AT_RIGHT: _o,
|
|
74
|
+
TOOLBOX_AT_TOP: fo,
|
|
75
|
+
TabNavigateCursor: po,
|
|
76
|
+
Theme: b,
|
|
77
|
+
ThemeManager: ho,
|
|
78
|
+
Themes: i,
|
|
79
|
+
Toolbox: ko,
|
|
80
|
+
ToolboxCategory: To,
|
|
81
|
+
ToolboxItem: Co,
|
|
82
|
+
ToolboxSeparator: Eo,
|
|
83
|
+
Tooltip: So,
|
|
84
|
+
Touch: vo,
|
|
85
|
+
Trashcan: Mo,
|
|
86
|
+
UnattachedFieldError: Oo,
|
|
87
|
+
VARIABLE_CATEGORY_NAME: Ao,
|
|
88
|
+
VARIABLE_DYNAMIC_CATEGORY_NAME: Po,
|
|
89
|
+
VERSION: wo,
|
|
90
|
+
VariableMap: Bo,
|
|
91
|
+
VariableModel: Ro,
|
|
92
|
+
Variables: Lo,
|
|
93
|
+
VariablesDynamic: Io,
|
|
94
|
+
VerticalFlyout: xo,
|
|
95
|
+
WidgetDiv: Do,
|
|
96
|
+
Workspace: Fo,
|
|
97
|
+
WorkspaceAudio: Vo,
|
|
98
|
+
WorkspaceDragger: zo,
|
|
99
|
+
WorkspaceSvg: No,
|
|
100
|
+
Xml: Uo,
|
|
101
|
+
ZoomControls: jo,
|
|
102
|
+
blockAnimations: $o,
|
|
103
|
+
blockRendering: Go,
|
|
104
|
+
browserEvents: Wo,
|
|
105
|
+
bubbles: Xo,
|
|
106
|
+
bumpObjects: Ho,
|
|
107
|
+
clipboard: Yo,
|
|
108
|
+
comments: qo,
|
|
109
|
+
common: Jo,
|
|
110
|
+
config: Zo,
|
|
111
|
+
constants: Ko,
|
|
112
|
+
defineBlocksWithJsonArray: Qo,
|
|
113
|
+
dialog: g,
|
|
114
|
+
dragging: er,
|
|
115
|
+
fieldRegistry: or,
|
|
116
|
+
geras: rr,
|
|
117
|
+
getMainWorkspace: I,
|
|
118
|
+
getSelected: tr,
|
|
119
|
+
hasBubble: ar,
|
|
120
|
+
hideChaff: cr,
|
|
121
|
+
icons: nr,
|
|
122
|
+
inject: x,
|
|
123
|
+
inputs: lr,
|
|
124
|
+
isCopyable: ir,
|
|
125
|
+
isDeletable: sr,
|
|
126
|
+
isDraggable: ur,
|
|
127
|
+
isIcon: dr,
|
|
128
|
+
isObservable: yr,
|
|
129
|
+
isPaster: mr,
|
|
130
|
+
isRenderedElement: br,
|
|
131
|
+
isSelectable: gr,
|
|
132
|
+
isSerializable: _r,
|
|
133
|
+
isVariableBackedParameterModel: fr,
|
|
134
|
+
procedures: pr,
|
|
135
|
+
registry: hr,
|
|
136
|
+
renderManagement: kr,
|
|
137
|
+
serialization: Tr,
|
|
138
|
+
setLocale: D,
|
|
139
|
+
setParentContainer: Cr,
|
|
140
|
+
svgResize: F,
|
|
141
|
+
thrasos: Er,
|
|
142
|
+
uiPosition: Sr,
|
|
143
|
+
utils: vr,
|
|
144
|
+
zelos: Mr
|
|
145
|
+
} = h;
|
|
146
|
+
g.setConfirm(async (e, o) => {
|
|
147
|
+
const r = await k({
|
|
621
148
|
title: "",
|
|
622
149
|
text: e
|
|
623
150
|
});
|
|
624
|
-
|
|
151
|
+
o(!!r);
|
|
625
152
|
});
|
|
626
|
-
|
|
627
|
-
const t = await
|
|
153
|
+
g.setPrompt(async (e, o, r) => {
|
|
154
|
+
const t = await T({
|
|
628
155
|
title: "",
|
|
629
|
-
value:
|
|
156
|
+
value: o
|
|
630
157
|
});
|
|
631
|
-
|
|
158
|
+
r(t);
|
|
632
159
|
});
|
|
633
|
-
const
|
|
634
|
-
const
|
|
635
|
-
return
|
|
636
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
160
|
+
const V = (e, o) => {
|
|
161
|
+
const r = e[o];
|
|
162
|
+
return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((t, a) => {
|
|
163
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, new Error("Unknown variable dynamic import: " + o)));
|
|
637
164
|
});
|
|
638
165
|
};
|
|
639
|
-
async function
|
|
640
|
-
const
|
|
641
|
-
|
|
166
|
+
async function y(e) {
|
|
167
|
+
const o = await V(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./en-DYxpcVy9.js"), "./msg/zhHans.ts": () => import("./zhHans-DjWw6Iqb.js") }), `./msg/${e}.ts`);
|
|
168
|
+
D(o);
|
|
642
169
|
}
|
|
643
|
-
|
|
170
|
+
i.Classic.blockStyles = {
|
|
644
171
|
color_blocks: {
|
|
645
172
|
colourPrimary: "#a5745b",
|
|
646
173
|
colourSecondary: "#ede3de",
|
|
@@ -714,7 +241,7 @@ B.Classic.blockStyles = {
|
|
|
714
241
|
hat: ""
|
|
715
242
|
}
|
|
716
243
|
};
|
|
717
|
-
|
|
244
|
+
i.Classic.categoryStyles = {
|
|
718
245
|
calc_category: {
|
|
719
246
|
colour: "#757575"
|
|
720
247
|
},
|
|
@@ -764,9 +291,9 @@ B.Classic.categoryStyles = {
|
|
|
764
291
|
colour: "#a55b80"
|
|
765
292
|
}
|
|
766
293
|
};
|
|
767
|
-
const
|
|
294
|
+
const z = b.defineTheme("light", {
|
|
768
295
|
name: "light",
|
|
769
|
-
base:
|
|
296
|
+
base: i.Classic,
|
|
770
297
|
componentStyles: {
|
|
771
298
|
workspaceBackgroundColour: "#ffffff",
|
|
772
299
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -780,9 +307,9 @@ const tt = le.defineTheme("light", {
|
|
|
780
307
|
scrollbarOpacity: 0.4,
|
|
781
308
|
cursorColour: ""
|
|
782
309
|
}
|
|
783
|
-
}),
|
|
310
|
+
}), N = b.defineTheme("dark", {
|
|
784
311
|
name: "dark",
|
|
785
|
-
base:
|
|
312
|
+
base: i.Classic,
|
|
786
313
|
componentStyles: {
|
|
787
314
|
workspaceBackgroundColour: "#1e1e1e",
|
|
788
315
|
toolboxBackgroundColour: "#272727",
|
|
@@ -797,47 +324,68 @@ const tt = le.defineTheme("light", {
|
|
|
797
324
|
cursorColour: ""
|
|
798
325
|
}
|
|
799
326
|
});
|
|
800
|
-
function
|
|
801
|
-
const
|
|
802
|
-
switch (console.log(
|
|
327
|
+
function U(e) {
|
|
328
|
+
const o = I();
|
|
329
|
+
switch (console.log(o), e) {
|
|
803
330
|
case "light":
|
|
804
|
-
|
|
331
|
+
o.setTheme(z);
|
|
805
332
|
break;
|
|
806
333
|
case "dark":
|
|
807
|
-
|
|
334
|
+
o.setTheme(N);
|
|
808
335
|
break;
|
|
809
336
|
}
|
|
810
337
|
}
|
|
811
|
-
function
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
338
|
+
function j(e, o) {
|
|
339
|
+
const r = E();
|
|
340
|
+
if (!r)
|
|
341
|
+
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
342
|
+
return r;
|
|
343
|
+
}
|
|
344
|
+
const $ = Symbol.for("vuetify:locale");
|
|
345
|
+
function G() {
|
|
346
|
+
const e = m($);
|
|
347
|
+
if (!e)
|
|
348
|
+
throw new Error("[Vuetify] Could not find injected locale instance");
|
|
349
|
+
return e;
|
|
350
|
+
}
|
|
351
|
+
const W = Symbol.for("vuetify:theme");
|
|
352
|
+
function X() {
|
|
353
|
+
j("useTheme");
|
|
354
|
+
const e = m(W, null);
|
|
355
|
+
if (!e)
|
|
356
|
+
throw new Error("Could not find Vuetify theme injection");
|
|
357
|
+
return e;
|
|
358
|
+
}
|
|
359
|
+
function H(e, o) {
|
|
360
|
+
var a, l;
|
|
361
|
+
const r = o.value, t = {
|
|
362
|
+
passive: !((a = o.modifiers) != null && a.active)
|
|
815
363
|
};
|
|
816
|
-
window.addEventListener("resize",
|
|
817
|
-
handler:
|
|
364
|
+
window.addEventListener("resize", r, t), e._onResize = Object(e._onResize), e._onResize[o.instance.$.uid] = {
|
|
365
|
+
handler: r,
|
|
818
366
|
options: t
|
|
819
|
-
}, (
|
|
367
|
+
}, (l = o.modifiers) != null && l.quiet || r();
|
|
820
368
|
}
|
|
821
|
-
function
|
|
822
|
-
var
|
|
823
|
-
if (!((
|
|
369
|
+
function Y(e, o) {
|
|
370
|
+
var a;
|
|
371
|
+
if (!((a = e._onResize) != null && a[o.instance.$.uid]))
|
|
824
372
|
return;
|
|
825
373
|
const {
|
|
826
|
-
handler:
|
|
374
|
+
handler: r,
|
|
827
375
|
options: t
|
|
828
|
-
} = e._onResize[
|
|
829
|
-
window.removeEventListener("resize",
|
|
376
|
+
} = e._onResize[o.instance.$.uid];
|
|
377
|
+
window.removeEventListener("resize", r, t), delete e._onResize[o.instance.$.uid];
|
|
830
378
|
}
|
|
831
|
-
const
|
|
832
|
-
mounted:
|
|
833
|
-
unmounted:
|
|
834
|
-
},
|
|
379
|
+
const q = {
|
|
380
|
+
mounted: H,
|
|
381
|
+
unmounted: Y
|
|
382
|
+
}, J = { class: "position-relative w-100 h-100" }, Z = /* @__PURE__ */ S({
|
|
835
383
|
__name: "index",
|
|
836
384
|
emits: ["ready", "change"],
|
|
837
|
-
setup(e, { emit:
|
|
838
|
-
const
|
|
839
|
-
let
|
|
840
|
-
const
|
|
385
|
+
setup(e, { emit: o }) {
|
|
386
|
+
const r = G(), t = X(), { open: a } = C("blocklyEditorFlyout"), l = o, s = v(null);
|
|
387
|
+
let n;
|
|
388
|
+
const _ = {
|
|
841
389
|
grid: {
|
|
842
390
|
length: 2,
|
|
843
391
|
snap: !0,
|
|
@@ -859,195 +407,186 @@ const st = {
|
|
|
859
407
|
wheel: !0
|
|
860
408
|
}
|
|
861
409
|
};
|
|
862
|
-
|
|
863
|
-
|
|
410
|
+
M(async () => {
|
|
411
|
+
s.value && (await y(r.current.value), n = x(s.value, _), n.addChangeListener(L.disableOrphans), n.addChangeListener(p), await O(), l("ready", n));
|
|
864
412
|
});
|
|
865
|
-
function
|
|
866
|
-
|
|
413
|
+
function f() {
|
|
414
|
+
n && F(n);
|
|
867
415
|
}
|
|
868
|
-
function
|
|
869
|
-
|
|
416
|
+
function p(c) {
|
|
417
|
+
l("change", c);
|
|
870
418
|
}
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
})
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
});
|
|
881
|
-
}), g = document.querySelector("#blocklyEditor .blocklyFlyout");
|
|
882
|
-
return p.observe(g, { attributes: !0 }), M(n, (d) => {
|
|
883
|
-
var _;
|
|
884
|
-
d || (_ = l.getToolbox()) == null || _.clearSelection();
|
|
885
|
-
}), M(
|
|
886
|
-
() => o.current.value,
|
|
887
|
-
(d) => {
|
|
888
|
-
ae(d);
|
|
419
|
+
return A(() => {
|
|
420
|
+
a.value = !1;
|
|
421
|
+
}), d(a, (c) => {
|
|
422
|
+
var u;
|
|
423
|
+
c || (u = n.getToolbox()) == null || u.clearSelection();
|
|
424
|
+
}), d(
|
|
425
|
+
() => r.current.value,
|
|
426
|
+
(c) => {
|
|
427
|
+
y(c);
|
|
889
428
|
}
|
|
890
|
-
),
|
|
429
|
+
), d(
|
|
891
430
|
() => t.current.value.dark,
|
|
892
|
-
(
|
|
893
|
-
|
|
431
|
+
(c) => {
|
|
432
|
+
U(c ? "dark" : "light");
|
|
894
433
|
}
|
|
895
|
-
), (
|
|
896
|
-
|
|
434
|
+
), (c, u) => (P(), w("div", J, [
|
|
435
|
+
B(R("div", {
|
|
897
436
|
class: "w-100 h-100",
|
|
898
437
|
ref_key: "blocklyDiv",
|
|
899
|
-
ref:
|
|
438
|
+
ref: s,
|
|
900
439
|
id: "blocklyEditor"
|
|
901
440
|
}, null, 512), [
|
|
902
|
-
[
|
|
441
|
+
[q, f]
|
|
903
442
|
])
|
|
904
443
|
]));
|
|
905
444
|
}
|
|
906
|
-
}),
|
|
907
|
-
e.component("x-blockly",
|
|
908
|
-
},
|
|
445
|
+
}), K = (e) => {
|
|
446
|
+
e.component("x-blockly", Z);
|
|
447
|
+
}, Or = { install: K };
|
|
909
448
|
export {
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
449
|
+
re as ASTNode,
|
|
450
|
+
te as BasicCursor,
|
|
451
|
+
ae as Block,
|
|
452
|
+
ce as BlockSvg,
|
|
453
|
+
ne as Blocks,
|
|
454
|
+
le as COLLAPSED_FIELD_NAME,
|
|
455
|
+
ie as COLLAPSED_INPUT_NAME,
|
|
456
|
+
se as COLLAPSE_CHARS,
|
|
457
|
+
ue as CodeGenerator,
|
|
458
|
+
de as CollapsibleToolboxCategory,
|
|
459
|
+
ye as ComponentManager,
|
|
460
|
+
me as Connection,
|
|
461
|
+
be as ConnectionChecker,
|
|
462
|
+
ge as ConnectionDB,
|
|
463
|
+
_e as ConnectionType,
|
|
464
|
+
fe as ContextMenu,
|
|
465
|
+
pe as ContextMenuItems,
|
|
466
|
+
he as ContextMenuRegistry,
|
|
467
|
+
ke as Css,
|
|
468
|
+
Te as Cursor,
|
|
469
|
+
Ce as DELETE_VARIABLE_ID,
|
|
470
|
+
Ee as DeleteArea,
|
|
471
|
+
Se as DragTarget,
|
|
472
|
+
ve as DropDownDiv,
|
|
473
|
+
L as Events,
|
|
474
|
+
Me as Extensions,
|
|
475
|
+
Oe as Field,
|
|
476
|
+
Ae as FieldCheckbox,
|
|
477
|
+
Pe as FieldDropdown,
|
|
478
|
+
we as FieldImage,
|
|
479
|
+
Be as FieldLabel,
|
|
480
|
+
Re as FieldLabelSerializable,
|
|
481
|
+
Le as FieldNumber,
|
|
482
|
+
Ie as FieldTextInput,
|
|
483
|
+
xe as FieldVariable,
|
|
484
|
+
De as Flyout,
|
|
485
|
+
Fe as FlyoutButton,
|
|
486
|
+
Ve as FlyoutMetricsManager,
|
|
487
|
+
ze as Generator,
|
|
488
|
+
Ne as Gesture,
|
|
489
|
+
Ue as Grid,
|
|
490
|
+
je as HorizontalFlyout,
|
|
491
|
+
$e as INPUT_VALUE,
|
|
492
|
+
Ge as Input,
|
|
493
|
+
We as InsertionMarkerManager,
|
|
494
|
+
Xe as InsertionMarkerPreviewer,
|
|
495
|
+
He as Marker,
|
|
496
|
+
Ye as MarkerManager,
|
|
497
|
+
qe as Menu,
|
|
498
|
+
Je as MenuItem,
|
|
499
|
+
Ze as MetricsManager,
|
|
500
|
+
Ke as Msg,
|
|
501
|
+
Qe as NEXT_STATEMENT,
|
|
502
|
+
eo as Names,
|
|
503
|
+
oo as OPPOSITE_TYPE,
|
|
504
|
+
ro as OUTPUT_VALUE,
|
|
505
|
+
to as Options,
|
|
506
|
+
ao as PREVIOUS_STATEMENT,
|
|
507
|
+
co as PROCEDURE_CATEGORY_NAME,
|
|
508
|
+
no as Procedures,
|
|
509
|
+
lo as RENAME_VARIABLE_ID,
|
|
510
|
+
io as RenderedConnection,
|
|
511
|
+
so as Scrollbar,
|
|
512
|
+
uo as ScrollbarPair,
|
|
513
|
+
yo as ShortcutItems,
|
|
514
|
+
mo as ShortcutRegistry,
|
|
515
|
+
bo as TOOLBOX_AT_BOTTOM,
|
|
516
|
+
go as TOOLBOX_AT_LEFT,
|
|
517
|
+
_o as TOOLBOX_AT_RIGHT,
|
|
518
|
+
fo as TOOLBOX_AT_TOP,
|
|
519
|
+
po as TabNavigateCursor,
|
|
520
|
+
b as Theme,
|
|
521
|
+
ho as ThemeManager,
|
|
522
|
+
i as Themes,
|
|
523
|
+
ko as Toolbox,
|
|
524
|
+
To as ToolboxCategory,
|
|
525
|
+
Co as ToolboxItem,
|
|
526
|
+
Eo as ToolboxSeparator,
|
|
527
|
+
So as Tooltip,
|
|
528
|
+
vo as Touch,
|
|
529
|
+
Mo as Trashcan,
|
|
530
|
+
Oo as UnattachedFieldError,
|
|
531
|
+
Ao as VARIABLE_CATEGORY_NAME,
|
|
532
|
+
Po as VARIABLE_DYNAMIC_CATEGORY_NAME,
|
|
533
|
+
wo as VERSION,
|
|
534
|
+
Bo as VariableMap,
|
|
535
|
+
Ro as VariableModel,
|
|
536
|
+
Lo as Variables,
|
|
537
|
+
Io as VariablesDynamic,
|
|
538
|
+
xo as VerticalFlyout,
|
|
539
|
+
Do as WidgetDiv,
|
|
540
|
+
Fo as Workspace,
|
|
541
|
+
Vo as WorkspaceAudio,
|
|
542
|
+
zo as WorkspaceDragger,
|
|
543
|
+
No as WorkspaceSvg,
|
|
544
|
+
Uo as Xml,
|
|
545
|
+
jo as ZoomControls,
|
|
546
|
+
$o as blockAnimations,
|
|
547
|
+
Go as blockRendering,
|
|
548
|
+
Wo as browserEvents,
|
|
549
|
+
Xo as bubbles,
|
|
550
|
+
Ho as bumpObjects,
|
|
551
|
+
Yo as clipboard,
|
|
552
|
+
qo as comments,
|
|
553
|
+
Jo as common,
|
|
554
|
+
Zo as config,
|
|
555
|
+
Ko as constants,
|
|
556
|
+
Or as default,
|
|
557
|
+
Qo as defineBlocksWithJsonArray,
|
|
558
|
+
g as dialog,
|
|
559
|
+
er as dragging,
|
|
560
|
+
or as fieldRegistry,
|
|
561
|
+
rr as geras,
|
|
562
|
+
I as getMainWorkspace,
|
|
563
|
+
tr as getSelected,
|
|
564
|
+
ar as hasBubble,
|
|
565
|
+
cr as hideChaff,
|
|
566
|
+
nr as icons,
|
|
567
|
+
x as inject,
|
|
568
|
+
lr as inputs,
|
|
569
|
+
ir as isCopyable,
|
|
570
|
+
sr as isDeletable,
|
|
571
|
+
ur as isDraggable,
|
|
572
|
+
dr as isIcon,
|
|
573
|
+
yr as isObservable,
|
|
574
|
+
mr as isPaster,
|
|
575
|
+
br as isRenderedElement,
|
|
576
|
+
gr as isSelectable,
|
|
577
|
+
_r as isSerializable,
|
|
578
|
+
fr as isVariableBackedParameterModel,
|
|
579
|
+
pr as procedures,
|
|
580
|
+
hr as registry,
|
|
581
|
+
kr as renderManagement,
|
|
582
|
+
Tr as serialization,
|
|
583
|
+
D as setLocale,
|
|
584
|
+
y as setLocaleAsync,
|
|
585
|
+
Cr as setParentContainer,
|
|
586
|
+
U as setTheme,
|
|
587
|
+
F as svgResize,
|
|
588
|
+
Er as thrasos,
|
|
589
|
+
Sr as uiPosition,
|
|
590
|
+
vr as utils,
|
|
591
|
+
Mr as zelos
|
|
1053
592
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
"eslint-plugin-vue": "^9.24.1",
|
|
40
40
|
"husky": "^9.0.11",
|
|
41
41
|
"lint-staged": "^15.2.2",
|
|
42
|
+
"pinia": "^2.1.7",
|
|
43
|
+
"pinia-plugin-persistedstate": "^3.2.1",
|
|
42
44
|
"prettier": "3.2.5",
|
|
43
45
|
"rollup-plugin-copy": "^3.5.0",
|
|
44
46
|
"sass": "^1.74.1",
|