x-block-lib 0.8.11 → 0.8.13
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;
|
|
@@ -2280,8 +2280,9 @@ const Si = {
|
|
|
2280
2280
|
}
|
|
2281
2281
|
};
|
|
2282
2282
|
d.get_app_state_v1 = Si;
|
|
2283
|
-
s.forBlock.get_app_state_v1 = function() {
|
|
2284
|
-
|
|
2283
|
+
s.forBlock.get_app_state_v1 = function(t) {
|
|
2284
|
+
const e = s.quote_;
|
|
2285
|
+
return [`__getStateV1__(${e(t.state.id)})`, c.ATOMIC];
|
|
2285
2286
|
};
|
|
2286
2287
|
const Bi = {
|
|
2287
2288
|
init: function() {
|
|
@@ -2345,8 +2346,9 @@ const Bi = {
|
|
|
2345
2346
|
}
|
|
2346
2347
|
};
|
|
2347
2348
|
d.set_app_state_v1 = Bi;
|
|
2348
|
-
s.forBlock.set_app_state_v1 = function() {
|
|
2349
|
-
|
|
2349
|
+
s.forBlock.set_app_state_v1 = function(t) {
|
|
2350
|
+
const e = s.quote_, n = t, o = s.valueToCode(n, "VALUE", c.NONE);
|
|
2351
|
+
return `__setStateV1__(${e(n.state.id)}, ${o});
|
|
2350
2352
|
`;
|
|
2351
2353
|
};
|
|
2352
2354
|
h([
|
|
@@ -3386,19 +3388,19 @@ s.forBlock.call_func_v1 = function(t) {
|
|
|
3386
3388
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3387
3389
|
let r = "";
|
|
3388
3390
|
r += `${e}var __inputs__ = {
|
|
3389
|
-
`, o.func.inputs.forEach(({ id:
|
|
3391
|
+
`, o.func.inputs.forEach(({ id: g }, m) => {
|
|
3390
3392
|
const y = s.valueToCode(
|
|
3391
3393
|
o,
|
|
3392
3394
|
"INPUT" + m,
|
|
3393
3395
|
c.ATOMIC
|
|
3394
3396
|
);
|
|
3395
|
-
r += `${e}${e}${n(
|
|
3397
|
+
r += `${e}${e}${n(g)}: ${y},
|
|
3396
3398
|
`;
|
|
3397
3399
|
}), r += `${e}};`;
|
|
3398
3400
|
const u = n(o.space.name + "/" + o.func.name);
|
|
3399
3401
|
let l = "";
|
|
3400
|
-
o.func.outputs.forEach(({ id:
|
|
3401
|
-
l += `${e}var __output_${
|
|
3402
|
+
o.func.outputs.forEach(({ id: g }) => {
|
|
3403
|
+
l += `${e}var __output_${g}__ = __result__[${n(g)}];
|
|
3402
3404
|
`;
|
|
3403
3405
|
});
|
|
3404
3406
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3557,19 +3559,19 @@ s.forBlock.call_func_internal_v1 = function(t) {
|
|
|
3557
3559
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3558
3560
|
let r = `${e}var __inputs__ = {
|
|
3559
3561
|
`;
|
|
3560
|
-
o.func.inputs.forEach(({ id:
|
|
3562
|
+
o.func.inputs.forEach(({ id: g }, m) => {
|
|
3561
3563
|
const y = s.valueToCode(
|
|
3562
3564
|
o,
|
|
3563
3565
|
"INPUT" + m,
|
|
3564
3566
|
c.ATOMIC
|
|
3565
3567
|
);
|
|
3566
|
-
r += `${e}${e}${n(
|
|
3568
|
+
r += `${e}${e}${n(g)}: ${y},
|
|
3567
3569
|
`;
|
|
3568
3570
|
}), r += `${e}};`;
|
|
3569
3571
|
const u = o.space.name + "/" + o.func.name;
|
|
3570
3572
|
let l = "";
|
|
3571
|
-
o.func.outputs.forEach(({ id:
|
|
3572
|
-
l += `${e}var __output_${
|
|
3573
|
+
o.func.outputs.forEach(({ id: g }) => {
|
|
3574
|
+
l += `${e}var __output_${g}__ = __result__.outputs[${n(g)}];
|
|
3573
3575
|
`;
|
|
3574
3576
|
});
|
|
3575
3577
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -4754,8 +4756,8 @@ d.select_column_v1 = as;
|
|
|
4754
4756
|
s.forBlock.select_column_v1 = function(t) {
|
|
4755
4757
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4756
4758
|
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:
|
|
4759
|
+
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, g = n.getFieldValue("ALIAS" + l);
|
|
4760
|
+
a.push({ name: T, alias: g });
|
|
4759
4761
|
}
|
|
4760
4762
|
let r = "[";
|
|
4761
4763
|
return a.forEach(({ name: l, alias: _ }, T) => {
|
|
@@ -5165,8 +5167,8 @@ d.update_column_v1 = _s;
|
|
|
5165
5167
|
s.forBlock.update_column_v1 = function(t) {
|
|
5166
5168
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5167
5169
|
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:
|
|
5170
|
+
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, g = s.valueToCode(n, "ADD" + l, c.ATOMIC) || "null";
|
|
5171
|
+
a.push({ name: T, value: g });
|
|
5170
5172
|
}
|
|
5171
5173
|
let r = "[";
|
|
5172
5174
|
return a.forEach(({ name: l, value: _ }, T) => {
|
|
@@ -10156,8 +10158,8 @@ const wa = /* @__PURE__ */ st({
|
|
|
10156
10158
|
return B(), Z(T, {
|
|
10157
10159
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10158
10160
|
}, {
|
|
10159
|
-
activator: tt(({ props:
|
|
10160
|
-
L(_, $e(
|
|
10161
|
+
activator: tt(({ props: g }) => [
|
|
10162
|
+
L(_, $e(g, {
|
|
10161
10163
|
density: "comfortable",
|
|
10162
10164
|
icon: "mdi-broom",
|
|
10163
10165
|
variant: "outlined",
|
|
@@ -10219,28 +10221,28 @@ const wa = /* @__PURE__ */ st({
|
|
|
10219
10221
|
border: "1px solid " + n.value,
|
|
10220
10222
|
pointerEvents: "none"
|
|
10221
10223
|
}));
|
|
10222
|
-
return (T,
|
|
10223
|
-
const m = D("v-spacer"), y = D("v-icon"),
|
|
10224
|
+
return (T, g) => {
|
|
10225
|
+
const m = D("v-spacer"), y = D("v-icon"), E = po("ripple");
|
|
10224
10226
|
return ho((B(), Q("div", {
|
|
10225
10227
|
class: "d-flex align-center cursor-pointer",
|
|
10226
10228
|
style: H(l.value),
|
|
10227
|
-
onClick:
|
|
10228
|
-
onMouseout:
|
|
10229
|
-
onMouseover:
|
|
10229
|
+
onClick: g[1] || (g[1] = (P) => r("x-click", a.id)),
|
|
10230
|
+
onMouseout: g[2] || (g[2] = (P) => u.value = !1),
|
|
10231
|
+
onMouseover: g[3] || (g[3] = (P) => u.value = !0)
|
|
10230
10232
|
}, [
|
|
10231
10233
|
W("span", $a, ce(a.title), 1),
|
|
10232
10234
|
L(m),
|
|
10233
10235
|
L(y, {
|
|
10234
10236
|
class: "x-handle cursor-move mr-3",
|
|
10235
10237
|
icon: "mdi-drag-horizontal-variant",
|
|
10236
|
-
onMousedown:
|
|
10238
|
+
onMousedown: g[0] || (g[0] = Bt(() => {
|
|
10237
10239
|
}, ["stop"]))
|
|
10238
10240
|
}),
|
|
10239
10241
|
W("div", {
|
|
10240
10242
|
style: H(_.value)
|
|
10241
10243
|
}, null, 4)
|
|
10242
10244
|
], 36)), [
|
|
10243
|
-
[
|
|
10245
|
+
[E]
|
|
10244
10246
|
]);
|
|
10245
10247
|
};
|
|
10246
10248
|
}
|
|
@@ -10264,15 +10266,15 @@ const wa = /* @__PURE__ */ st({
|
|
|
10264
10266
|
return;
|
|
10265
10267
|
}
|
|
10266
10268
|
const m = [];
|
|
10267
|
-
i.workspace.getTopBlocks(!0).forEach((
|
|
10268
|
-
const P =
|
|
10269
|
+
i.workspace.getTopBlocks(!0).forEach((E) => {
|
|
10270
|
+
const P = E.id === bo()?.id;
|
|
10269
10271
|
let U = "<n/a>";
|
|
10270
|
-
if (
|
|
10271
|
-
const X =
|
|
10272
|
+
if (E.type.startsWith("on_app_event_v")) {
|
|
10273
|
+
const X = E, dt = J[X.node.key];
|
|
10272
10274
|
dt && (U = n(dt.name), X.node.alias && (U += " / " + X.node.alias), U += " - " + ue(X.event.names, X.event.from));
|
|
10273
|
-
} else
|
|
10275
|
+
} 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
10276
|
m.push({
|
|
10275
|
-
id:
|
|
10277
|
+
id: E.id,
|
|
10276
10278
|
name: U,
|
|
10277
10279
|
select: P
|
|
10278
10280
|
});
|
|
@@ -10299,10 +10301,10 @@ const wa = /* @__PURE__ */ st({
|
|
|
10299
10301
|
}
|
|
10300
10302
|
if (m.oldIndex === m.newIndex)
|
|
10301
10303
|
return;
|
|
10302
|
-
const y = u[m.oldIndex],
|
|
10304
|
+
const y = u[m.oldIndex], E = i.workspace.getBlockById(
|
|
10303
10305
|
y
|
|
10304
10306
|
);
|
|
10305
|
-
if (!
|
|
10307
|
+
if (!E) {
|
|
10306
10308
|
console.assert(!1);
|
|
10307
10309
|
return;
|
|
10308
10310
|
}
|
|
@@ -10312,9 +10314,9 @@ const wa = /* @__PURE__ */ st({
|
|
|
10312
10314
|
P !== "" && (U = i.workspace.getBlockById(
|
|
10313
10315
|
P
|
|
10314
10316
|
).getRelativeToSurfaceXY().y + 10);
|
|
10315
|
-
const X =
|
|
10316
|
-
|
|
10317
|
-
},
|
|
10317
|
+
const X = E.getRelativeToSurfaceXY();
|
|
10318
|
+
E.moveTo(new C.Coordinate(X.x, U)), i.workspace.cleanUp(), zn();
|
|
10319
|
+
}, g = async (m) => {
|
|
10318
10320
|
if (!i.workspace) {
|
|
10319
10321
|
console.assert(!1);
|
|
10320
10322
|
return;
|
|
@@ -10325,7 +10327,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10325
10327
|
return (m, y) => a.value.length > 0 ? (B(), Z(R(Bo), {
|
|
10326
10328
|
key: 0,
|
|
10327
10329
|
modelValue: a.value,
|
|
10328
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
10330
|
+
"onUpdate:modelValue": y[0] || (y[0] = (E) => a.value = E),
|
|
10329
10331
|
animation: 150,
|
|
10330
10332
|
"ghost-class": "ghost",
|
|
10331
10333
|
handle: ".x-handle",
|
|
@@ -10334,12 +10336,12 @@ const wa = /* @__PURE__ */ st({
|
|
|
10334
10336
|
onStart: l
|
|
10335
10337
|
}, {
|
|
10336
10338
|
default: tt(() => [
|
|
10337
|
-
(B(!0), Q(En, null, fo(a.value, (
|
|
10338
|
-
id:
|
|
10339
|
-
key:
|
|
10340
|
-
select:
|
|
10341
|
-
title:
|
|
10342
|
-
onXClick:
|
|
10339
|
+
(B(!0), Q(En, null, fo(a.value, (E) => (B(), Z(Ha, {
|
|
10340
|
+
id: E.id,
|
|
10341
|
+
key: E.id,
|
|
10342
|
+
select: E.select,
|
|
10343
|
+
title: E.name,
|
|
10344
|
+
onXClick: g
|
|
10343
10345
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10344
10346
|
]),
|
|
10345
10347
|
_: 1
|
|
@@ -10350,7 +10352,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10350
10352
|
for (const [o, i] of e)
|
|
10351
10353
|
n[o] = i;
|
|
10352
10354
|
return n;
|
|
10353
|
-
}, Xa = /* @__PURE__ */ ja(Wa, [["__scopeId", "data-v-
|
|
10355
|
+
}, Xa = /* @__PURE__ */ ja(Wa, [["__scopeId", "data-v-4cd8352a"]]), Ja = /* @__PURE__ */ st({
|
|
10354
10356
|
__name: "index",
|
|
10355
10357
|
props: {
|
|
10356
10358
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10404,27 +10406,27 @@ const wa = /* @__PURE__ */ st({
|
|
|
10404
10406
|
mo(() => {
|
|
10405
10407
|
_.value = !1;
|
|
10406
10408
|
});
|
|
10407
|
-
const T = bt("blockList"),
|
|
10409
|
+
const T = bt("blockList"), g = bt("blockTree");
|
|
10408
10410
|
return e({ open: _, update: () => {
|
|
10409
|
-
t.type === "list" ? T.value?.update() : t.type === "tree" &&
|
|
10410
|
-
} }), (y,
|
|
10411
|
+
t.type === "list" ? T.value?.update() : t.type === "tree" && g.value?.update();
|
|
10412
|
+
} }), (y, E) => {
|
|
10411
10413
|
const P = D("v-sheet"), U = D("v-btn"), X = D("v-spacer"), dt = D("v-dialog"), Ie = D("v-tooltip");
|
|
10412
10414
|
return B(), Q(En, null, [
|
|
10413
10415
|
L(dt, {
|
|
10414
10416
|
modelValue: R(_),
|
|
10415
|
-
"onUpdate:modelValue":
|
|
10417
|
+
"onUpdate:modelValue": E[5] || (E[5] = ($) => $t(_) ? _.value = $ : null),
|
|
10416
10418
|
eager: "",
|
|
10417
10419
|
fullscreen: "",
|
|
10418
10420
|
"no-click-animation": "",
|
|
10419
10421
|
persistent: "",
|
|
10420
10422
|
transition: "scroll-x-reverse-transition",
|
|
10421
|
-
onKeydown:
|
|
10423
|
+
onKeydown: E[6] || (E[6] = gn(Bt(($) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10422
10424
|
}, {
|
|
10423
10425
|
default: tt(() => [
|
|
10424
10426
|
W("div", {
|
|
10425
10427
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10426
|
-
onClick:
|
|
10427
|
-
onContextmenu:
|
|
10428
|
+
onClick: E[3] || (E[3] = Bt(($) => _.value = !1, ["self"])),
|
|
10429
|
+
onContextmenu: E[4] || (E[4] = Bt(($) => _.value = !1, ["self", "prevent"]))
|
|
10428
10430
|
}, [
|
|
10429
10431
|
W("div", {
|
|
10430
10432
|
class: "elevation-2",
|
|
@@ -10445,7 +10447,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10445
10447
|
density: "comfortable",
|
|
10446
10448
|
icon: "mdi-close",
|
|
10447
10449
|
variant: "text",
|
|
10448
|
-
onClick:
|
|
10450
|
+
onClick: E[0] || (E[0] = ($) => _.value = !1)
|
|
10449
10451
|
}),
|
|
10450
10452
|
W("span", qa, ce(R(n)("x-block-lib.navigator")), 1),
|
|
10451
10453
|
L(X)
|
|
@@ -10461,14 +10463,14 @@ const wa = /* @__PURE__ */ st({
|
|
|
10461
10463
|
ref_key: "blockList",
|
|
10462
10464
|
ref: T,
|
|
10463
10465
|
modelValue: R(_),
|
|
10464
|
-
"onUpdate:modelValue":
|
|
10466
|
+
"onUpdate:modelValue": E[1] || (E[1] = ($) => $t(_) ? _.value = $ : null),
|
|
10465
10467
|
lock: t.lock
|
|
10466
10468
|
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (B(), Z(Ja, {
|
|
10467
10469
|
key: 1,
|
|
10468
10470
|
ref_key: "blockTree",
|
|
10469
|
-
ref:
|
|
10471
|
+
ref: g,
|
|
10470
10472
|
modelValue: R(_),
|
|
10471
|
-
"onUpdate:modelValue":
|
|
10473
|
+
"onUpdate:modelValue": E[2] || (E[2] = ($) => $t(_) ? _.value = $ : null)
|
|
10472
10474
|
}, null, 8, ["modelValue"])) : mt("", !0),
|
|
10473
10475
|
W("div", {
|
|
10474
10476
|
style: H(l.value)
|
|
@@ -10487,7 +10489,7 @@ const wa = /* @__PURE__ */ st({
|
|
|
10487
10489
|
density: "comfortable",
|
|
10488
10490
|
icon: "mdi-navigation-variant",
|
|
10489
10491
|
variant: "outlined",
|
|
10490
|
-
onClick:
|
|
10492
|
+
onClick: E[7] || (E[7] = (qe) => _.value = !0)
|
|
10491
10493
|
}), null, 16)
|
|
10492
10494
|
]),
|
|
10493
10495
|
_: 1
|
|
@@ -10583,8 +10585,8 @@ function nc(t, e) {
|
|
|
10583
10585
|
l.push(_);
|
|
10584
10586
|
u.initData(l);
|
|
10585
10587
|
for (let _ = 0; _ < l.length; _++) {
|
|
10586
|
-
const T = l[_],
|
|
10587
|
-
o(i[T],
|
|
10588
|
+
const T = l[_], g = u.getInput("ENTRY" + _);
|
|
10589
|
+
o(i[T], g.connection);
|
|
10588
10590
|
}
|
|
10589
10591
|
} else if (r === "json_array_v1") {
|
|
10590
10592
|
u.initData(i.length);
|
|
@@ -10643,9 +10645,9 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10643
10645
|
}),
|
|
10644
10646
|
emits: /* @__PURE__ */ be(["ready"], ["update:lock", "update:scale"]),
|
|
10645
10647
|
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"),
|
|
10648
|
+
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
10649
|
Ya(m);
|
|
10648
|
-
const y = It(!0),
|
|
10650
|
+
const y = It(!0), E = It(!1), P = Y(() => t.type === "json" ? "tree" : "list"), U = Y(() => ({
|
|
10649
10651
|
width: "100%",
|
|
10650
10652
|
height: "calc(100% - 48px)"
|
|
10651
10653
|
})), X = Y(() => ({
|
|
@@ -10709,7 +10711,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10709
10711
|
async function oo(N) {
|
|
10710
10712
|
if (N.type === O.FINISHED_LOADING) {
|
|
10711
10713
|
zn(), setTimeout(() => {
|
|
10712
|
-
|
|
10714
|
+
g.value?.update();
|
|
10713
10715
|
}, 0), y.value = !1;
|
|
10714
10716
|
return;
|
|
10715
10717
|
}
|
|
@@ -10718,8 +10720,8 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10718
10720
|
a.value = m.workspace.getScale();
|
|
10719
10721
|
return;
|
|
10720
10722
|
}
|
|
10721
|
-
N.type === O.BLOCK_DRAG && (N.isStart ?
|
|
10722
|
-
|
|
10723
|
+
N.type === O.BLOCK_DRAG && (N.isStart ? E.value = !0 : E.value = !1), setTimeout(() => {
|
|
10724
|
+
g.value?.update();
|
|
10723
10725
|
}, 0);
|
|
10724
10726
|
}
|
|
10725
10727
|
}
|
|
@@ -10741,7 +10743,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10741
10743
|
}, tn = () => {
|
|
10742
10744
|
i.value = !i.value;
|
|
10743
10745
|
}, en = () => {
|
|
10744
|
-
|
|
10746
|
+
g.value && (g.value.open = !0);
|
|
10745
10747
|
};
|
|
10746
10748
|
return nn(() => {
|
|
10747
10749
|
gt.on("cleanWorkspace", Ze), gt.on("toggleBlocklyLock", tn), gt.on("openBlocklyNavigator", en);
|
|
@@ -10784,7 +10786,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10784
10786
|
}, [
|
|
10785
10787
|
Eo(N.$slots, "bottom")
|
|
10786
10788
|
], 4),
|
|
10787
|
-
|
|
10789
|
+
E.value ? (B(), Q("div", {
|
|
10788
10790
|
key: 0,
|
|
10789
10791
|
class: "d-flex flex-column justify-center align-center",
|
|
10790
10792
|
style: H(dt.value)
|
|
@@ -10810,7 +10812,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10810
10812
|
}, null, 8, ["modelValue"]),
|
|
10811
10813
|
L(Qa, {
|
|
10812
10814
|
ref_key: "navigator",
|
|
10813
|
-
ref:
|
|
10815
|
+
ref: g,
|
|
10814
10816
|
lock: i.value,
|
|
10815
10817
|
type: P.value
|
|
10816
10818
|
}, null, 8, ["lock", "type"])
|
|
@@ -10874,8 +10876,8 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10874
10876
|
a.value = _.code;
|
|
10875
10877
|
}, { open: l } = He("sourceDlg", u);
|
|
10876
10878
|
return (_, T) => {
|
|
10877
|
-
const
|
|
10878
|
-
return B(), Z(
|
|
10879
|
+
const g = D("v-sheet"), m = D("v-btn"), y = D("v-spacer"), E = D("v-dialog");
|
|
10880
|
+
return B(), Z(E, {
|
|
10879
10881
|
modelValue: R(l),
|
|
10880
10882
|
"onUpdate:modelValue": T[1] || (T[1] = (P) => $t(l) ? l.value = P : null),
|
|
10881
10883
|
fullscreen: "",
|
|
@@ -10885,18 +10887,18 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10885
10887
|
onKeydown: T[2] || (T[2] = gn(Bt((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10886
10888
|
}, {
|
|
10887
10889
|
default: tt(() => [
|
|
10888
|
-
L(
|
|
10890
|
+
L(g, {
|
|
10889
10891
|
color: R(o),
|
|
10890
10892
|
height: "100%",
|
|
10891
10893
|
width: "100%"
|
|
10892
10894
|
}, {
|
|
10893
10895
|
default: tt(() => [
|
|
10894
|
-
R(n) ? (B(), Z(
|
|
10896
|
+
R(n) ? (B(), Z(g, {
|
|
10895
10897
|
key: 0,
|
|
10896
10898
|
color: R(i),
|
|
10897
10899
|
height: 24
|
|
10898
10900
|
}, null, 8, ["color"])) : mt("", !0),
|
|
10899
|
-
L(
|
|
10901
|
+
L(g, {
|
|
10900
10902
|
class: "d-flex align-center px-2",
|
|
10901
10903
|
color: R(i),
|
|
10902
10904
|
height: 48
|
|
@@ -10932,7 +10934,7 @@ const ic = { class: "position-relative w-100 h-100" }, sc = /* @__PURE__ */ st({
|
|
|
10932
10934
|
t.component("XBlockly", sc), t.component("XSourceDlg", uc);
|
|
10933
10935
|
};
|
|
10934
10936
|
async function Ec(t) {
|
|
10935
|
-
return (await bn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.
|
|
10937
|
+
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
10938
|
}
|
|
10937
10939
|
const gc = { install: lc };
|
|
10938
10940
|
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.13",
|
|
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.19",
|
|
42
42
|
"x-state-lib": "^0.3.19"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|