x-block-lib 0.11.6 → 0.11.7

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.
@@ -170,7 +170,7 @@ var en_default = {
170
170
  APP_V1_SELECT_SLOT_TITLE: "select slot",
171
171
  APP_V1_SELECT_SLOT_TOOLTIP: "APP_V1_SELECT_SLOT_TOOLTIP",
172
172
  APP_V1_SELECT_SLOT_HELPURL: "APP_V1_SELECT_SLOT_HELPURL",
173
- APP_V1_SET_APP_METHOD_OUTPUT_TITLE: "set method output",
173
+ APP_V1_SET_APP_METHOD_OUTPUT_TITLE: "set output",
174
174
  APP_V1_SET_APP_METHOD_OUTPUT_TOOLTIP: "APP_V1_SET_APP_METHOD_OUTPUT_TOOLTIP",
175
175
  APP_V1_SET_APP_METHOD_OUTPUT_HELPURL: "APP_V1_SET_APP_METHOD_OUTPUT_HELPURL",
176
176
  APP_V1_SET_APP_STATE_TITLE: "set state",
@@ -1,4 +1,4 @@
1
- import { n as __exportAll } from "./rolldown-runtime.wcysgu6r.js";
1
+ import { n as __exportAll } from "./rolldown-runtime.d6iwd7kf.js";
2
2
 
3
3
  //#region src/i18n/locales/en/index.ts
4
4
  var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
@@ -1,4 +1,4 @@
1
- import { n as __exportAll } from "./rolldown-runtime.wcysgu6r.js";
1
+ import { n as __exportAll } from "./rolldown-runtime.d6iwd7kf.js";
2
2
 
3
3
  //#region src/i18n/locales/zhHans/index.ts
4
4
  var zhHans_exports = /* @__PURE__ */ __exportAll({ default: () => zhHans_default });
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Type } from "x-essential-lib";
2
2
  import { EventKind, MethodKind, PropertyKind, ZProperty } from "x-runtime-lib";
3
3
  import { App } from "vue";
4
-
5
4
  //#region src/core/utils/app/event.d.ts
