x-block-lib 0.1.2 → 0.1.4
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 +185 -194
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { B as ke } from "./blockly-ByC0ID0H.js";
|
|
2
|
-
import { getCurrentInstance as se, inject as
|
|
2
|
+
import { getCurrentInstance as se, inject as H, hasInjectionContext as Oe, ref as k, watch as x, reactive as Ne, markRaw as D, effectScope as Ce, isRef as M, isReactive as q, toRef as F, toRaw as Se, nextTick as U, computed as X, getCurrentScope as Te, onScopeDispose as Pe, toRefs as ee, onMounted as ce, onBeforeUnmount as ie, defineComponent as we, openBlock as De, createElementBlock as Ve, withDirectives as xe, createElementVNode as Ae } from "vue";
|
|
3
3
|
const {
|
|
4
4
|
ASTNode: mt,
|
|
5
|
-
BasicCursor:
|
|
6
|
-
Block:
|
|
5
|
+
BasicCursor: ht,
|
|
6
|
+
Block: yt,
|
|
7
7
|
BlockSvg: pt,
|
|
8
8
|
Blocks: bt,
|
|
9
9
|
COLLAPSED_FIELD_NAME: gt,
|
|
@@ -21,11 +21,11 @@ const {
|
|
|
21
21
|
ContextMenuRegistry: Dt,
|
|
22
22
|
Css: Vt,
|
|
23
23
|
Cursor: xt,
|
|
24
|
-
DELETE_VARIABLE_ID:
|
|
25
|
-
DeleteArea:
|
|
24
|
+
DELETE_VARIABLE_ID: At,
|
|
25
|
+
DeleteArea: Mt,
|
|
26
26
|
DragTarget: Rt,
|
|
27
27
|
DropDownDiv: It,
|
|
28
|
-
Events:
|
|
28
|
+
Events: Me,
|
|
29
29
|
Extensions: jt,
|
|
30
30
|
Field: Lt,
|
|
31
31
|
FieldCheckbox: Bt,
|
|
@@ -34,9 +34,9 @@ const {
|
|
|
34
34
|
FieldLabel: zt,
|
|
35
35
|
FieldLabelSerializable: Ut,
|
|
36
36
|
FieldNumber: Wt,
|
|
37
|
-
FieldTextInput:
|
|
38
|
-
FieldVariable:
|
|
39
|
-
Flyout:
|
|
37
|
+
FieldTextInput: Gt,
|
|
38
|
+
FieldVariable: Ht,
|
|
39
|
+
Flyout: qt,
|
|
40
40
|
FlyoutButton: Xt,
|
|
41
41
|
FlyoutMetricsManager: Yt,
|
|
42
42
|
Generator: Jt,
|
|
@@ -56,8 +56,8 @@ const {
|
|
|
56
56
|
NEXT_STATEMENT: uo,
|
|
57
57
|
Names: fo,
|
|
58
58
|
OPPOSITE_TYPE: mo,
|
|
59
|
-
OUTPUT_VALUE:
|
|
60
|
-
Options:
|
|
59
|
+
OUTPUT_VALUE: ho,
|
|
60
|
+
Options: yo,
|
|
61
61
|
PREVIOUS_STATEMENT: po,
|
|
62
62
|
PROCEDURE_CATEGORY_NAME: bo,
|
|
63
63
|
Procedures: go,
|
|
@@ -74,11 +74,11 @@ const {
|
|
|
74
74
|
TabNavigateCursor: wo,
|
|
75
75
|
Theme: le,
|
|
76
76
|
ThemeManager: Do,
|
|
77
|
-
Themes:
|
|
77
|
+
Themes: L,
|
|
78
78
|
Toolbox: Vo,
|
|
79
79
|
ToolboxCategory: xo,
|
|
80
|
-
ToolboxItem:
|
|
81
|
-
ToolboxSeparator:
|
|
80
|
+
ToolboxItem: Ao,
|
|
81
|
+
ToolboxSeparator: Mo,
|
|
82
82
|
Tooltip: Ro,
|
|
83
83
|
Touch: Io,
|
|
84
84
|
Trashcan: jo,
|
|
@@ -89,9 +89,9 @@ const {
|
|
|
89
89
|
VariableMap: zo,
|
|
90
90
|
VariableModel: Uo,
|
|
91
91
|
Variables: Wo,
|
|
92
|
-
VariablesDynamic:
|
|
93
|
-
VerticalFlyout:
|
|
94
|
-
WidgetDiv:
|
|
92
|
+
VariablesDynamic: Go,
|
|
93
|
+
VerticalFlyout: Ho,
|
|
94
|
+
WidgetDiv: qo,
|
|
95
95
|
Workspace: Xo,
|
|
96
96
|
WorkspaceAudio: Yo,
|
|
97
97
|
WorkspaceDragger: Jo,
|
|
@@ -114,8 +114,8 @@ const {
|
|
|
114
114
|
fieldRegistry: fr,
|
|
115
115
|
geras: mr,
|
|
116
116
|
getMainWorkspace: Re,
|
|
117
|
-
getSelected:
|
|
118
|
-
hasBubble:
|
|
117
|
+
getSelected: hr,
|
|
118
|
+
hasBubble: yr,
|
|
119
119
|
hideChaff: pr,
|
|
120
120
|
icons: br,
|
|
121
121
|
inject: Ie,
|
|
@@ -135,9 +135,9 @@ const {
|
|
|
135
135
|
renderManagement: Vr,
|
|
136
136
|
serialization: xr,
|
|
137
137
|
setLocale: je,
|
|
138
|
-
setParentContainer:
|
|
138
|
+
setParentContainer: Ar,
|
|
139
139
|
svgResize: Le,
|
|
140
|
-
thrasos:
|
|
140
|
+
thrasos: Mr,
|
|
141
141
|
uiPosition: Rr,
|
|
142
142
|
utils: Ir,
|
|
143
143
|
zelos: jr
|
|
@@ -150,7 +150,7 @@ function Be(e, r) {
|
|
|
150
150
|
}
|
|
151
151
|
const Fe = Symbol.for("vuetify:locale");
|
|
152
152
|
function $e() {
|
|
153
|
-
const e =
|
|
153
|
+
const e = H(Fe);
|
|
154
154
|
if (!e)
|
|
155
155
|
throw new Error("[Vuetify] Could not find injected locale instance");
|
|
156
156
|
return e;
|
|
@@ -158,13 +158,13 @@ function $e() {
|
|
|
158
158
|
const ze = Symbol.for("vuetify:theme");
|
|
159
159
|
function de() {
|
|
160
160
|
Be("useTheme");
|
|
161
|
-
const e =
|
|
161
|
+
const e = H(ze, null);
|
|
162
162
|
if (!e)
|
|
163
163
|
throw new Error("Could not find Vuetify theme injection");
|
|
164
164
|
return e;
|
|
165
165
|
}
|
|
166
166
|
var Ue = !1;
|
|
167
|
-
function
|
|
167
|
+
function I(e, r, o) {
|
|
168
168
|
return Array.isArray(e) ? (e.length = Math.max(e.length, r), e.splice(r, 1, o), o) : (e[r] = o, o);
|
|
169
169
|
}
|
|
170
170
|
function $(e, r) {
|
|
@@ -175,12 +175,12 @@ function $(e, r) {
|
|
|
175
175
|
delete e[r];
|
|
176
176
|
}
|
|
177
177
|
var u = {};
|
|
178
|
-
let
|
|
179
|
-
const
|
|
178
|
+
let V;
|
|
179
|
+
const j = (e) => V = e, We = u.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
180
180
|
/* istanbul ignore next */
|
|
181
181
|
Symbol()
|
|
182
182
|
);
|
|
183
|
-
function
|
|
183
|
+
function C(e) {
|
|
184
184
|
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
185
185
|
}
|
|
186
186
|
var A;
|
|
@@ -194,7 +194,7 @@ function fe(e, r) {
|
|
|
194
194
|
if (!(o in e))
|
|
195
195
|
continue;
|
|
196
196
|
const n = e[o];
|
|
197
|
-
|
|
197
|
+
C(n) && C(t) && !M(t) && !q(t) ? e[o] = fe(n, t) : e[o] = t;
|
|
198
198
|
}
|
|
199
199
|
return e;
|
|
200
200
|
}
|
|
@@ -208,53 +208,53 @@ function te(e, r, o, t = me) {
|
|
|
208
208
|
};
|
|
209
209
|
return !o && Te() && Pe(n), n;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function T(e, ...r) {
|
|
212
212
|
e.slice().forEach((o) => {
|
|
213
213
|
o(...r);
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
const
|
|
216
|
+
const Ge = (e) => e();
|
|
217
217
|
function W(e, r) {
|
|
218
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
219
|
for (const o in r) {
|
|
220
220
|
if (!r.hasOwnProperty(o))
|
|
221
221
|
continue;
|
|
222
222
|
const t = r[o], n = e[o];
|
|
223
|
-
|
|
223
|
+
C(n) && C(t) && e.hasOwnProperty(o) && !M(t) && !q(t) ? e[o] = W(n, t) : e[o] = t;
|
|
224
224
|
}
|
|
225
225
|
return e;
|
|
226
226
|
}
|
|
227
|
-
const
|
|
227
|
+
const He = u.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
228
228
|
/* istanbul ignore next */
|
|
229
229
|
Symbol()
|
|
230
230
|
);
|
|
231
|
-
function
|
|
232
|
-
return !
|
|
231
|
+
function qe(e) {
|
|
232
|
+
return !C(e) || !e.hasOwnProperty(He);
|
|
233
233
|
}
|
|
234
|
-
const { assign:
|
|
234
|
+
const { assign: E } = Object;
|
|
235
235
|
function oe(e) {
|
|
236
|
-
return !!(
|
|
236
|
+
return !!(M(e) && e.effect);
|
|
237
237
|
}
|
|
238
238
|
function re(e, r, o, t) {
|
|
239
|
-
const { state: n, actions: i, getters:
|
|
239
|
+
const { state: n, actions: i, getters: y } = r, l = o.state.value[e];
|
|
240
240
|
let m;
|
|
241
|
-
function
|
|
241
|
+
function h() {
|
|
242
242
|
!l && (u.NODE_ENV === "production" || !t) && (o.state.value[e] = n ? n() : {});
|
|
243
243
|
const b = u.NODE_ENV !== "production" && t ? (
|
|
244
244
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
245
|
-
ee(
|
|
245
|
+
ee(k(n ? n() : {}).value)
|
|
246
246
|
) : ee(o.state.value[e]);
|
|
247
|
-
return
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
return
|
|
251
|
-
})),
|
|
247
|
+
return E(b, i, Object.keys(y || {}).reduce((d, p) => (u.NODE_ENV !== "production" && p in b && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`), d[p] = D(X(() => {
|
|
248
|
+
j(o);
|
|
249
|
+
const _ = o._s.get(e);
|
|
250
|
+
return y[p].call(_, _);
|
|
251
|
+
})), d), {}));
|
|
252
252
|
}
|
|
253
|
-
return m =
|
|
253
|
+
return m = G(e, h, r, o, t, !0), m;
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
let
|
|
257
|
-
const l =
|
|
255
|
+
function G(e, r, o = {}, t, n, i) {
|
|
256
|
+
let y;
|
|
257
|
+
const l = E({ actions: {} }, o);
|
|
258
258
|
if (u.NODE_ENV !== "production" && !t._e.active)
|
|
259
259
|
throw new Error("Pinia destroyed");
|
|
260
260
|
const m = {
|
|
@@ -262,34 +262,34 @@ function q(e, r, o = {}, t, n, i) {
|
|
|
262
262
|
// flush: 'post',
|
|
263
263
|
};
|
|
264
264
|
u.NODE_ENV !== "production" && !Ue && (m.onTrigger = (s) => {
|
|
265
|
-
|
|
265
|
+
h ? _ = s : h == !1 && !c._hotUpdating && (Array.isArray(_) ? _.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
266
266
|
});
|
|
267
|
-
let
|
|
268
|
-
const
|
|
269
|
-
!i && !
|
|
270
|
-
const
|
|
267
|
+
let h, b, d = [], p = [], _;
|
|
268
|
+
const S = t.state.value[e];
|
|
269
|
+
!i && !S && (u.NODE_ENV === "production" || !n) && (t.state.value[e] = {});
|
|
270
|
+
const B = k({});
|
|
271
271
|
let J;
|
|
272
272
|
function Q(s) {
|
|
273
273
|
let a;
|
|
274
|
-
|
|
274
|
+
h = b = !1, u.NODE_ENV !== "production" && (_ = []), typeof s == "function" ? (s(t.state.value[e]), a = {
|
|
275
275
|
type: A.patchFunction,
|
|
276
276
|
storeId: e,
|
|
277
|
-
events:
|
|
277
|
+
events: _
|
|
278
278
|
}) : (W(t.state.value[e], s), a = {
|
|
279
279
|
type: A.patchObject,
|
|
280
280
|
payload: s,
|
|
281
281
|
storeId: e,
|
|
282
|
-
events:
|
|
282
|
+
events: _
|
|
283
283
|
});
|
|
284
284
|
const f = J = Symbol();
|
|
285
285
|
U().then(() => {
|
|
286
|
-
J === f && (
|
|
287
|
-
}), b = !0,
|
|
286
|
+
J === f && (h = !0);
|
|
287
|
+
}), b = !0, T(d, a, t.state.value[e]);
|
|
288
288
|
}
|
|
289
289
|
const ge = i ? function() {
|
|
290
290
|
const { state: a } = o, f = a ? a() : {};
|
|
291
|
-
this.$patch((
|
|
292
|
-
|
|
291
|
+
this.$patch((g) => {
|
|
292
|
+
E(g, f);
|
|
293
293
|
});
|
|
294
294
|
} : (
|
|
295
295
|
/* istanbul ignore next */
|
|
@@ -298,61 +298,61 @@ function q(e, r, o = {}, t, n, i) {
|
|
|
298
298
|
} : me
|
|
299
299
|
);
|
|
300
300
|
function _e() {
|
|
301
|
-
|
|
301
|
+
y.stop(), d = [], p = [], t._s.delete(e);
|
|
302
302
|
}
|
|
303
303
|
function Z(s, a) {
|
|
304
304
|
return function() {
|
|
305
|
-
|
|
306
|
-
const f = Array.from(arguments),
|
|
307
|
-
function ve(
|
|
308
|
-
|
|
305
|
+
j(t);
|
|
306
|
+
const f = Array.from(arguments), g = [], P = [];
|
|
307
|
+
function ve(v) {
|
|
308
|
+
g.push(v);
|
|
309
309
|
}
|
|
310
|
-
function Ee(
|
|
311
|
-
|
|
310
|
+
function Ee(v) {
|
|
311
|
+
P.push(v);
|
|
312
312
|
}
|
|
313
|
-
|
|
313
|
+
T(p, {
|
|
314
314
|
args: f,
|
|
315
315
|
name: s,
|
|
316
316
|
store: c,
|
|
317
317
|
after: ve,
|
|
318
318
|
onError: Ee
|
|
319
319
|
});
|
|
320
|
-
let
|
|
320
|
+
let w;
|
|
321
321
|
try {
|
|
322
|
-
|
|
323
|
-
} catch (
|
|
324
|
-
throw P
|
|
322
|
+
w = a.apply(this && this.$id === e ? this : c, f);
|
|
323
|
+
} catch (v) {
|
|
324
|
+
throw T(P, v), v;
|
|
325
325
|
}
|
|
326
|
-
return
|
|
326
|
+
return w instanceof Promise ? w.then((v) => (T(g, v), v)).catch((v) => (T(P, v), Promise.reject(v))) : (T(g, w), w);
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const R = /* @__PURE__ */ D({
|
|
330
330
|
actions: {},
|
|
331
331
|
getters: {},
|
|
332
332
|
state: [],
|
|
333
|
-
hotState:
|
|
333
|
+
hotState: B
|
|
334
334
|
}), K = {
|
|
335
335
|
_p: t,
|
|
336
336
|
// _s: scope,
|
|
337
337
|
$id: e,
|
|
338
|
-
$onAction: te.bind(null,
|
|
338
|
+
$onAction: te.bind(null, p),
|
|
339
339
|
$patch: Q,
|
|
340
340
|
$reset: ge,
|
|
341
341
|
$subscribe(s, a = {}) {
|
|
342
|
-
const f = te(
|
|
343
|
-
(a.flush === "sync" ? b :
|
|
342
|
+
const f = te(d, s, a.detached, () => g()), g = y.run(() => x(() => t.state.value[e], (P) => {
|
|
343
|
+
(a.flush === "sync" ? b : h) && s({
|
|
344
344
|
storeId: e,
|
|
345
345
|
type: A.direct,
|
|
346
|
-
events:
|
|
347
|
-
},
|
|
348
|
-
},
|
|
346
|
+
events: _
|
|
347
|
+
}, P);
|
|
348
|
+
}, E({}, m, a)));
|
|
349
349
|
return f;
|
|
350
350
|
},
|
|
351
351
|
$dispose: _e
|
|
352
|
-
}, c = Ne(u.NODE_ENV !== "production" || z ?
|
|
352
|
+
}, c = Ne(u.NODE_ENV !== "production" || z ? E(
|
|
353
353
|
{
|
|
354
|
-
_hmrPayload:
|
|
355
|
-
_customProperties:
|
|
354
|
+
_hmrPayload: R,
|
|
355
|
+
_customProperties: D(/* @__PURE__ */ new Set())
|
|
356
356
|
// devtools custom properties
|
|
357
357
|
},
|
|
358
358
|
K
|
|
@@ -360,52 +360,52 @@ function q(e, r, o = {}, t, n, i) {
|
|
|
360
360
|
// setupStore
|
|
361
361
|
) : K);
|
|
362
362
|
t._s.set(e, c);
|
|
363
|
-
const
|
|
364
|
-
for (const s in
|
|
365
|
-
const a =
|
|
366
|
-
if (
|
|
367
|
-
u.NODE_ENV !== "production" && n ?
|
|
363
|
+
const O = (t._a && t._a.runWithContext || Ge)(() => t._e.run(() => (y = Ce()).run(r)));
|
|
364
|
+
for (const s in O) {
|
|
365
|
+
const a = O[s];
|
|
366
|
+
if (M(a) && !oe(a) || q(a))
|
|
367
|
+
u.NODE_ENV !== "production" && n ? I(B.value, s, F(O, s)) : i || (S && qe(a) && (M(a) ? a.value = S[s] : W(a, S[s])), t.state.value[e][s] = a), u.NODE_ENV !== "production" && R.state.push(s);
|
|
368
368
|
else if (typeof a == "function") {
|
|
369
369
|
const f = u.NODE_ENV !== "production" && n ? a : Z(s, a);
|
|
370
|
-
|
|
370
|
+
O[s] = f, u.NODE_ENV !== "production" && (R.actions[s] = a), l.actions[s] = a;
|
|
371
371
|
} else
|
|
372
|
-
u.NODE_ENV !== "production" && oe(a) && (
|
|
372
|
+
u.NODE_ENV !== "production" && oe(a) && (R.getters[s] = i ? (
|
|
373
373
|
// @ts-expect-error
|
|
374
374
|
o.getters[s]
|
|
375
|
-
) : a, Y && (
|
|
376
|
-
(
|
|
375
|
+
) : a, Y && (O._getters || // @ts-expect-error: same
|
|
376
|
+
(O._getters = D([]))).push(s));
|
|
377
377
|
}
|
|
378
|
-
if (
|
|
379
|
-
get: () => u.NODE_ENV !== "production" && n ?
|
|
378
|
+
if (E(c, O), E(Se(c), O), Object.defineProperty(c, "$state", {
|
|
379
|
+
get: () => u.NODE_ENV !== "production" && n ? B.value : t.state.value[e],
|
|
380
380
|
set: (s) => {
|
|
381
381
|
if (u.NODE_ENV !== "production" && n)
|
|
382
382
|
throw new Error("cannot set hotState");
|
|
383
383
|
Q((a) => {
|
|
384
|
-
|
|
384
|
+
E(a, s);
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
}), u.NODE_ENV !== "production" && (c._hotUpdate =
|
|
387
|
+
}), u.NODE_ENV !== "production" && (c._hotUpdate = D((s) => {
|
|
388
388
|
c._hotUpdating = !0, s._hmrPayload.state.forEach((a) => {
|
|
389
389
|
if (a in c.$state) {
|
|
390
|
-
const f = s.$state[a],
|
|
391
|
-
typeof f == "object" &&
|
|
390
|
+
const f = s.$state[a], g = c.$state[a];
|
|
391
|
+
typeof f == "object" && C(f) && C(g) ? fe(f, g) : s.$state[a] = g;
|
|
392
392
|
}
|
|
393
|
-
|
|
393
|
+
I(c, a, F(s.$state, a));
|
|
394
394
|
}), Object.keys(c.$state).forEach((a) => {
|
|
395
395
|
a in s.$state || $(c, a);
|
|
396
|
-
}),
|
|
397
|
-
|
|
396
|
+
}), h = !1, b = !1, t.state.value[e] = F(s._hmrPayload, "hotState"), b = !0, U().then(() => {
|
|
397
|
+
h = !0;
|
|
398
398
|
});
|
|
399
399
|
for (const a in s._hmrPayload.actions) {
|
|
400
400
|
const f = s[a];
|
|
401
|
-
|
|
401
|
+
I(c, a, Z(a, f));
|
|
402
402
|
}
|
|
403
403
|
for (const a in s._hmrPayload.getters) {
|
|
404
|
-
const f = s._hmrPayload.getters[a],
|
|
404
|
+
const f = s._hmrPayload.getters[a], g = i ? (
|
|
405
405
|
// special handling of options api
|
|
406
|
-
X(() => (
|
|
406
|
+
X(() => (j(t), f.call(c, c)))
|
|
407
407
|
) : f;
|
|
408
|
-
|
|
408
|
+
I(c, a, g);
|
|
409
409
|
}
|
|
410
410
|
Object.keys(c._hmrPayload.getters).forEach((a) => {
|
|
411
411
|
a in s._hmrPayload.getters || $(c, a);
|
|
@@ -420,20 +420,20 @@ function q(e, r, o = {}, t, n, i) {
|
|
|
420
420
|
enumerable: !1
|
|
421
421
|
};
|
|
422
422
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((a) => {
|
|
423
|
-
Object.defineProperty(c, a,
|
|
423
|
+
Object.defineProperty(c, a, E({ value: c[a] }, s));
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
return t._p.forEach((s) => {
|
|
427
427
|
if (z) {
|
|
428
|
-
const a =
|
|
428
|
+
const a = y.run(() => s({
|
|
429
429
|
store: c,
|
|
430
430
|
app: t._a,
|
|
431
431
|
pinia: t,
|
|
432
432
|
options: l
|
|
433
433
|
}));
|
|
434
|
-
Object.keys(a || {}).forEach((f) => c._customProperties.add(f)),
|
|
434
|
+
Object.keys(a || {}).forEach((f) => c._customProperties.add(f)), E(c, a);
|
|
435
435
|
} else
|
|
436
|
-
|
|
436
|
+
E(c, y.run(() => s({
|
|
437
437
|
store: c,
|
|
438
438
|
app: t._a,
|
|
439
439
|
pinia: t,
|
|
@@ -441,40 +441,40 @@ function q(e, r, o = {}, t, n, i) {
|
|
|
441
441
|
})));
|
|
442
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
443
|
state: () => new MyClass()
|
|
444
|
-
Found in store "${c.$id}".`),
|
|
444
|
+
Found in store "${c.$id}".`), S && i && o.hydrate && o.hydrate(c.$state, S), h = !0, b = !0, c;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function he(e, r, o) {
|
|
447
447
|
let t, n;
|
|
448
448
|
const i = typeof r == "function";
|
|
449
449
|
if (typeof e == "string")
|
|
450
450
|
t = e, n = i ? o : r;
|
|
451
451
|
else if (n = e, t = e.id, u.NODE_ENV !== "production" && typeof t != "string")
|
|
452
452
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
453
|
-
function
|
|
454
|
-
const
|
|
453
|
+
function y(l, m) {
|
|
454
|
+
const h = Oe();
|
|
455
455
|
if (l = // in test mode, ignore the argument provided as we can always retrieve a
|
|
456
456
|
// pinia instance with getActivePinia()
|
|
457
|
-
(u.NODE_ENV === "test" &&
|
|
457
|
+
(u.NODE_ENV === "test" && V && V._testing ? null : l) || (h ? H(We, null) : null), l && j(l), u.NODE_ENV !== "production" && !V)
|
|
458
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
459
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
460
460
|
This will fail in production.`);
|
|
461
|
-
l =
|
|
461
|
+
l = V, l._s.has(t) || (i ? G(t, r, n, l) : re(t, n, l), u.NODE_ENV !== "production" && (y._pinia = l));
|
|
462
462
|
const b = l._s.get(t);
|
|
463
463
|
if (u.NODE_ENV !== "production" && m) {
|
|
464
|
-
const
|
|
465
|
-
m._hotUpdate(
|
|
464
|
+
const d = "__hot:" + t, p = i ? G(d, r, n, l, !0) : re(d, E({}, n), l, !0);
|
|
465
|
+
m._hotUpdate(p), delete l.state.value[d], l._s.delete(d);
|
|
466
466
|
}
|
|
467
467
|
if (u.NODE_ENV !== "production" && Y) {
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
468
|
+
const d = se();
|
|
469
|
+
if (d && d.proxy && // avoid adding stores that are just built for hot module replacement
|
|
470
470
|
!m) {
|
|
471
|
-
const
|
|
472
|
-
|
|
471
|
+
const p = d.proxy, _ = "_pStores" in p ? p._pStores : p._pStores = {};
|
|
472
|
+
_[t] = b;
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
return b;
|
|
476
476
|
}
|
|
477
|
-
return
|
|
477
|
+
return y.$id = t, y;
|
|
478
478
|
}
|
|
479
479
|
(function() {
|
|
480
480
|
try {
|
|
@@ -486,8 +486,8 @@ This will fail in production.`);
|
|
|
486
486
|
console.error("vite-plugin-css-injected-by-js", r);
|
|
487
487
|
}
|
|
488
488
|
})();
|
|
489
|
-
const Xe =
|
|
490
|
-
const e =
|
|
489
|
+
const Xe = he("viewMgr", () => {
|
|
490
|
+
const e = k([]);
|
|
491
491
|
function r() {
|
|
492
492
|
return e.value.length <= 0;
|
|
493
493
|
}
|
|
@@ -497,22 +497,22 @@ const Xe = ye("viewMgr", () => {
|
|
|
497
497
|
return e.value[m - 1];
|
|
498
498
|
}
|
|
499
499
|
function t(m) {
|
|
500
|
-
return e.value.find((
|
|
500
|
+
return e.value.find((h) => h === m) !== void 0;
|
|
501
501
|
}
|
|
502
502
|
function n(m) {
|
|
503
503
|
i(m), e.value.push(m);
|
|
504
504
|
}
|
|
505
505
|
function i(m) {
|
|
506
|
-
const
|
|
507
|
-
|
|
506
|
+
const h = e.value.findIndex((b) => b === m);
|
|
507
|
+
h !== -1 && e.value.splice(h, 1);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function y() {
|
|
510
510
|
e.value.pop();
|
|
511
511
|
}
|
|
512
512
|
function l() {
|
|
513
513
|
e.value = [];
|
|
514
514
|
}
|
|
515
|
-
return { isEmpty: r, lastView: o, hasView: t, addView: n, delView: i, popView:
|
|
515
|
+
return { isEmpty: r, lastView: o, hasView: t, addView: n, delView: i, popView: y, clearViews: l };
|
|
516
516
|
});
|
|
517
517
|
function Ye(e) {
|
|
518
518
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(r, o) {
|
|
@@ -530,8 +530,8 @@ function Ye(e) {
|
|
|
530
530
|
});
|
|
531
531
|
} };
|
|
532
532
|
}
|
|
533
|
-
const
|
|
534
|
-
async function
|
|
533
|
+
const N = Ye();
|
|
534
|
+
async function ye(e, r, o) {
|
|
535
535
|
return new Promise((t) => {
|
|
536
536
|
const n = async () => {
|
|
537
537
|
e() ? t(!0) : setTimeout(n, 30);
|
|
@@ -551,30 +551,30 @@ function Je(e, r) {
|
|
|
551
551
|
t.value = !0;
|
|
552
552
|
};
|
|
553
553
|
return ce(() => {
|
|
554
|
-
|
|
554
|
+
N.on(e, n);
|
|
555
555
|
}), ie(() => {
|
|
556
|
-
|
|
556
|
+
N.off(e, n);
|
|
557
557
|
}), { open: t };
|
|
558
558
|
}
|
|
559
|
-
|
|
559
|
+
he(
|
|
560
560
|
"global",
|
|
561
561
|
() => {
|
|
562
|
-
const e =
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
(
|
|
566
|
-
|
|
562
|
+
const e = de(), r = k();
|
|
563
|
+
x(
|
|
564
|
+
r,
|
|
565
|
+
(i) => {
|
|
566
|
+
e.global.name.value = i ? "dark" : "light";
|
|
567
567
|
},
|
|
568
568
|
{
|
|
569
569
|
immediate: !0
|
|
570
570
|
}
|
|
571
571
|
);
|
|
572
|
-
const
|
|
572
|
+
const o = k("en"), t = k({}), n = k("");
|
|
573
573
|
return {
|
|
574
|
-
dark:
|
|
575
|
-
locale:
|
|
576
|
-
permissionObjects:
|
|
577
|
-
permissionChecksum:
|
|
574
|
+
dark: r,
|
|
575
|
+
locale: o,
|
|
576
|
+
permissionObjects: t,
|
|
577
|
+
permissionChecksum: n
|
|
578
578
|
};
|
|
579
579
|
},
|
|
580
580
|
{
|
|
@@ -603,7 +603,7 @@ async function Ze(e) {
|
|
|
603
603
|
const t = (i) => {
|
|
604
604
|
o = i, r = !0;
|
|
605
605
|
}, n = be();
|
|
606
|
-
return
|
|
606
|
+
return N.on("confirmDlgResult" + n, t), N.emit("confirmDlg", { ...e, seq: n }), await ye(() => r), N.off("confirmDlgResult" + n, t), o;
|
|
607
607
|
}
|
|
608
608
|
async function Ke(e) {
|
|
609
609
|
if (!pe())
|
|
@@ -612,10 +612,10 @@ async function Ke(e) {
|
|
|
612
612
|
const t = (i) => {
|
|
613
613
|
o = i, r = !0;
|
|
614
614
|
}, n = be();
|
|
615
|
-
return
|
|
615
|
+
return N.on("promptDlgResult" + n, t), N.emit("promptDlg", { ...e, seq: n }), await ye(() => r), N.off("promptDlgResult" + n, t), o;
|
|
616
616
|
}
|
|
617
617
|
require("js-cookie");
|
|
618
|
-
|
|
618
|
+
k("");
|
|
619
619
|
ue.setConfirm(async (e, r) => {
|
|
620
620
|
const o = await Ze({
|
|
621
621
|
title: "",
|
|
@@ -640,7 +640,7 @@ async function ae(e) {
|
|
|
640
640
|
const r = await et(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./en-DYxpcVy9.js"), "./msg/zhHans.ts": () => import("./zhHans-DjWw6Iqb.js") }), `./msg/${e}.ts`);
|
|
641
641
|
je(r);
|
|
642
642
|
}
|
|
643
|
-
|
|
643
|
+
L.Classic.blockStyles = {
|
|
644
644
|
color_blocks: {
|
|
645
645
|
colourPrimary: "#a5745b",
|
|
646
646
|
colourSecondary: "#ede3de",
|
|
@@ -714,7 +714,7 @@ B.Classic.blockStyles = {
|
|
|
714
714
|
hat: ""
|
|
715
715
|
}
|
|
716
716
|
};
|
|
717
|
-
|
|
717
|
+
L.Classic.categoryStyles = {
|
|
718
718
|
calc_category: {
|
|
719
719
|
colour: "#757575"
|
|
720
720
|
},
|
|
@@ -766,7 +766,7 @@ B.Classic.categoryStyles = {
|
|
|
766
766
|
};
|
|
767
767
|
const tt = le.defineTheme("light", {
|
|
768
768
|
name: "light",
|
|
769
|
-
base:
|
|
769
|
+
base: L.Classic,
|
|
770
770
|
componentStyles: {
|
|
771
771
|
workspaceBackgroundColour: "#ffffff",
|
|
772
772
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -782,7 +782,7 @@ const tt = le.defineTheme("light", {
|
|
|
782
782
|
}
|
|
783
783
|
}), ot = le.defineTheme("dark", {
|
|
784
784
|
name: "dark",
|
|
785
|
-
base:
|
|
785
|
+
base: L.Classic,
|
|
786
786
|
componentStyles: {
|
|
787
787
|
workspaceBackgroundColour: "#1e1e1e",
|
|
788
788
|
toolboxBackgroundColour: "#272727",
|
|
@@ -835,7 +835,7 @@ const st = {
|
|
|
835
835
|
__name: "index",
|
|
836
836
|
emits: ["ready", "change"],
|
|
837
837
|
setup(e, { emit: r }) {
|
|
838
|
-
const o = $e(), t = de(), { open: n } = Je("blocklyEditorFlyout"), i = r,
|
|
838
|
+
const o = $e(), t = de(), { open: n } = Je("blocklyEditorFlyout"), i = r, y = k(null);
|
|
839
839
|
let l;
|
|
840
840
|
const m = {
|
|
841
841
|
grid: {
|
|
@@ -860,46 +860,37 @@ const st = {
|
|
|
860
860
|
}
|
|
861
861
|
};
|
|
862
862
|
ce(async () => {
|
|
863
|
-
|
|
863
|
+
y.value && (await ae(o.current.value), l = Ie(y.value, m), l.addChangeListener(Me.disableOrphans), l.addChangeListener(b), await U(), i("ready", l));
|
|
864
864
|
});
|
|
865
|
-
function
|
|
865
|
+
function h() {
|
|
866
866
|
l && Le(l);
|
|
867
867
|
}
|
|
868
868
|
function b(d) {
|
|
869
869
|
i("change", d);
|
|
870
870
|
}
|
|
871
|
-
ie(() => {
|
|
871
|
+
return ie(() => {
|
|
872
872
|
n.value = !1;
|
|
873
|
-
})
|
|
874
|
-
|
|
875
|
-
d.
|
|
876
|
-
|
|
877
|
-
const S = l.getFlyout();
|
|
878
|
-
n.value = (S == null ? void 0 : S.isVisible()) ?? !1;
|
|
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(
|
|
873
|
+
}), x(n, (d) => {
|
|
874
|
+
var p;
|
|
875
|
+
d || (p = l.getToolbox()) == null || p.clearSelection();
|
|
876
|
+
}), x(
|
|
886
877
|
() => o.current.value,
|
|
887
878
|
(d) => {
|
|
888
879
|
ae(d);
|
|
889
880
|
}
|
|
890
|
-
),
|
|
881
|
+
), x(
|
|
891
882
|
() => t.current.value.dark,
|
|
892
883
|
(d) => {
|
|
893
884
|
rt(d ? "dark" : "light");
|
|
894
885
|
}
|
|
895
|
-
), (d,
|
|
896
|
-
xe(
|
|
886
|
+
), (d, p) => (De(), Ve("div", ct, [
|
|
887
|
+
xe(Ae("div", {
|
|
897
888
|
class: "w-100 h-100",
|
|
898
889
|
ref_key: "blocklyDiv",
|
|
899
|
-
ref:
|
|
890
|
+
ref: y,
|
|
900
891
|
id: "blocklyEditor"
|
|
901
892
|
}, null, 512), [
|
|
902
|
-
[st,
|
|
893
|
+
[st, h]
|
|
903
894
|
])
|
|
904
895
|
]));
|
|
905
896
|
}
|
|
@@ -908,8 +899,8 @@ const st = {
|
|
|
908
899
|
}, Lr = { install: lt };
|
|
909
900
|
export {
|
|
910
901
|
mt as ASTNode,
|
|
911
|
-
|
|
912
|
-
|
|
902
|
+
ht as BasicCursor,
|
|
903
|
+
yt as Block,
|
|
913
904
|
pt as BlockSvg,
|
|
914
905
|
bt as Blocks,
|
|
915
906
|
gt as COLLAPSED_FIELD_NAME,
|
|
@@ -927,11 +918,11 @@ export {
|
|
|
927
918
|
Dt as ContextMenuRegistry,
|
|
928
919
|
Vt as Css,
|
|
929
920
|
xt as Cursor,
|
|
930
|
-
|
|
931
|
-
|
|
921
|
+
At as DELETE_VARIABLE_ID,
|
|
922
|
+
Mt as DeleteArea,
|
|
932
923
|
Rt as DragTarget,
|
|
933
924
|
It as DropDownDiv,
|
|
934
|
-
|
|
925
|
+
Me as Events,
|
|
935
926
|
jt as Extensions,
|
|
936
927
|
Lt as Field,
|
|
937
928
|
Bt as FieldCheckbox,
|
|
@@ -940,9 +931,9 @@ export {
|
|
|
940
931
|
zt as FieldLabel,
|
|
941
932
|
Ut as FieldLabelSerializable,
|
|
942
933
|
Wt as FieldNumber,
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
934
|
+
Gt as FieldTextInput,
|
|
935
|
+
Ht as FieldVariable,
|
|
936
|
+
qt as Flyout,
|
|
946
937
|
Xt as FlyoutButton,
|
|
947
938
|
Yt as FlyoutMetricsManager,
|
|
948
939
|
Jt as Generator,
|
|
@@ -962,8 +953,8 @@ export {
|
|
|
962
953
|
uo as NEXT_STATEMENT,
|
|
963
954
|
fo as Names,
|
|
964
955
|
mo as OPPOSITE_TYPE,
|
|
965
|
-
|
|
966
|
-
|
|
956
|
+
ho as OUTPUT_VALUE,
|
|
957
|
+
yo as Options,
|
|
967
958
|
po as PREVIOUS_STATEMENT,
|
|
968
959
|
bo as PROCEDURE_CATEGORY_NAME,
|
|
969
960
|
go as Procedures,
|
|
@@ -980,11 +971,11 @@ export {
|
|
|
980
971
|
wo as TabNavigateCursor,
|
|
981
972
|
le as Theme,
|
|
982
973
|
Do as ThemeManager,
|
|
983
|
-
|
|
974
|
+
L as Themes,
|
|
984
975
|
Vo as Toolbox,
|
|
985
976
|
xo as ToolboxCategory,
|
|
986
|
-
|
|
987
|
-
|
|
977
|
+
Ao as ToolboxItem,
|
|
978
|
+
Mo as ToolboxSeparator,
|
|
988
979
|
Ro as Tooltip,
|
|
989
980
|
Io as Touch,
|
|
990
981
|
jo as Trashcan,
|
|
@@ -995,9 +986,9 @@ export {
|
|
|
995
986
|
zo as VariableMap,
|
|
996
987
|
Uo as VariableModel,
|
|
997
988
|
Wo as Variables,
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
989
|
+
Go as VariablesDynamic,
|
|
990
|
+
Ho as VerticalFlyout,
|
|
991
|
+
qo as WidgetDiv,
|
|
1001
992
|
Xo as Workspace,
|
|
1002
993
|
Yo as WorkspaceAudio,
|
|
1003
994
|
Jo as WorkspaceDragger,
|
|
@@ -1021,8 +1012,8 @@ export {
|
|
|
1021
1012
|
fr as fieldRegistry,
|
|
1022
1013
|
mr as geras,
|
|
1023
1014
|
Re as getMainWorkspace,
|
|
1024
|
-
|
|
1025
|
-
|
|
1015
|
+
hr as getSelected,
|
|
1016
|
+
yr as hasBubble,
|
|
1026
1017
|
pr as hideChaff,
|
|
1027
1018
|
br as icons,
|
|
1028
1019
|
Ie as inject,
|
|
@@ -1043,10 +1034,10 @@ export {
|
|
|
1043
1034
|
xr as serialization,
|
|
1044
1035
|
je as setLocale,
|
|
1045
1036
|
ae as setLocaleAsync,
|
|
1046
|
-
|
|
1037
|
+
Ar as setParentContainer,
|
|
1047
1038
|
rt as setTheme,
|
|
1048
1039
|
Le as svgResize,
|
|
1049
|
-
|
|
1040
|
+
Mr as thrasos,
|
|
1050
1041
|
Rr as uiPosition,
|
|
1051
1042
|
Ir as utils,
|
|
1052
1043
|
jr as zelos
|
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.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"vue": "^3.4.26",
|
|
29
29
|
"vuetify": "^3.6.5",
|
|
30
|
-
"x-essential-lib": "^0.3.
|
|
30
|
+
"x-essential-lib": "^0.3.16"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@rushstack/eslint-patch": "^1.8.0",
|
|
@@ -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",
|