x-block-lib 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/dist/index.js +95 -94
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10,8 +10,8 @@
10
10
  var Ll = Object.defineProperty;
11
11
  var Sl = (e, t, n) => t in e ? Ll(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
12
12
  var tt = (e, t, n) => Sl(e, typeof t != "symbol" ? t + "" : t, n);
13
- import { getCurrentScope as Bl, onScopeDispose as Rl, computed as Se, toValue as Na, watch as Lt, shallowRef as Dl, getCurrentInstance as xo, onMounted as dn, defineComponent as ht, onBeforeUnmount as Oo, resolveComponent as De, createBlock as ut, openBlock as Be, unref as X, withCtx as pt, createVNode as Ne, mergeProps as Zi, useModel as Di, toRefs as Ml, ref as Mt, reactive as Pl, h as Mi, nextTick as es, onUnmounted as Ul, isRef as kn, resolveDirective as xl, withDirectives as wl, createElementBlock as Et, normalizeStyle as lt, createElementVNode as st, toDisplayString as wo, withModifiers as Ln, Fragment as ka, renderList as Vl, withKeys as La, createCommentVNode as cn, mergeModels as Ns } from "vue";
14
- import { d as C, j as r, O as p, E as w, u as k, X as Fl, M as T, B as U, i as pe, F as $, a as Wt, b as Vo, c as be, C as Sa, e as Yl, P as Pi, N as ts, V as po, g as Pt, f as Kl, h as Ba, s as Hl, S as Ye, k as _o, l as $t, m as sn, n as no, o as ui, p as On, q as ks, G as pi, r as $l, t as Gl, v as _i, U as oo, D as io, w as en, x as jl, T as Fo, y as Ra, z as Wl, A as Xl, H as Ls, I as zl, J as ql } from "./blockly-o2yt2sz2.js";
13
+ import { getCurrentScope as Bl, onScopeDispose as Rl, computed as Se, toValue as Na, watch as Lt, shallowRef as Dl, getCurrentInstance as xo, onMounted as dn, defineComponent as ht, onBeforeUnmount as Oo, resolveComponent as De, createBlock as ut, openBlock as Be, unref as X, withCtx as pt, createVNode as be, mergeProps as Zi, useModel as Di, toRefs as Ml, ref as Mt, reactive as Pl, h as Mi, nextTick as es, onUnmounted as Ul, isRef as kn, resolveDirective as xl, withDirectives as wl, createElementBlock as Et, normalizeStyle as lt, createElementVNode as st, toDisplayString as wo, withModifiers as Ln, Fragment as ka, renderList as Vl, withKeys as La, createCommentVNode as cn, mergeModels as Ns } from "vue";
14
+ import { d as C, j as r, O as p, E as w, u as k, X as Fl, M as T, B as U, i as pe, F as $, a as Wt, b as Vo, c as Ie, C as Sa, e as Yl, P as Pi, N as ts, V as po, g as Pt, f as Kl, h as Ba, s as Hl, S as Ye, k as _o, l as $t, m as sn, n as no, o as ui, p as On, q as ks, G as pi, r as $l, t as Gl, v as _i, U as oo, D as io, w as en, x as jl, T as Fo, y as Ra, z as Wl, A as Xl, H as Ls, I as zl, J as ql } from "./blockly-o2yt2sz2.js";
15
15
  import { openConfirmDlg as Jl, openPromptDlg as Ql, eventBus as ct, messageWarning as Da, useColor as Yo, useViewStack as Ko, useSystem as Ma, injectDark as Zl, injectLocale as ec } from "x-essential-lib";
16
16
  import { pkgs as tc, elements as Ke, getPropTag as Ho } from "x-runtime-lib";
17
17
  import { globalState as V } from "x-state-lib";
@@ -4983,9 +4983,9 @@ const gh = {
4983
4983
  AND: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_AND}",
4984
4984
  OR: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_OR}"
4985
4985
  };
