x-block-lib 0.11.8 → 0.11.9
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.
|
@@ -4,13 +4,13 @@ import { n as __exportAll } from "./rolldown-runtime.d6iwd7kf.js";
|
|
|
4
4
|
var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
|
|
5
5
|
var en_default = { "x-block-lib": {
|
|
6
6
|
bind: "Bind",
|
|
7
|
-
dlg: { source: { title: "Source" } },
|
|
8
7
|
funcEntry: "Func Entry",
|
|
9
8
|
implementMethod: "Implement Method",
|
|
10
9
|
msg: { cannotOperateInLockedState: "Cannot operate in locked state" },
|
|
11
10
|
navigator: "Navigator",
|
|
12
11
|
noOption: "No Option",
|
|
13
12
|
procedure: "Procedure",
|
|
13
|
+
source: "Source",
|
|
14
14
|
temporaryBlock: "Temporary Block",
|
|
15
15
|
tip: {
|
|
16
16
|
hotkeyCtrlE: "Press 'Ctrl W' to navigate",
|
|
@@ -4,13 +4,13 @@ import { n as __exportAll } from "./rolldown-runtime.d6iwd7kf.js";
|
|
|
4
4
|
var zhHans_exports = /* @__PURE__ */ __exportAll({ default: () => zhHans_default });
|
|
5
5
|
var zhHans_default = { "x-block-lib": {
|
|
6
6
|
bind: "绑定",
|
|
7
|
-
dlg: { source: { title: "源代码" } },
|
|
8
7
|
funcEntry: "函数入口",
|
|
9
8
|
implementMethod: "实现方法",
|
|
10
9
|
msg: { cannotOperateInLockedState: "锁定状态下不能操作" },
|
|
11
10
|
navigator: "导航器",
|
|
12
11
|
noOption: "没有选项",
|
|
13
12
|
procedure: "过程",
|
|
13
|
+
source: "源代码",
|
|
14
14
|
temporaryBlock: "临时块",
|
|
15
15
|
tip: {
|
|
16
16
|
hotkeyCtrlE: "按「Ctrl E」导航",
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,12 @@ type __VLS_Props = {
|
|
|
68
68
|
locale: string;
|
|
69
69
|
dark: boolean;
|
|
70
70
|
};
|
|
71
|
+
declare function load(state: any): void;
|
|
72
|
+
declare function save(): any;
|
|
73
|
+
declare function appendBlock(state: any): void;
|
|
74
|
+
declare function generateCode(): string | undefined;
|
|
75
|
+
declare function generateReactivity(): import("x-runtime-lib").Reactivity;
|
|
76
|
+
declare function fireStateChange(): void;
|
|
71
77
|
type __VLS_ModelProps = {
|
|
72
78
|
'lock': boolean;
|
|
73
79
|
'scale': number;
|
|
@@ -79,12 +85,12 @@ type __VLS_Slots = {} & {
|
|
|
79
85
|
};
|
|
80
86
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
81
87
|
loading: import("vue").Ref<boolean, boolean>;
|
|
82
|
-
load:
|
|
83
|
-
save:
|
|
84
|
-
appendBlock:
|
|
85
|
-
generateCode:
|
|
86
|
-
generateReactivity:
|
|
87
|
-
fireStateChange:
|
|
88
|
+
load: typeof load;
|
|
89
|
+
save: typeof save;
|
|
90
|
+
appendBlock: typeof appendBlock;
|
|
91
|
+
generateCode: typeof generateCode;
|
|
92
|
+
generateReactivity: typeof generateReactivity;
|
|
93
|
+
fireStateChange: typeof fireStateChange;
|
|
88
94
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
89
95
|
"update:lock": (value: boolean) => any;
|
|
90
96
|
"update:scale": (value: number) => any;
|
|
@@ -107,11 +113,6 @@ declare const install: (app: App) => void;
|
|
|
107
113
|
export declare function loadLocaleMessageBlock(locale: string): Promise<{
|
|
108
114
|
'x-block-lib': {
|
|
109
115
|
bind: string;
|
|
110
|
-
dlg: {
|
|
111
|
-
source: {
|
|
112
|
-
title: string;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
116
|
funcEntry: string;
|
|
116
117
|
implementMethod: string;
|
|
117
118
|
msg: {
|
|
@@ -120,6 +121,7 @@ export declare function loadLocaleMessageBlock(locale: string): Promise<{
|
|
|
120
121
|
navigator: string;
|
|
121
122
|
noOption: string;
|
|
122
123
|
procedure: string;
|
|
124
|
+
source: string;
|
|
123
125
|
temporaryBlock: string;
|
|
124
126
|
tip: {
|
|
125
127
|
hotkeyCtrlE: string;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){try{document.getElementById(`x-block-lib`)?.remove();const e = document.createElement(`style`);e.setAttribute(`id`, `x-block-lib`);const t = document.createTextNode(`.ghost[data-v-x-block-lib-ca7316a0]{opacity:.4;pointer-events:none}.blocklyToolbox{width:56px;overflow-x:hidden}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{place-items:center;height:28px;display:flex;overflow:hidden}.blocklyFlyout{z-index:21}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#444;background:#f3f3f3}.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}`);e.appendChild(t);document.head.appendChild(e);}catch(e){console.error('rolldown-plugin-inject-css', e);}})()
|
|
2
|
-
import { A as Names, B as defineBlocksWithJsonArray, C as FieldCheckbox, D as FieldNumber, E as FieldLabel, F as Themes, G as inject$1, H as getMainWorkspace, I as Variables, J as serialization, K as inputs, L as WorkspaceSvg, M as ShortcutItems, N as ShortcutRegistry, O as FieldTextInput, P as Theme,
|
|
2
|
+
import { A as Names, B as defineBlocksWithJsonArray, C as FieldCheckbox, D as FieldNumber, E as FieldLabel, F as Themes, G as inject$1, H as getMainWorkspace, I as Variables, J as serialization, K as inputs, L as WorkspaceSvg, M as ShortcutItems, N as ShortcutRegistry, O as FieldTextInput, P as Theme, R as Xml, S as Extensions, T as FieldImage, U as getSelected, V as dialog, W as icons, X as svgResize, Y as setLocale$1, Z as utils, _ as javascriptGenerator, a as lo, b as ContextMenuRegistry, c as encodeString, d as snakeCase, f as parseInt$1, g as Order, h as cloneDeep, i as require_dist$2, j as Procedures, k as Msg, l as require_dist, m as debounce, n as o, o as useResizeObserver, p as isEqual, q as registry, r as core_default, s as require_dist$1, t as javascript, u as upperCase, v as Blocks, w as FieldDropdown, x as Events, y as ContextMenu, z as common } from "./vendor.eb5jfwqa.js";
|
|
3
3
|
import { eventBus, globalObjects, messageWarning, openConfirmDlg, openPromptDlg, useColor, useSystem, useViewStack } from "x-essential-lib";
|
|
4
4
|
import { globalState } from "x-state-lib";
|
|
5
5
|
import { addIndent, finalProperties, getElement, getImplementMethodName, getItems, getTag, getTypes, makeEventId, makeEventKeyOfCustomSlot, makeEventKeyOfElementSlot, makeMethodId, makeMethodKeyOfCustomSlot, makeMethodKeyOfElementSlot, makePropertyId, makePropertyKeyOfCustomSlot, makePropertyKeyOfElementSlot, makeTriggerId, parseNumberUnit, pkgs, themeColors, toEventName, toMethodName, toPropertyName, unwrapEventId, unwrapEventKeyOfCustomSlot, unwrapEventKeyOfElementSlot, unwrapMethodId, unwrapMethodKeyOfCustomSlot, unwrapMethodKeyOfElementSlot, unwrapPropertyId, unwrapPropertyKeyOfCustomSlot, unwrapPropertyKeyOfElementSlot, unwrapSlotId } from "x-runtime-lib";
|
|
@@ -11388,42 +11388,9 @@ WorkspaceSvg.prototype.cleanUp = function() {
|
|
|
11388
11388
|
this.setResizesEnabled(true);
|
|
11389
11389
|
};
|
|
11390
11390
|
|
|
11391
|
-
//#endregion
|
|
11392
|
-
//#region src/core/plugins/disableTopBlocks/index.ts
|
|
11393
|
-
var import_dist$1 = require_dist$1();
|
|
11394
|
-
function isOrphan(block) {
|
|
11395
|
-
const parent = block.getParent();
|
|
11396
|
-
if (parent && isOrphan(parent)) return true;
|
|
11397
|
-
return !parent && !!(block.outputConnection || block.previousConnection);
|
|
11398
|
-
}
|
|
11399
|
-
var DisableTopBlocks = class {
|
|
11400
|
-
init() {
|
|
11401
|
-
const disableMenuItem = ContextMenuRegistry.registry.getItem("blockDisable");
|
|
11402
|
-
if (!disableMenuItem) return;
|
|
11403
|
-
disableMenuItem.preconditionFn = function(scope) {
|
|
11404
|
-
const block = scope.block;
|
|
11405
|
-
if (!block) return "hidden";
|
|
11406
|
-
if (!block.isInFlyout && block.workspace.options.disable && block.isEditable()) {
|
|
11407
|
-
if (block.getInheritedDisabled() || isOrphan(block)) return "disabled";
|
|
11408
|
-
return "enabled";
|
|
11409
|
-
}
|
|
11410
|
-
return "hidden";
|
|
11411
|
-
};
|
|
11412
|
-
}
|
|
11413
|
-
};
|
|
11414
|
-
|
|
11415
|
-
//#endregion
|
|
11416
|
-
//#region src/core/plugins/index.ts
|
|
11417
|
-
(0, import_dist$2.registerFieldColour)();
|
|
11418
|
-
ShortcutRegistry.registry.unregister(ShortcutItems.names.ESCAPE);
|
|
11419
|
-
new import_dist$1.CrossTabCopyPaste().init({
|
|
11420
|
-
contextMenu: true,
|
|
11421
|
-
shortcut: true
|
|
11422
|
-
});
|
|
11423
|
-
new DisableTopBlocks().init();
|
|
11424
|
-
|
|
11425
11391
|
//#endregion
|
|
11426
11392
|
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
|
|
11393
|
+
var import_dist$1 = require_dist$1();
|
|
11427
11394
|
function _typeof(o) {
|
|
11428
11395
|
"@babel/helpers - typeof";
|
|
11429
11396
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -11464,6 +11431,48 @@ function _defineProperty(e, r, t) {
|
|
|
11464
11431
|
}) : e[r] = t, e;
|
|
11465
11432
|
}
|
|
11466
11433
|
|
|
11434
|
+
//#endregion
|
|
11435
|
+
//#region src/core/plugins/disableTopBlocks/index.ts
|
|
11436
|
+
function isOrphan(block) {
|
|
11437
|
+
const parent = block.getParent();
|
|
11438
|
+
if (parent && isOrphan(parent)) return true;
|
|
11439
|
+
return !parent && !!(block.outputConnection || block.previousConnection);
|
|
11440
|
+
}
|
|
11441
|
+
var DisableTopBlocks = class {
|
|
11442
|
+
constructor() {
|
|
11443
|
+
_defineProperty(this, "oldPreconditionFn", void 0);
|
|
11444
|
+
}
|
|
11445
|
+
init() {
|
|
11446
|
+
const disableMenuItem = ContextMenuRegistry.registry.getItem("blockDisable");
|
|
11447
|
+
if (!disableMenuItem) return;
|
|
11448
|
+
this.oldPreconditionFn = disableMenuItem.preconditionFn;
|
|
11449
|
+
disableMenuItem.preconditionFn = function(scope) {
|
|
11450
|
+
const block = scope.block;
|
|
11451
|
+
if (!block) return "hidden";
|
|
11452
|
+
if (!block.isInFlyout && block.workspace.options.disable && block.isEditable()) {
|
|
11453
|
+
if (block.getInheritedDisabled() || isOrphan(block)) return "disabled";
|
|
11454
|
+
return "enabled";
|
|
11455
|
+
}
|
|
11456
|
+
return "hidden";
|
|
11457
|
+
};
|
|
11458
|
+
}
|
|
11459
|
+
dispose() {
|
|
11460
|
+
const disableMenuItem = ContextMenuRegistry.registry.getItem("blockDisable");
|
|
11461
|
+
if (!disableMenuItem) return;
|
|
11462
|
+
disableMenuItem.preconditionFn = this.oldPreconditionFn;
|
|
11463
|
+
}
|
|
11464
|
+
};
|
|
11465
|
+
|
|
11466
|
+
//#endregion
|
|
11467
|
+
//#region src/core/plugins/index.ts
|
|
11468
|
+
(0, import_dist$2.registerFieldColour)();
|
|
11469
|
+
ShortcutRegistry.registry.unregister(ShortcutItems.names.ESCAPE);
|
|
11470
|
+
new import_dist$1.CrossTabCopyPaste().init({
|
|
11471
|
+
contextMenu: true,
|
|
11472
|
+
shortcut: true
|
|
11473
|
+
});
|
|
11474
|
+
new DisableTopBlocks().init();
|
|
11475
|
+
|
|
11467
11476
|
//#endregion
|
|
11468
11477
|
//#region src/core/events/index.ts
|
|
11469
11478
|
var StateChange = class extends Events.Abstract {
|
|
@@ -11744,7 +11753,7 @@ var index_vue_vue_type_script_setup_true_lang_default$7 = /*@__PURE__*/ defineCo
|
|
|
11744
11753
|
const disabled = computed(() => {
|
|
11745
11754
|
return display.smAndDown.value;
|
|
11746
11755
|
});
|
|
11747
|
-
|
|
11756
|
+
function cleanWorkspace() {
|
|
11748
11757
|
if (!context.workspace) {
|
|
11749
11758
|
console.assert(false);
|
|
11750
11759
|
return;
|
|
@@ -11754,10 +11763,10 @@ var index_vue_vue_type_script_setup_true_lang_default$7 = /*@__PURE__*/ defineCo
|
|
|
11754
11763
|
return;
|
|
11755
11764
|
}
|
|
11756
11765
|
context.workspace.cleanUp();
|
|
11757
|
-
}
|
|
11758
|
-
|
|
11766
|
+
}
|
|
11767
|
+
function onClick() {
|
|
11759
11768
|
cleanWorkspace();
|
|
11760
|
-
}
|
|
11769
|
+
}
|
|
11761
11770
|
__expose({ cleanWorkspace });
|
|
11762
11771
|
return (_ctx, _cache) => {
|
|
11763
11772
|
const _component_v_btn = resolveComponent("v-btn");
|
|
@@ -12582,7 +12591,7 @@ function callback$4() {
|
|
|
12582
12591
|
});
|
|
12583
12592
|
root.push(button);
|
|
12584
12593
|
}
|
|
12585
|
-
const variables = workspace.
|
|
12594
|
+
const variables = workspace.getVariableMap().getAllVariables();
|
|
12586
12595
|
if (variables.length <= 0) return root;
|
|
12587
12596
|
variables.sort(Variables.compareByName);
|
|
12588
12597
|
{
|
|
@@ -13499,15 +13508,18 @@ const options = {
|
|
|
13499
13508
|
maxScale: 1,
|
|
13500
13509
|
minScale: .1,
|
|
13501
13510
|
scaleSpeed: 1.25,
|
|
13502
|
-
startScale: 1
|
|
13503
|
-
wheel: true
|
|
13511
|
+
startScale: 1
|
|
13504
13512
|
}
|
|
13505
13513
|
};
|
|
13506
13514
|
function createWorkspace(container, type, version, dark) {
|
|
13507
13515
|
options.theme = dark ? "dark" : "light";
|
|
13508
13516
|
options.toolbox = getToolbox(type, version);
|
|
13509
13517
|
const workspace = inject$1(container, options);
|
|
13518
|
+
workspace.addChangeListener(Events.disableOrphans);
|
|
13510
13519
|
workspace.addChangeListener((event) => {
|
|
13520
|
+
setTimeout(() => {
|
|
13521
|
+
(0, import_dist.shadowBlockConversionChangeListener)(event);
|
|
13522
|
+
}, 0);
|
|
13511
13523
|
if (event.type === "state_change") {
|
|
13512
13524
|
const blocks = workspace.getAllBlocks();
|
|
13513
13525
|
for (const block of blocks) {
|
|
@@ -13515,9 +13527,6 @@ function createWorkspace(container, type, version, dark) {
|
|
|
13515
13527
|
if (b.checkWarning_) b.checkWarning_();
|
|
13516
13528
|
}
|
|
13517
13529
|
}
|
|
13518
|
-
setTimeout(() => {
|
|
13519
|
-
(0, import_dist.shadowBlockConversionChangeListener)(event);
|
|
13520
|
-
}, 0);
|
|
13521
13530
|
});
|
|
13522
13531
|
regCustomCategory(workspace, type, version);
|
|
13523
13532
|
regButtonCallback(workspace);
|
|
@@ -13641,7 +13650,6 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
13641
13650
|
const emit = __emit;
|
|
13642
13651
|
const blocklyEditor = `blocklyEditor${useId()}`;
|
|
13643
13652
|
const blocklyDiv = ref();
|
|
13644
|
-
const parentContainer = useTemplateRef("parentContainer");
|
|
13645
13653
|
const clean = useTemplateRef("clean");
|
|
13646
13654
|
const navigator = useTemplateRef("navigator");
|
|
13647
13655
|
const context = {};
|
|
@@ -13707,24 +13715,11 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
13707
13715
|
zIndex: 999
|
|
13708
13716
|
};
|
|
13709
13717
|
});
|
|
13710
|
-
const parentContStyle = computed(() => {
|
|
13711
|
-
return {
|
|
13712
|
-
position: "fixed",
|
|
13713
|
-
top: 0,
|
|
13714
|
-
left: 0,
|
|
13715
|
-
zIndex: 3e3
|
|
13716
|
-
};
|
|
13717
|
-
});
|
|
13718
13718
|
const { open: flyoutOpen } = useViewStack(`blocklyEditorFlyout${useId()}`);
|
|
13719
13719
|
onMounted(async () => {
|
|
13720
|
-
if (!blocklyDiv.value
|
|
13721
|
-
console.assert(false);
|
|
13722
|
-
return;
|
|
13723
|
-
}
|
|
13724
|
-
setParentContainer(parentContainer.value);
|
|
13720
|
+
if (!blocklyDiv.value) throw new Error(`invalid blocklyDiv`);
|
|
13725
13721
|
await setLocale(__props.locale);
|
|
13726
13722
|
context.workspace = createWorkspace(blocklyDiv.value, __props.type, __props.version, __props.dark);
|
|
13727
|
-
context.workspace.addChangeListener(Events.disableOrphans);
|
|
13728
13723
|
context.workspace.addChangeListener(onChange);
|
|
13729
13724
|
const flyoutDiv = document.querySelector(`#${blocklyEditor} .blocklyFlyout`);
|
|
13730
13725
|
new MutationObserver((mutations) => {
|
|
@@ -13766,45 +13761,45 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
13766
13761
|
navigator.value?.update();
|
|
13767
13762
|
}, 0);
|
|
13768
13763
|
}
|
|
13769
|
-
|
|
13764
|
+
function load(state) {
|
|
13770
13765
|
loading.value = true;
|
|
13771
13766
|
if (__props.type === "json") loadFromJson(state, context.workspace);
|
|
13772
13767
|
else serialization.workspaces.load(state, context.workspace);
|
|
13773
|
-
}
|
|
13774
|
-
|
|
13768
|
+
}
|
|
13769
|
+
function save() {
|
|
13775
13770
|
if (__props.type === "json") return saveToJson(context.workspace);
|
|
13776
13771
|
else return serialization.workspaces.save(context.workspace);
|
|
13777
|
-
}
|
|
13778
|
-
|
|
13772
|
+
}
|
|
13773
|
+
function appendBlock(state) {
|
|
13779
13774
|
serialization.blocks.append(state, context.workspace);
|
|
13780
|
-
}
|
|
13781
|
-
|
|
13775
|
+
}
|
|
13776
|
+
function generateCode() {
|
|
13782
13777
|
if (__props.type === "json") console.assert(false);
|
|
13783
13778
|
else return javascriptGenerator.workspaceToCode(context.workspace);
|
|
13784
|
-
}
|
|
13785
|
-
|
|
13779
|
+
}
|
|
13780
|
+
function generateReactivity() {
|
|
13786
13781
|
return buildReactivity(context.workspace);
|
|
13787
|
-
}
|
|
13788
|
-
|
|
13782
|
+
}
|
|
13783
|
+
function applyLock() {
|
|
13789
13784
|
context.workspace.setIsReadOnly(lock.value);
|
|
13790
13785
|
if (context.workspace.isReadOnly()) flyoutOpen.value = false;
|
|
13791
|
-
}
|
|
13792
|
-
|
|
13786
|
+
}
|
|
13787
|
+
function applyScale() {
|
|
13793
13788
|
context.workspace.setScale(scale.value);
|
|
13794
|
-
}
|
|
13795
|
-
|
|
13789
|
+
}
|
|
13790
|
+
function fireStateChange() {
|
|
13796
13791
|
Events.fire(new (Events.get("state_change"))(context.workspace));
|
|
13797
|
-
}
|
|
13798
|
-
|
|
13792
|
+
}
|
|
13793
|
+
function onCleanWorkspace() {
|
|
13799
13794
|
clean.value?.cleanWorkspace();
|
|
13800
|
-
}
|
|
13801
|
-
|
|
13795
|
+
}
|
|
13796
|
+
function onToggleBlocklyLock() {
|
|
13802
13797
|
lock.value = !lock.value;
|
|
13803
|
-
}
|
|
13804
|
-
|
|
13798
|
+
}
|
|
13799
|
+
function onOpenBlocklyNavigator() {
|
|
13805
13800
|
if (!navigator.value) return;
|
|
13806
13801
|
navigator.value.open = true;
|
|
13807
|
-
}
|
|
13802
|
+
}
|
|
13808
13803
|
onMounted(() => {
|
|
13809
13804
|
eventBus.on("cleanWorkspace", onCleanWorkspace);
|
|
13810
13805
|
eventBus.on("toggleBlocklyLock", onToggleBlocklyLock);
|
|
@@ -13887,11 +13882,6 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
|
|
|
13887
13882
|
key: 3,
|
|
13888
13883
|
style: normalizeStyle(mainMaskStyle.value)
|
|
13889
13884
|
}, null, 4)) : createCommentVNode("v-if", true),
|
|
13890
|
-
createElementVNode("div", {
|
|
13891
|
-
ref_key: "parentContainer",
|
|
13892
|
-
ref: parentContainer,
|
|
13893
|
-
style: normalizeStyle(parentContStyle.value)
|
|
13894
|
-
}, null, 4),
|
|
13895
13885
|
createVNode(_component_x_loading, {
|
|
13896
13886
|
open: loading.value,
|
|
13897
13887
|
"z-index": 99
|
|
@@ -13998,7 +13988,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
13998
13988
|
variant: "text",
|
|
13999
13989
|
onClick: _cache[0] || (_cache[0] = ($event) => open.value = false)
|
|
14000
13990
|
}),
|
|
14001
|
-
createElementVNode("span", _hoisted_1, toDisplayString(unref(t)("x-block-lib.
|
|
13991
|
+
createElementVNode("span", _hoisted_1, toDisplayString(unref(t)("x-block-lib.source")), 1),
|
|
14002
13992
|
createVNode(_component_v_spacer)
|
|
14003
13993
|
]),
|
|
14004
13994
|
_: 1
|
|
@@ -14027,8 +14017,8 @@ const install = (app) => {
|
|
|
14027
14017
|
//#endregion
|
|
14028
14018
|
//#region src/i18n/index.ts
|
|
14029
14019
|
async function loadLocaleMessageBlock(locale) {
|
|
14030
|
-
if (locale === "en") return (await import("./i18n-en.
|
|
14031
|
-
else if (locale === "zhHans") return (await import("./i18n-zhHans.
|
|
14020
|
+
if (locale === "en") return (await import("./i18n-en.o4ueycrn.js").then((n) => n.t)).default;
|
|
14021
|
+
else if (locale === "zhHans") return (await import("./i18n-zhHans.b2uuecq7.js").then((n) => n.t)).default;
|
|
14032
14022
|
else throw new Error(`invalid locale=${locale}`);
|
|
14033
14023
|
}
|
|
14034
14024
|
|
|
@@ -36959,4 +36959,4 @@ function javascript(hljs) {
|
|
|
36959
36959
|
}
|
|
36960
36960
|
|
|
36961
36961
|
//#endregion
|
|
36962
|
-
export { Names as A, defineBlocksWithJsonArray as B, FieldCheckbox as C, FieldNumber as D, FieldLabel as E, Themes as F, inject$1 as G, getMainWorkspace as H, Variables as I, serialization as J, inputs as K, WorkspaceSvg as L, ShortcutItems as M, ShortcutRegistry as N, FieldTextInput as O, Theme as P,
|
|
36962
|
+
export { Names as A, defineBlocksWithJsonArray as B, FieldCheckbox as C, FieldNumber as D, FieldLabel as E, Themes as F, inject$1 as G, getMainWorkspace as H, Variables as I, serialization as J, inputs as K, WorkspaceSvg as L, ShortcutItems as M, ShortcutRegistry as N, FieldTextInput as O, Theme as P, Xml as R, Extensions as S, FieldImage as T, getSelected as U, dialog as V, icons as W, svgResize as X, setLocale as Y, utils as Z, javascriptGenerator as _, lo as a, ContextMenuRegistry as b, encodeString as c, snakeCase as d, parseInt$1 as f, Order as g, cloneDeep as h, require_dist as i, Procedures as j, Msg as k, require_dist$2 as l, debounce as m, o as n, useResizeObserver as o, isEqual as p, registry as q, core_default as r, require_dist$1 as s, javascript as t, upperCase as u, Blocks as v, FieldDropdown as w, Events as x, ContextMenu as y, common as z };
|