x-block-lib 0.10.5 → 0.10.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.
package/dist/index.js CHANGED
@@ -7,8 +7,8 @@
7
7
  License: see project LICENSE
8
8
  Touched: 2021
9
9
  */
10
- 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}.ghost[data-v-14e53948]{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}
11
- /*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();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 require_dist, d as snakeCase_default, f as parseInt_default, g as Order, h as cloneDeep_default, i as require_dist$2, j as Procedures, k as Msg, l as encodeString, m as debounce_default, n as javascript, o as useResizeObserver, p as isEqual_default, q as registry, r as core_default, s as require_dist$1, t as highlightjs_vue_esm_min_default, u as upperCase_default, v as Blocks, w as FieldDropdown, x as Events, y as ContextMenu, z as common } from "./vendor.leasz44h.js";
10
+ 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}.ghost[data-v-a710550b]{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}
11
+ /*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();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 require_dist, d as snakeCase_default, f as parseInt_default, g as Order, h as cloneDeep_default, i as require_dist$2, j as Procedures, k as Msg, l as encodeString, m as debounce_default, n as javascript, o as useResizeObserver, p as isEqual_default, q as registry, r as core_default, s as require_dist$1, t as highlightjs_vue_esm_min_default, u as upperCase_default, v as Blocks, w as FieldDropdown, x as Events, y as ContextMenu, z as common } from "./vendor.evszf9wa.js";
12
12
  import { globalState } from "x-state-lib";
13
13
  import { addIndent, finalProperties, getElement, getImplementMethodName, getTag, makeEventId, makeEventKeyOfCustomSlot, makeEventKeyOfElementSlot, makeMethodId, makeMethodKeyOfCustomSlot, makeMethodKeyOfElementSlot, makePropertyId, makePropertyKeyOfCustomSlot, makePropertyKeyOfElementSlot, makeTriggerId, parsePercentStr, parsePixelStr, pkgs, toEventName, toMethodName, toPropertyName, unwrapEventId, unwrapEventKeyOfCustomSlot, unwrapEventKeyOfElementSlot, unwrapMethodId, unwrapMethodKeyOfCustomSlot, unwrapMethodKeyOfElementSlot, unwrapPropertyId, unwrapPropertyKeyOfCustomSlot, unwrapPropertyKeyOfElementSlot, unwrapSlotId } from "x-runtime-lib";
14
14
  import { eventBus, globalObjects, messageWarning, openConfirmDlg, openPromptDlg, useColor, useSystem, useViewStack } from "x-essential-lib";
@@ -6660,7 +6660,7 @@ ${C}}\n`, w;
6660
6660
  tooltip: "%{BKY_LOOP_REPEAT_TOOLTIP}",
6661
6661
  helpUrl: "%{BKY_LOOP_REPEAT_HELPURL}"
6662
6662
  }]), javascriptGenerator.forBlock.repeat_v1 = function(y) {
6663
- let b = "";
6663
+ let b;
6664
6664
  b = y.getField("TIMES") ? String(Number(y.getFieldValue("TIMES"))) : javascriptGenerator.valueToCode(y, "TIMES", Order.ASSIGNMENT) || "0";
6665
6665
  let x = javascriptGenerator.addLoopTrap(javascriptGenerator.statementToCode(y, "DO"), y), S = "", C = javascriptGenerator.nameDB_.getDistinctName("count", Names.NameType.VARIABLE), w = b;
6666
6666
  return !b.match(/^\w+$/) && !utils.string.isNumber(b) && (w = javascriptGenerator.nameDB_.getDistinctName("repeat_end", Names.NameType.VARIABLE), S += `var ${w} = ${b};\n`), S += `for (var ${C} = 0; ${C} < ${w}; ${C}++) {\n${x}}\n`, S;
@@ -7934,7 +7934,7 @@ Extensions.register("text_append_tooltip_v1", Extensions.buildTooltipWithFieldTe
7934
7934
  UPPERCASE: ".toUpperCase()",
7935
7935
  LOWERCASE: ".toLowerCase()",
7936
7936
  TITLECASE: null
7937
- }[e.getFieldValue("CASE")], b = javascriptGenerator.valueToCode(e, "TEXT", y ? Order.MEMBER : Order.NONE) || "''", x = "";
7937
+ }[e.getFieldValue("CASE")], b = javascriptGenerator.valueToCode(e, "TEXT", y ? Order.MEMBER : Order.NONE) || "''", x;
7938
7938
  return x = y ? b + y : javascriptGenerator.provideFunction_("textToTitleCase", `
7939
7939
  function ${javascriptGenerator.FUNCTION_NAME_PLACEHOLDER_}(str) {
7940
7940
  return str.slice(0, 1).toUpperCase() + str.slice(1).toLowerCase();
@@ -8765,9 +8765,9 @@ var clean_default = /* @__PURE__ */ defineComponent({
8765
8765
  }, 8, ["disabled", "text"]);
