x-block-lib 0.10.32 → 0.10.33

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.
@@ -1,4 +1,4 @@
1
- import { n as e } from "./rolldown-runtime.expcly8c.js";
1
+ import { n as e } from "./rolldown-runtime.n5wfka5s.js";
2
2
  //#region src/i18n/locales/en/index.ts
3
3
  var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-block-lib": {
4
4
  bind: "Bind",
@@ -1,4 +1,4 @@
1
- import { n as e } from "./rolldown-runtime.expcly8c.js";
1
+ import { n as e } from "./rolldown-runtime.n5wfka5s.js";
2
2
  //#region src/i18n/locales/zhHans/index.ts
3
3
  var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-block-lib": {
4
4
  bind: "绑定",
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
  Touched: 2021
9
9
  */
10
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-899634e5]{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 e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as ee, M as te, N as d, O as f, P as ne, Q as p, R as re, S as m, T as h, U as ie, V as ae, W as oe, X as se, Y as ce, Z as le, _ as g, a as ue, b as de, c as fe, d as pe, f as me, g as _, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as v, q as Ce, r as we, s as Te, t as Ee, u as De, v as y, w as b, x, y as Oe, z as ke } from "./vendor.kijv4sw8.js";
11
+ /*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as ee, M as te, N as d, O as f, P as ne, Q as p, R as re, S as m, T as h, U as ie, V as ae, W as oe, X as se, Y as ce, Z as le, _ as g, a as ue, b as de, c as fe, d as pe, f as me, g as _, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as v, q as Ce, r as we, s as Te, t as Ee, u as De, v as y, w as b, x, y as Oe, z as ke } from "./vendor.hv87bh8l.js";
12
12
  import { eventBus as Ae, globalObjects as je, messageWarning as Me, openConfirmDlg as Ne, openPromptDlg as Pe, useColor as Fe, useSystem as Ie, useViewStack as Le } from "x-essential-lib";
13
13
  import { globalState as S } from "x-state-lib";
14
14
  import { addIndent as Re, finalProperties as C, getElement as w, getImplementMethodName as ze, getItems as Be, getTag as Ve, getTypes as He, makeEventId as T, makeEventKeyOfCustomSlot as Ue, makeEventKeyOfElementSlot as We, makeMethodId as Ge, makeMethodKeyOfCustomSlot as Ke, makeMethodKeyOfElementSlot as qe, makePropertyId as Je, makePropertyKeyOfCustomSlot as Ye, makePropertyKeyOfElementSlot as Xe, makeTriggerId as Ze, parseNumberUnit as Qe, pkgs as $e, themeColors as et, toEventName as tt, toMethodName as nt, toPropertyName as rt, unwrapEventId as it, unwrapEventKeyOfCustomSlot as at, unwrapEventKeyOfElementSlot as ot, unwrapMethodId as st, unwrapMethodKeyOfCustomSlot as ct, unwrapMethodKeyOfElementSlot as lt, unwrapPropertyId as ut, unwrapPropertyKeyOfCustomSlot as dt, unwrapPropertyKeyOfElementSlot as ft, unwrapSlotId as pt } from "x-runtime-lib";
@@ -26,8 +26,8 @@ var Vt = (e, t, n) => {
26
26
  //#region src/core/locale/index.ts
27
27
  async function Ht(e) {
28
28
  ce((await Vt(/* @__PURE__ */ Object.assign({
29
- "./msg/en.ts": () => import("./msg-en.k1nt2k1p.js").then((e) => e.t),
30
- "./msg/zhHans.ts": () => import("./msg-zhHans.fw3xr2l3.js").then((e) => e.t)
29
+ "./msg/en.ts": () => import("./msg-en.guy8ywqy.js").then((e) => e.t),
30
+ "./msg/zhHans.ts": () => import("./msg-zhHans.fzxiy58e.js").then((e) => e.t)
31
31
  }), `./msg/${e}.ts`, 3)).default);
32
32
  }
33
33
  function F(e) {
@@ -3317,8 +3317,8 @@ ${c}${t}return __outputs__;
3317
3317
  e.name !== this.comp.name && (this.comp.name = e.name), this.setWarningText(null);
3318
3318
  }
