x-block-lib 0.11.12 → 0.11.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.
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 constants, C as FieldCheckbox, D as FieldNumber, E as FieldLabel, F as Themes, G as icons, H as dialog, I as Variables, J as registry, K as inject$1, 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 getMainWorkspace, V as defineBlocksWithJsonArray, W as getSelected, X as setLocale$1, Y as serialization, 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 inputs, 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.lqnzhjrj.js";
2
+ import { A as Names, B as constants, C as FieldCheckbox, D as FieldNumber, E as FieldLabel, F as Themes, G as icons, H as dialog, I as Variables, J as registry, K as inject$1, 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 getMainWorkspace, V as defineBlocksWithJsonArray, W as getSelected, X as setLocale$1, Y as serialization, 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 inputs, 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.fqjsm3xo.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";
@@ -5321,8 +5321,8 @@ const CALL_FUNC_V1 = {
5321
5321
  if (!funcInfo) return;
5322
5322
  this.func.id = funcInfo.id;
5323
5323
  this.func.name = funcInfo.name;
5324
- this.func.inputs = funcInfo.inputs;
5325
- this.func.outputs = funcInfo.outputs;
5324
+ this.func.inputs = funcInfo.inputs ?? [];
5325
+ this.func.outputs = funcInfo.outputs ?? [];
5326
5326
  const funcDropdown = this.getField("FUNC");
5327
5327
  funcDropdown.getOptions(false);
5328
5328
  funcDropdown.setValue(this.func.id);
@@ -5392,8 +5392,8 @@ const CALL_FUNC_V1 = {
5392
5392
  return;
5393
5393
  }
5394
5394
  this.func.id = funcInfo.id;
5395
- this.func.inputs = funcInfo.inputs;
5396
- this.func.outputs = funcInfo.outputs;
5395
+ this.func.inputs = funcInfo.inputs ?? [];
5396
+ this.func.outputs = funcInfo.outputs ?? [];
5397
5397
  this.updateShape_();
5398
5398
  this.updateCheck_();
5399
5399
  this.updateShadow_();
@@ -5545,8 +5545,8 @@ const CALL_FUNC_INTERNAL_V1 = {
5545
5545
  if (!funcInfo) return;
5546
5546
  this.func.id = funcInfo.id;
5547
5547
  this.func.name = funcInfo.name;
5548
- this.func.inputs = funcInfo.inputs;
5549
- this.func.outputs = funcInfo.outputs;
5548
+ this.func.inputs = funcInfo.inputs ?? [];
5549
+ this.func.outputs = funcInfo.outputs ?? [];
5550
5550
  const funcDropdown = this.getField("FUNC");
5551
5551
  funcDropdown.getOptions(false);
5552
5552
  funcDropdown.setValue(this.func.id);
@@ -5616,8 +5616,8 @@ const CALL_FUNC_INTERNAL_V1 = {
5616
5616
  return;
5617
5617
  }
5618
5618
  this.func.id = funcInfo.id;
5619
- this.func.inputs = funcInfo.inputs;
5620
- this.func.outputs = funcInfo.outputs;
5619
+ this.func.inputs = funcInfo.inputs ?? [];
5620
+ this.func.outputs = funcInfo.outputs ?? [];
5621
5621
  this.updateShape_();
5622
5622
  this.updateCheck_();
5623
5623
  this.updateShadow_();
@@ -11560,7 +11560,7 @@ WorkspaceSvg.prototype.cleanUp = function() {
11560
11560
  };
11561
11561
 
11562
11562
  //#endregion
11563
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
11563
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/typeof.js
11564
11564
  var import_dist$1 = require_dist$1();
11565
11565
  function _typeof(o) {
11566
11566
  "@babel/helpers - typeof";
@@ -11572,7 +11572,7 @@ function _typeof(o) {
11572
11572
  }
11573
11573
 
11574
11574
  //#endregion
11575
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
11575
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/toPrimitive.js
11576
11576
  function toPrimitive(t, r) {
11577
11577
  if ("object" != _typeof(t) || !t) return t;
11578
11578
  var e = t[Symbol.toPrimitive];
@@ -11585,14 +11585,14 @@ function toPrimitive(t, r) {
11585
11585
  }
11586
11586
 
11587
11587
  //#endregion
11588
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
11588
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/toPropertyKey.js
11589
11589
  function toPropertyKey(t) {
11590
11590
  var i = toPrimitive(t, "string");
11591
11591
  return "symbol" == _typeof(i) ? i : i + "";
11592
11592
  }
11593
11593
 
11594
11594
  //#endregion
11595
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
11595
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/defineProperty.js
11596
11596
  function _defineProperty(e, r, t) {
11597
11597
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
11598
11598
  value: t,
@@ -32372,19 +32372,19 @@ var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32372
32372
  }));
32373
32373
 
32374
32374
  //#endregion
32375
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/checkPrivateRedeclaration.js
32375
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/checkPrivateRedeclaration.js
32376
32376
  function _checkPrivateRedeclaration(e, t) {
32377
32377
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
32378
32378
  }
32379
32379
 
32380
32380
  //#endregion
32381
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/classPrivateMethodInitSpec.js
32381
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/classPrivateMethodInitSpec.js
32382
32382
  function _classPrivateMethodInitSpec(e, a) {
32383
32383
  _checkPrivateRedeclaration(e, a), a.add(e);
32384
32384
  }
32385
32385
 
32386
32386
  //#endregion
32387
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/assertClassBrand.js
32387
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/assertClassBrand.js
32388
32388
  function _assertClassBrand(e, t, n) {
32389
32389
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
32390
32390
  throw new TypeError("Private element is not present on this object");
@@ -32685,7 +32685,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32685
32685
  }));
32686
32686
 
32687
32687
  //#endregion
32688
- //#region node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
32688
+ //#region node_modules/.pnpm/@vueuse+shared@15.0.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
32689
32689
  /**
32690
32690
  * Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
32691
32691
  *
@@ -32714,7 +32714,7 @@ const camelize = cacheStringFunction((str) => {
32714
32714
  });
32715
32715
 
32716
32716
  //#endregion
32717
- //#region node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
32717
+ //#region node_modules/.pnpm/@vueuse+core@15.0.0_vue@3.5.43_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
32718
32718
  const defaultWindow = isClient ? window : void 0;
32719
32719
  const defaultDocument = isClient ? window.document : void 0;
32720
32720
  const defaultNavigator = isClient ? window.navigator : void 0;
@@ -32770,14 +32770,15 @@ function useResizeObserver(target, callback, options = {}) {
32770
32770
  observer = void 0;
32771
32771
  }
32772
32772
  };
32773
- const stopWatch = watch(computed(() => {
32773
+ const targets = computed(() => {
32774
32774
  const _targets = toValue(target);
32775
32775
  return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
32776
- }), (els) => {
32776
+ });
32777
+ const stopWatch = watch(targets, (els) => {
32777
32778
  cleanup();
32778
32779
  if (isSupported.value && window) {
32779
32780
  observer = new ResizeObserver(callback);
32780
- for (const _el of els) if (_el) observer.observe(_el, observerOptions);
32781
+ for (const _el of els) if (_el instanceof Element) observer.observe(_el, observerOptions);
32781
32782
  }
32782
32783
  }, {
32783
32784
  immediate: true,
@@ -32793,43 +32794,6 @@ function useResizeObserver(target, callback, options = {}) {
32793
32794
  stop
32794
32795
  };
32795
32796
  }
32796
- const DEFAULT_UNITS = [
32797
- {
32798
- max: 6e4,
32799
- value: 1e3,
32800
- name: "second"
32801
- },
32802
- {
32803
- max: 276e4,
32804
- value: 6e4,
32805
- name: "minute"
32806
- },
32807
- {
32808
- max: 72e6,
32809
- value: 36e5,
32810
- name: "hour"
32811
- },
32812
- {
32813
- max: 5184e5,
32814
- value: 864e5,
32815
- name: "day"
32816
- },
32817
- {
32818
- max: 24192e5,
32819
- value: 6048e5,
32820
- name: "week"
32821
- },
32822
- {
32823
- max: 28512e6,
32824
- value: 2592e6,
32825
- name: "month"
32826
- },
32827
- {
32828
- max: Number.POSITIVE_INFINITY,
32829
- value: 31536e6,
32830
- name: "year"
32831
- }
32832
- ];
32833
32797
 
32834
32798
  //#endregion
32835
32799
  //#region node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
@@ -36323,7 +36287,7 @@ var import_core = /* @__PURE__ */ __toESM(require_core());
36323
36287
  var core_default = import_core.default;
36324
36288
 
36325
36289
  //#endregion
36326
- //#region node_modules/.pnpm/@highlightjs+vue-plugin@2.1.0_highlight.js@11.12.0_vue@3.5.42_typescript@6.0.3_/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js
36290
+ //#region node_modules/.pnpm/@highlightjs+vue-plugin@2.1.0_highlight.js@11.12.0_vue@3.5.43_typescript@6.0.3_/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js
36327
36291
  var r = defineComponent({
36328
36292
  props: {
36329
36293
  code: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
- "version": "0.11.12",
3
+ "version": "0.11.13",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -17,6 +17,8 @@
17
17
  "lint": "oxlint",
18
18
  "fmt": "oxfmt",
19
19
  "build": "tsdown",
20
+ "ncu:check": "ncu --dep dev,peer -x typescript",
21
+ "ncu:update": "ncu --dep dev,peer -x typescript -u",
20
22
  "lint-staged": "lint-staged",
21
23
  "prepare": "husky"
22
24
  },
@@ -27,33 +29,34 @@
27
29
  "@highlightjs/vue-plugin": "^2.1.0",
28
30
  "@sindresorhus/base62": "^1.0.0",
29
31
  "@types/lodash-es": "^4.17.12",
30
- "@types/node": "^26.0.0",
31
- "@vueuse/core": "^14.4.0",
32
+ "@types/node": "^26.6.4",
33
+ "@vueuse/core": "^15.0.0",
32
34
  "blockly": "^13.3.0",
33
35
  "highlight.js": "^11.12.0",
34
36
  "husky": "^9.1.7",
35
- "lint-staged": "^17.5.1",
37
+ "lint-staged": "^17.6.0",
36
38
  "lodash-es": "^4.18.1",
37
- "oxfmt": "^0.67.0",
38
- "oxlint": "^1.82.0",
39
- "oxlint-tsgolint": "^7.0.2002",
39
+ "oxfmt": "^0.71.0",
40
+ "oxlint": "^1.86.0",
41
+ "oxlint-tsgolint": "^7.0.2003",
40
42
  "picomatch": "^4.0.7",
41
- "sass": "^1.104.0",
43
+ "sass": "^1.105.1",
42
44
  "tsdown": "^0.23.0",
43
45
  "typescript": "^6.0.3",
44
- "vite": "^8.3.0",
46
+ "vite": "^8.3.2",
45
47
  "vue-draggable-plus": "^0.6.1",
46
- "x-config-lib": "^0.1.8",
47
- "x-config-oxfmt": "^0.1.6",
48
- "x-config-oxlint": "^0.1.7"
48
+ "vue-tsc": "^3.3.12",
49
+ "x-config-lib": "^0.1.10",
50
+ "x-config-oxfmt": "^0.1.7",
51
+ "x-config-oxlint": "^0.1.8"
49
52
  },
50
53
  "peerDependencies": {
51
- "vue": "^3.5.42",
52
- "vue-i18n": "^11.4.10",
53
- "vuetify": "^4.2.1",
54
- "x-essential-lib": "^0.11.11",
55
- "x-permission-lib": "^0.1.6",
56
- "x-runtime-lib": "^0.10.7",
57
- "x-state-lib": "^0.4.5"
54
+ "vue": "^3.5.43",
55
+ "vue-i18n": "^11.4.13",
56
+ "vuetify": "^4.2.3",
57
+ "x-essential-lib": "^0.11.12",
58
+ "x-permission-lib": "^0.1.7",
59
+ "x-runtime-lib": "^0.10.8",
60
+ "x-state-lib": "^0.4.6"
58
61
  }
59
62
  }