x-block-lib 0.10.18 → 0.10.19

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,5 +1,2 @@
1
1
  import * as Blockly from 'blockly/core';
2
- import { ZProperty } from 'x-runtime-lib';
3
- export declare function blockOfListCreateV1(): Element;
4
- export declare function spawnPropertyBlockV1(workspace: Blockly.Workspace, property: ZProperty): Blockly.Block | null;
5
2
  export declare function spawnColumnBlockV1(workspace: Blockly.Workspace, type: string): Blockly.Block | null;
package/dist/index.js CHANGED
@@ -34,14 +34,32 @@ function P(e) {
34
34
  return ve[e] ?? e;
35
35
  }
36
36
  //#endregion
37
- //#region src/core/utils/common/misc.ts
38
- var Gt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Kt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
37
+ //#region src/core/utils/common/block.ts
38
+ function Gt(e) {
39
+ let t = `<block type="text_v1"><field name="TEXT">${e}</field></block>`;
40
+ return p.xml.textToDom(t);
41
+ }
42
+ function Kt(e) {
43
+ let t = `<block type="math_number_v1"><field name="NUM">${e}</field></block>`;
44
+ return p.xml.textToDom(t);
45
+ }
39
46
  function qt(e) {
47
+ let t = `<block type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></block>`;
48
+ return p.xml.textToDom(t);
49
+ }
50
+ function Jt(e, t) {
51
+ let n = null;
52
+ return t === "string" ? n = Gt("") : t === "integer" || t === "decimal" ? n = Kt(0) : t === "boolean" ? n = qt(!1) : t === "enum" || t === "dateTime" ? n = Gt("") : console.assert(!1, "type not implementd"), n ? re.domToBlock(n, e) : null;
53
+ }
54
+ //#endregion
55
+ //#region src/core/utils/common/misc.ts
56
+ var Yt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Xt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
57
+ function Zt(e) {
40
58
  let t = e.lastIndexOf("V");
41
59
  if (t <= 0 || t >= e.length - 1) throw Error("must has V");
42
60
  return `${pe(e.substring(0, t))}_${"v" + e.substring(t + 1)}`;
43
61
  }
