@pie-qti/default-components 1.0.0-beta.5 → 1.0.0-beta.7

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
- //#region ../../node_modules/.bun/mathlive@0.111.1/node_modules/mathlive/mathlive.min.mjs
1
+ // ../../node_modules/.bun/mathlive@0.111.1/node_modules/mathlive/mathlive.min.mjs
2
2
  var e = Object.defineProperty, t = Object.defineProperties, n = Object.getOwnPropertyDescriptors, r = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable, o = (t, n, r) => n in t ? e(t, n, {
3
3
  enumerable: !0,
4
4
  configurable: !0,
@@ -4970,7 +4970,7 @@ function he() {
4970
4970
  return "linux";
4971
4971
  }
4972
4972
  function ge(e) {
4973
- (!e.platform || e.platform === he()) && pe.push(e);
4973
+ e.platform && e.platform !== he() || pe.push(e);
4974
4974
  }
4975
4975
  function _e(e, t) {
4976
4976
  let n = {
@@ -18510,7 +18510,7 @@ function fc(e, t, n) {
18510
18510
  for (let r of t) {
18511
18511
  (i = o.atomIdsSettings) != null && i.groupNumbers && e && (n && r.isDigit() || !n && pc(r)) && (o.atomIdsSettings.overrideID = e);
18512
18512
  let t = r.render(o);
18513
- o.atomIdsSettings && (o.atomIdsSettings.overrideID = void 0), t && ((a = o.atomIdsSettings) != null && a.groupNumbers && ((r.isDigit() || pc(r)) && (!e || n !== r.isDigit()) && (n = r.isDigit(), e = r.id ?? ""), e && (!(r.isDigit() || pc(r)) || !r.hasEmptyBranch("superscript") || !r.hasEmptyBranch("subscript")) && (e = "")), l && r.isSelected && t.selected(!0), u.push(t));
18513
+ o.atomIdsSettings && (o.atomIdsSettings.overrideID = void 0), t && ((a = o.atomIdsSettings) != null && a.groupNumbers && (!r.isDigit() && !pc(r) || e && n === r.isDigit() || (n = r.isDigit(), e = r.id ?? ""), !e || (r.isDigit() || pc(r)) && r.hasEmptyBranch("superscript") && r.hasEmptyBranch("subscript") || (e = "")), l && r.isSelected && t.selected(!0), u.push(t));
18514
18514
  }
18515
18515
  }
18516
18516
  if (u.length === 0) return null;
@@ -22964,7 +22964,7 @@ B.stateMachines = {
22964
22964
  },
22965
22965
  "- after o/d": function(e, t, n) {
22966
22966
  var r = B.patterns.match_("orbital", e.o || ""), i = B.patterns.match_("one lowercase greek letter $", e.o || ""), a = B.patterns.match_("one lowercase latin letter $", e.o || ""), o = B.patterns.match_("$one lowercase latin letter$ $", e.o || ""), s = t === "-" && (r && r.remainder === "" || i || a || o);
22967
- s && !e.a && !e.b && !e.p && !e.d && !e.q && !r && a && (e.o = "$" + e.o + "$");
22967
+ !s || e.a || e.b || e.p || e.d || e.q || r || !a || (e.o = "$" + e.o + "$");
22968
22968
  var c = [];
22969
22969
  return s ? (B.concatArray(c, this.output(e)), c.push({ type_: "hyphen" })) : (r = B.patterns.match_("digits", e.d || ""), n && r && r.remainder === "" ? (B.concatArray(c, B.actions["d="](e, t)), B.concatArray(c, this.output(e))) : (B.concatArray(c, this.output(e)), B.concatArray(c, B.actions.bond(e, t, "-")))), c;
22970
22970
  },
@@ -23007,7 +23007,7 @@ B.stateMachines = {
23007
23007
  },
23008
23008
  output: function(e, t, n) {
23009
23009
  var r;
23010
- if (!e.r) r = [], !e.a && !e.b && !e.p && !e.o && !e.q && !e.d && !n || (e.sb && r.push({ type_: "entitySkip" }), !e.o && !e.q && !e.d && !e.b && !e.p && n !== 2 ? (e.o = e.a, e.a = void 0) : !e.o && !e.q && !e.d && (e.b || e.p) ? (e.o = e.a, e.d = e.b, e.q = e.p, e.a = e.b = e.p = void 0) : e.o && e.dType === "kv" && B.patterns.match_("d-oxidation$", e.d || "") ? e.dType = "oxidation" : e.o && e.dType === "kv" && !e.q && (e.dType = void 0), r.push({
23010
+ if (!e.r) r = [], (e.a || e.b || e.p || e.o || e.q || e.d || n) && (e.sb && r.push({ type_: "entitySkip" }), !e.o && !e.q && !e.d && !e.b && !e.p && n !== 2 ? (e.o = e.a, e.a = void 0) : !e.o && !e.q && !e.d && (e.b || e.p) ? (e.o = e.a, e.d = e.b, e.q = e.p, e.a = e.b = e.p = void 0) : e.o && e.dType === "kv" && B.patterns.match_("d-oxidation$", e.d || "") ? e.dType = "oxidation" : e.o && e.dType === "kv" && !e.q && (e.dType = void 0), r.push({
23011
23011
  type_: "chemfive",
23012
23012
  a: B.go(e.a, "a"),
23013
23013
  b: B.go(e.b, "bd"),
@@ -25970,7 +25970,7 @@ T([
25970
25970
  })}`,
25971
25971
  render: (e, t) => {
25972
25972
  let n = t.evaluate(e.args[0]);
25973
- return (!n || !("number" in n)) && (n = {
25973
+ return n && "number" in n || (n = {
25974
25974
  number: 10067,
25975
25975
  base: "hexadecimal"
25976
25976
  }), e.value = String.fromCodePoint(n.number), e.createBox(t);
@@ -29863,7 +29863,7 @@ function Zf() {
29863
29863
  let e = window.mathVirtualKeyboard.alphabeticLayout;
29864
29864
  if (e === "auto") {
29865
29865
  let t = xe();
29866
- t && (e = t.virtualLayout), (!e || e === "auto") && (e = {
29866
+ t && (e = t.virtualLayout), e && e !== "auto" || (e = {
29867
29867
  fr: "azerty",
29868
29868
  be: "azerty",
29869
29869
  al: "qwertz",
@@ -30077,7 +30077,7 @@ function Qf(e) {
30077
30077
  "paste"
30078
30078
  ].includes(e) && (r = !0);
30079
30079
  }
30080
- return (!("displayShiftedKeycaps" in e) || e.displayShiftedKeycaps === void 0) && (t.displayShiftedKeycaps = n), (!("displayEditToolbar" in e) || e.displayEditToolbar === void 0) && (t.displayEditToolbar = !r), t;
30080
+ return "displayShiftedKeycaps" in e && e.displayShiftedKeycaps !== void 0 || (t.displayShiftedKeycaps = n), "displayEditToolbar" in e && e.displayEditToolbar !== void 0 || (t.displayEditToolbar = !r), t;
30081
30081
  }
30082
30082
  function $f(e, t) {
30083
30083
  let n = "<div class=\"left\">";
@@ -30135,7 +30135,7 @@ function np(e) {
30135
30135
  if (!t) return;
30136
30136
  let n = {};
30137
30137
  if (!e.id) {
30138
- if (e.hasAttribute("data-label") && (n.label = e.dataset.label), e.hasAttribute("data-latex") && (n.latex = e.dataset.latex), e.hasAttribute("data-key") && (n.key = e.dataset.key), e.hasAttribute("data-insert") && (n.insert = e.dataset.insert), e.hasAttribute("data-variants") && (n.variants = e.dataset.variants), e.hasAttribute("data-aside") && (n.aside = e.dataset.aside), e.className && (n.class = e.className), !n.label && !n.latex && !n.key && !n.insert && (n.latex = e.innerText, n.label = e.innerHTML), e.hasAttribute("data-command")) try {
30138
+ if (e.hasAttribute("data-label") && (n.label = e.dataset.label), e.hasAttribute("data-latex") && (n.latex = e.dataset.latex), e.hasAttribute("data-key") && (n.key = e.dataset.key), e.hasAttribute("data-insert") && (n.insert = e.dataset.insert), e.hasAttribute("data-variants") && (n.variants = e.dataset.variants), e.hasAttribute("data-aside") && (n.aside = e.dataset.aside), e.className && (n.class = e.className), n.label || n.latex || n.key || n.insert || (n.latex = e.innerText, n.label = e.innerHTML), e.hasAttribute("data-command")) try {
30139
30139
  n.command = JSON.parse(e.dataset.command);
30140
30140
  } catch (e) {
30141
30141
  console.warn("Invalid JSON in data-command attribute", e);
@@ -31166,7 +31166,7 @@ function kp(e, t, n) {
31166
31166
  }
31167
31167
  if (o.command === "\\operatorname") a = Rp(o.body), e.index += 1;
31168
31168
  else if (s || c) for (; e.index < t && (o.type === "mord" || o.type === "macro") && !o.isDigit() && s === (o.style?.variant ?? "") && c === (o.style?.variantStyle ?? "");) a += Rp([o]), e.index += 1, o = e.atoms[e.index];
31169
- else (o.type === "mord" || o.type === "macro") && !o.isDigit() && (a += Rp([o]), e.index += 1);
31169
+ else o.type !== "mord" && o.type !== "macro" || o.isDigit() || (a += Rp([o]), e.index += 1);
31170
31170
  if (a.length > 0) {
31171
31171
  r = !0, i = `<mi${l}>${a}</mi>`;
31172
31172
  let t = e.lastType;
@@ -31268,7 +31268,7 @@ function Ip(e, t, n) {
31268
31268
  let t = e.atoms[e.index], r = t.value === "\\operatorname", o = r ? "<mi class=\"MathML-Unit\"" + U(t.id, n) + ">" + Rp(t.value) + "</mi>" : Lp(t, n);
31269
31269
  i += o, !r && !/^<mo>(.*)<\/mo>$/.test(o) ? (i += Ep, a = "applyfunction") : a = r ? "mi" : "mo";
31270
31270
  }
31271
- (e.lastType === "mi" || e.lastType === "mn") && !/^<mo>(.*)<\/mo>$/.test(i) && (i = Dp + i), e.index += 1;
31271
+ e.lastType !== "mi" && e.lastType !== "mn" || /^<mo>(.*)<\/mo>$/.test(i) || (i = Dp + i), e.index += 1;
31272
31272
  }
31273
31273
  return i.length > 0 && (r = !0, Mp(i, e, n) || (e.mathML += i, e.lastType = a)), r;
31274
31274
  }
@@ -32026,7 +32026,7 @@ function lm(e, t) {
32026
32026
  let r = n.parent, i = e.extractAtoms([e.position, e.offsetOf(r.lastChild)]), a = e.extractAtoms([e.offsetOf(r.firstChild), e.position]);
32027
32027
  a.length === 0 && (a = Cm()), i.length === 0 && (i = Cm());
32028
32028
  let o = "pmatrix", s = r.leftDelim, c = r.rightDelim;
32029
- s === "(" && (c === ")" || c === "?") ? o = "pmatrix" : (s === "[" || s === "\\lbrack") && (c === "]" || c === "\\rbrack" || c === "?") ? o = "bmatrix" : s === "\\vert" && c === "\\vert" ? o = "vmatrix" : s === "\\Vert" && c === "\\Vert" ? o = "Vmatrix" : (s === "{" || s === "\\lbrace") && (c === "." || c === "?") && (o = "cases");
32029
+ s === "(" && (c === ")" || c === "?") ? o = "pmatrix" : (s === "[" || s === "\\lbrack") && (c === "]" || c === "\\rbrack" || c === "?") ? o = "bmatrix" : s === "\\vert" && c === "\\vert" ? o = "vmatrix" : s === "\\Vert" && c === "\\Vert" ? o = "Vmatrix" : s !== "{" && s !== "\\lbrace" || c !== "." && c !== "?" || (o = "cases");
32030
32030
  let l = Xu(o, t.endsWith("column") ? [[a, i]] : [[a], [i]]);
32031
32031
  return r.parent.addChildBefore(l, r), r.parent.removeChild(r), um(l, 0, 0) ? fm(e, l, 0, 0) : t.endsWith("column") ? um(l, 0, 1) ? fm(e, l, 0, 1) : e.position = e.offsetOf(n) : um(l, 1, 0) ? fm(e, l, 1, 0) : e.position = e.offsetOf(n), [void 0, [0, 0]];
32032
32032
  }
@@ -33916,7 +33916,7 @@ var Ah = class extends L {
33916
33916
  let g = f[f.length - 1];
33917
33917
  if (n.selectionMode === "placeholder") {
33918
33918
  let t;
33919
- if (f.length === 1 && f[0].type === "genfrac" && (t = f[0].branch("above")?.find((e) => e.type === "placeholder"), !t && (t = f[0].branch("below")?.find((e) => e.type === "placeholder"))), t || (t = f.flatMap((e) => [e, ...e.children]).find((e) => e.type === "placeholder")), t) {
33919
+ if (f.length === 1 && f[0].type === "genfrac" && (t = f[0].branch("above")?.find((e) => e.type === "placeholder"), t || (t = f[0].branch("below")?.find((e) => e.type === "placeholder"))), t || (t = f.flatMap((e) => [e, ...e.children]).find((e) => e.type === "placeholder")), t) {
33920
33920
  let n = e.offsetOf(t);
33921
33921
  e.setSelection(n - 1, n), e.announce("move");
33922
33922
  } else if (g) {
@@ -36714,7 +36714,7 @@ var A_ = class {
36714
36714
  if (window.mathVirtualKeyboard.visible && window.mathVirtualKeyboard.update(zh(this.mathfield)), this.silenceNotifications || !((t = this.mathfield) != null && t.host)) return;
36715
36715
  let n = this.silenceNotifications;
36716
36716
  this.silenceNotifications = !0, setTimeout(() => {
36717
- !this.mathfield || !Bc(this.mathfield) || !this.mathfield.host || this.mathfield.host.dispatchEvent(new InputEvent("input", c(s({}, e), {
36717
+ this.mathfield && Bc(this.mathfield) && this.mathfield.host && this.mathfield.host.dispatchEvent(new InputEvent("input", c(s({}, e), {
36718
36718
  data: e.data ? e.data : e.inputType ?? "",
36719
36719
  bubbles: !0,
36720
36720
  composed: !0
@@ -38688,6 +38688,5 @@ function fv() {
38688
38688
  var e;
38689
38689
  return globalThis[e = Symbol.for("io.cortexjs.mathlive")] ?? (globalThis[e] = {}), globalThis[Symbol.for("io.cortexjs.mathlive")];
38690
38690
  }
38691
- //#endregion
38692
38691
 
38693
- //# sourceMappingURL=mathlive.min-Cmxm6f5R.js.map
38692
+ //# sourceMappingURL=mathlive.min-DHkAtaP5.js.map