3319
3319
  }, g.forBlock.select_comp_v1 = function(e) {
3320
- let t = g.quote_, n = e.comp.id;
3321
- return [t(n), _.ATOMIC];
3320
+ let t = g.quote_, n = e, r = n.comp.id, i = n.comp.name;
3321
+ return [`{id:${t(r)},name:${t(i)}}`, _.ATOMIC];
3322
3322
  }, y.select_slot_v1 = {
3323
3323
  init: function() {
3324
3324
  this.slot = {
@@ -3370,8 +3370,8 @@ ${c}${t}return __outputs__;
3370
3370
  e.name !== this.slot.name && (this.slot.name = e.name), this.setWarningText(null);
3371
3371
  }
3372
3372
  }, g.forBlock.select_slot_v1 = function(e) {
3373
- let t = g.quote_, n = e.slot.id;
3374
- return [t(n), _.ATOMIC];
3373
+ let t = g.quote_, n = e, r = n.slot.id, i = n.slot.name;
3374
+ return [`{id:${t(r)},name:${t(i)}}`, _.ATOMIC];
3375
3375
  }, y.get_app_property_v1 = {
3376
3376
  init: function() {
3377
3377
  this.node = {
@@ -8442,12 +8442,12 @@ var Si = /* @__PURE__ */ function(e) {
8442
8442
  }({}), Ci = class extends x.Abstract {
8443
8443
  isBlank = !0;
8444
8444
  recordUndo = !1;
8445
- type = Si.STATE_CHANGE;
8445
+ type = "state_change";
8446
8446
  constructor(e) {
8447
8447
  super(), this.workspaceId = e.id;
8448
8448
  }
8449
8449
  };
8450
- Ce.register(Ce.Type.EVENT, Si.STATE_CHANGE, Ci);
8450
+ Ce.register(Ce.Type.EVENT, "state_change", Ci);
8451
8451
  //#endregion
8452
8452
  //#region src/core/misc/index.ts
8453
8453
  function wi(e) {
@@ -8683,30 +8683,30 @@ var Ri = /* @__PURE__ */ _t({
8683
8683
  __name: "index",
8684
8684
  props: { lock: { type: Boolean } },
8685
8685
  setup(e, { expose: t }) {
8686
- let { t: n } = zt(), r = Bt(), i = e, a = Li(), o = E(() => r.smAndDown.value), s = () => {
8687
- if (!a.workspace) {
8686
+ let { t: n } = zt(), r = Bt(), i = Li(), a = E(() => r.smAndDown.value), o = () => {
8687
+ if (!i.workspace) {
8688
8688
  console.assert(!1);
8689
8689
  return;
8690
8690
  }
8691
- if (i.lock) {
8691
+ if (e.lock) {
8692
8692
  Me(n("x-block-lib.msg.cannotOperateInLockedState"));
8693
8693
  return;
8694
8694
  }
8695
- a.workspace.cleanUp();
8696
- }, c = () => {
8697
- s();
8695
+ i.workspace.cleanUp();
8696
+ }, s = () => {
8697
+ o();
8698
8698
  };
8699
- return t({ cleanWorkspace: s }), (e, t) => {
8699
+ return t({ cleanWorkspace: o }), (e, t) => {
8700
8700
  let r = M("v-btn"), i = M("v-tooltip");
8701
8701
  return j(), ht(i, {
8702
- disabled: o.value,
8702
+ disabled: a.value,
8703
8703
  text: N(n)("x-block-lib.tip.hotkeyCtrlQ")
8704
8704
  }, {
8705
8705
  activator: P(({ props: e }) => [k(r, xt(e, {
8706
8706
  density: "comfortable",
8707
8707
  icon: "mdi-broom",
8708
8708
  variant: "outlined",
8709
- onClick: c
8709
+ onClick: s
8710
8710
  }), null, 16)]),
8711
8711
  _: 1
8712
8712
  }, 8, ["disabled", "text"]);
@@ -10330,18 +10330,17 @@ var Qa = { class: "position-relative w-100 h-100" }, $a = /* @__PURE__ */ _t({
10330
10330
  __name: "index",
10331
10331
  props: { code: {} },
10332
10332
  setup(e) {
10333
- let t = e;
10334
10333
  we.registerLanguage("javascript", Ee);
10335
- let n = xe.component, { backgroundColor2: r } = Fe();
10336
- return (e, i) => {
10334
+ let t = xe.component, { backgroundColor2: n } = Fe();
10335
+ return (r, i) => {
10337
10336
  let a = M("v-sheet");
10338
10337
  return j(), ht(a, {
10339
- color: N(r),
10338
+ color: N(n),
10340
10339
  height: "100%",
10341
10340
  width: "100%"
10342
10341
  }, {
10343
- default: P(() => [k(N(n), {
10344
- code: t.code,
10342
+ default: P(() => [k(N(t), {
10343
+ code: e.code,
10345
10344
  language: "js"
10346
10345
  }, null, 8, ["code"])]),
10347
10346
  _: 1
@@ -10414,8 +10413,8 @@ var Qa = { class: "position-relative w-100 h-100" }, $a = /* @__PURE__ */ _t({
10414
10413
  //#region src/i18n/index.ts
10415
10414
  async function ao(e) {
10416
10415
  return (await Vt(/* @__PURE__ */ Object.assign({
10417
- "./locales/en/index.ts": () => import("./i18n-en.may04z0x.js").then((e) => e.t),
10418
- "./locales/zhHans/index.ts": () => import("./i18n-zhHans.co0odqoc.js").then((e) => e.t)
10416
+ "./locales/en/index.ts": () => import("./i18n-en.lcnic7w6.js").then((e) => e.t),
10417
+ "./locales/zhHans/index.ts": () => import("./i18n-zhHans.h4es2oi9.js").then((e) => e.t)
10419
10418
  }), `./locales/${e}/index.ts`, 4)).default;
10420
10419
  }
10421
10420
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as e } from "./rolldown-runtime.expcly8c.js";
1
+ import { n as e } from "./rolldown-runtime.n5wfka5s.js";
2
2
  //#region src/core/locale/msg/en.ts
3
3
  var t = /* @__PURE__ */ e({ default: () => n }), n = {
4
4
  ADD_COMMENT: "Add Comment",
@@ -1,4 +1,4 @@
1
- import { n as e } from "./rolldown-runtime.expcly8c.js";
1
+ import { n as e } from "./rolldown-runtime.n5wfka5s.js";
2
2
  //#region src/core/locale/msg/zhHans.ts
3
3
  var t = /* @__PURE__ */ e({ default: () => n }), n = {
4
4
  ADD_COMMENT: "添加注释",