8766
8766
  };
8767
8767
  }
8768
- }), _hoisted_1$4 = { class: "d-flex flex-column" }, _hoisted_2$1 = { class: "text-subtitle-1 ml-6" }, _hoisted_3 = {
8768
+ }), _hoisted_1$4 = { class: "d-flex flex-column" }, _hoisted_2$1 = { class: "text-body-large ml-6" }, _hoisted_3 = {
8769
8769
  key: 0,
8770
- class: "text-caption text-grey text-truncate ml-6",
8770
+ class: "text-body-small text-grey text-truncate ml-6",
8771
8771
  style: { maxWidth: "340px" }
8772
8772
  }, item_default = /* @__PURE__ */ defineComponent({
8773
8773
  __name: "item",
@@ -8818,7 +8818,7 @@ var clean_default = /* @__PURE__ */ defineComponent({
8818
8818
  }
8819
8819
  }), _hoisted_1$3 = {
8820
8820
  key: 1,
8821
- class: "text-caption text-grey"
8821
+ class: "text-body-small text-grey"
8822
8822
  }, blockList_default = /* @__PURE__ */ ((e, y) => {
8823
8823
  let b = e.__vccOpts || e;
8824
8824
  for (let [e, x] of y) b[e] = x;
@@ -8926,7 +8926,7 @@ var clean_default = /* @__PURE__ */ defineComponent({
8926
8926
  _: 1
8927
8927
  }, 8, ["modelValue"])) : (openBlock(), createElementBlock("span", _hoisted_1$3, toDisplayString(unref(b)("x-block-lib.noOption")), 1));
8928
8928
  }
8929
- }), [["__scopeId", "data-v-14e53948"]]), blockTree_default = /* @__PURE__ */ defineComponent({
8929
+ }), [["__scopeId", "data-v-a710550b"]]), blockTree_default = /* @__PURE__ */ defineComponent({
8930
8930
  __name: "index",
8931
8931
  props: {
8932
8932
  modelValue: {
@@ -8955,7 +8955,7 @@ var clean_default = /* @__PURE__ */ defineComponent({
8955
8955
  };
8956
8956
  return (e, y) => (openBlock(), createElementBlock("div", { onClick: y[0] ||= (e) => S("") }, "blockTree"));
8957
8957
  }
8958
- }), _hoisted_1$2 = { class: "text-subtitle-1" }, navigator_default = /* @__PURE__ */ defineComponent({
8958
+ }), _hoisted_1$2 = { class: "text-body-large" }, navigator_default = /* @__PURE__ */ defineComponent({
8959
8959
  __name: "index",
8960
8960
  props: {
8961
8961
  type: {},
@@ -10352,7 +10352,7 @@ var _hoisted_1$1 = { class: "position-relative w-100 h-100" }, blockly_default =
10352
10352
  }, 8, ["color"]);
10353
10353
  };
10354
10354
  }
10355
- }), _hoisted_1 = { class: "text-subtitle-1" }, _hoisted_2 = { class: "w-100 h-100 overflow-auto" }, sourceDlg_default = /* @__PURE__ */ defineComponent({
10355
+ }), _hoisted_1 = { class: "text-body-large" }, _hoisted_2 = { class: "w-100 h-100 overflow-auto" }, sourceDlg_default = /* @__PURE__ */ defineComponent({
10356
10356
  __name: "index",
10357
10357
  setup(e) {
10358
10358
  let { t: y } = useI18n(), { sysBarAvail: b } = useSystem(), { backgroundColor0: x, backgroundColor2: S } = useColor(), C = ref(""), w = computed(() => {