x-block-lib 0.6.32 → 0.6.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.
@@ -13,9 +13,7 @@ type __VLS_PublicProps = __VLS_Props & {
13
13
  declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
14
14
  loading: import("vue").Ref<boolean, boolean>;
15
15
  load: (state: any) => void;
16
- save: () => {
17
- [key: string]: any;
18
- } | undefined;
16
+ save: () => any;
19
17
  generateCode: () => string;
20
18
  fireStateChange: () => void;
21
19
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
package/dist/index.js CHANGED
@@ -12021,7 +12021,9 @@ function oT(e, t) {
12021
12021
  o(i[l], c.getInput("ENTRY" + l).connection);
12022
12022
  } else a === "json_string_v1" || a === "json_number_v1" ? c.setFieldValue(i, "VALUE") : a === "json_boolean_v1" && c.setFieldValue(i ? "true" : "false", "VALUE");
12023
12023
  };
12024
- o(e, n.getInput("JSON").connection), M.fire(new (M.get(M.FINISHED_LOADING))(t));
12024
+ o(e, n.getInput("JSON").connection), M.fire(
12025
+ new (M.get(M.FINISHED_LOADING))(t)
12026
+ );
12025
12027
  }
12026
12028
  function iT(e) {
12027
12029
  const t = (o) => {
@@ -12029,13 +12031,18 @@ function iT(e) {
12029
12031
  return null;
12030
12032
  if (o.type === "json_root_v1")
12031
12033
  return t(o.getInputTargetBlock("JSON"));
12032
- if (o.type === "json_map_v1")
12033
- for (let i = 0; i < o.length; i++)
12034
- o.getFieldValue("KEY" + i), t(o.getInputTargetBlock("ENTRY" + i));
12035
- else if (o.type === "json_array_v1") {
12034
+ if (o.type === "json_map_v1") {
12035
+ const i = {};
12036
+ for (let s = 0; s < o.length; s++) {
12037
+ const a = o.getFieldValue("KEY" + s);
12038
+ i[a] = t(o.getInputTargetBlock("ENTRY" + s));
12039
+ }
12040
+ return i;
12041
+ } else if (o.type === "json_array_v1") {
12036
12042
  const i = [];
12037
12043
  for (let s = 0; s < o.length; s++)
12038
12044
  i.push(t(o.getInputTargetBlock("ENTRY" + s)));
12045
+ return i;
12039
12046
  } else {
12040
12047
  if (o.type === "json_string_v1")
12041
12048
  return o.getFieldValue("VALUE");
@@ -12137,12 +12144,7 @@ const sT = { class: "position-relative w-100 h-100" }, aT = /* @__PURE__ */ at({
12137
12144
  }
12138
12145
  const j = (D) => {
12139
12146
  l.value = !0, e.type === "json" ? oT(D, c) : Fs.workspaces.load(D, c);
12140
- }, Q = () => {
12141
- if (e.type === "json")
12142
- iT(c);
12143
- else
12144
- return Fs.workspaces.save(c);
12145
- }, ne = () => r.workspaceToCode(c), he = () => {
12147
+ }, Q = () => e.type === "json" ? iT(c) : Fs.workspaces.save(c), ne = () => r.workspaceToCode(c), he = () => {
12146
12148
  c.options.readOnly = o.value, c.options.readOnly && (v.value = !1);
12147
12149
  }, J = () => {
12148
12150
  c.setScale(i.value);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.6.32",
4
+ "version": "0.6.33",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",