x-block-lib 0.8.11 → 0.8.12
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const t = {
|
|
2
2
|
"x-block-lib": {
|
|
3
|
+
bind: "Bind",
|
|
3
4
|
dlg: {
|
|
4
5
|
source: {
|
|
5
6
|
title: "Source"
|
|
@@ -17,7 +18,8 @@ const t = {
|
|
|
17
18
|
hotkeyCtrlE: "Press 'Ctrl W' to navigate",
|
|
18
19
|
hotkeyCtrlQ: "Press 'Ctrl Q' to clean workspace",
|
|
19
20
|
hotkeyCtrlW: "Press 'Ctrl R' to toggle lock state"
|
|
20
|
-
}
|
|
21
|
+
},
|
|
22
|
+
watchEffect: "Watch Effect"
|
|
21
23
|
}
|
|
22
24
|
};
|
|
23
25
|
export {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const t = {
|
|
2
2
|
"x-block-lib": {
|
|
3
|
+
bind: "绑定",
|
|
3
4
|
dlg: {
|
|
4
5
|
source: {
|
|
5
6
|
title: "源代码"
|
|
@@ -17,7 +18,8 @@ const t = {
|
|
|
17
18
|
hotkeyCtrlE: "按「Ctrl E」导航",
|
|
18
19
|
hotkeyCtrlQ: "按「Ctrl Q」清理工作区",
|
|
19
20
|
hotkeyCtrlW: "按「Ctrl W」切换锁状态"
|
|
20
|
-
}
|
|
21
|
+
},
|
|
22
|
+
watchEffect: "观察效应"
|
|
21
23
|
}
|
|
22
24
|
};
|
|
23
25
|
export {
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Website: https://highlightjs.org/
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-
|
|
9
|
+
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-4cd8352a]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
10
|
import { provide as lo, inject as _o, defineComponent as st, resolveComponent as D, createBlock as Z, openBlock as B, unref as R, withCtx as tt, createVNode as L, mergeProps as $e, useModel as Rt, ref as It, computed as Y, resolveDirective as po, withDirectives as ho, createElementBlock as Q, normalizeStyle as H, createElementVNode as W, toDisplayString as ce, withModifiers as Bt, mergeModels as be, Fragment as En, renderList as fo, useId as Pe, onUnmounted as mo, useTemplateRef as bt, withKeys as gn, isRef as $t, createCommentVNode as mt, onMounted as nn, nextTick as To, onBeforeUnmount as on, watch as Lt, renderSlot as Eo } from "vue";
|
|
11
11
|
import { f as go, F as An, E as O, r as sn, M as In, s as Ao, a as Io, X as On, u as C, B as d, j as s, O as c, b as Re, i as v, c as ht, d as Oo, e as M, g as h, h as vo, k as w, l as lt, p as Pt, m as z, n as an, o as S, C as vn, N as et, q as Co, P as De, t as ve, V as At, v as Ut, w as Cn, x as yo, y as ko, S as No, z as Lo, A as So, T as re, D as yn, G as Bo, H as bo, I as kn, J as Po, K as Ro, L as Do, Q as Mo, R as Uo, U as Vo, W as xo, Y as Fo } from "./vendor.cenq5uur.js";
|
|
12
12
|
import { globalObjects as nt, openConfirmDlg as Yo, openPromptDlg as wo, messageWarning as Nn, useColor as Vt, useSystem as Ln, useViewStack as He, eventBus as gt } from "x-essential-lib";
|
|
@@ -993,23 +993,23 @@ function Dt(t, e) {
|
|
|
993
993
|
if (!l)
|
|
994
994
|
return console.assert(!1, "invalid element", u.key), a;
|
|
995
995
|
if (n[l.key] && n[l.key][r])
|
|
996
|
-
for (const { keys: _, names: T, raw:
|
|
997
|
-
e === "write" && Xt(_,
|
|
996
|
+
for (const { keys: _, names: T, raw: g } of n[l.key][r])
|
|
997
|
+
e === "write" && Xt(_, g) || a.push({
|
|
998
998
|
key: _,
|
|
999
999
|
names: T,
|
|
1000
1000
|
meta: {
|
|
1001
1001
|
from: "regular",
|
|
1002
|
-
raw:
|
|
1002
|
+
raw: g
|
|
1003
1003
|
}
|
|
1004
1004
|
});
|
|
1005
1005
|
if (l.key.startsWith("single_ref_v") && console.log("singleRef"), l.key.startsWith("multiple_ref_v") && console.log("multipleRef"), l.key.startsWith("globality_v") && o.type === "comp")
|
|
1006
|
-
for (const { id: _, name: T, type:
|
|
1006
|
+
for (const { id: _, name: T, type: g } of i.meta.properties)
|
|
1007
1007
|
a.push({
|
|
1008
1008
|
key: _,
|
|
1009
1009
|
names: [T],
|
|
1010
1010
|
meta: {
|
|
1011
1011
|
from: "custom",
|
|
1012
|
-
raw: { type:
|
|
1012
|
+
raw: { type: g }
|
|
1013
1013
|
}
|
|
1014
1014
|
});
|
|
1015
1015
|
return a;
|
|
@@ -3386,19 +3386,19 @@ s.forBlock.call_func_v1 = function(t) {
|
|
|
3386
3386
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3387
3387
|
let r = "";
|
|
3388
3388
|
r += `${e}var __inputs__ = {
|
|
3389
|
-
`, o.func.inputs.forEach(({ id:
|
|
3389
|
+
`, o.func.inputs.forEach(({ id: g }, m) => {
|
|
3390
3390
|
const y = s.valueToCode(
|
|
3391
3391
|
o,
|
|
3392
3392
|
"INPUT" + m,
|
|
3393
3393
|
c.ATOMIC
|
|
3394
3394
|
);
|
|
3395
|
-
r += `${e}${e}${n(
|
|
3395
|
+
r += `${e}${e}${n(g)}: ${y},
|
|
3396
3396
|
`;
|
|
3397
3397
|
}), r += `${e}};`;
|
|
3398
3398
|
const u = n(o.space.name + "/" + o.func.name);
|
|
3399
3399
|
let l = "";
|
|
3400
|
-
o.func.outputs.forEach(({ id:
|
|
3401
|
-
l += `${e}var __output_${
|
|
3400
|
+
o.func.outputs.forEach(({ id: g }) => {
|
|
3401
|
+
l += `${e}var __output_${g}__ = __result__[${n(g)}];
|
|
3402
3402
|
`;
|
|
3403
3403
|
});
|
|
3404
3404
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3557,19 +3557,19 @@ s.forBlock.call_func_internal_v1 = function(t) {
|
|
|
3557
3557
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3558
3558
|
let r = `${e}var __inputs__ = {
|
|
3559
3559
|
`;
|
|
3560
|
-
o.func.inputs.forEach(({ id:
|
|
3560
|
+
o.func.inputs.forEach(({ id: g }, m) => {
|
|
3561
3561
|
const y = s.valueToCode(
|
|
3562
3562
|
o,
|
|
3563
3563
|
"INPUT" + m,
|
|
3564
3564
|
c.ATOMIC
|
|
3565
3565
|
);
|
|
3566
|
-
r += `${e}${e}${n(
|
|
3566
|
+
r += `${e}${e}${n(g)}: ${y},
|
|
3567
3567
|
`;
|
|
3568
3568
|
}), r += `${e}};`;
|
|
3569
3569
|
const u = o.space.name + "/" + o.func.name;
|
|
3570
3570
|
let l = "";
|
|
3571
|
-
o.func.outputs.forEach(({ id:
|
|
3572
|
-
l += `${e}var __output_${
|
|
3571
|
+
o.func.outputs.forEach(({ id: g }) => {
|
|
3572
|
+
l += `${e}var __output_${g}__ = __result__.outputs[${n(g)}];
|
|
3573
3573
|
`;
|
|
3574
3574
|
});
|
|
3575
3575
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -4754,8 +4754,8 @@ d.select_column_v1 = as;
|
|
|
4754
4754
|
s.forBlock.select_column_v1 = function(t) {
|
|
4755
4755
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4756
4756
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
4757
|
-
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name,
|
|
4758
|
-
a.push({ name: T, alias:
|
|
4757
|
+
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, g = n.getFieldValue("ALIAS" + l);
|
|
4758
|
+
a.push({ name: T, alias: g });
|
|
4759
4759
|
}
|
|
4760
4760
|
let r = "[";
|
|
4761
4761
|
return a.forEach(({ name: l, alias: _ }, T) => {
|
|
@@ -5165,8 +5165,8 @@ d.update_column_v1 = _s;
|
|
|
5165
5165
|
s.forBlock.update_column_v1 = function(t) {
|
|
5166
5166
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5167
5167
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
5168
|
-
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name,
|
|
5169
|
-
a.push({ name: T, value:
|
|
5168
|
+
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, g = s.valueToCode(n, "ADD" + l, c.ATOMIC) || "null";
|
|
5169
|
+
a.push({ name: T, value: g });
|
|
5170
5170
|
}
|
|
5171
5171
|
let r = "[";
|
|
5172
5172
|
return a.forEach(({ name: l, value: _ }, T) => {
|
|
@@ -10156,8 +10156,8 @@ const wa = /* @__PURE__ */ st({
|
|
|
10156
10156
|
return B(), Z(T, {
|
|
10157
10157
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10158
10158
|
}, {
|
|
10159
|
-
activator: tt(({ props:
|
|
10160
|
-
L(_, $e(
|
|
10159
|
+
activator: tt(({ props: g }) => [
|
|
10160
|
+
L(_, $e(g, {
|
|
10161
10161
|
density: "comfortable",
|
|
10162
10162
|
icon: "mdi-broom",
|
|
10163
10163
|
variant: "outlined",
|
|
@@ -10219,28 +10219,28 @@ const wa = /* @__PURE__ */ st({
|
|
|
10219
10219
|
border: "1px solid " + n.value,
|
|
10220
10220
|
pointerEvents: "none"
|
|
10221
10221
|
}));
|
|
10222
|
-
return (T,
|
|
10223
|
-
const m = D("v-spacer"), y = D("v-icon"),
|
|
10222
|
+
return (T, g) => {
|
|
10223
|
+
const m = D("v-spacer"), y = D("v-icon"), E = po("ripple");
|
|
10224
10224
|
return ho((B(), Q("div", {
|
|
10225
10225
|
class: "d-flex align-center cursor-pointer",
|
|
10226
10226
|
style: H(l.value),
|
|
10227
|
-
onClick:
|
|
10228
|
-
onMouseout:
|
|
10229
|
-
onMouseover:
|
|
10227
|
+
onClick: g[1] || (g[1] = (P) => r("x-click", a.id)),
|
|
10228
|
+
onMouseout: g[2] || (g[2] = (P) => u.value = !1),
|
|
10229
|
+
onMouseover: g[3] || (g[3] = (P) => u.value = !0)
|
|
10230
10230
|
}, [
|
|
10231
10231
|
W("span", $a, ce(a.title), 1),
|
|
10232
10232
|
L(m),
|
|
10233
10233
|
L(y, {
|
|
10234
10234
|
class: "x-handle cursor-move mr-3",
|
|
10235
10235
|
icon: "mdi-drag-horizontal-variant",
|
|
10236
|
-
onMousedown:
|
|
10236
|
+
onMousedown: g[0] || (g[0] = Bt(() => {
|
|
10237
10237
|
}, ["stop"]))
|
|
10238
10238
|
}),
|
|
10239
10239
|
W("div", {
|
|
10240
10240
|
style: H(_.value)
|
|
10241
10241
|
}, null, 4)
|
|
10242
10242
|
], 36)), [
|
|
10243
|
-
[
|
|
10243
|
+
[E]
|
|
10244
10244
|
]);
|
|
10245
10245
|
};
|
|
10246
10246
|
}
|
|
@@ -10264,15 +10264,15 @@ const wa = /* @__PURE__ */ st({
|
|
|
10264
10264
|
return;
|
|
10265
10265
|
}
|
|
10266
10266
|
const m = [];
|
|
10267
|
-
i.workspace.getTopBlocks(!0).forEach((
|
|
10268
|
-
const P =
|
|
10267
|
+
i.workspace.getTopBlocks(!0).forEach((E) => {
|
|
10268
|
+
const P = E.id === bo()?.id;
|
|
10269
10269
|
let U = "<n/a>";
|
|
10270
|
-
if (
|
|
10271
|
-
const X =
|
|
10270
|
+
if (E.type.startsWith("on_app_event_v")) {
|
|
10271
|
+
const X = E, dt = J[X.node.key];
|
|
10272
10272
|
dt && (U = n(dt.name), X.node.alias && (U += " / " + X.node.alias), U += " - " + ue(X.event.names, X.event.from));
|
|
10273
|
-
} else
|
|
10273
|
+
} else E.type.startsWith("watch_effect_v") ? U = n("x-block-lib.watchEffect") : E.type.startsWith("app_bind_v") ? U = n("x-block-lib.bind") : E.type.startsWith("func_entry_v") ? U = n("x-block-lib.funcEntry") : E.type.startsWith("procedure_def_v") ? U = n("x-block-lib.procedure") + " - " + E.getFieldValue("NAME") : U = n("x-block-lib.temporaryBlock");
|
|
10274
10274
|
m.push({
|
|
10275
|
-
id:
|
|
10275
|
+
id: E.id,
|
|
10276
10276
|
name: U,
|
|
10277
10277
|
select: P
|
|
10278
10278
|
});
|
|
@@ -10299,10 +10299,10 @@ const wa = /* @__PURE__ */ st({
|
|
|
10299
10299
|
}
|
|
10300
10300
|
if (m.oldIndex === m.newIndex)
|
|
10301
10301
|
return;
|
|
10302
|
-
const y = u[m.oldIndex],
|
|
10302
|
+
const y = u[m.oldIndex], E = i.workspace.getBlockById(
|
|
10303
10303
|
y
|
|
10304
10304
|
);
|
|
10305
|
-
if (!
|
|
10305
|
+
if (!E) {
|
|
10306
10306
|
console.assert(!1);
|
|
10307
10307
|
return;
|
|
10308
10308
|
}
|
|
@@ -10312,9 +10312,9 @@ const wa = /* @__PURE__ */ st({
|
|
|
10312
10312
|
P !== "" && (U = i.workspace.getBlockById(
|
|
10313
10313
|
P
|
|
10314
10314
|
).getRelativeToSurfaceXY().y + 10);
|
|
10315
|
-
const X =
|
|
10316
|
-
|
|
10317
|
-
},
|
|
10315
|
+
const X = E.getRelativeToSurfaceXY();
|
|
10316
|
+
E.moveTo(new C.Coordinate(X.x, U)), i.workspace.cleanUp(), zn();
|
|
10317
|
+
}, g = async (m) => {
|
|
10318
10318
|
if (!i.workspace) {
|
|
10319
10319
|
console.assert(!1);
|
|
10320
10320
|
return;
|
|
@@ -10325,7 +10325,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10325
10325
|
return (m, y) => a.value.length > 0 ? (B(), Z(R(Bo), {
|
|
10326
10326
|
key: 0,
|
|
10327
10327
|
modelValue: a.value,
|
|
10328
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
10328
|
+
"onUpdate:modelValue": y[0] || (y[0] = (E) => a.value = E),
|
|
10329
10329
|
animation: 150,
|
|
10330
10330
|
"ghost-class": "ghost",
|
|
10331
10331
|
handle: ".x-handle",
|
|
@@ -10334,12 +10334,12 @@ const wa = /* @__PURE__ */ st({
|
|
|
10334
10334
|
onStart: l
|
|
10335
10335
|
}, {
|
|
10336
10336
|
default: tt(() => [
|
|
10337
|
-
(B(!0), Q(En, null, fo(a.value, (
|
|
10338
|
-
id:
|
|
10339
|
-
key:
|
|
10340
|
-
select:
|
|
10341
|
-
title:
|
|
10342
|
-
onXClick:
|
|
10337
|
+
(B(!0), Q(En, null, fo(a.value, (E) => (B(), Z(Ha, {
|
|
10338
|
+
id: E.id,
|
|
10339
|
+
key: E.id,
|
|
10340
|
+
select: E.select,
|
|
10341
|
+
title: E.name,
|
|
10342
|
+
onXClick: g
|
|
10343
10343
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10344
10344
|
]),
|
|
10345
10345
|
_: 1
|
|
@@ -10350,7 +10350,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10350
10350
|
for (const [o, i] of e)
|
|
10351
10351
|
n[o] = i;
|
|
10352
10352
|
return n;
|
|
10353
|
-
}, Xa = /* @__PURE__ */ ja(Wa, [["__scopeId", "data-v-
|
|
10353
|
+
}, Xa = /* @__PURE__ */ ja(Wa, [["__scopeId", "data-v-4cd8352a"]]), Ja = /* @__PURE__ */ st({
|
|
10354
10354
|
__name: "index",
|
|
10355
10355
|
props: {
|
|
10356
10356
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10404,27 +10404,27 @@ const wa = /* @__PURE__ */ st({
|
|
|
10404
10404
|
mo(() => {
|
|
10405
10405
|
_.value = !1;
|
|
10406
10406
|
});
|
|
10407
|
-
const T = bt("blockList"),
|
|
10407
|
+
const T = bt("blockList"), g = bt("blockTree");
|
|
10408
10408
|
return e({ open: _, update: () => {
|
|
10409
|
-
t.type === "list" ? T.value?.update() : t.type === "tree" &&
|
|
10410
|
-
} }), (y,
|
|
10409
|
+
t.type === "list" ? T.value?.update() : t.type === "tree" && g.value?.update();
|
|
10410
|
+
} }), (y, E) => {
|
|
10411
10411
|
const P = D("v-sheet"), U = D("v-btn"), X = D("v-spacer"), dt = D("v-dialog"), Ie = D("v-tooltip");
|
|
10412
10412
|
return B(), Q(En, null, [
|
|
10413
10413
|
L(dt, {
|
|
10414
10414
|
modelValue: R(_),
|
|
10415
|
-
"onUpdate:modelValue":
|
|
10415
|
+
"onUpdate:modelValue": E[5] || (E[5] = ($) => $t(_) ? _.value = $ : null),
|
|
10416
10416
|
eager: "",
|
|
10417
10417
|
fullscreen: "",
|
|
10418
10418
|
"no-click-animation": "",
|
|
10419
10419
|
persistent: "",
|
|
10420
10420
|
transition: "scroll-x-reverse-transition",
|
|
10421
|
-
onKeydown:
|
|
10421
|
+
onKeydown: E[6] || (E[6] = gn(Bt(($) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10422
10422
|
}, {
|
|
10423
10423
|
default: tt(() => [
|
|
10424
10424
|
W("div", {
|
|
10425
10425
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10426
|
-
onClick:
|
|
10427
|
-
onContextmenu:
|
|
10426
|
+
onClick: E[3] || (E[3] = Bt(($) => _.value = !1, ["self"])),
|
|
10427
|
+
onContextmenu: E[4] || (E[4] = Bt(($) => _.value = !1, ["self", "prevent"]))
|
|
10428
10428
|
}, [
|
|
10429
10429
|
W("div", {
|
|
10430
10430
|
class: "elevation-2",
|
|
@@ -10445,7 +10445,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10445
10445
|
density: "comfortable",
|
|
10446
10446
|
icon: "mdi-close",
|
|
10447
10447
|
variant: "text",
|
|
10448
|
-
onClick:
|
|
10448
|
+
onClick: E[0] || (E[0] = ($) => _.value = !1)
|
|
10449
10449
|
}),
|
|
10450
10450
|
W("span", qa, ce(R(n)("x-block-lib.navigator")), 1),
|
|
10451
10451
|
L(X)
|
|
@@ -10461,14 +10461,14 @@ const wa = /* @__PURE__ */ st({
|
|
|
10461
10461
|
ref_key: "blockList",
|
|
10462
10462
|
ref: T,
|
|
10463
10463
|
modelValue: R(_),
|
|
10464
|
-
"onUpdate:modelValue":
|
|
10464
|
+
"onUpdate:modelValue": E[1] || (E[1] = ($) => $t(_) ? _.value = $ : null),
|
|
10465
10465
|
lock: t.lock
|
|
10466
10466
|
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (B(), Z(Ja, {
|
|
10467
10467
|
key: 1,
|
|
10468
10468
|
ref_key: "blockTree",
|
|
10469
|
-
ref:
|
|
10469
|
+
ref: g,
|
|
10470
10470
|
modelValue: R(_),
|
|
10471
|
-
"onUpdate:modelValue":
|
|
10471
|
+
"onUpdate:modelValue": E[2] || (E[2] = ($) => $t(_) ? _.value = $ : null)
|
|
10472
10472
|
}, null, 8, ["modelValue"])) : mt("", !0),
|
|
10473
10473
|
W("div", {
|
|
10474
10474
|
style: H(l.value)
|
|
@@ -10487,7 +10487,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10487
10487
|
density: "comfortable",
|
|
10488
10488
|
icon: "mdi-navigation-variant",
|
|
10489
10489
|
variant: "outlined",
|
|
10490
|
-
onClick:
|
|
10490
|
+
onClick: E[7] || (E[7] = (qe) => _.value = !0)
|
|
10491
10491
|
}), null, 16)
|
|
10492
10492
|
]),
|
|
10493
10493
|
_: 1
|
|
@@ -10583,8 +10583,8 @@ function nc(t, e) {
|
|
|
10583
10583
|
l.push(_);
|
|
10584
10584
|
u.initData(l);
|
|
10585
10585
|
for (let _ = 0; _ < l.length; _++) {
|
|
10586
|
-
const T = l[_],
|
|
10587
|
-
o(i[T],
|
|
10586
|
+
const T = l[_], g = u.getInput("ENTRY" + _);
|
|
10587
|
+
o(i[T], g.connection);
|
|
10588
10588
|
}
|
|
10589
10589
|
} else if (r === "json_array_v1") {
|
|
10590
10590
|
u.initData(i.length);
|
|
@@ -10643,9 +10643,9 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10643
10643
|
}),
|
|
10644
10644
|
emits: /* @__PURE__ */ be(["ready"], ["update:lock", "update:scale"]),
|
|
10645
10645
|
setup(t, { expose: e, emit: n }) {
|
|
10646
|
-
const { backgroundColor2: o } = Vt(), i = Rt(t, "lock"), a = Rt(t, "scale"), r = n, u = `blocklyEditor${Pe()}`, l = It(), _ = bt("parentContainer"), T = bt("clean"),
|
|
10646
|
+
const { backgroundColor2: o } = Vt(), i = Rt(t, "lock"), a = Rt(t, "scale"), r = n, u = `blocklyEditor${Pe()}`, l = It(), _ = bt("parentContainer"), T = bt("clean"), g = bt("navigator"), m = {};
|
|
10647
10647
|
Ya(m);
|
|
10648
|
-
const y = It(!0),
|
|
10648
|
+
const y = It(!0), E = It(!1), P = Y(() => t.type === "json" ? "tree" : "list"), U = Y(() => ({
|
|
10649
10649
|
width: "100%",
|
|
10650
10650
|
height: "calc(100% - 48px)"
|
|
10651
10651
|
})), X = Y(() => ({
|
|
@@ -10709,7 +10709,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10709
10709
|
async function oo(N) {
|
|
10710
10710
|
if (N.type === O.FINISHED_LOADING) {
|
|
10711
10711
|
zn(), setTimeout(() => {
|
|
10712
|
-
|
|
10712
|
+
g.value?.update();
|
|
10713
10713
|
}, 0), y.value = !1;
|
|
10714
10714
|
return;
|
|
10715
10715
|
}
|
|
@@ -10718,8 +10718,8 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10718
10718
|
a.value = m.workspace.getScale();
|
|
10719
10719
|
return;
|
|
10720
10720
|
}
|
|
10721
|
-
N.type === O.BLOCK_DRAG && (N.isStart ?
|
|
10722
|
-
|
|
10721
|
+
N.type === O.BLOCK_DRAG && (N.isStart ? E.value = !0 : E.value = !1), setTimeout(() => {
|
|
10722
|
+
g.value?.update();
|
|
10723
10723
|
}, 0);
|
|
10724
10724
|
}
|
|
10725
10725
|
}
|
|
@@ -10741,7 +10741,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10741
10741
|
}, tn = () => {
|
|
10742
10742
|
i.value = !i.value;
|
|
10743
10743
|
}, en = () => {
|
|
10744
|
-
|
|
10744
|
+
g.value && (g.value.open = !0);
|
|
10745
10745
|
};
|
|
10746
10746
|
return nn(() => {
|
|
10747
10747
|
gt.on("cleanWorkspace", Ze), gt.on("toggleBlocklyLock", tn), gt.on("openBlocklyNavigator", en);
|
|
@@ -10784,7 +10784,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10784
10784
|
}, [
|
|
10785
10785
|
Eo(N.$slots, "bottom")
|
|
10786
10786
|
], 4),
|
|
10787
|
-
|
|
10787
|
+
E.value ? (B(), Q("div", {
|
|
10788
10788
|
key: 0,
|
|
10789
10789
|
class: "d-flex flex-column justify-center align-center",
|
|
10790
10790
|
style: H(dt.value)
|
|
@@ -10810,7 +10810,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10810
10810
|
}, null, 8, ["modelValue"]),
|
|
10811
10811
|
L(Qa, {
|
|
10812
10812
|
ref_key: "navigator",
|
|
10813
|
-
ref:
|
|
10813
|
+
ref: g,
|
|
10814
10814
|
lock: i.value,
|
|
10815
10815
|
type: P.value
|
|
10816
10816
|
}, null, 8, ["lock", "type"])
|
|
@@ -10874,8 +10874,8 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10874
10874
|
a.value = _.code;
|
|
10875
10875
|
}, { open: l } = He("sourceDlg", u);
|
|
10876
10876
|
return (_, T) => {
|
|
10877
|
-
const
|
|
10878
|
-
return B(), Z(
|
|
10877
|
+
const g = D("v-sheet"), m = D("v-btn"), y = D("v-spacer"), E = D("v-dialog");
|
|
10878
|
+
return B(), Z(E, {
|
|
10879
10879
|
modelValue: R(l),
|
|
10880
10880
|
"onUpdate:modelValue": T[1] || (T[1] = (P) => $t(l) ? l.value = P : null),
|
|
10881
10881
|
fullscreen: "",
|
|
@@ -10885,18 +10885,18 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10885
10885
|
onKeydown: T[2] || (T[2] = gn(Bt((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10886
10886
|
}, {
|
|
10887
10887
|
default: tt(() => [
|
|
10888
|
-
L(
|
|
10888
|
+
L(g, {
|
|
10889
10889
|
color: R(o),
|
|
10890
10890
|
height: "100%",
|
|
10891
10891
|
width: "100%"
|
|
10892
10892
|
}, {
|
|
10893
10893
|
default: tt(() => [
|
|
10894
|
-
R(n) ? (B(), Z(
|
|
10894
|
+
R(n) ? (B(), Z(g, {
|
|
10895
10895
|
key: 0,
|
|
10896
10896
|
color: R(i),
|
|
10897
10897
|
height: 24
|
|
10898
10898
|
}, null, 8, ["color"])) : mt("", !0),
|
|
10899
|
-
L(
|
|
10899
|
+
L(g, {
|
|
10900
10900
|
class: "d-flex align-center px-2",
|
|
10901
10901
|
color: R(i),
|
|
10902
10902
|
height: 48
|
|
@@ -10932,7 +10932,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10932
10932
|
t.component("XBlockly", sc), t.component("XSourceDlg", uc);
|
|
10933
10933
|
};
|
|
10934
10934
|
async function Ec(t) {
|
|
10935
|
-
return (await bn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.
|
|
10935
|
+
return (await bn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
10936
10936
|
}
|
|
10937
10937
|
const gc = { install: lc };
|
|
10938
10938
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"vue-router": "^4.6.3",
|
|
39
39
|
"vuetify": "^3.10.7",
|
|
40
40
|
"x-essential-lib": "^0.9.1",
|
|
41
|
-
"x-runtime-lib": "^0.8.
|
|
41
|
+
"x-runtime-lib": "^0.8.18",
|
|
42
42
|
"x-state-lib": "^0.3.19"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|