44
- function Jt(e) {
62
+ function Qt(e) {
45
63
  let t = e.lastIndexOf("V");
46
64
  if (t <= 0 || t >= e.length - 1) return console.assert(!1, `invalid key=${e}`), "";
47
65
  let n = e.substring(0, t - 1);
@@ -50,15 +68,15 @@ function Jt(e) {
50
68
  function F(e) {
51
69
  return e.length <= 0 && e.push([P("NO_OPTION"), ""]), e;
52
70
  }
53
- function Yt(e) {
71
+ function $t(e) {
54
72
  let t = 0;
55
73
  for (; e;) t++, e = e.getParent();
56
74
  return t;
57
75
  }
58
- function Xt(e) {
76
+ function en(e) {
59
77
  return e.ui === "strInput" ? "string" : e.ui === "numInput" ? "number" : e.ui === "switch" ? "boolean" : "string";
60
78
  }
61
- function Zt(e, t) {
79
+ function tn(e, t) {
62
80
  return !!(e.startsWith("basic.") || !t.ui || t.readonly);
63
81
  }
64
82
  function I(e) {
@@ -76,39 +94,21 @@ function z(e) {
76
94
  function B(e) {
77
95
  return e.startsWith("multiple_slot_v");
78
96
  }
79
- function Qt(e, t, n) {
97
+ function nn(e, t, n) {
80
98
  let { kind: r, mainKey: i, slotKey: a } = ot(e);
81
99
  return !(r !== "elementSlot" && r !== "multipleElementSlot" || t !== i || n !== a);
82
100
  }
83
- function $t(e, t, n) {
101
+ function rn(e, t, n) {
84
102
  let { kind: r, mainKey: i, slotKey: a } = ot(e);
85
103
  return !(r !== "customSlot" && r !== "multipleCustomSlot" || t !== i || n !== a);
86
104
  }
87
105
  //#endregion
88
- //#region src/core/utils/common/block.ts
89
- function en(e) {
90
- let t = `<block type="text_v1"><field name="TEXT">${e}</field></block>`;
91
- return p.xml.textToDom(t);
92
- }
93
- function tn(e) {
94
- let t = `<block type="math_number_v1"><field name="NUM">${e}</field></block>`;
95
- return p.xml.textToDom(t);
96
- }
97
- function nn(e) {
98
- let t = `<block type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></block>`;
99
- return p.xml.textToDom(t);
100
- }
101
- function rn(e, t) {
102
- let n = null;
103
- return t === "string" ? n = en("") : t === "integer" || t === "decimal" ? n = tn(0) : t === "boolean" ? n = nn(!1) : t === "enum" || t === "dateTime" ? n = en("") : console.assert(!1), n ? re.domToBlock(n, e) : null;
104
- }
105
- //#endregion
106
106
  //#region src/core/utils/common/check.ts
107
107
  function an(e) {
108
108
  return e === "string" ? "String" : e === "number" ? "Number" : e === "boolean" ? "Boolean" : e === "array" ? "Array" : e === "object" ? "Object" : (e === "any" || console.assert(!1), null);
109
109
  }
110
110
  function on(e) {
111
- return e.array ? "Array" : e.ui === "dummy" ? null : e.ui === "strInput" ? "String" : e.ui === "numInput" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ? Jt(e.items) : e.ui === "multiTypes" ? Jt(e.types) : e.ui === "selectComp" ? "Comp" : e.ui === "selectSlot" ? "Slot" : e.ui === "selectAdaptSlot" ? "AdaptSlot" : e.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
111
+ return e.array ? "Array" : e.ui === "dummy" ? null : e.ui === "strInput" ? "String" : e.ui === "numInput" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ? Qt(e.items) : e.ui === "multiTypes" ? Qt(e.types) : e.ui === "selectComp" ? "Comp" : e.ui === "selectSlot" ? "Slot" : e.ui === "selectAdaptSlot" ? "AdaptSlot" : e.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
112
112
  }
113
113
  function sn(e) {
114
114
  return e === "string" ? "String" : e === "integer" || e === "decimal" ? "Number" : e === "boolean" ? "Boolean" : e === "enum" || e === "dateTime" ? "String" : (console.assert(!1), null);
@@ -164,11 +164,11 @@ function mn() {
164
164
  return p.xml.textToDom("<shadow type=\"object_create_v1\"></shadow>");
165
165
  }
166
166
  function hn(e) {
167
- let t = `<shadow type="${qt(e)}"></shadow>`;
167
+ let t = `<shadow type="${Zt(e)}"></shadow>`;
168
168
  return p.xml.textToDom(t);
169
169
  }
170
170
  function gn(e) {
171
- let t = `<shadow type="${qt(e)}"></shadow>`;
171
+ let t = `<shadow type="${Zt(e)}"></shadow>`;
172
172
  return p.xml.textToDom(t);
173
173
  }
174
174
  function _n() {
@@ -186,11 +186,11 @@ function bn() {
186
186
  }
187
187
  function H(e) {
188
188
  let t = null;
189
- return e === "string" ? t = un("") : e === "number" ? t = dn(0) : e === "boolean" ? t = fn(!1) : e === "array" ? t = pn() : e === "object" ? t = mn() : e === "any" ? t = null : console.assert(!1), t;
189
+ return e === "string" ? t = un("") : e === "number" ? t = dn(0) : e === "boolean" ? t = fn(!1) : e === "array" ? t = pn() : e === "object" ? t = mn() : e === "any" ? t = null : console.assert(!1, "type not implementd"), t;
190
190
  }
191
191
  function xn(e) {
192
192
  let t = null;
193
- return e.array ? t = pn() : e.ui === "dummy" ? t = null : e.ui === "strInput" ? t = un(e.default) : e.ui === "numInput" ? t = dn(e.default) : e.ui === "switch" ? t = fn(e.default) : e.ui === "select" ? t = hn(e.items) : e.ui === "multiTypes" ? t = gn(e.types) : e.ui === "selectComp" ? t = _n() : e.ui === "selectSlot" ? t = vn() : e.ui === "colorPicker" ? t = yn(e.default ?? "#ff0000") : console.assert(!1), t;
193
+ return e.array ? t = pn() : e.ui === "temp" ? t = H(e.type) : e.ui === "dummy" ? t = null : e.ui === "strInput" ? t = un(e.default) : e.ui === "numInput" ? t = dn(e.default) : e.ui === "switch" ? t = fn(e.default) : e.ui === "select" ? t = hn(e.items) : e.ui === "multiTypes" ? t = gn(e.types) : e.ui === "selectComp" ? t = _n() : e.ui === "selectSlot" ? t = vn() : e.ui === "colorPicker" ? t = yn(e.default ?? "#ff0000") : console.assert(!1, "property ui not implementd"), t;
194
194
  }
195
195
  //#endregion
196
196
  //#region src/core/utils/app/argument.ts
@@ -277,7 +277,7 @@ y.get_page_argument_v1 = {
277
277
  //#endregion
278
278
  //#region src/core/blocks/app/define/items/v1/index.ts
279
279
  var Tn = (e, t) => {
280
- let n = qt(e), r = Jt(e);
280
+ let n = Zt(e), r = Qt(e);
281
281
  y[n] = {
282
282
  init: function() {
283
283
  this.appendDummyInput().appendField(new b(() => this.genOpts_()), "ITEM"), this.setOutput(!0, r), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
@@ -299,7 +299,7 @@ for (let e in Ke) {
299
299
  //#endregion
300
300
  //#region src/core/blocks/app/define/types/v1/index.ts
301
301
  var En = ye(), Dn = (e, t) => {
302
- let n = qt(e), i = Jt(e);
302
+ let n = Zt(e), i = Qt(e);
303
303
  y[n] = {
304
304
  init: function() {
305
305
  this.value = t[0].default, this.appendDummyInput("DUMMY").appendField(new b(() => this.genOpts_()), "TYPE"), this.setOutput(!0, i), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl(""), this.updateShape_();
@@ -409,7 +409,7 @@ function jn(e, t, n, r, i) {
409
409
  let { activeObject: a, activePage: o, activeComp: s, depends: c } = S.app;
410
410
  if (e.events && e.events.length > 0) return !1;
411
411
  if (C[e.key] && C[e.key][t]) {
412
- for (let { keys: n, raw: r } of C[e.key][t]) if (!Zt(n, r)) return !1;
412
+ for (let { keys: n, raw: r } of C[e.key][t]) if (!tn(n, r)) return !1;
413
413
  }
414
414
  if (L(e.key) && r) {
415
415
  let e = c[r];
@@ -581,7 +581,7 @@ function In(e, t, n, r, i) {
581
581
  function Ln(e, t, n, r, i) {
582
582
  let { activeObject: a, activeComp: o, depends: s } = S.app;
583
583
  if (C[e.key] && C[e.key][t]) {
584
- for (let { keys: n, raw: r } of C[e.key][t]) if (!Zt(n, r)) return !1;
584
+ for (let { keys: n, raw: r } of C[e.key][t]) if (!tn(n, r)) return !1;
585
585
  }
586
586
  if (L(e.key) && r) {
587
587
  let e = s[r];
@@ -806,11 +806,11 @@ function Xn(e) {
806
806
  names: [n],
807
807
  params: r
808
808
  });
809
- if (C[c.key] && C[c.key][o]) for (let { keys: t, names: n, raw: r } of C[c.key][o]) Zt(t, r) || a.push({
809
+ if (C[c.key] && C[c.key][o]) for (let { keys: t, names: n, raw: r } of C[c.key][o]) tn(t, r) || a.push({
810
810
  id: T("elementPropertyChangeEvent", e, t),
811
811
  kind: "elementPropertyChangeEvent",
812
812
  names: n,
813
- params: K(Xt(r))
813
+ params: K(en(r))
814
814
  });
815
815
  if (L(c.key) && s.comp) {
816
816
  let t = i[s.comp];
@@ -991,7 +991,7 @@ function Zn(e) {
991
991
  id: e,
992
992
  kind: o,
993
993
  names: t.names,
994
- params: K(Xt(t.raw))
994
+ params: K(en(t.raw))
995
995
  };
996
996
  }
997
997
  } else if (o === "refEvent") {
@@ -1133,7 +1133,7 @@ function Zn(e) {
1133
1133
  } else if (o === "elementAdaptSlotEvent") {
1134
1134
  if (I(u.key) && t.type === "comp" && l.adaptSlot) {
1135
1135
  let { elementKey: t, slotKey: n, eventKey: r } = $e(c);
1136
- if (Qt(l.adaptSlot, t, n)) {
1136
+ if (nn(l.adaptSlot, t, n)) {
1137
1137
  let i = w(t);
1138
1138
  if (i && i.slots) {
1139
1139
  let t = i.slots.find((e) => e.key === n);
@@ -1156,7 +1156,7 @@ function Zn(e) {
1156
1156
  } else if (o === "elementAdaptSlotPropertyChangeEvent") {
1157
1157
  if (I(u.key) && t.type === "comp" && l.adaptSlot) {
1158
1158
  let { elementKey: t, slotKey: n, propertyKey: r } = at(c);
1159
- if (Qt(l.adaptSlot, t, n)) {
1159
+ if (nn(l.adaptSlot, t, n)) {
1160
1160
  let i = w(t);
1161
1161
  if (i && i.slots) {
1162
1162
  let t = i.slots.find((e) => e.key === n);
@@ -1179,7 +1179,7 @@ function Zn(e) {
1179
1179
  } else if (o === "customAdaptSlotEvent") {
1180
1180
  if (I(u.key) && t.type === "comp" && l.adaptSlot) {
1181
1181
  let { compId: t, slotId: n, eventId: r } = Qe(c);
1182
- if ($t(l.adaptSlot, t, n)) {
1182
+ if (rn(l.adaptSlot, t, n)) {
1183
1183
  let a = i[t];
1184
1184
  if (a && a.meta.slots) {
1185
1185
  let t = a.meta.slots.find((e) => e.id === n);
@@ -1202,7 +1202,7 @@ function Zn(e) {
1202
1202
  } else if (o === "customAdaptSlotPropertyChangeEvent") {
1203
1203
  if (I(u.key) && t.type === "comp" && l.adaptSlot) {
1204
1204
  let { compId: t, slotId: n, propertyId: r } = it(c);
1205
- if ($t(l.adaptSlot, t, n)) {
1205
+ if (rn(l.adaptSlot, t, n)) {
1206
1206
  let a = i[t];
1207
1207
  if (a && a.meta.slots) {
1208
1208
  let t = a.meta.slots.find((e) => e.id === n);
@@ -1533,7 +1533,7 @@ function ir(e) {
1533
1533
  } else if (i === "elementAdaptSlotMethod") {
1534
1534
  if (I(c.key) && t.type === "comp" && s.adaptSlot) {
1535
1535
  let { elementKey: t, slotKey: n, methodKey: r } = nt(o);
1536
- if (Qt(s.adaptSlot, t, n)) {
1536
+ if (nn(s.adaptSlot, t, n)) {
1537
1537
  let a = w(t);
1538
1538
  if (a && a.slots) {
1539
1539
  let t = a.slots.find((e) => e.key === n);
@@ -1556,7 +1556,7 @@ function ir(e) {
1556
1556
  }
1557
1557
  } else if (i === "customAdaptSlotMethod" && I(c.key) && t.type === "comp" && s.adaptSlot) {
1558
1558
  let { compId: t, slotId: n, methodId: a } = tt(o);
1559
- if ($t(s.adaptSlot, t, n)) {
1559
+ if (rn(s.adaptSlot, t, n)) {
1560
1560
  let o = r[t];
1561
1561
  if (o && o.meta.slots) {
1562
1562
  let t = o.meta.slots.find((e) => e.id === n);
@@ -1748,7 +1748,7 @@ function gr(e, t) {
1748
1748
  if (!s) return a;
1749
1749
  let c = w(s.key);
1750
1750
  if (!c) return console.assert(!1, "invalid element", s.key), a;
1751
- if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" && Zt(n, i) || a.push({
1751
+ if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" && tn(n, i) || a.push({
1752
1752
  id: Be("elementProperty", e, n),
1753
1753
  kind: "elementProperty",
1754
1754
  names: r,
@@ -1928,7 +1928,7 @@ function _r(e) {
1928
1928
  } else if (a === "elementAdaptSlotProperty") {
1929
1929
  if (I(l.key) && t.type === "comp" && c.adaptSlot) {
1930
1930
  let { elementKey: t, slotKey: n, propertyKey: r } = at(s);
1931
- if (Qt(c.adaptSlot, t, n)) {
1931
+ if (nn(c.adaptSlot, t, n)) {
1932
1932
  let i = w(t);
1933
1933
  if (i && i.slots) {
1934
1934
  let t = i.slots.find((e) => e.key === n);
@@ -1950,7 +1950,7 @@ function _r(e) {
1950
1950
  }
1951
1951
  } else if (a === "customAdaptSlotProperty" && I(l.key) && t.type === "comp" && c.adaptSlot) {
1952
1952
  let { compId: t, slotId: n, propertyId: i } = it(s);
1953
- if ($t(c.adaptSlot, t, n)) {
1953
+ if (rn(c.adaptSlot, t, n)) {
1954
1954
  let o = r[t];
1955
1955
  if (o && o.meta.slots) {
1956
1956
  let t = o.meta.slots.find((e) => e.id === n);
@@ -4820,7 +4820,7 @@ ${g.statementToCode(e, "HANDLE")}}
4820
4820
  let t = this.getInput("VALUE").connection, n = t.targetBlock();
4821
4821
  if (e) n && n.dispose();
4822
4822
  else if (n) return;
4823
- let r = rn(this.workspace, this.column.type);
4823
+ let r = Jt(this.workspace, this.column.type);
4824
4824
  r && (t.setCheck(null), t.connect(r.outputConnection));
4825
4825
  },
4826
4826
  updateCheck_: function() {
@@ -5538,7 +5538,7 @@ ${g.statementToCode(e, "HANDLE")}}
5538
5538
  ]]);
5539
5539
  }
5540
5540
  }, g.forBlock.transaction_v1 = function(e) {
5541
- let t = g.INDENT, n = e, r = Yt(n), i = g.statementToCode(n, "HANDLE"), a = g.statementToCode(n, "FINALLY");
5541
+ let t = g.INDENT, n = e, r = $t(n), i = g.statementToCode(n, "HANDLE"), a = g.statementToCode(n, "FINALLY");
5542
5542
  return `{
5543
5543
  ${t}var __error${r}__ = '';
5544
5544
  ${t}var __txExist${r}__ = typeof(__tx__) !== 'undefined';
@@ -5687,7 +5687,7 @@ ${t}}
5687
5687
  }
5688
5688
  let r = this.getInput("ADD" + e).connection, i = r.targetBlock();
5689
5689
  i && i.dispose();
5690
- let a = rn(this.workspace, n.type);
5690
+ let a = Jt(this.workspace, n.type);
5691
5691
  a && (r.setCheck(null), r.connect(a.outputConnection)), this.updateCheck_();
5692
5692
  },
5693
5693
  decompose: function(e) {
@@ -5758,7 +5758,7 @@ ${t}}
5758
5758
  let a = this.getFieldValue("COLUMN" + t), o = this.table.columns.find((e) => e.id === a);
5759
5759
  if (!o) continue;
5760
5760
  n.setCheck(null);
5761
- let s = rn(this.workspace, o.type);
5761
+ let s = Jt(this.workspace, o.type);
5762
5762
  s && r.connect(s.outputConnection);
5763
5763
  }
5764
5764
  },
@@ -5919,7 +5919,7 @@ ${g.statementToCode(e, "HANDLE")}}
5919
5919
  var ei = p.xml;
5920
5920
  y.json_array_v1 = {
5921
5921
  init: function() {
5922
- this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(Gt, 20, 20, void 0, () => {
5922
+ this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(Yt, 20, 20, void 0, () => {
5923
5923
  this.isInFlyout || this.addEntry_();
5924
5924
  })), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
5925
5925
  },
@@ -5936,9 +5936,9 @@ y.json_array_v1 = {
5936
5936
  initShape_: function() {
5937
5937
  for (let e = 0; e < this.length; e++) {
5938
5938
  let t = "ENTRY" + e, n = this.appendValueInput(t);
5939
- n.appendField(new h(Gt, 20, 20, void 0, () => {
5939
+ n.appendField(new h(Yt, 20, 20, void 0, () => {
5940
5940
  this.isInFlyout || this.addEntry_(n);
5941
- })), n.appendField(new i(String(e))), n.appendField(new h(Kt, 20, 20, void 0, () => {
5941
+ })), n.appendField(new i(String(e))), n.appendField(new h(Xt, 20, 20, void 0, () => {
5942
5942
  this.isInFlyout || this.removeEntry_(n);
5943
5943
  })), this.moveInputBefore(t, "ADD");
5944
5944
  }
@@ -5951,9 +5951,9 @@ y.json_array_v1 = {
5951
5951
  t.name = "ENTRY" + (e + 1), t.fieldRow[1].setValue(e + 1);
5952
5952
  }
5953
5953
  let n = this.appendValueInput("ENTRY" + t);
5954
- n.appendField(new h(Gt, 20, 20, void 0, () => {
5954
+ n.appendField(new h(Yt, 20, 20, void 0, () => {
5955
5955
  this.isInFlyout || this.addEntry_(n);
5956
- })), n.appendField(new i(String(t))), n.appendField(new h(Kt, 20, 20, void 0, () => {
5956
+ })), n.appendField(new i(String(t))), n.appendField(new h(Xt, 20, 20, void 0, () => {
5957
5957
  this.isInFlyout || this.removeEntry_(n);
5958
5958
  })), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
5959
5959
  },
@@ -5975,7 +5975,7 @@ y.json_array_v1 = {
5975
5975
  var ti = p.xml;
5976
5976
  y.json_map_v1 = {
5977
5977
  init: function() {
5978
- this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(Gt, 20, 20, void 0, () => {
5978
+ this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(Yt, 20, 20, void 0, () => {
5979
5979
  this.isInFlyout || this.addEntry_();
5980
5980
  })), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
5981
5981
  },
@@ -6001,9 +6001,9 @@ y.json_map_v1 = {
6001
6001
  initShape_: function(e) {
6002
6002
  for (let t = 0; t < e.length; t++) {
6003
6003
  let n = e[t], r = "ENTRY" + t, i = this.appendValueInput(r);
6004
- i.appendField(new h(Gt, 20, 20, void 0, () => {
6004
+ i.appendField(new h(Yt, 20, 20, void 0, () => {
6005
6005
  this.isInFlyout || this.addEntry_(i);
6006
- })), i.appendField(new f(n), "KEY" + t), i.appendField(new h(Kt, 20, 20, void 0, () => {
6006
+ })), i.appendField(new f(n), "KEY" + t), i.appendField(new h(Xt, 20, 20, void 0, () => {
6007
6007
  this.isInFlyout || this.removeEntry_(i);
6008
6008
  })), this.moveInputBefore(r, "ADD");
6009
6009
  }
@@ -6013,9 +6013,9 @@ y.json_map_v1 = {
6013
6013
  e && (t = me(e.name.substring(5)));
6014
6014
  for (let e = this.length - 1; e >= t; e--) this.getField("KEY" + e).name = "KEY" + (e + 1), this.getInput("ENTRY" + e).name = "ENTRY" + (e + 1);
6015
6015
  let n = this.appendValueInput("ENTRY" + t);
6016
- n.appendField(new h(Gt, 20, 20, void 0, () => {
6016
+ n.appendField(new h(Yt, 20, 20, void 0, () => {
6017
6017
  this.isInFlyout || this.addEntry_(n);
6018
- })), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(Kt, 20, 20, void 0, () => {
6018
+ })), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(Xt, 20, 20, void 0, () => {
6019
6019
  this.isInFlyout || this.removeEntry_(n);
6020
6020
  })), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
6021
6021
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.10.18",
4
+ "version": "0.10.19",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "peerDependencies": {
43
43
  "x-error-lib": "^0.5.16",
44
44
  "x-essential-lib": "^0.9.29",
45
- "x-runtime-lib": "^0.9.10",
45
+ "x-runtime-lib": "^0.9.20",
46
46
  "x-state-lib": "^0.3.42"
47
47
  },
48
48
  "devDependencies": {
@@ -1,2 +0,0 @@
1
- import * as Blockly from 'blockly/core';
2
- export declare function ensureBindEntryBlocks(scope: Blockly.Block): void;