6
5
  interface Param {
7
6
  key: string;
@@ -14,8 +13,8 @@ interface EventInfo {
14
13
  names: string[];
15
14
  params?: Param[];
16
15
  }
17
- declare function getOnEventInfo(id: string): EventInfo | undefined;
18
- declare function getTriggerEventInfo(id: string): EventInfo | undefined;
16
+ export declare function getOnEventInfo(id: string): EventInfo | undefined;
17
+ export declare function getTriggerEventInfo(id: string): EventInfo | undefined;
19
18
  //#endregion
20
19
  //#region src/core/utils/app/method.d.ts
21
20
  interface Field {
@@ -30,8 +29,8 @@ interface MethodInfo {
30
29
  inputs?: Field[];
31
30
  outputs?: Field[];
32
31
  }
33
- declare function getCallMethodInfo(id: string): MethodInfo | undefined;
34
- declare function getImplementMethodInfo(id: string): MethodInfo | undefined;
32
+ export declare function getCallMethodInfo(id: string): MethodInfo | undefined;
33
+ export declare function getImplementMethodInfo(id: string): MethodInfo | undefined;
35
34
  //#endregion
36
35
  //#region src/core/utils/app/node.d.ts
37
36
  interface NodeInfo {
@@ -40,7 +39,7 @@ interface NodeInfo {
40
39
  name: string;
41
40
  alias: string;
42
41
  }
43
- declare function getNodeInfo(nodeid: string): NodeInfo | undefined;
42
+ export declare function getNodeInfo(nodeid: string): NodeInfo | undefined;
44
43
  //#endregion
45
44
  //#region src/core/utils/app/property.d.ts
46
45
  interface PropertyInfo {
@@ -57,7 +56,7 @@ interface PropertyInfo {
57
56
  };
58
57
  };
59
58
  }
60
- declare function getPropertyInfo(id: string): PropertyInfo | undefined;
59
+ export declare function getPropertyInfo(id: string): PropertyInfo | undefined;
61
60
  //#endregion
62
61
  //#region src/components/blockly/workspace.d.ts
63
62
  type Type$1 = 'page' | 'comp' | 'func' | 'flow' | 'json';
@@ -105,7 +104,7 @@ type __VLS_WithSlots<T, S> = T & {
105
104
  declare const install: (app: App) => void;
106
105
  //#endregion
107
106
  //#region src/i18n/index.d.ts
108
- declare function loadLocaleMessageBlock(locale: string): Promise<{
107
+ export declare function loadLocaleMessageBlock(locale: string): Promise<{
109
108
  'x-block-lib': {
110
109
  bind: string;
111
110
  dlg: {
@@ -136,4 +135,4 @@ declare const _default$1: {
136
135
  install: (app: import("vue").App) => void;
137
136
  };
138
137
  //#endregion
139
- export { _default as XBlockly, _default$1 as default, getCallMethodInfo, getImplementMethodInfo, getNodeInfo, getOnEventInfo, getPropertyInfo, getTriggerEventInfo, install, loadLocaleMessageBlock };
138
+ export { _default as XBlockly, _default$1 as default, install };
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, Q as utils, R as Xml, S as Extensions, T as FieldImage, U as getSelected, V as dialog, W as icons, X as setParentContainer, Y as setLocale$1, Z as svgResize, _ 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.b0mctov2.js";
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, Q as utils, R as Xml, S as Extensions, T as FieldImage, U as getSelected, V as dialog, W as icons, X as setParentContainer, Y as setLocale$1, Z as svgResize, _ 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.k3ftbehq.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";
@@ -9,8 +9,8 @@ import { useDisplay } from "vuetify";
9
9
 
10
10
  //#region src/core/locale/index.ts
11
11
  async function setLocale(locale) {
12
- if (locale === "en") setLocale$1((await import("./en.farnksb7.js")).default);
13
- else if (locale === "zhHans") setLocale$1((await import("./zhHans.cyz6m68z.js")).default);
12
+ if (locale === "en") setLocale$1((await import("./en.ek9yugi6.js")).default);
13
+ else if (locale === "zhHans") setLocale$1((await import("./zhHans.e42r5aas.js")).default);
14
14
  else throw new Error(`invalid locale=${locale}`);
15
15
  }
16
16
  function localeMsg(key) {
@@ -1123,10 +1123,11 @@ function getAllBindKinds() {
1123
1123
  }
1124
1124
  function genBindKindOpts() {
1125
1125
  const { i18n } = globalObjects;
1126
- return ensureOpts(getAllBindKinds().map((v) => {
1126
+ const options = getAllBindKinds().map((v) => {
1127
1127
  if (v === "notSet") return [i18n.global.t(`x-runtime-lib.${v}`), v];
1128
1128
  else return [localeMsg(`APP_${upperCase(v)}`), v];
1129
- }));
1129
+ });
1130
+ return ensureOpts(options);
1130
1131
  }
1131
1132
 
1132
1133
  //#endregion
@@ -2895,8 +2896,10 @@ const APP_BIND_V1 = {
2895
2896
  let currCheck;
2896
2897
  if (block.kind === "property") {
2897
2898
  const propertyInfo = getPropertyInfo(block.property.id);
2898
- if (propertyInfo) if (propertyInfo.meta.element) currCheck = getPropCheck(propertyInfo.meta.raw);
2899
- else currCheck = getTypeCheck(propertyInfo.meta.raw.type);
2899
+ if (propertyInfo) {
2900
+ if (propertyInfo.meta.element) currCheck = getPropCheck(propertyInfo.meta.raw);
2901
+ else currCheck = getTypeCheck(propertyInfo.meta.raw.type);
2902
+ }
2900
2903
  } else if (block.kind === "state") {
2901
2904
  const stateInfo = getStateInfo(block.state.id);
2902
2905
  if (stateInfo) currCheck = getTypeCheck(stateInfo.type);
@@ -5178,6 +5181,14 @@ function ${javascriptGenerator.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
5178
5181
  `)}(${red}, ${green}, ${blue})`, Order.FUNCTION_CALL];
5179
5182
  };
5180
5183
 
5184
+ //#endregion
5185
+ //#region src/core/blocks/compute/flow/customFlowTrigger/v1/index.ts
5186
+ const CUSTOM_FLOW_TRIGGER_V1 = { init: function() {} };
5187
+ Blocks.custom_flow_trigger_v1 = CUSTOM_FLOW_TRIGGER_V1;
5188
+ javascriptGenerator.forBlock["custom_flow_trigger_v1"] = function() {
5189
+ return ``;
5190
+ };
5191
+
5181
5192
  //#endregion
5182
5193
  //#region src/core/blocks/compute/flow/invokeFlowTrigger/v1/index.ts
5183
5194
  const INVOKE_FLOW_TRIGGER_V1 = { init: function() {} };
@@ -8836,7 +8847,7 @@ Extensions.register("flow_control_tooltip_v1", Extensions.buildTooltipForDropdow
8836
8847
  BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
8837
8848
  CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
8838
8849
  }));
8839
- const loopTypes = new Set([
8850
+ const loopTypes = /* @__PURE__ */ new Set([
8840
8851
  "repeat_v1",
8841
8852
  "for_each_v1",
8842
8853
  "for_v1",
@@ -9601,9 +9612,7 @@ javascriptGenerator.forBlock["math_round_v1"] = function(block) {
9601
9612
  case "ROUNDUP":
9602
9613
  code = `Math.ceil(${arg})`;
9603
9614
  break;
9604
- case "ROUNDDOWN":
9605
- code = `Math.floor(${arg})`;
9606
- break;
9615
+ case "ROUNDDOWN": code = `Math.floor(${arg})`;
9607
9616
  }
9608
9617
  return [code, Order.FUNCTION_CALL];
9609
9618
  };
@@ -9658,9 +9667,7 @@ javascriptGenerator.forBlock["math_single_v1"] = function(block) {
9658
9667
  case "EXP":
9659
9668
  code = `Math.exp(${arg})`;
9660
9669
  break;
9661
- case "POW10":
9662
- code = `Math.pow(10, ${arg})`;
9663
- break;
9670
+ case "POW10": code = `Math.pow(10, ${arg})`;
9664
9671
  }
9665
9672
  if (code) return [code, Order.FUNCTION_CALL];
9666
9673
  switch (operator) {
@@ -9711,9 +9718,7 @@ javascriptGenerator.forBlock["math_trig_v1"] = function(block) {
9711
9718
  case "COS":
9712
9719
  code = `Math.cos(${arg} / 180 * Math.PI)`;
9713
9720
  break;
9714
- case "TAN":
9715
- code = `Math.tan(${arg} / 180 * Math.PI)`;
9716
- break;
9721
+ case "TAN": code = `Math.tan(${arg} / 180 * Math.PI)`;
9717
9722
  }
9718
9723
  if (code) return [code, Order.FUNCTION_CALL];
9719
9724
  switch (operator) {
@@ -10664,7 +10669,9 @@ defineBlocksWithJsonArray([{
10664
10669
  extensions: ["text_append_tooltip_v1"]
10665
10670
  }]);
10666
10671
  javascriptGenerator.forBlock["text_append_v1"] = function(block) {
10667
- return `${javascriptGenerator.nameDB_?.getName(block.getFieldValue("VAR"), Names.NameType.VARIABLE)} += ${forceString(javascriptGenerator.valueToCode(block, "TEXT", Order.NONE) || "''")[0]};\n`;
10672
+ const varName = javascriptGenerator.nameDB_?.getName(block.getFieldValue("VAR"), Names.NameType.VARIABLE);
10673
+ const value = javascriptGenerator.valueToCode(block, "TEXT", Order.NONE) || "''";
10674
+ return `${varName} += ${forceString(value)[0]};\n`;
10668
10675
  };
10669
10676
 
10670
10677
  //#endregion
@@ -10932,7 +10939,10 @@ javascriptGenerator.forBlock["text_join_v1"] = function(blockBase) {
10932
10939
  const block = blockBase;
10933
10940
  switch (block.itemCount_) {
10934
10941
  case 0: return ["''", Order.ATOMIC];
10935
- case 1: return forceString(javascriptGenerator.valueToCode(block, "ADD0", Order.NONE) || "''");
10942
+ case 1: {
10943
+ const element = javascriptGenerator.valueToCode(block, "ADD0", Order.NONE) || "''";
10944
+ return forceString(element);
10945
+ }
10936
10946
  case 2: {
10937
10947
  const element0 = javascriptGenerator.valueToCode(block, "ADD0", Order.NONE) || "''";
10938
10948
  const element1 = javascriptGenerator.valueToCode(block, "ADD1", Order.NONE) || "''";
@@ -11413,7 +11423,7 @@ new import_dist$1.CrossTabCopyPaste().init({
11413
11423
  new DisableTopBlocks().init();
11414
11424
 
11415
11425
  //#endregion
11416
- //#region \0@oxc-project+runtime@0.135.0/helpers/esm/typeof.js
11426
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
11417
11427
  function _typeof(o) {
11418
11428
  "@babel/helpers - typeof";
11419
11429
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -11424,7 +11434,7 @@ function _typeof(o) {
11424
11434
  }
11425
11435
 
11426
11436
  //#endregion
11427
- //#region \0@oxc-project+runtime@0.135.0/helpers/esm/toPrimitive.js
11437
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
11428
11438
  function toPrimitive(t, r) {
11429
11439
  if ("object" != _typeof(t) || !t) return t;
11430
11440
  var e = t[Symbol.toPrimitive];
@@ -11437,14 +11447,14 @@ function toPrimitive(t, r) {
11437
11447
  }
11438
11448
 
11439
11449
  //#endregion
11440
- //#region \0@oxc-project+runtime@0.135.0/helpers/esm/toPropertyKey.js
11450
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
11441
11451
  function toPropertyKey(t) {
11442
11452
  var i = toPrimitive(t, "string");
11443
11453
  return "symbol" == _typeof(i) ? i : i + "";
11444
11454
  }
11445
11455
 
11446
11456
  //#endregion
11447
- //#region \0@oxc-project+runtime@0.135.0/helpers/esm/defineProperty.js
11457
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
11448
11458
  function _defineProperty(e, r, t) {
11449
11459
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
11450
11460
  value: t,
@@ -11639,9 +11649,7 @@ function setTheme(theme) {
11639
11649
  case "light":
11640
11650
  workspace.setTheme(light);
11641
11651
  break;
11642
- case "dark":
11643
- workspace.setTheme(dark);
11644
- break;
11652
+ case "dark": workspace.setTheme(dark);
11645
11653
  }
11646
11654
  }
11647
11655
 
@@ -11916,21 +11924,21 @@ var item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
11916
11924
  const emit = __emit;
11917
11925
  const mouseOver = ref(false);
11918
11926
  const style = computed(() => {
11919
- const style = {
11927
+ return {
11920
11928
  position: "relative",
11921
11929
  background: mouseOver.value ? highlightColor.value : backgroundColor2.value,
11922
11930
  width: "100%",
11923
11931
  height: "48px",
11924
11932
  userSelect: "none"
11925
11933
  };
11926
- if (__props.select) {
11927
- style.borderTop = "1px solid " + primaryColor.value;
11928
- style.borderBottom = "1px solid " + primaryColor.value;
11929
- } else {
11930
- style.borderTop = void 0;
11931
- style.borderBottom = void 0;
11932
- }
11933
- return style;
11934
+ });
11935
+ const flagStyle = computed(() => {
11936
+ return {
11937
+ position: "absolute",
11938
+ background: primaryColor.value,
11939
+ width: "4px",
11940
+ height: "100%"
11941
+ };
11934
11942
  });
11935
11943
  return (_ctx, _cache) => {
11936
11944
  const _component_v_spacer = resolveComponent("v-spacer");
@@ -11943,6 +11951,10 @@ var item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
11943
11951
  onMouseout: _cache[2] || (_cache[2] = ($event) => mouseOver.value = false),
11944
11952
  onMouseover: _cache[3] || (_cache[3] = ($event) => mouseOver.value = true)
11945
11953
  }, [
11954
+ __props.select ? (openBlock(), createElementBlock("div", {
11955
+ key: 0,
11956
+ style: normalizeStyle(flagStyle.value)
11957
+ }, null, 4)) : createCommentVNode("v-if", true),
11946
11958
  createElementVNode("div", _hoisted_1$4, [createElementVNode("span", _hoisted_2$1, toDisplayString(__props.title), 1), __props.desc ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.desc), 1)) : createCommentVNode("v-if", true)]),
11947
11959
  createVNode(_component_v_spacer),
11948
11960
  createVNode(_component_v_icon, {
@@ -11982,8 +11994,15 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
11982
11994
  const { t } = useI18n();
11983
11995
  const open = useModel(__props, "modelValue");
11984
11996
  const context = injectContext();
11997
+ const style = computed(() => {
11998
+ return {
11999
+ display: "flex",
12000
+ flexDirection: "column",
12001
+ gap: "1px"
12002
+ };
12003
+ });
11985
12004
  const blockList = ref([]);
11986
- const update = () => {
12005
+ function update() {
11987
12006
  if (!context.workspace) {
11988
12007
  console.assert(false);
11989
12008
  return;
@@ -12018,10 +12037,10 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
12018
12037
  });
12019
12038
  });
12020
12039
  blockList.value = tmpBlockList;
12021
- };
12040
+ }
12022
12041
  __expose({ update });
12023
12042
  let backupBlockIdList = [];
12024
- const onStart = () => {
12043
+ function onStart() {
12025
12044
  if (__props.lock) {
12026
12045
  messageWarning(t("x-block-lib.msg.cannotOperateInLockedState"));
12027
12046
  return;
@@ -12031,11 +12050,11 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
12031
12050
  tmpBlockList.push(id);
12032
12051
  });
12033
12052
  backupBlockIdList = tmpBlockList;
12034
- };
12035
- const onMove = () => {
12053
+ }
12054
+ function onMove() {
12036
12055
  return !__props.lock;
12037
- };
12038
- const onEnd = (e) => {
12056
+ }
12057
+ function onEnd(e) {
12039
12058
  if (!context.workspace) {
12040
12059
  console.assert(false);
12041
12060
  return;
@@ -12060,8 +12079,8 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
12060
12079
  draggedBlock.moveTo(new utils.Coordinate(pos.x, y));
12061
12080
  context.workspace.cleanUp();
12062
12081
  jumpFirstTopBlock();
12063
- };
12064
- const onItemClick = async (id) => {
12082
+ }
12083
+ async function onItemClick(id) {
12065
12084
  if (!context.workspace) {
12066
12085
  console.assert(false);
12067
12086
  return;
@@ -12070,7 +12089,7 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
12070
12089
  common.setSelected(block);
12071
12090
  jumpTopBlock(id);
12072
12091
  open.value = false;
12073
- };
12092
+ }
12074
12093
  return (_ctx, _cache) => {
12075
12094
  return blockList.value.length > 0 ? (openBlock(), createBlock(unref(lo), {
12076
12095
  key: 0,
@@ -12079,6 +12098,7 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
12079
12098
  animation: 150,
12080
12099
  "ghost-class": "ghost",
12081
12100
  handle: ".x-handle",
12101
+ style: normalizeStyle(style.value),
12082
12102
  onEnd,
12083
12103
  onMove,
12084
12104
  onStart
@@ -12099,7 +12119,7 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /*@__PURE__*/ defineCo
12099
12119
  ]);
12100
12120
  }), 128))]),
12101
12121
  _: 1
12102
- }, 8, ["modelValue"])) : (openBlock(), createElementBlock("span", _hoisted_1$3, toDisplayString(unref(t)("x-block-lib.noOption")), 1));
12122
+ }, 8, ["modelValue", "style"])) : (openBlock(), createElementBlock("span", _hoisted_1$3, toDisplayString(unref(t)("x-block-lib.noOption")), 1));
12103
12123
  };
12104
12124
  }
12105
12125
  });
@@ -13566,13 +13586,13 @@ function regCustomCategory(workspace, type, version) {
13566
13586
  function regButtonCallback(workspace) {
13567
13587
  const { router } = globalObjects;
13568
13588
  workspace.registerButtonCallback("NO_COMPUTE", () => {
13569
- const target = router.resolve({ path: "/compute/" + Date.now() });
13589
+ const target = router.resolve({ path: `/compute/${Date.now()}` });
13570
13590
  setTimeout(() => {
13571
13591
  window.open(target.href, "_blank");
13572
13592
  }, 100);
13573
13593
  });
13574
13594
  workspace.registerButtonCallback("NO_TABLE", () => {
13575
- const target = router.resolve({ path: "/data/" + Date.now() });
13595
+ const target = router.resolve({ path: `/data/${Date.now()}` });
13576
13596
  setTimeout(() => {
13577
13597
  window.open(target.href, "_blank");
13578
13598
  }, 100);
@@ -13738,8 +13758,10 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineCo
13738
13758
  scale.value = context.workspace.getScale();
13739
13759
  return;
13740
13760
  }
13741
- if (event.type === Events.BLOCK_DRAG) if (event.isStart) dragging.value = true;
13742
- else dragging.value = false;
13761
+ if (event.type === Events.BLOCK_DRAG) {
13762
+ if (event.isStart) dragging.value = true;
13763
+ else dragging.value = false;
13764
+ }
13743
13765
  setTimeout(() => {
13744
13766
  navigator.value?.update();
13745
13767
  }, 0);
@@ -14005,8 +14027,8 @@ const install = (app) => {
14005
14027
  //#endregion
14006
14028
  //#region src/i18n/index.ts
14007
14029
  async function loadLocaleMessageBlock(locale) {
14008
- if (locale === "en") return (await import("./i18n-en.d45d4c13.js").then((n) => n.t)).default;
14009
- else if (locale === "zhHans") return (await import("./i18n-zhHans.fjtgsqkm.js").then((n) => n.t)).default;
14030
+ if (locale === "en") return (await import("./i18n-en.c3uxu3r5.js").then((n) => n.t)).default;
14031
+ else if (locale === "zhHans") return (await import("./i18n-zhHans.hyv14btt.js").then((n) => n.t)).default;
14010
14032
  else throw new Error(`invalid locale=${locale}`);
14011
14033
  }
14012
14034
 
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
33
33
  }
34
34
  return to;
35
35
  };
36
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
37
37
  value: mod,
38
38
  enumerable: true
39
39
  }) : target, mod));