4986
- be.register(
4986
+ Ie.register(
4987
4987
  "logic_op_tooltip_v1",
4988
- be.buildTooltipForDropdown("OP", gh)
4988
+ Ie.buildTooltipForDropdown("OP", gh)
4989
4989
  );
4990
4990
  C([
4991
4991
  {
@@ -5027,7 +5027,7 @@ const mh = {
5027
5027
  this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
5028
5028
  }
5029
5029
  };
5030
- be.register(
5030
+ Ie.register(
5031
5031
  "logic_compare_v1",
5032
5032
  function() {
5033
5033
  this.mixin(mh);
@@ -5206,7 +5206,7 @@ const Th = {
5206
5206
  n == null || n.reconnect(this, "ELSE");
5207
5207
  }
5208
5208
  };
5209
- be.registerMutator(
5209
+ Ie.registerMutator(
5210
5210
  "logic_if_v1_mutator",
5211
5211
  Th,
5212
5212
  void 0,
@@ -5369,7 +5369,7 @@ const Eh = {
5369
5369
  this.prevParentConnection_ = o;
5370
5370
  }
5371
5371
  };
5372
- be.registerMixin("logic_ternary_v1", Eh);
5372
+ Ie.registerMixin("logic_ternary_v1", Eh);
5373
5373
  C([
5374
5374
  {
5375
5375
  type: "logic_ternary_v1",
@@ -5426,13 +5426,13 @@ const Ah = {
5426
5426
  }
5427
5427
  }
5428
5428
  };
5429
- be.registerMixin(
5429
+ Ie.registerMixin(
5430
5430
  "contextMenu_newGetVariableBlock_v1",
5431
5431
  Ah
5432
5432
  );
5433
- be.register(
5433
+ Ie.register(
5434
5434
  "flow_control_tooltip_v1",
5435
- be.buildTooltipForDropdown("MODE", {
5435
+ Ie.buildTooltipForDropdown("MODE", {
5436
5436
  BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
5437
5437
  CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
5438
5438
  })
@@ -5467,7 +5467,7 @@ const vh = /* @__PURE__ */ new Set([
5467
5467
  }
5468
5468
  }
5469
5469
  };
5470
- be.registerMixin(
5470
+ Ie.registerMixin(
5471
5471
  "flow_control_in_loop_check_v1",
5472
5472
  Oh
5473
5473
  );
@@ -5492,9 +5492,9 @@ C([
5492
5492
  extensions: ["flow_control_tooltip_v1", "flow_control_in_loop_check_v1"]
5493
5493
  }
5494
5494
  ]);
5495
- be.register(
5495
+ Ie.register(
5496
5496
  "for_tooltip_v1",
5497
- be.buildTooltipWithFieldText(
5497
+ Ie.buildTooltipWithFieldText(
5498
5498
  "%{BKY_LOOP_V1_FOR_TOOLTIP}",
5499
5499
  "VAR"
5500
5500
  )
@@ -5543,9 +5543,9 @@ C([
5543
5543
  extensions: ["contextMenu_newGetVariableBlock_v1", "for_tooltip_v1"]
5544
5544
  }
5545
5545
  ]);
5546
- be.register(
5546
+ Ie.register(
5547
5547
  "for_each_tooltip_v1",
5548
- be.buildTooltipWithFieldText(
5548
+ Ie.buildTooltipWithFieldText(
5549
5549
  "%{BKY_LOOP_V1_FOR_EACH_TOOLTIP}",
5550
5550
  "VAR"
5551
5551
  )
@@ -5580,9 +5580,9 @@ C([
5580
5580
  extensions: ["contextMenu_newGetVariableBlock_v1", "for_each_tooltip_v1"]
5581
5581
  }
5582
5582
  ]);
5583
- be.register(
5583
+ Ie.register(
5584
5584
  "loop_while_until_tooltip_v1",
5585
- be.buildTooltipForDropdown("MODE", {
5585
+ Ie.buildTooltipForDropdown("MODE", {
5586
5586
  WHILE: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_WHILE}",
5587
5587
  UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
5588
5588
  })
@@ -5666,9 +5666,9 @@ const bh = {
5666
5666
  STD_DEV: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_STD_DEV}",
5667
5667
  RANDOM: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_RANDOM}"
5668
5668
  };
5669
- be.register(
5669
+ Ie.register(
5670
5670
  "math_op_tooltip_v1",
5671
- be.buildTooltipForDropdown("OP", bh)
5671
+ Ie.buildTooltipForDropdown("OP", bh)
5672
5672
  );
5673
5673
  C([
5674
5674
  {
@@ -6842,9 +6842,9 @@ const Dh = /^\s*'([^']|\\')*'\s*$/;
6842
6842
  function fo(e) {
6843
6843
  return Dh.test(e) ? [e, p.ATOMIC] : [`String(${e})`, p.FUNCTION_CALL];
6844
6844
  }
6845
- be.register(
6845
+ Ie.register(
6846
6846
  "text_append_tooltip_v1",
6847
- be.buildTooltipWithFieldText(
6847
+ Ie.buildTooltipWithFieldText(
6848
6848
  "%{BKY_TEXT_V1_APPEND_TOOLTIP}",
6849
6849
  "VAR"
6850
6850
  )
@@ -7123,7 +7123,7 @@ const Mh = k.xml, Ph = {
7123
7123
  }, Uh = function() {
7124
7124
  this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Wt.MutatorIcon(["text_join_item_v1"], this));
7125
7125
  };
7126
- be.registerMutator(
7126
+ Ie.registerMutator(
7127
7127
  "text_join_mutator_v1",
7128
7128
  Ph,
7129
7129
  Uh
@@ -7453,7 +7453,7 @@ const wh = {
7453
7453
  t.deleteVariableById(o.getId()), t.refreshToolboxSelection();
7454
7454
  };
7455
7455
  };
7456
- be.registerMixin(
7456
+ Ie.registerMixin(
7457
7457
  "context_menu_variable_v1",
7458
7458
  wh
7459
7459
  );
@@ -10079,8 +10079,7 @@ const zo = {
10079
10079
  text: X(t)("x-block-lib.tip.hotkeyCtrlQ")
10080
10080
  }, {
10081
10081
  activator: pt(({ props: c }) => [
10082
- Ne(a, Zi(c, {
10083
- class: "mr-3",
10082
+ be(a, Zi(c, {
10084
10083
  variant: "outlined",
10085
10084
  density: "comfortable",
10086
10085
  icon: X(oc),
@@ -10106,8 +10105,7 @@ const zo = {
10106
10105
  text: X(t)("x-block-lib.tip.hotkeyCtrlW")
10107
10106
  }, {
10108
10107
  activator: pt(({ props: l }) => [
10109
- Ne(s, Zi(l, {
10110
- class: "mr-3",
10108
+ be(s, Zi(l, {
10111
10109
  variant: "outlined",
10112
10110
  density: "comfortable",
10113
10111
  icon: n.value ? X(ac) : X(rc),
@@ -10361,7 +10359,7 @@ function _t() {
10361
10359
  var e = document.scrollingElement;
10362
10360
  return e || document.documentElement;
10363
10361
  }
10364
- function Ce(e, t, n, o, i) {
10362
+ function Ne(e, t, n, o, i) {
10365
10363
  if (!(!e.getBoundingClientRect && e !== window)) {
10366
10364
  var s, a, l, c, _, d, h;
10367
10365
  if (e !== window && e.parentNode && e !== _t() ? (s = e.getBoundingClientRect(), a = s.top, l = s.left, c = s.bottom, _ = s.right, d = s.height, h = s.width) : (a = 0, l = 0, c = window.innerHeight, _ = window.innerWidth, d = window.innerHeight, h = window.innerWidth), (t || n) && e !== window && (i = i || e.parentNode, !yt))
@@ -10387,8 +10385,8 @@ function Ce(e, t, n, o, i) {
10387
10385
  }
10388
10386
  }
10389
10387
  function ga(e, t, n) {
10390
- for (var o = Dt(e, !0), i = Ce(e)[t]; o; ) {
10391
- var s = Ce(o)[n], a = void 0;
10388
+ for (var o = Dt(e, !0), i = Ne(e)[t]; o; ) {
10389
+ var s = Ne(o)[n], a = void 0;
10392
10390
  if (a = i >= s, !a)
10393
10391
  return o;
10394
10392
  if (o === _t())
@@ -10492,7 +10490,7 @@ function Nr(e, t, n) {
10492
10490
  return Array.from(e.children).forEach(function(i) {
10493
10491
  var s, a, l, c;
10494
10492
  if (!(!ot(i, t.draggable, e, !1) || i.animated || i === n)) {
10495
- var _ = Ce(i);
10493
+ var _ = Ne(i);
10496
10494
  o.left = Math.min((s = o.left) !== null && s !== void 0 ? s : 1 / 0, _.left), o.top = Math.min((a = o.top) !== null && a !== void 0 ? a : 1 / 0, _.top), o.right = Math.max((l = o.right) !== null && l !== void 0 ? l : -1 / 0, _.right), o.bottom = Math.max((c = o.bottom) !== null && c !== void 0 ? c : -1 / 0, _.bottom);
10497
10495
  }
10498
10496
  }), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
@@ -10508,7 +10506,7 @@ function Bf() {
10508
10506
  if (!(M(o, "display") === "none" || o === P.ghost)) {
10509
10507
  e.push({
10510
10508
  target: o,
10511
- rect: Ce(o)
10509
+ rect: Ne(o)
10512
10510
  });
10513
10511
  var i = dt({}, e[e.length - 1].rect);
10514
10512
  if (o.thisAnimationDuration) {
@@ -10536,7 +10534,7 @@ function Bf() {
10536
10534
  }
10537
10535
  var i = !1, s = 0;
10538
10536
  e.forEach(function(a) {
10539
- var l = 0, c = a.target, _ = c.fromRect, d = Ce(c), h = c.prevFromRect, g = c.prevToRect, m = a.rect, I = _n(c, !0);
10537
+ var l = 0, c = a.target, _ = c.fromRect, d = Ne(c), h = c.prevFromRect, g = c.prevToRect, m = a.rect, I = _n(c, !0);
10540
10538
  I && (d.top -= I.f, d.left -= I.e), c.toRect = d, c.thisAnimationDuration && bi(h, d) && !bi(_, d) && // Make sure animatingRect is on line between toRect & fromRect
10541
10539
  (m.top - d.top) / (m.left - d.left) === (_.top - d.top) / (_.left - d.left) && (l = Df(m, h, g, o.options)), bi(d, _) || (c.prevFromRect = _, c.prevToRect = d, l || (l = o.options.animation), o.animate(c, m, d, l)), l && (i = !0, s = Math.max(s, l), clearTimeout(c.animationResetTimer), c.animationResetTimer = setTimeout(function() {
10542
10540
  c.animationTime = 0, c.prevFromRect = null, c.fromRect = null, c.prevToRect = null, c.thisAnimationDuration = null;
@@ -10684,7 +10682,7 @@ var A, me, K, de, Ht, mo, he, St, ln, Je, Dn, kt, ro, Ue, an = !1, Do = !1, Mo =
10684
10682
  return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
10685
10683
  }
10686
10684
  }(), Lr = function(e, t) {
10687
- var n = M(e), o = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = mn(e, 0, t), s = mn(e, 1, t), a = i && M(i), l = s && M(s), c = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + Ce(i).width, _ = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + Ce(s).width;
10685
+ var n = M(e), o = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = mn(e, 0, t), s = mn(e, 1, t), a = i && M(i), l = s && M(s), c = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + Ne(i).width, _ = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + Ne(s).width;
10688
10686
  if (n.display === "flex")
10689
10687
  return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
10690
10688
  if (n.display === "grid")
@@ -10702,7 +10700,7 @@ var A, me, K, de, Ht, mo, he, St, ln, Je, Dn, kt, ro, Ue, an = !1, Do = !1, Mo =
10702
10700
  return Mo.some(function(o) {
10703
10701
  var i = o[Qe].options.emptyInsertThreshold;
10704
10702
  if (!(!i || ls(o))) {
10705
- var s = Ce(o), a = e >= s.left - i && e <= s.right + i, l = t >= s.top - i && t <= s.bottom + i;
10703
+ var s = Ne(o), a = e >= s.left - i && e <= s.right + i, l = t >= s.top - i && t <= s.bottom + i;
10706
10704
  if (a && l)
10707
10705
  return n = o;
10708
10706
  }
@@ -10857,7 +10855,7 @@ P.prototype = /** @lends Sortable.prototype */
10857
10855
  _prepareDragStart: function(e, t, n) {
10858
10856
  var o = this, i = o.el, s = o.options, a = i.ownerDocument, l;
10859
10857
  if (n && !A && n.parentNode === i) {
10860
- var c = Ce(n);
10858
+ var c = Ne(n);
10861
10859
  if (de = i, A = n, me = A.parentNode, Ht = A.nextSibling, mo = n, ro = s.group, P.dragged = A, Yt = {
10862
10860
  target: A,
10863
10861
  clientX: (t || e).clientX,
@@ -10969,7 +10967,7 @@ P.prototype = /** @lends Sortable.prototype */
10969
10967
  },
10970
10968
  _appendGhost: function() {
10971
10969
  if (!K) {
10972
- var e = this.options.fallbackOnBody ? document.body : de, t = Ce(A, !0, co, !0, e), n = this.options;
10970
+ var e = this.options.fallbackOnBody ? document.body : de, t = Ne(A, !0, co, !0, e), n = this.options;
10973
10971
  if (co) {
10974
10972
  for (Fe = e; M(Fe, "position") === "static" && M(Fe, "transform") === "none" && Fe !== document; )
10975
10973
  Fe = Fe.parentNode;
@@ -11011,7 +11009,7 @@ P.prototype = /** @lends Sortable.prototype */
11011
11009
  target: n,
11012
11010
  completed: D,
11013
11011
  onMove: function(Xe, gt) {
11014
- return uo(de, t, A, o, Xe, Ce(Xe), e, gt);
11012
+ return uo(de, t, A, o, Xe, Ne(Xe), e, gt);
11015
11013
  },
11016
11014
  changed: j
11017
11015
  }, re));
@@ -11041,7 +11039,7 @@ P.prototype = /** @lends Sortable.prototype */
11041
11039
  if (A.contains(e.target) || n.animated && n.animatingX && n.animatingY || m._ignoreWhileAnimating === n)
11042
11040
  return D(!1);
11043
11041
  if (Do = !1, c && !a.disabled && (_ ? d || (s = me !== de) : Ue === this || (this.lastPutMode = ro.checkPull(this, c, A, e)) && l.checkPut(this, c, A, e))) {
11044
- if (g = this._getDirection(e, n) === "vertical", o = Ce(A), O("dragOverValid"), P.eventCanceled)
11042
+ if (g = this._getDirection(e, n) === "vertical", o = Ne(A), O("dragOverValid"), P.eventCanceled)
11045
11043
  return I;
11046
11044
  if (s)
11047
11045
  return me = de, G(), this._hideClone(), O("revert"), P.eventCanceled || (Ht ? de.insertBefore(A, Ht) : de.appendChild(A)), D(!0);
@@ -11049,16 +11047,16 @@ P.prototype = /** @lends Sortable.prototype */
11049
11047
  if (!ee || Hf(e, g, this) && !ee.animated) {
11050
11048
  if (ee === A)
11051
11049
  return D(!1);
11052
- if (ee && t === e.target && (n = ee), n && (i = Ce(n)), uo(de, t, A, o, n, i, e, !!n) !== !1)
11050
+ if (ee && t === e.target && (n = ee), n && (i = Ne(n)), uo(de, t, A, o, n, i, e, !!n) !== !1)
11053
11051
  return G(), ee && ee.nextSibling ? t.insertBefore(A, ee.nextSibling) : t.appendChild(A), me = t, j(), D(!0);
11054
11052
  } else if (ee && Kf(e, g, this)) {
11055
11053
  var fe = mn(t, 0, a, !0);
11056
11054
  if (fe === A)
11057
11055
  return D(!1);
11058
- if (n = fe, i = Ce(n), uo(de, t, A, o, n, i, e, !1) !== !1)
11056
+ if (n = fe, i = Ne(n), uo(de, t, A, o, n, i, e, !1) !== !1)
11059
11057
  return G(), t.insertBefore(A, fe), me = t, j(), D(!0);
11060
11058
  } else if (n.parentNode === t) {
11061
- i = Ce(n);
11059
+ i = Ne(n);
11062
11060
  var J = 0, ke, $e = A.parentNode !== t, B = !xf(A.animated && A.toRect || o, n.animated && n.toRect || i, g), F = g ? "top" : "left", ie = ga(n, "top", "top") || ga(A, "top", "top"), ge = ie ? ie.scrollTop : void 0;
11063
11061
  on !== n && (ke = i[F], Pn = !1, lo = !B && a.invertSwap || $e), J = $f(e, n, i, g, B ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, lo, on === n);
11064
11062
  var Q;
@@ -11075,7 +11073,7 @@ P.prototype = /** @lends Sortable.prototype */
11075
11073
  R = J === 1;
11076
11074
  var ae = uo(de, t, A, o, n, i, e, R);
11077
11075
  if (ae !== !1)
11078
- return (ae === 1 || ae === -1) && (R = ae === 1), Xi = !0, setTimeout(Yf, 30), G(), R && !oe ? t.appendChild(A) : n.parentNode.insertBefore(A, R ? oe : n), ie && yr(ie, 0, ge - ie.scrollTop), me = A.parentNode, ke !== void 0 && !lo && (To = Math.abs(ke - Ce(n)[F])), j(), D(!0);
11076
+ return (ae === 1 || ae === -1) && (R = ae === 1), Xi = !0, setTimeout(Yf, 30), G(), R && !oe ? t.appendChild(A) : n.parentNode.insertBefore(A, R ? oe : n), ie && yr(ie, 0, ge - ie.scrollTop), me = A.parentNode, ke !== void 0 && !lo && (To = Math.abs(ke - Ne(n)[F])), j(), D(!0);
11079
11077
  }
11080
11078
  if (t.contains(A))
11081
11079
  return D(!1);
@@ -11252,7 +11250,7 @@ function uo(e, t, n, o, i, s, a, l) {
11252
11250
  return window.CustomEvent && !yt && !jn ? c = new CustomEvent("move", {
11253
11251
  bubbles: !0,
11254
11252
  cancelable: !0
11255
- }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = o, c.related = i || t, c.relatedRect = s || Ce(t), c.willInsertAfter = l, c.originalEvent = a, e.dispatchEvent(c), d && (h = d.call(_, c, a)), h;
11253
+ }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = o, c.related = i || t, c.relatedRect = s || Ne(t), c.willInsertAfter = l, c.originalEvent = a, e.dispatchEvent(c), d && (h = d.call(_, c, a)), h;
11256
11254
  }
11257
11255
  function ki(e) {
11258
11256
  e.draggable = !1;
@@ -11261,11 +11259,11 @@ function Yf() {
11261
11259
  Xi = !1;
11262
11260
  }
11263
11261
  function Kf(e, t, n) {
11264
- var o = Ce(mn(n.el, 0, n.options, !0)), i = Nr(n.el, n.options, K), s = 10;
11262
+ var o = Ne(mn(n.el, 0, n.options, !0)), i = Nr(n.el, n.options, K), s = 10;
11265
11263
  return t ? e.clientX < i.left - s || e.clientY < o.top && e.clientX < o.right : e.clientY < i.top - s || e.clientY < o.bottom && e.clientX < o.left;
11266
11264
  }
11267
11265
  function Hf(e, t, n) {
11268
- var o = Ce(ls(n.el, n.options.draggable)), i = Nr(n.el, n.options, K), s = 10;
11266
+ var o = Ne(ls(n.el, n.options.draggable)), i = Nr(n.el, n.options, K), s = 10;
11269
11267
  return t ? e.clientX > i.right + s || e.clientY > o.bottom && e.clientX > o.left : e.clientY > i.bottom + s || e.clientX > o.right && e.clientY > o.top;
11270
11268
  }
11271
11269
  function $f(e, t, n, o, i, s, a, l) {
@@ -11340,7 +11338,7 @@ P.create = function(e, t) {
11340
11338
  return new P(e, t);
11341
11339
  };
11342
11340
  P.version = Cf;
11343
- var ye = [], Cn, qi, Ji = !1, Li, Si, Uo, Nn;
11341
+ var Ce = [], Cn, qi, Ji = !1, Li, Si, Uo, Nn;
11344
11342
  function Xf() {
11345
11343
  function e() {
11346
11344
  this.defaults = {
@@ -11366,7 +11364,7 @@ function Xf() {
11366
11364
  this.sortable.nativeDraggable ? Z(document, "dragover", this._handleAutoScroll) : (Z(document, "pointermove", this._handleFallbackAutoScroll), Z(document, "touchmove", this._handleFallbackAutoScroll), Z(document, "mousemove", this._handleFallbackAutoScroll)), va(), Ao(), Sf();
11367
11365
  },
11368
11366
  nulling: function() {
11369
- Uo = qi = Cn = Ji = Nn = Li = Si = null, ye.length = 0;
11367
+ Uo = qi = Cn = Ji = Nn = Li = Si = null, Ce.length = 0;
11370
11368
  },
11371
11369
  _handleFallbackAutoScroll: function(t) {
11372
11370
  this._handleAutoScroll(t, !0);
@@ -11394,9 +11392,9 @@ function Xf() {
11394
11392
  });
11395
11393
  }
11396
11394
  function Ao() {
11397
- ye.forEach(function(e) {
11395
+ Ce.forEach(function(e) {
11398
11396
  clearInterval(e.pid);
11399
- }), ye = [];
11397
+ }), Ce = [];
11400
11398
  }
11401
11399
  function va() {
11402
11400
  clearInterval(Nn);
@@ -11407,16 +11405,16 @@ var Bi = Ir(function(e, t, n, o) {
11407
11405
  qi !== n && (qi = n, Ao(), Cn = t.scroll, d = t.scrollFn, Cn === !0 && (Cn = Dt(n, !0)));
11408
11406
  var h = 0, g = Cn;
11409
11407
  do {
11410
- var m = g, I = Ce(m), O = I.top, G = I.bottom, D = I.left, j = I.right, ee = I.width, fe = I.height, J = void 0, ke = void 0, $e = m.scrollWidth, B = m.scrollHeight, F = M(m), ie = m.scrollLeft, ge = m.scrollTop;
11408
+ var m = g, I = Ne(m), O = I.top, G = I.bottom, D = I.left, j = I.right, ee = I.width, fe = I.height, J = void 0, ke = void 0, $e = m.scrollWidth, B = m.scrollHeight, F = M(m), ie = m.scrollLeft, ge = m.scrollTop;
11411
11409
  m === c ? (J = ee < $e && (F.overflowX === "auto" || F.overflowX === "scroll" || F.overflowX === "visible"), ke = fe < B && (F.overflowY === "auto" || F.overflowY === "scroll" || F.overflowY === "visible")) : (J = ee < $e && (F.overflowX === "auto" || F.overflowX === "scroll"), ke = fe < B && (F.overflowY === "auto" || F.overflowY === "scroll"));
11412
11410
  var Q = J && (Math.abs(j - i) <= a && ie + ee < $e) - (Math.abs(D - i) <= a && !!ie), se = ke && (Math.abs(G - s) <= a && ge + fe < B) - (Math.abs(O - s) <= a && !!ge);
11413
- if (!ye[h])
11411
+ if (!Ce[h])
11414
11412
  for (var oe = 0; oe <= h; oe++)
11415
- ye[oe] || (ye[oe] = {});
11416
- (ye[h].vx != Q || ye[h].vy != se || ye[h].el !== m) && (ye[h].el = m, ye[h].vx = Q, ye[h].vy = se, clearInterval(ye[h].pid), (Q != 0 || se != 0) && (_ = !0, ye[h].pid = setInterval((function() {
11413
+ Ce[oe] || (Ce[oe] = {});
11414
+ (Ce[h].vx != Q || Ce[h].vy != se || Ce[h].el !== m) && (Ce[h].el = m, Ce[h].vx = Q, Ce[h].vy = se, clearInterval(Ce[h].pid), (Q != 0 || se != 0) && (_ = !0, Ce[h].pid = setInterval((function() {
11417
11415
  o && this.layer === 0 && P.active._onTouchMove(Uo);
11418
- var R = ye[this.layer].vy ? ye[this.layer].vy * l : 0, ae = ye[this.layer].vx ? ye[this.layer].vx * l : 0;
11419
- typeof d == "function" && d.call(P.dragged.parentNode[Qe], ae, R, e, Uo, ye[this.layer].el) !== "continue" || yr(ye[this.layer].el, ae, R);
11416
+ var R = Ce[this.layer].vy ? Ce[this.layer].vy * l : 0, ae = Ce[this.layer].vx ? Ce[this.layer].vx * l : 0;
11417
+ typeof d == "function" && d.call(P.dragged.parentNode[Qe], ae, R, e, Uo, Ce[this.layer].el) !== "continue" || yr(Ce[this.layer].el, ae, R);
11420
11418
  }).bind({
11421
11419
  layer: h
11422
11420
  }), 24))), h++;
@@ -11744,8 +11742,8 @@ const Qi = [
11744
11742
  onMouseout: h[3] || (h[3] = (O) => l.value = !1)
11745
11743
  }, [
11746
11744
  st("span", ng, wo(s.title), 1),
11747
- Ne(g),
11748
- Ne(m, {
11745
+ be(g),
11746
+ be(m, {
11749
11747
  class: "x-handle cursor-move mr-3",
11750
11748
  icon: X(sc),
11751
11749
  onMousedown: h[0] || (h[0] = Ln(() => {
@@ -11869,7 +11867,7 @@ const Qi = [
11869
11867
  function lg(e, t) {
11870
11868
  return Be(), Et("div", null, "blockTree");
11871
11869
  }
11872
- const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitle-1 ml-3" }, pg = /* @__PURE__ */ ht({
11870
+ const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitle-1" }, pg = /* @__PURE__ */ ht({
11873
11871
  __name: "index",
11874
11872
  props: {
11875
11873
  type: {},
@@ -11894,9 +11892,9 @@ const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitl
11894
11892
  height: "60px"
11895
11893
  })), { open: _ } = Ko("blocklyNavigatorDlg");
11896
11894
  return (d, h) => {
11897
- const g = De("v-sheet"), m = De("v-icon"), I = De("v-dialog"), O = De("v-btn"), G = De("v-tooltip");
11895
+ const g = De("v-sheet"), m = De("v-btn"), I = De("v-spacer"), O = De("v-dialog"), G = De("v-tooltip");
11898
11896
  return Be(), Et(ka, null, [
11899
- Ne(I, {
11897
+ be(O, {
11900
11898
  modelValue: X(_),
11901
11899
  "onUpdate:modelValue": h[3] || (h[3] = (D) => kn(_) ? _.value = D : null),
11902
11900
  transition: "scroll-x-reverse-transition",
@@ -11921,17 +11919,20 @@ const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitl
11921
11919
  color: "transparent",
11922
11920
  height: 24
11923
11921
  })) : cn("", !0),
11924
- Ne(g, {
11925
- class: "d-flex align-center px-3",
11922
+ be(g, {
11923
+ class: "d-flex align-center px-2",
11926
11924
  color: "transparent",
11927
11925
  height: 48
11928
11926
  }, {
11929
11927
  default: pt(() => [
11930
- Ne(m, {
11928
+ be(m, {
11929
+ variant: "text",
11930
+ density: "comfortable",
11931
11931
  icon: X(Pa),
11932
11932
  onClick: h[0] || (h[0] = (D) => _.value = !1)
11933
11933
  }, null, 8, ["icon"]),
11934
- st("span", ug, wo(X(t)("x-block-lib.navigator")), 1)
11934
+ st("span", ug, wo(X(t)("x-block-lib.navigator")), 1),
11935
+ be(I)
11935
11936
  ]),
11936
11937
  _: 1
11937
11938
  }),
@@ -11952,11 +11953,11 @@ const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitl
11952
11953
  ]),
11953
11954
  _: 1
11954
11955
  }, 8, ["modelValue"]),
11955
- Ne(G, {
11956
+ be(G, {
11956
11957
  text: X(t)("x-block-lib.tip.hotkeyCtrlE")
11957
11958
  }, {
11958
11959
  activator: pt(({ props: D }) => [
11959
- Ne(O, Zi(D, {
11960
+ be(m, Zi(D, {
11960
11961
  variant: "outlined",
11961
11962
  density: "comfortable",
11962
11963
  icon: X(lc),
@@ -12165,21 +12166,21 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
12165
12166
  class: "d-flex flex-column justify-center align-center",
12166
12167
  style: lt(I.value)
12167
12168
  }, [
12168
- Ne(Me, {
12169
+ be(Me, {
12169
12170
  size: "x-large",
12170
12171
  icon: X(ic)
12171
12172
  }, null, 8, ["icon"])
12172
12173
  ], 4)) : cn("", !0),
12173
12174
  st("div", {
12174
- class: "d-flex align-end pt-3 pr-3",
12175
+ class: "d-flex align-end ga-3 pt-3 pr-3",
12175
12176
  style: lt(O.value)
12176
12177
  }, [
12177
- Ne(lf, { lock: s.value }, null, 8, ["lock"]),
12178
- Ne(cf, {
12178
+ be(lf, { lock: s.value }, null, 8, ["lock"]),
12179
+ be(cf, {
12179
12180
  modelValue: s.value,
12180
12181
  "onUpdate:modelValue": ae[0] || (ae[0] = (Xe) => s.value = Xe)
12181
12182
  }, null, 8, ["modelValue"]),
12182
- Ne(pg, {
12183
+ be(pg, {
12183
12184
  type: m.value,
12184
12185
  lock: s.value
12185
12186
  }, null, 8, ["type", "lock"])
@@ -12192,7 +12193,7 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
12192
12193
  key: 2,
12193
12194
  style: lt(G.value)
12194
12195
  }, null, 4)) : cn("", !0),
12195
- Ne(re, {
12196
+ be(re, {
12196
12197
  open: h.value,
12197
12198
  "z-index": 99
12198
12199
  }, null, 8, ["open"])
@@ -12752,8 +12753,8 @@ function Tg() {
12752
12753
  const x = this.matcherRe.exec(y);
12753
12754
  if (!x)
12754
12755
  return null;
12755
- const Re = x.findIndex((vn, ii) => ii > 0 && vn !== void 0), Ie = this.matchIndexes[Re];
12756
- return x.splice(0, Re), Object.assign(x, Ie);
12756
+ const Re = x.findIndex((vn, ii) => ii > 0 && vn !== void 0), ye = this.matchIndexes[Re];
12757
+ return x.splice(0, Re), Object.assign(x, ye);
12757
12758
  }
12758
12759
  }
12759
12760
  class Y {
@@ -12764,7 +12765,7 @@ function Tg() {
12764
12765
  getMatcher(y) {
12765
12766
  if (this.multiRegexes[y]) return this.multiRegexes[y];
12766
12767
  const x = new v();
12767
- return this.rules.slice(y).forEach(([Re, Ie]) => x.addRule(Re, Ie)), x.compile(), this.multiRegexes[y] = x, x;
12768
+ return this.rules.slice(y).forEach(([Re, ye]) => x.addRule(Re, ye)), x.compile(), this.multiRegexes[y] = x, x;
12768
12769
  }
12769
12770
  resumingScanAtSamePosition() {
12770
12771
  return this.regexIndex !== 0;
@@ -12782,8 +12783,8 @@ function Tg() {
12782
12783
  x.lastIndex = this.lastIndex;
12783
12784
  let Re = x.exec(y);
12784
12785
  if (this.resumingScanAtSamePosition() && !(Re && Re.index === this.lastIndex)) {
12785
- const Ie = this.getMatcher(0);
12786
- Ie.lastIndex = this.lastIndex + 1, Re = Ie.exec(y);
12786
+ const ye = this.getMatcher(0);
12787
+ ye.lastIndex = this.lastIndex + 1, Re = ye.exec(y);
12787
12788
  }
12788
12789
  return Re && (this.regexIndex += Re.position + 1, this.regexIndex === this.count && this.considerAll()), Re;
12789
12790
  }
@@ -12805,24 +12806,24 @@ function Tg() {
12805
12806
  zr,
12806
12807
  sl,
12807
12808
  Jr
12808
- ].forEach((Ie) => Ie(N, y)), u.compilerExtensions.forEach((Ie) => Ie(N, y)), N.__beforeBegin = null, [
12809
+ ].forEach((ye) => ye(N, y)), u.compilerExtensions.forEach((ye) => ye(N, y)), N.__beforeBegin = null, [
12809
12810
  Wr,
12810
12811
  // do this later so compiler extensions that come earlier have access to the
12811
12812
  // raw array if they wanted to perhaps manipulate it, etc.
12812
12813
  Xr,
12813
12814
  // default to 1 relevance if not specified
12814
12815
  qr
12815
- ].forEach((Ie) => Ie(N, y)), N.isCompiled = !0;
12816
+ ].forEach((ye) => ye(N, y)), N.isCompiled = !0;
12816
12817
  let Re = null;
12817
12818
  return typeof N.keywords == "object" && N.keywords.$pattern && (N.keywords = Object.assign({}, N.keywords), Re = N.keywords.$pattern, delete N.keywords.$pattern), Re = Re || /\w+/, N.keywords && (N.keywords = ps(N.keywords, u.case_insensitive)), x.keywordPatternRe = f(Re, !0), y && (N.begin || (N.begin = /\B|\b/), x.beginRe = f(x.begin), !N.end && !N.endsWithParent && (N.end = /\B|\b/), N.end && (x.endRe = f(x.end)), x.terminatorEnd = h(x.end) || "", N.endsWithParent && y.terminatorEnd && (x.terminatorEnd += (N.end ? "|" : "") + y.terminatorEnd)), N.illegal && (x.illegalRe = f(
12818
12819
  /** @type {RegExp | string} */
12819
12820
  N.illegal
12820
- )), N.contains || (N.contains = []), N.contains = [].concat(...N.contains.map(function(Ie) {
12821
- return rl(Ie === "self" ? N : Ie);
12822
- })), N.contains.forEach(function(Ie) {
12821
+ )), N.contains || (N.contains = []), N.contains = [].concat(...N.contains.map(function(ye) {
12822
+ return rl(ye === "self" ? N : ye);
12823
+ })), N.contains.forEach(function(ye) {
12823
12824
  ve(
12824
12825
  /** @type Mode */
12825
- Ie,
12826
+ ye,
12826
12827
  x
12827
12828
  );
12828
12829
  }), N.starts && ve(N.starts, y), x.matcher = Ae(x), x;
@@ -12877,7 +12878,7 @@ function Tg() {
12877
12878
  }
12878
12879
  return S.split(/\s+/).find((le) => x(le) || Ct(le));
12879
12880
  }
12880
- function Ie(E, S, z) {
12881
+ function ye(E, S, z) {
12881
12882
  let le = "", Le = "";
12882
12883
  typeof S == "object" ? (le = E, z = S.ignoreIllegals, Le = S.language) : (Qt("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Qt("10.7.0", `Please use highlight(code, options) instead.
12883
12884
  https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z === void 0 && (z = !0);
@@ -13133,7 +13134,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
13133
13134
  E.innerHTML
13134
13135
  );
13135
13136
  S = E;
13136
- const le = S.textContent, Le = z ? Ie(le, { language: z, ignoreIllegals: !0 }) : si(le);
13137
+ const le = S.textContent, Le = z ? ye(le, { language: z, ignoreIllegals: !0 }) : si(le);
13137
13138
  E.innerHTML = Le.value, E.dataset.highlighted = "yes", pl(E, z, Le.language), E.result = {
13138
13139
  language: Le.language,
13139
13140
  // TODO: remove with version 11.0
@@ -13225,7 +13226,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
13225
13226
  return Qt("10.7.0", "highlightBlock will be removed entirely in v12.0"), Qt("10.7.0", "Please use highlightElement now."), ai(E);
13226
13227
  }
13227
13228
  Object.assign(u, {
13228
- highlight: Ie,
13229
+ highlight: ye,
13229
13230
  highlightAuto: si,
13230
13231
  highlightAll: Jn,
13231
13232
  highlightElement: ai,
@@ -13959,7 +13960,7 @@ const Ng = /* @__PURE__ */ ht({
13959
13960
  height: "100%"
13960
13961
  }, {
13961
13962
  default: pt(() => [
13962
- Ne(X(n), {
13963
+ be(X(n), {
13963
13964
  language: "js",
13964
13965
  code: t.code
13965
13966
  }, null, 8, ["code"])
@@ -13986,14 +13987,14 @@ const Ng = /* @__PURE__ */ ht({
13986
13987
  return Be(), ut(I, {
13987
13988
  modelValue: X(c),
13988
13989
  "onUpdate:modelValue": d[1] || (d[1] = (O) => kn(c) ? c.value = O : null),
13989
- transition: "fade-transition",
13990
+ transition: "dialog-bottom-transition",
13990
13991
  persistent: "",
13991
13992
  "no-click-animation": "",
13992
13993
  fullscreen: "",
13993
13994
  onKeydown: d[2] || (d[2] = La(Ln((O) => c.value = !1, ["stop", "prevent"]), ["esc"]))
13994
13995
  }, {
13995
13996
  default: pt(() => [
13996
- Ne(h, {
13997
+ be(h, {
13997
13998
  color: X(o),
13998
13999
  width: "100%",
13999
14000
  height: "100%"
@@ -14004,25 +14005,25 @@ const Ng = /* @__PURE__ */ ht({
14004
14005
  color: X(i),
14005
14006
  height: 24
14006
14007
  }, null, 8, ["color"])) : cn("", !0),
14007
- Ne(h, {
14008
+ be(h, {
14008
14009
  class: "d-flex align-center px-3",
14009
14010
  color: X(i),
14010
14011
  height: 48
14011
14012
  }, {
14012
14013
  default: pt(() => [
14013
- Ne(g, {
14014
+ be(g, {
14014
14015
  icon: X(Pa),
14015
14016
  onClick: d[0] || (d[0] = (O) => c.value = !1)
14016
14017
  }, null, 8, ["icon"]),
14017
14018
  st("span", kg, wo(X(t)("x-block-lib.dlg.source.title")), 1),
14018
- Ne(m)
14019
+ be(m)
14019
14020
  ]),
14020
14021
  _: 1
14021
14022
  }, 8, ["color"]),
14022
14023
  st("div", {
14023
14024
  style: lt(a.value)
14024
14025
  }, [
14025
- Ne(Ng, { code: s.value }, null, 8, ["code"])
14026
+ be(Ng, { code: s.value }, null, 8, ["code"])
14026
14027
  ], 4)
14027
14028
  ]),
14028
14029
  _: 1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "vue": "^3.5.13",
32
32
  "vue-draggable-plus": "^0.6.0",
33
33
  "vuetify": "^3.7.13",
34
- "x-essential-lib": "^0.8.0",
34
+ "x-essential-lib": "^0.8.2",
35
35
  "x-runtime-lib": "^0.6.0",
36
36
  "x-state-lib": "^0.2.0"
37
37
  },