x-block-lib 0.4.23 → 0.4.24

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
@@ -3,7 +3,7 @@ var xn = Object.defineProperty;
3
3
  var Pn = (e, o, t) => o in e ? xn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
4
4
  var he = (e, o, t) => Pn(e, typeof o != "symbol" ? o + "" : o, t);
5
5
  import { getCurrentScope as wn, onScopeDispose as Vn, unref as N, computed as ue, watch as He, ref as Je, getCurrentInstance as Pt, onMounted as ze, defineComponent as we, onBeforeUnmount as Nt, resolveComponent as oe, openBlock as J, createBlock as Le, withCtx as je, createVNode as ne, mergeProps as mo, useModel as co, toRefs as Un, reactive as Yn, h as Kn, onUnmounted as Fn, nextTick as go, isRef as vt, resolveDirective as Hn, withDirectives as Gn, createElementBlock as ke, normalizeStyle as Ne, createElementVNode as ve, toDisplayString as Eo, withModifiers as yt, Fragment as Zo, renderList as Xn, withKeys as $n, createCommentVNode as nt, mergeModels as Lo, useTemplateRef as jn } from "vue";
6
- import { d as g, j as a, O as c, u as m, X as Wn, B as _e, E as F, M as j, i as wt, a as De, b as V, C as en, F as vo, c as Jn, P as uo, N as yo, V as bt, e as zn, f as tn, s as qn, g as Pe, S as z, h as Jt, k as Ke, l as _t, m as zt, n as Qe, o as xe, p as ko, G as qt, q as Qn, r as Zn, t as Qt, U as pt, D as dt, v as Ve, w as ei, T as Vt, x as on, y as ti, z as oi, A as No, H as ni } from "./blockly-jce3d2r3.js";
6
+ import { d as g, j as a, O as c, u as m, X as Wn, B as _e, E as F, M as j, i as wt, a as De, b as V, C as en, F as vo, c as Jn, P as uo, N as yo, V as bt, e as zn, f as tn, s as qn, g as Pe, S as z, h as Jt, k as Ke, l as _t, m as zt, n as Qe, o as xe, p as ko, G as qt, q as Qn, r as Zn, t as Qt, U as pt, D as dt, v as Ve, w as ei, T as Vt, x as on, y as ti, z as oi, A as No, H as ni } from "./blockly-ou5p4kro.js";
7
7
  import { storeToRefs as ii } from "pinia";
8
8
  import { openConfirmDlg as ri, openPromptDlg as li, eventBus as Te, useColor as nn, useViewStack as bo, useSystem as ai, useGlobalStore as si } from "x-essential-lib";
9
9
  import { useI18n as Ut } from "vue-i18n";
@@ -7331,6 +7331,10 @@ const kl = { class: "position-relative w-100 h-100" }, Nl = /* @__PURE__ */ we({
7331
7331
  h.value = !0, No.workspaces.load(E, T);
7332
7332
  }, w = () => No.workspaces.save(T), re = () => a.workspaceToCode(T);
7333
7333
  ze(async () => {
7334
+ if (!p.value) {
7335
+ console.assert(!1);
7336
+ return;
7337
+ }
7334
7338
  await Do(i.value), T = Ll(p.value, _.type, _.version), T.addChangeListener(F.disableOrphans), T.addChangeListener(U), T.setScale(u.value), await go(), d("ready");
7335
7339
  }), Nt(() => {
7336
7340
  l.value = !1;
@@ -7375,9 +7379,12 @@ const kl = { class: "position-relative w-100 h-100" }, Nl = /* @__PURE__ */ we({
7375
7379
  }), He(l, (E) => {
7376
7380
  var B;
7377
7381
  E || (B = T.getToolbox()) == null || B.clearSelection();
7378
- }), He(u, (E) => {
7379
- T.setScale(E);
7380
- }), o({ loading: h, load: Q, save: w, generateCode: re }), (E, B) => {
7382
+ }), He(
7383
+ () => u.value,
7384
+ (E) => {
7385
+ T.setScale(E);
7386
+ }
7387
+ ), o({ loading: h, load: Q, save: w, generateCode: re }), (E, B) => {
7381
7388
  const R = oe("v-icon"), x = oe("x-loading");
7382
7389
  return J(), ke("div", kl, [
7383
7390
  ve("div", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.4.23",
4
+ "version": "0.4.24",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",