x-block-lib 0.4.8 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/blockly/index.vue.d.ts +0 -1
- package/dist/components/index.d.ts +2 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.js +151 -146
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.id="x-block-lib",o.appendChild(document.createTextNode(".blocklyToolboxDiv{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:10px}.blocklyTreeRow{height:28px;display:flex;align-items:center;border-left-width:6px!important;border-right-width:6px!important}.blocklyTreeIcon{display:none!important}.blocklyFlyout{z-index:21}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
var Qe = Object.defineProperty;
|
|
3
3
|
var qe = (e, o, t) => o in e ? Qe(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
|
|
4
|
-
var
|
|
5
|
-
import { defineComponent as
|
|
6
|
-
import { d as _, j as s, O as l, u, X as ct, B as y, E as f, M as
|
|
4
|
+
var A = (e, o, t) => qe(e, typeof o != "symbol" ? o + "" : o, t);
|
|
5
|
+
import { defineComponent as X, resolveComponent as C, openBlock as L, createBlock as V, unref as v, useModel as ue, ref as ee, onMounted as Se, onUnmounted as Ze, withCtx as Y, createElementBlock as j, Fragment as et, renderList as tt, createVNode as B, createTextVNode as ot, toDisplayString as pe, computed as K, isRef as nt, withKeys as it, withModifiers as le, mergeProps as st, createElementVNode as S, normalizeStyle as F, createCommentVNode as te, mergeModels as Ae, onBeforeUnmount as lt, watch as W, resolveDirective as at, withDirectives as rt } from "vue";
|
|
6
|
+
import { d as _, j as s, O as l, u, X as ct, B as y, E as f, M as E, i as ie, a as M, b as d, C as Me, F as Ee, c as _t, P as Te, N as he, V as oe, e as ut, f as Ue, s as pt, g as H, S as g, h as ae, k as D, l as J, m as re, n as G, o as U, p as ve, G as ce, q as Tt, r as dt, t as _e, U as z, D as Q, v as x, w as ft, T as se, x as Ve, y as Et, z as ht } from "./blockly-jgwpd4oo.js";
|
|
7
7
|
import { storeToRefs as mt } from "pinia";
|
|
8
|
-
import { openConfirmDlg as Ot, openPromptDlg as gt, eventBus as de, useSystem as It, useColor as Lt, useViewStack as
|
|
8
|
+
import { openConfirmDlg as Ot, openPromptDlg as gt, eventBus as de, useSystem as It, useColor as Lt, useViewStack as Pe, useGlobalStore as yt } from "x-essential-lib";
|
|
9
9
|
import { useDisplay as Ct } from "vuetify";
|
|
10
|
-
import { useI18n as
|
|
11
|
-
var
|
|
10
|
+
import { useI18n as xe } from "vue-i18n";
|
|
11
|
+
var At = "M19.36,2.72L20.78,4.14L15.06,9.85C16.13,11.39 16.28,13.24 15.38,14.44L9.06,8.12C10.26,7.22 12.11,7.37 13.65,8.44L19.36,2.72M5.93,17.57C3.92,15.56 2.69,13.16 2.35,10.92L7.23,8.83L14.67,16.27L12.58,21.15C10.34,20.81 7.94,19.58 5.93,17.57Z", vt = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", bt = "M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z", kt = "M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z", Nt = "M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z", Bt = "M21 3L3 10.53V11.5L9.84 14.16L12.5 21H13.46L21 3Z";
|
|
12
12
|
_([
|
|
13
13
|
{
|
|
14
14
|
type: "color_blend_v1",
|
|
@@ -196,7 +196,7 @@ function q(e) {
|
|
|
196
196
|
console.assert(!1, "invalid param type", e.type);
|
|
197
197
|
return u.xml.textToDom(o);
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function De(e, o, t) {
|
|
200
200
|
const n = `<xml><block type="parameter_v1"><mutation key="${o}" name="${t}"/></block></xml>`, i = u.xml.textToDom(n), a = ct.domToWorkspace(i, e);
|
|
201
201
|
return e.getBlockById(a[0]);
|
|
202
202
|
}
|
|
@@ -274,7 +274,7 @@ const Vt = {
|
|
|
274
274
|
f.disable();
|
|
275
275
|
const n = (t = o.getInput(e.oldInputName)) == null ? void 0 : t.connection;
|
|
276
276
|
if (n) {
|
|
277
|
-
const i =
|
|
277
|
+
const i = De(this.workspace, this.key, this.name);
|
|
278
278
|
n.connect(i.outputConnection);
|
|
279
279
|
}
|
|
280
280
|
} finally {
|
|
@@ -282,7 +282,7 @@ const Vt = {
|
|
|
282
282
|
}
|
|
283
283
|
},
|
|
284
284
|
updateShape_: function() {
|
|
285
|
-
this.name ? this.setFieldValue(
|
|
285
|
+
this.name ? this.setFieldValue(E[this.name], "LABEL") : this.setFieldValue(this.key, "LABEL");
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
288
|
y.parameter_v1 = Vt;
|
|
@@ -826,8 +826,8 @@ const Ht = {
|
|
|
826
826
|
for (let e = 1; this.getInput("IF" + e); e++)
|
|
827
827
|
this.removeInput("IF" + e), this.removeInput("DO" + e);
|
|
828
828
|
for (let e = 1; e <= this.elseIfCount_; e++)
|
|
829
|
-
this.appendValueInput("IF" + e).setCheck("Boolean").appendField(
|
|
830
|
-
this.hasElse_ && this.appendStatementInput("ELSE").appendField(
|
|
829
|
+
this.appendValueInput("IF" + e).setCheck("Boolean").appendField(E.LOGIC_ELSE_IF), this.appendStatementInput("DO" + e).appendField(E.LOGIC_DO);
|
|
830
|
+
this.hasElse_ && this.appendStatementInput("ELSE").appendField(E.LOGIC_ELSE);
|
|
831
831
|
},
|
|
832
832
|
reconnectChildBlocks_: function(e, o, t) {
|
|
833
833
|
var n, i;
|
|
@@ -1050,8 +1050,8 @@ const Gt = {
|
|
|
1050
1050
|
};
|
|
1051
1051
|
e.push({
|
|
1052
1052
|
enabled: !0,
|
|
1053
|
-
text:
|
|
1054
|
-
callback:
|
|
1053
|
+
text: E.VARIABLES_SET_CREATE_GET.replace("%1", n),
|
|
1054
|
+
callback: Me.callbackFactory(this, i)
|
|
1055
1055
|
});
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
@@ -1088,7 +1088,7 @@ const $t = /* @__PURE__ */ new Set([
|
|
|
1088
1088
|
return;
|
|
1089
1089
|
const t = this.getSurroundLoop();
|
|
1090
1090
|
if (console.log(e.type, t), this.setWarningText(
|
|
1091
|
-
t ? null :
|
|
1091
|
+
t ? null : E.LOOP_FLOW_CONTROL_WARNING
|
|
1092
1092
|
), !this.isInFlyout)
|
|
1093
1093
|
try {
|
|
1094
1094
|
f.setRecordUndo(!1), this.setDisabledReason(!t, "FLOW_CONTROL_NOT_IN_LOOP");
|
|
@@ -2253,7 +2253,7 @@ _([
|
|
|
2253
2253
|
s.forBlock.object_to_json_v1 = function(e) {
|
|
2254
2254
|
return [`__jsonStringifyV1__(${s.valueToCode(e, "OBJECT", l.NONE) || "null"})`, l.FUNCTION_CALL];
|
|
2255
2255
|
};
|
|
2256
|
-
const
|
|
2256
|
+
const be = u.xml, qt = {
|
|
2257
2257
|
init: function() {
|
|
2258
2258
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new _t(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
2259
2259
|
}
|
|
@@ -2296,9 +2296,9 @@ const eo = {
|
|
|
2296
2296
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
2297
2297
|
},
|
|
2298
2298
|
mutationToDom: function() {
|
|
2299
|
-
const e =
|
|
2299
|
+
const e = be.createElement("mutation");
|
|
2300
2300
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((o) => {
|
|
2301
|
-
const t =
|
|
2301
|
+
const t = be.createElement("arg");
|
|
2302
2302
|
t.setAttribute("name", o.name), t.setAttribute("id", o.id), e.appendChild(t);
|
|
2303
2303
|
}), e;
|
|
2304
2304
|
},
|
|
@@ -2375,7 +2375,7 @@ const eo = {
|
|
|
2375
2375
|
n.setKeyName(o.name, "");
|
|
2376
2376
|
else
|
|
2377
2377
|
try {
|
|
2378
|
-
f.disable(), n =
|
|
2378
|
+
f.disable(), n = De(this.workspace, o.name, ""), n.outputConnection.connect(t);
|
|
2379
2379
|
} finally {
|
|
2380
2380
|
f.enable();
|
|
2381
2381
|
}
|
|
@@ -3048,11 +3048,11 @@ const ro = {
|
|
|
3048
3048
|
if (this.isInFlyout) {
|
|
3049
3049
|
if (this.type === "variables_get_v1" || this.type === "variables_get_v1_reporter") {
|
|
3050
3050
|
const o = {
|
|
3051
|
-
text:
|
|
3051
|
+
text: E.RENAME_VARIABLE,
|
|
3052
3052
|
enabled: !0,
|
|
3053
3053
|
callback: co(this)
|
|
3054
3054
|
}, t = this.getField("VAR").getText(), n = {
|
|
3055
|
-
text:
|
|
3055
|
+
text: E.DELETE_VARIABLE.replace("%1", t),
|
|
3056
3056
|
enabled: !0,
|
|
3057
3057
|
callback: _o(this)
|
|
3058
3058
|
};
|
|
@@ -3060,7 +3060,7 @@ const ro = {
|
|
|
3060
3060
|
}
|
|
3061
3061
|
} else {
|
|
3062
3062
|
let o, t;
|
|
3063
|
-
this.type === "variables_get_v1" ? (o = "variables_set_v1", t =
|
|
3063
|
+
this.type === "variables_get_v1" ? (o = "variables_set_v1", t = E.VARIABLE_V1_GET_CREATE_SET) : this.type === "variables_set_v1" ? (o = "variables_get_v1", t = E.VARIABLE_V1_SET_CREATE_GET) : console.assert(!1);
|
|
3064
3064
|
const n = this.getField("VAR"), i = {
|
|
3065
3065
|
type: o,
|
|
3066
3066
|
fields: { VAR: n.saveState(!0) }
|
|
@@ -3068,7 +3068,7 @@ const ro = {
|
|
|
3068
3068
|
e.push({
|
|
3069
3069
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
3070
3070
|
text: t.replace("%1", n.getText()),
|
|
3071
|
-
callback:
|
|
3071
|
+
callback: Me.callbackFactory(this, i)
|
|
3072
3072
|
});
|
|
3073
3073
|
}
|
|
3074
3074
|
}
|
|
@@ -3141,15 +3141,15 @@ s.forBlock.variable_set_v1 = function(e) {
|
|
|
3141
3141
|
return `${o} = ${t};
|
|
3142
3142
|
`;
|
|
3143
3143
|
};
|
|
3144
|
-
const
|
|
3144
|
+
const ke = u.xml;
|
|
3145
3145
|
function uo() {
|
|
3146
3146
|
const e = [];
|
|
3147
3147
|
{
|
|
3148
|
-
const o =
|
|
3149
|
-
o.setAttribute("text",
|
|
3148
|
+
const o = ke.createElement("label");
|
|
3149
|
+
o.setAttribute("text", E.LABEL_ASSET_LAYER), e.push(o);
|
|
3150
3150
|
}
|
|
3151
3151
|
{
|
|
3152
|
-
const o =
|
|
3152
|
+
const o = ke.createElement("block");
|
|
3153
3153
|
o.setAttribute("type", "upload_asset_v1"), e.push(o);
|
|
3154
3154
|
}
|
|
3155
3155
|
return e;
|
|
@@ -3157,28 +3157,28 @@ function uo() {
|
|
|
3157
3157
|
const po = {
|
|
3158
3158
|
name: "INTERFACE_CATEGORY",
|
|
3159
3159
|
callback: uo
|
|
3160
|
-
},
|
|
3160
|
+
}, $ = u.xml;
|
|
3161
3161
|
function To() {
|
|
3162
3162
|
const e = [];
|
|
3163
3163
|
{
|
|
3164
|
-
const o =
|
|
3164
|
+
const o = $.createElement("label");
|
|
3165
3165
|
o.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), e.push(o);
|
|
3166
3166
|
}
|
|
3167
3167
|
{
|
|
3168
|
-
const o =
|
|
3168
|
+
const o = $.createElement("block");
|
|
3169
3169
|
o.setAttribute("type", "procedure_def_v1");
|
|
3170
3170
|
{
|
|
3171
|
-
const t =
|
|
3171
|
+
const t = $.createElement("field");
|
|
3172
3172
|
t.setAttribute("name", "NAME");
|
|
3173
|
-
const n =
|
|
3174
|
-
|
|
3173
|
+
const n = $.createTextNode(
|
|
3174
|
+
E.PROCEDURE_DEFAULT_NAME
|
|
3175
3175
|
);
|
|
3176
3176
|
t.appendChild(n), o.appendChild(t);
|
|
3177
3177
|
}
|
|
3178
3178
|
e.push(o);
|
|
3179
3179
|
}
|
|
3180
3180
|
{
|
|
3181
|
-
const o =
|
|
3181
|
+
const o = $.createElement("block");
|
|
3182
3182
|
o.setAttribute("type", "procedure_return_v1"), e.push(o);
|
|
3183
3183
|
}
|
|
3184
3184
|
return e;
|
|
@@ -3193,16 +3193,16 @@ function fo() {
|
|
|
3193
3193
|
o.push({ id: t, name: n, type: i });
|
|
3194
3194
|
}), o;
|
|
3195
3195
|
}
|
|
3196
|
-
const
|
|
3196
|
+
const Ne = u.xml;
|
|
3197
3197
|
function Eo() {
|
|
3198
3198
|
const e = [];
|
|
3199
3199
|
if (fo().length > 0) {
|
|
3200
3200
|
{
|
|
3201
|
-
const o =
|
|
3201
|
+
const o = Ne.createElement("label");
|
|
3202
3202
|
o.setAttribute("text", "%{BKY_LABEL_ARGUMENT}"), e.push(o);
|
|
3203
3203
|
}
|
|
3204
3204
|
{
|
|
3205
|
-
const o =
|
|
3205
|
+
const o = Ne.createElement("block");
|
|
3206
3206
|
o.setAttribute("type", "get_arg_v1"), e.push(o);
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
@@ -3235,7 +3235,7 @@ function ho(e) {
|
|
|
3235
3235
|
t.sort(ut.compareByName);
|
|
3236
3236
|
{
|
|
3237
3237
|
const n = Z.createElement("label");
|
|
3238
|
-
n.setAttribute("text",
|
|
3238
|
+
n.setAttribute("text", E.LABEL_CREATED), o.push(n);
|
|
3239
3239
|
}
|
|
3240
3240
|
return t.forEach((n) => {
|
|
3241
3241
|
{
|
|
@@ -3252,21 +3252,21 @@ const N = {
|
|
|
3252
3252
|
name: "VARIABLE_CATEGORY",
|
|
3253
3253
|
callback: ho
|
|
3254
3254
|
};
|
|
3255
|
-
|
|
3255
|
+
Ue.setConfirm(async (e, o) => {
|
|
3256
3256
|
const t = await Ot({
|
|
3257
3257
|
title: "",
|
|
3258
3258
|
text: e
|
|
3259
3259
|
});
|
|
3260
3260
|
o(!!t);
|
|
3261
3261
|
});
|
|
3262
|
-
|
|
3262
|
+
Ue.setPrompt(async (e, o, t) => {
|
|
3263
3263
|
const n = await gt({
|
|
3264
3264
|
title: "",
|
|
3265
3265
|
value: o
|
|
3266
3266
|
});
|
|
3267
3267
|
t(String(n));
|
|
3268
3268
|
});
|
|
3269
|
-
const
|
|
3269
|
+
const Ye = (e, o, t) => {
|
|
3270
3270
|
const n = e[o];
|
|
3271
3271
|
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((i, a) => {
|
|
3272
3272
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -3279,11 +3279,11 @@ const Ke = (e, o, t) => {
|
|
|
3279
3279
|
);
|
|
3280
3280
|
});
|
|
3281
3281
|
};
|
|
3282
|
-
async function
|
|
3283
|
-
const o = await
|
|
3282
|
+
async function Be(e) {
|
|
3283
|
+
const o = await Ye(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en-kge4l75d.js"), "./msg/zhHans.ts": () => import("./msg-zhHans-hfznrf5k.js") }), `./msg/${e}.ts`, 3);
|
|
3284
3284
|
pt(o.default);
|
|
3285
3285
|
}
|
|
3286
|
-
function
|
|
3286
|
+
function Ke(e) {
|
|
3287
3287
|
const o = H();
|
|
3288
3288
|
if (!o)
|
|
3289
3289
|
return;
|
|
@@ -3302,7 +3302,7 @@ function mo() {
|
|
|
3302
3302
|
if (!e)
|
|
3303
3303
|
return;
|
|
3304
3304
|
const o = (t = e.getTopBlocks(!0)) == null ? void 0 : t[0];
|
|
3305
|
-
o &&
|
|
3305
|
+
o && Ke(o.id);
|
|
3306
3306
|
}
|
|
3307
3307
|
class Oo {
|
|
3308
3308
|
init({ contextMenu: o = !0, shortcut: t = !0 } = {
|
|
@@ -3320,11 +3320,11 @@ class Oo {
|
|
|
3320
3320
|
blockCopyToStorageContextMenu() {
|
|
3321
3321
|
const o = {
|
|
3322
3322
|
displayText: function() {
|
|
3323
|
-
return
|
|
3323
|
+
return E.CROSS_TAB_COPY ? E.CROSS_TAB_COPY : "Copy";
|
|
3324
3324
|
},
|
|
3325
3325
|
preconditionFn: function() {
|
|
3326
3326
|
const t = D();
|
|
3327
|
-
return !t || !J(t) || !t.isDeletable() || !re(t) || !t.isMovable() ||
|
|
3327
|
+
return !t || !J(t) || !t.isDeletable() || !re(t) || !t.isMovable() || !G(t) ? "disabled" : "enabled";
|
|
3328
3328
|
},
|
|
3329
3329
|
callback: function(t) {
|
|
3330
3330
|
var n;
|
|
@@ -3342,7 +3342,7 @@ class Oo {
|
|
|
3342
3342
|
blockPasteFromStorageContextMenu() {
|
|
3343
3343
|
const o = {
|
|
3344
3344
|
displayText: function() {
|
|
3345
|
-
return
|
|
3345
|
+
return E.CROSS_TAB_PASTE ? E.CROSS_TAB_PASTE : "Paste";
|
|
3346
3346
|
},
|
|
3347
3347
|
preconditionFn: function(t) {
|
|
3348
3348
|
var a;
|
|
@@ -3357,7 +3357,7 @@ class Oo {
|
|
|
3357
3357
|
if (!n)
|
|
3358
3358
|
return;
|
|
3359
3359
|
const i = JSON.parse(n);
|
|
3360
|
-
i && t.workspace &&
|
|
3360
|
+
i && t.workspace && ve.paste(i, t.workspace);
|
|
3361
3361
|
},
|
|
3362
3362
|
scopeType: U.ScopeType.WORKSPACE,
|
|
3363
3363
|
id: "blockPasteFromStorage",
|
|
@@ -3381,12 +3381,12 @@ class Oo {
|
|
|
3381
3381
|
if (a.options.readOnly || ce.inProgress())
|
|
3382
3382
|
return !1;
|
|
3383
3383
|
const r = D();
|
|
3384
|
-
return !(!r || !J(r) || !r.isDeletable() || !re(r) || !r.isMovable() ||
|
|
3384
|
+
return !(!r || !J(r) || !r.isDeletable() || !re(r) || !r.isMovable() || !G(r));
|
|
3385
3385
|
},
|
|
3386
3386
|
callback: function(a, r) {
|
|
3387
3387
|
r.preventDefault();
|
|
3388
3388
|
const c = D();
|
|
3389
|
-
if (!c ||
|
|
3389
|
+
if (!c || !G(c))
|
|
3390
3390
|
return !1;
|
|
3391
3391
|
const p = c.toCopyData();
|
|
3392
3392
|
return p ? (a.hideChaff(), localStorage.setItem("blocklyStash", JSON.stringify(p)), !0) : !1;
|
|
@@ -3411,12 +3411,12 @@ class Oo {
|
|
|
3411
3411
|
if (a.options.readOnly || ce.inProgress())
|
|
3412
3412
|
return !1;
|
|
3413
3413
|
const r = D();
|
|
3414
|
-
return !(!r || !J(r) || !r.isDeletable() || !re(r) || !r.isMovable() ||
|
|
3414
|
+
return !(!r || !J(r) || !r.isDeletable() || !re(r) || !r.isMovable() || !G(r) || r.workspace.isFlyout);
|
|
3415
3415
|
},
|
|
3416
3416
|
callback: function(a, r) {
|
|
3417
3417
|
r.preventDefault();
|
|
3418
3418
|
const c = D();
|
|
3419
|
-
if (!c || !J(c) || !c.isDeletable() ||
|
|
3419
|
+
if (!c || !J(c) || !c.isDeletable() || !G(c))
|
|
3420
3420
|
return !1;
|
|
3421
3421
|
const p = c.toCopyData();
|
|
3422
3422
|
return p ? (localStorage.setItem("blocklyStash", JSON.stringify(p)), c instanceof Tt ? c.checkAndDelete() : c.dispose(), !0) : !1;
|
|
@@ -3452,7 +3452,7 @@ class Oo {
|
|
|
3452
3452
|
if (!c)
|
|
3453
3453
|
return !1;
|
|
3454
3454
|
const p = JSON.parse(c);
|
|
3455
|
-
return p ? (
|
|
3455
|
+
return p ? (ve.paste(p, a), !0) : !1;
|
|
3456
3456
|
},
|
|
3457
3457
|
keyCodes: [o, t, n]
|
|
3458
3458
|
};
|
|
@@ -3479,50 +3479,50 @@ class go {
|
|
|
3479
3479
|
});
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
|
-
function
|
|
3482
|
+
function Fe(e) {
|
|
3483
3483
|
const o = e.getParent();
|
|
3484
|
-
return o &&
|
|
3484
|
+
return o && Fe(o) ? !0 : !o && !!(e.outputConnection || e.previousConnection);
|
|
3485
3485
|
}
|
|
3486
3486
|
class Io {
|
|
3487
3487
|
init() {
|
|
3488
3488
|
const o = U.registry.getItem("blockDisable");
|
|
3489
3489
|
o && (o.preconditionFn = function(t) {
|
|
3490
3490
|
const n = t.block;
|
|
3491
|
-
return n && !n.isInFlyout && n.workspace.options.disable && n.isEditable() ? n.getInheritedDisabled() ||
|
|
3491
|
+
return n && !n.isInFlyout && n.workspace.options.disable && n.isEditable() ? n.getInheritedDisabled() || Fe(n) ? "disabled" : "enabled" : "hidden";
|
|
3492
3492
|
});
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
3495
|
-
class
|
|
3495
|
+
class He extends _e {
|
|
3496
3496
|
constructor(t, n, i) {
|
|
3497
3497
|
super(_e.SKIP_SETUP);
|
|
3498
3498
|
/** The field's colour picker element. */
|
|
3499
|
-
|
|
3499
|
+
A(this, "picker", null);
|
|
3500
3500
|
/** Index of the currently highlighted element. */
|
|
3501
|
-
|
|
3501
|
+
A(this, "highlightedIndex", null);
|
|
3502
3502
|
/**
|
|
3503
3503
|
* Array holding info needed to unbind events.
|
|
3504
3504
|
* Used for disposing.
|
|
3505
3505
|
* Ex: [[node, name, func], [node, name, func]].
|
|
3506
3506
|
*/
|
|
3507
|
-
|
|
3507
|
+
A(this, "boundEvents", []);
|
|
3508
3508
|
/**
|
|
3509
3509
|
* Serializable fields are saved by the serializer, non-serializable fields
|
|
3510
3510
|
* are not. Editable fields should also be serializable.
|
|
3511
3511
|
*/
|
|
3512
|
-
|
|
3512
|
+
A(this, "SERIALIZABLE", !0);
|
|
3513
3513
|
/** Mouse cursor style when over the hotspot that initiates the editor. */
|
|
3514
|
-
|
|
3514
|
+
A(this, "CURSOR", "default");
|
|
3515
3515
|
/**
|
|
3516
3516
|
* Used to tell if the field needs to be rendered the next time the block is
|
|
3517
3517
|
* rendered. Colour fields are statically sized, and only need to be
|
|
3518
3518
|
* rendered at initialization.
|
|
3519
3519
|
*/
|
|
3520
|
-
|
|
3520
|
+
A(this, "isDirty_", !1);
|
|
3521
3521
|
/**
|
|
3522
3522
|
* An array of colour strings for the palette.
|
|
3523
3523
|
* Copied from goog.ui.ColorPicker.SIMPLE_GRID_COLORS
|
|
3524
3524
|
*/
|
|
3525
|
-
|
|
3525
|
+
A(this, "colours", [
|
|
3526
3526
|
// red
|
|
3527
3527
|
"#F44336",
|
|
3528
3528
|
// base
|
|
@@ -4084,11 +4084,11 @@ class we extends _e {
|
|
|
4084
4084
|
* An array of tooltip strings for the palette. If not the same length as
|
|
4085
4085
|
* COLOURS, the colour's hex code will be used for any missing titles.
|
|
4086
4086
|
*/
|
|
4087
|
-
|
|
4087
|
+
A(this, "titles", ["%{BKY_COLOR_RED}"]);
|
|
4088
4088
|
/**
|
|
4089
4089
|
* Number of columns in the palette.
|
|
4090
4090
|
*/
|
|
4091
|
-
|
|
4091
|
+
A(this, "columns", 14);
|
|
4092
4092
|
t !== _e.SKIP_SETUP && (i && this.configure_(i), this.setValue(t), n && this.setValidator(n));
|
|
4093
4093
|
}
|
|
4094
4094
|
configure_(t) {
|
|
@@ -4198,8 +4198,8 @@ class we extends _e {
|
|
|
4198
4198
|
const i = this.colours, a = this.columns;
|
|
4199
4199
|
let r = this.highlightedIndex % a, c = Math.floor(this.highlightedIndex / a);
|
|
4200
4200
|
r += t, c += n, t < 0 ? r < 0 && c > 0 ? (r = a - 1, c--) : r < 0 && (r = 0) : t > 0 ? r > a - 1 && c < Math.floor(i.length / a) - 1 ? (r = 0, c++) : r > a - 1 && r-- : n < 0 ? c < 0 && (c = 0) : n > 0 && c > Math.floor(i.length / a) - 1 && (c = Math.floor(i.length / a) - 1);
|
|
4201
|
-
const p = this.picker.childNodes[c].childNodes[r],
|
|
4202
|
-
this.setHighlightedCell(p,
|
|
4201
|
+
const p = this.picker.childNodes[c].childNodes[r], h = c * a + r;
|
|
4202
|
+
this.setHighlightedCell(p, h);
|
|
4203
4203
|
}
|
|
4204
4204
|
onMouseMove(t) {
|
|
4205
4205
|
const n = t.target, i = n && Number(n.getAttribute("data-index"));
|
|
@@ -4309,7 +4309,7 @@ class we extends _e {
|
|
|
4309
4309
|
return new this(t.colour, void 0, t);
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
4312
|
-
|
|
4312
|
+
He.prototype.DEFAULT_VALUE = "#ffffff";
|
|
4313
4313
|
dt.register(`
|
|
4314
4314
|
.blocklyColourTable {
|
|
4315
4315
|
border-collapse: collapse;
|
|
@@ -4338,14 +4338,14 @@ dt.register(`
|
|
|
4338
4338
|
}
|
|
4339
4339
|
`);
|
|
4340
4340
|
function Lo() {
|
|
4341
|
-
ft.register("field_colour",
|
|
4341
|
+
ft.register("field_colour", He);
|
|
4342
4342
|
}
|
|
4343
4343
|
const yo = new Oo();
|
|
4344
4344
|
yo.init({ contextMenu: !0, shortcut: !0 });
|
|
4345
4345
|
const Co = new go();
|
|
4346
4346
|
Co.init();
|
|
4347
|
-
const
|
|
4348
|
-
|
|
4347
|
+
const Ao = new Io();
|
|
4348
|
+
Ao.init();
|
|
4349
4349
|
Lo();
|
|
4350
4350
|
se.Classic.blockStyles = {
|
|
4351
4351
|
color_blocks: {
|
|
@@ -4471,7 +4471,7 @@ se.Classic.categoryStyles = {
|
|
|
4471
4471
|
colour: "#a55b80"
|
|
4472
4472
|
}
|
|
4473
4473
|
};
|
|
4474
|
-
const
|
|
4474
|
+
const vo = Ve.defineTheme("light", {
|
|
4475
4475
|
name: "light",
|
|
4476
4476
|
base: se.Classic,
|
|
4477
4477
|
componentStyles: {
|
|
@@ -4487,7 +4487,7 @@ const Ao = Pe.defineTheme("light", {
|
|
|
4487
4487
|
scrollbarOpacity: 0.4,
|
|
4488
4488
|
cursorColour: ""
|
|
4489
4489
|
}
|
|
4490
|
-
}), bo =
|
|
4490
|
+
}), bo = Ve.defineTheme("dark", {
|
|
4491
4491
|
name: "dark",
|
|
4492
4492
|
base: se.Classic,
|
|
4493
4493
|
componentStyles: {
|
|
@@ -4508,7 +4508,7 @@ function ko(e) {
|
|
|
4508
4508
|
const o = H();
|
|
4509
4509
|
switch (console.log(o), e) {
|
|
4510
4510
|
case "light":
|
|
4511
|
-
o.setTheme(
|
|
4511
|
+
o.setTheme(vo);
|
|
4512
4512
|
break;
|
|
4513
4513
|
case "dark":
|
|
4514
4514
|
o.setTheme(bo);
|
|
@@ -5260,7 +5260,7 @@ const me = {
|
|
|
5260
5260
|
custom: k.name
|
|
5261
5261
|
}
|
|
5262
5262
|
]
|
|
5263
|
-
}, Mo = /* @__PURE__ */
|
|
5263
|
+
}, Mo = /* @__PURE__ */ X({
|
|
5264
5264
|
__name: "index",
|
|
5265
5265
|
setup(e) {
|
|
5266
5266
|
const o = () => {
|
|
@@ -5276,12 +5276,12 @@ const me = {
|
|
|
5276
5276
|
class: "mr-3",
|
|
5277
5277
|
variant: "outlined",
|
|
5278
5278
|
density: "comfortable",
|
|
5279
|
-
icon:
|
|
5279
|
+
icon: v(At),
|
|
5280
5280
|
onClick: o
|
|
5281
5281
|
}, null, 8, ["icon"]);
|
|
5282
5282
|
};
|
|
5283
5283
|
}
|
|
5284
|
-
}), Uo = /* @__PURE__ */
|
|
5284
|
+
}), Uo = /* @__PURE__ */ X({
|
|
5285
5285
|
__name: "index",
|
|
5286
5286
|
props: {
|
|
5287
5287
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -5296,7 +5296,7 @@ const me = {
|
|
|
5296
5296
|
class: "mr-3",
|
|
5297
5297
|
variant: "outlined",
|
|
5298
5298
|
density: "comfortable",
|
|
5299
|
-
icon: o.value ?
|
|
5299
|
+
icon: o.value ? v(kt) : v(Nt),
|
|
5300
5300
|
onClick: n[0] || (n[0] = (a) => o.value = !o.value)
|
|
5301
5301
|
}, null, 8, ["icon"]);
|
|
5302
5302
|
};
|
|
@@ -5304,17 +5304,17 @@ const me = {
|
|
|
5304
5304
|
}), Vo = {
|
|
5305
5305
|
key: 1,
|
|
5306
5306
|
class: "text-caption text-grey"
|
|
5307
|
-
}, Po = /* @__PURE__ */
|
|
5307
|
+
}, Po = /* @__PURE__ */ X({
|
|
5308
5308
|
__name: "index",
|
|
5309
5309
|
setup(e) {
|
|
5310
|
-
const { t: o } =
|
|
5311
|
-
var
|
|
5310
|
+
const { t: o } = xe(), t = ee([]), n = () => {
|
|
5311
|
+
var h;
|
|
5312
5312
|
const a = H();
|
|
5313
5313
|
if (!a) {
|
|
5314
5314
|
t.value = [];
|
|
5315
5315
|
return;
|
|
5316
5316
|
}
|
|
5317
|
-
const r = [], c = a.getTopBlocks(!0), p = ((
|
|
5317
|
+
const r = [], c = a.getTopBlocks(!0), p = ((h = D()) == null ? void 0 : h.id) ?? "";
|
|
5318
5318
|
c.forEach((T) => {
|
|
5319
5319
|
const I = T;
|
|
5320
5320
|
if (I.type.startsWith("on_node_event_v"))
|
|
@@ -5325,7 +5325,7 @@ const me = {
|
|
|
5325
5325
|
const O = I.getRelativeToSurfaceXY();
|
|
5326
5326
|
r.push({
|
|
5327
5327
|
id: I.id,
|
|
5328
|
-
name:
|
|
5328
|
+
name: E.fffff,
|
|
5329
5329
|
x: O.x,
|
|
5330
5330
|
y: O.y,
|
|
5331
5331
|
active: I.id === p
|
|
@@ -5333,7 +5333,7 @@ const me = {
|
|
|
5333
5333
|
}
|
|
5334
5334
|
}), t.value = r;
|
|
5335
5335
|
};
|
|
5336
|
-
|
|
5336
|
+
Se(() => {
|
|
5337
5337
|
de.on("codeUpdate", n);
|
|
5338
5338
|
}), Ze(() => {
|
|
5339
5339
|
de.off("codeUpdate", n);
|
|
@@ -5343,13 +5343,13 @@ const me = {
|
|
|
5343
5343
|
if (!r)
|
|
5344
5344
|
return;
|
|
5345
5345
|
const c = r.getBlockById(a.id);
|
|
5346
|
-
c && (
|
|
5346
|
+
c && (Ke(a.id), c.select());
|
|
5347
5347
|
};
|
|
5348
5348
|
return (a, r) => {
|
|
5349
|
-
const c = C("v-list-item-title"), p = C("v-list-item"),
|
|
5350
|
-
return t.value.length > 0 ? (L(), V(
|
|
5349
|
+
const c = C("v-list-item-title"), p = C("v-list-item"), h = C("v-list");
|
|
5350
|
+
return t.value.length > 0 ? (L(), V(h, { key: 0 }, {
|
|
5351
5351
|
default: Y(() => [
|
|
5352
|
-
(L(!0),
|
|
5352
|
+
(L(!0), j(et, null, tt(t.value, (T) => (L(), V(p, {
|
|
5353
5353
|
key: T.id,
|
|
5354
5354
|
class: "d-flex justify-start",
|
|
5355
5355
|
active: T.active,
|
|
@@ -5367,33 +5367,33 @@ const me = {
|
|
|
5367
5367
|
}, 1032, ["active", "onClick"]))), 128))
|
|
5368
5368
|
]),
|
|
5369
5369
|
_: 1
|
|
5370
|
-
})) : (L(),
|
|
5370
|
+
})) : (L(), j("span", Vo, pe(v(o)("x-block-lib.noOption")), 1));
|
|
5371
5371
|
};
|
|
5372
5372
|
}
|
|
5373
|
-
}), xo = { class: "text-subtitle-1 ml-3" }, Do = /* @__PURE__ */
|
|
5373
|
+
}), xo = { class: "text-subtitle-1 ml-3" }, Do = /* @__PURE__ */ X({
|
|
5374
5374
|
__name: "index",
|
|
5375
5375
|
setup(e) {
|
|
5376
|
-
const { t: o } =
|
|
5377
|
-
let
|
|
5378
|
-
return t.mdAndUp.value && (
|
|
5376
|
+
const { t: o } = xe(), t = Ct(), { sysBarAvail: n } = It(), { backgroundColor1: i } = Lt(), a = K(() => {
|
|
5377
|
+
let h = "100%";
|
|
5378
|
+
return t.mdAndUp.value && (h = "400px"), {
|
|
5379
5379
|
background: i.value,
|
|
5380
|
-
width:
|
|
5380
|
+
width: h,
|
|
5381
5381
|
height: "100%"
|
|
5382
5382
|
};
|
|
5383
5383
|
}), r = K(() => {
|
|
5384
|
-
let
|
|
5385
|
-
return n.value && (
|
|
5384
|
+
let h = 48;
|
|
5385
|
+
return n.value && (h += 24), {
|
|
5386
5386
|
position: "relative",
|
|
5387
5387
|
width: "100%",
|
|
5388
|
-
height: `calc(100% - ${
|
|
5388
|
+
height: `calc(100% - ${h}px)`
|
|
5389
5389
|
};
|
|
5390
5390
|
}), c = K(() => ({
|
|
5391
5391
|
height: "60px"
|
|
5392
|
-
})), { open: p } =
|
|
5393
|
-
return (
|
|
5392
|
+
})), { open: p } = Pe("selectNodeDlg");
|
|
5393
|
+
return (h, T) => {
|
|
5394
5394
|
const I = C("v-btn"), O = C("v-sheet"), P = C("v-icon"), w = C("v-dialog");
|
|
5395
5395
|
return L(), V(w, {
|
|
5396
|
-
modelValue:
|
|
5396
|
+
modelValue: v(p),
|
|
5397
5397
|
"onUpdate:modelValue": T[3] || (T[3] = (b) => nt(p) ? p.value = b : null),
|
|
5398
5398
|
transition: "scroll-x-reverse-transition",
|
|
5399
5399
|
persistent: "",
|
|
@@ -5405,7 +5405,7 @@ const me = {
|
|
|
5405
5405
|
B(I, st(b, {
|
|
5406
5406
|
variant: "outlined",
|
|
5407
5407
|
density: "comfortable",
|
|
5408
|
-
icon:
|
|
5408
|
+
icon: v(Bt)
|
|
5409
5409
|
}), null, 16, ["icon"])
|
|
5410
5410
|
]),
|
|
5411
5411
|
default: Y(() => [
|
|
@@ -5418,7 +5418,7 @@ const me = {
|
|
|
5418
5418
|
class: "elevation-2",
|
|
5419
5419
|
style: F(a.value)
|
|
5420
5420
|
}, [
|
|
5421
|
-
|
|
5421
|
+
v(n) ? (L(), V(O, {
|
|
5422
5422
|
key: 0,
|
|
5423
5423
|
color: "transparent",
|
|
5424
5424
|
height: 24
|
|
@@ -5430,10 +5430,10 @@ const me = {
|
|
|
5430
5430
|
}, {
|
|
5431
5431
|
default: Y(() => [
|
|
5432
5432
|
B(P, {
|
|
5433
|
-
icon:
|
|
5433
|
+
icon: v(vt),
|
|
5434
5434
|
onClick: T[0] || (T[0] = (b) => p.value = !1)
|
|
5435
5435
|
}, null, 8, ["icon"]),
|
|
5436
|
-
S("span", xo, pe(
|
|
5436
|
+
S("span", xo, pe(v(o)("x-block-lib.navigator")), 1)
|
|
5437
5437
|
]),
|
|
5438
5438
|
_: 1
|
|
5439
5439
|
}),
|
|
@@ -5453,7 +5453,7 @@ const me = {
|
|
|
5453
5453
|
}, 8, ["modelValue"]);
|
|
5454
5454
|
};
|
|
5455
5455
|
}
|
|
5456
|
-
}),
|
|
5456
|
+
}), Re = {
|
|
5457
5457
|
grid: {
|
|
5458
5458
|
length: 2,
|
|
5459
5459
|
snap: !0,
|
|
@@ -5478,8 +5478,8 @@ const me = {
|
|
|
5478
5478
|
};
|
|
5479
5479
|
function Yo(e, o, t) {
|
|
5480
5480
|
let n;
|
|
5481
|
-
o === "app" ? t === "v1" && (n = Bo) : o === "func" ? t === "v1" && (n = So) : o === "flow" && t === "v1" && (n = Ro), console.assert(!!n),
|
|
5482
|
-
const i = Et(e,
|
|
5481
|
+
o === "app" ? t === "v1" && (n = Bo) : o === "func" ? t === "v1" && (n = So) : o === "flow" && t === "v1" && (n = Ro), console.assert(!!n), Re.toolbox = n;
|
|
5482
|
+
const i = Et(e, Re);
|
|
5483
5483
|
return o === "app" ? t === "v1" && (i.registerToolboxCategoryCallback(
|
|
5484
5484
|
fe.name,
|
|
5485
5485
|
fe.callback
|
|
@@ -5503,12 +5503,11 @@ function Yo(e, o, t) {
|
|
|
5503
5503
|
N.callback
|
|
5504
5504
|
)), i;
|
|
5505
5505
|
}
|
|
5506
|
-
const Ko = { class: "position-relative w-100 h-100" },
|
|
5506
|
+
const Ko = { class: "position-relative w-100 h-100" }, Fo = /* @__PURE__ */ X({
|
|
5507
5507
|
__name: "index",
|
|
5508
5508
|
props: /* @__PURE__ */ Ae({
|
|
5509
5509
|
type: {},
|
|
5510
|
-
version: {}
|
|
5511
|
-
active: { type: Boolean }
|
|
5510
|
+
version: {}
|
|
5512
5511
|
}, {
|
|
5513
5512
|
lock: { type: Boolean, required: !0 },
|
|
5514
5513
|
lockModifiers: {},
|
|
@@ -5517,7 +5516,7 @@ const Ko = { class: "position-relative w-100 h-100" }, zo = /* @__PURE__ */ W({
|
|
|
5517
5516
|
}),
|
|
5518
5517
|
emits: /* @__PURE__ */ Ae(["ready", "change"], ["update:lock", "update:scale"]),
|
|
5519
5518
|
setup(e, { expose: o, emit: t }) {
|
|
5520
|
-
const n = yt(), { locale: i, dark: a } = mt(n), { open: r } =
|
|
5519
|
+
const n = yt(), { locale: i, dark: a } = mt(n), { open: r } = Pe("blocklyEditorFlyout"), c = ue(e, "lock"), p = ue(e, "scale"), h = e, T = t, I = ee();
|
|
5521
5520
|
let O;
|
|
5522
5521
|
const P = ee(!1), w = ee(!1), b = K(() => ({
|
|
5523
5522
|
position: "absolute",
|
|
@@ -5528,7 +5527,7 @@ const Ko = { class: "position-relative w-100 h-100" }, zo = /* @__PURE__ */ W({
|
|
|
5528
5527
|
height: "calc(100% - 1px)",
|
|
5529
5528
|
pointerEvents: "none",
|
|
5530
5529
|
zIndex: 999
|
|
5531
|
-
})),
|
|
5530
|
+
})), we = K(() => ({
|
|
5532
5531
|
position: "absolute",
|
|
5533
5532
|
background: a.value ? "#0000007f" : "#ffffff7f",
|
|
5534
5533
|
top: "0px",
|
|
@@ -5536,76 +5535,77 @@ const Ko = { class: "position-relative w-100 h-100" }, zo = /* @__PURE__ */ W({
|
|
|
5536
5535
|
width: "100%",
|
|
5537
5536
|
height: "100%",
|
|
5538
5537
|
pointerEvents: "none"
|
|
5539
|
-
})),
|
|
5538
|
+
})), Ge = K(() => ({
|
|
5540
5539
|
position: "absolute",
|
|
5541
5540
|
top: "0px",
|
|
5542
5541
|
right: "0px",
|
|
5543
5542
|
zIndex: 20
|
|
5544
5543
|
}));
|
|
5545
|
-
|
|
5544
|
+
Se(async () => {
|
|
5546
5545
|
if (!I.value) {
|
|
5547
5546
|
console.assert(!1);
|
|
5548
5547
|
return;
|
|
5549
5548
|
}
|
|
5550
|
-
await
|
|
5549
|
+
await Be(i.value), O = Yo(I.value, h.type, h.version), O.addChangeListener(f.disableOrphans), O.addChangeListener(je), O.setScale(p.value), T("ready", O);
|
|
5551
5550
|
}), lt(() => {
|
|
5552
5551
|
r.value = !1;
|
|
5553
5552
|
});
|
|
5554
|
-
function
|
|
5553
|
+
function $e() {
|
|
5555
5554
|
O && ht(O);
|
|
5556
5555
|
}
|
|
5557
|
-
function je(
|
|
5558
|
-
if (
|
|
5556
|
+
function je(m) {
|
|
5557
|
+
if (m.type === f.FINISHED_LOADING) {
|
|
5559
5558
|
mo(), de.emit("codeUpdate"), P.value = !1;
|
|
5560
5559
|
return;
|
|
5561
5560
|
}
|
|
5562
|
-
|
|
5561
|
+
if (!P.value) {
|
|
5562
|
+
if (m.type === f.VIEWPORT_CHANGE) {
|
|
5563
|
+
p.value = O.getScale();
|
|
5564
|
+
return;
|
|
5565
|
+
}
|
|
5566
|
+
m.type === f.BLOCK_DRAG && (m.isStart ? w.value = !0 : w.value = !1), T("change", m);
|
|
5567
|
+
}
|
|
5563
5568
|
}
|
|
5564
5569
|
return o({ load: () => {
|
|
5565
5570
|
P.value = !0;
|
|
5566
5571
|
}, resize: () => {
|
|
5567
|
-
} }),
|
|
5568
|
-
|
|
5569
|
-
}),
|
|
5570
|
-
ko(
|
|
5571
|
-
}),
|
|
5572
|
+
} }), W(i, (m) => {
|
|
5573
|
+
Be(m);
|
|
5574
|
+
}), W(a, (m) => {
|
|
5575
|
+
ko(m ? "dark" : "light");
|
|
5576
|
+
}), W(r, (m) => {
|
|
5572
5577
|
var R;
|
|
5573
|
-
|
|
5574
|
-
}),
|
|
5575
|
-
()
|
|
5576
|
-
|
|
5577
|
-
h && setTimeout(() => ve(), 1);
|
|
5578
|
-
}
|
|
5579
|
-
), G(p, (h) => {
|
|
5580
|
-
O.setScale(h);
|
|
5581
|
-
}), (h, R) => {
|
|
5578
|
+
m || (R = O.getToolbox()) == null || R.clearSelection();
|
|
5579
|
+
}), W(p, (m) => {
|
|
5580
|
+
O.setScale(m);
|
|
5581
|
+
}), (m, R) => {
|
|
5582
5582
|
const Xe = C("v-icon"), We = C("x-loading"), Je = at("resize");
|
|
5583
|
-
return L(),
|
|
5583
|
+
return L(), j("div", Ko, [
|
|
5584
5584
|
rt(S("div", {
|
|
5585
5585
|
id: "blocklyEditor",
|
|
5586
5586
|
ref_key: "blocklyDiv",
|
|
5587
5587
|
ref: I,
|
|
5588
5588
|
class: "w-100 h-100"
|
|
5589
5589
|
}, null, 512), [
|
|
5590
|
-
[Je,
|
|
5590
|
+
[Je, $e]
|
|
5591
5591
|
]),
|
|
5592
|
-
w.value ? (L(),
|
|
5592
|
+
w.value ? (L(), j("div", {
|
|
5593
5593
|
key: 0,
|
|
5594
5594
|
class: "d-flex flex-column align-center justify-center",
|
|
5595
5595
|
style: F(b.value)
|
|
5596
5596
|
}, [
|
|
5597
5597
|
B(Xe, {
|
|
5598
|
-
icon:
|
|
5598
|
+
icon: v(bt),
|
|
5599
5599
|
size: "x-large"
|
|
5600
5600
|
}, null, 8, ["icon"])
|
|
5601
5601
|
], 4)) : te("", !0),
|
|
5602
|
-
c.value ? (L(),
|
|
5602
|
+
c.value ? (L(), j("div", {
|
|
5603
5603
|
key: 1,
|
|
5604
|
-
style: F(
|
|
5604
|
+
style: F(we.value)
|
|
5605
5605
|
}, null, 4)) : te("", !0),
|
|
5606
5606
|
S("div", {
|
|
5607
5607
|
class: "d-flex align-end pt-3 pr-3",
|
|
5608
|
-
style: F(
|
|
5608
|
+
style: F(Ge.value)
|
|
5609
5609
|
}, [
|
|
5610
5610
|
B(Mo),
|
|
5611
5611
|
B(Uo, {
|
|
@@ -5621,11 +5621,16 @@ const Ko = { class: "position-relative w-100 h-100" }, zo = /* @__PURE__ */ W({
|
|
|
5621
5621
|
]);
|
|
5622
5622
|
};
|
|
5623
5623
|
}
|
|
5624
|
-
})
|
|
5625
|
-
|
|
5626
|
-
|
|
5624
|
+
}), Ho = (e) => {
|
|
5625
|
+
e.component("XBlockly", Fo);
|
|
5626
|
+
};
|
|
5627
|
+
async function qo(e) {
|
|
5628
|
+
return (await Ye(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en-hf8d9jpk.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans-kicfou8k.js") }), `./locales/${e}/index.ts`, 4)).default;
|
|
5627
5629
|
}
|
|
5630
|
+
const Zo = { install: Ho };
|
|
5628
5631
|
export {
|
|
5629
|
-
|
|
5630
|
-
|
|
5632
|
+
Fo as XBlockly,
|
|
5633
|
+
Zo as default,
|
|
5634
|
+
Ho as install,
|
|
5635
|
+
qo as loadLocaleMessageBlock
|
|
5631
5636
|
};
|