@pie-lib/mask-markup 4.0.5-next.20261014231219 → 4.1.0

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.
@@ -16,22 +16,23 @@ var { translator: s } = a, c = (e) => [...new Set(Array.from((e || "").matchAll(
16
16
  "&.correct": { border: `1px solid ${i.correct()}` },
17
17
  "&.incorrect": { border: `1px solid ${i.incorrect()}` }
18
18
  })), u = e("input", (e) => (n, i) => {
19
- let { adjustedLimit: a, disabled: o, feedback: u, showCorrectAnswer: d, maxLength: f, spellCheck: p, pluginProps: m, onChange: h } = e, g = n.data?.dataset || {};
20
- if (g.component === "input") {
21
- let _ = c(e.markup), v = (e.choices && g && e.choices[g.id] || [])[0], y = d ? v && v.label : i[g.id] || "", b = f && f[g.id], x = u && u[g.id], S = d || x === "correct", C = !d && x === "incorrect";
19
+ let { adjustedLimit: a, disabled: o, feedback: u, showCorrectAnswer: d, maxLength: f, spellCheck: p, pluginProps: m, onChange: h, idleSaveDelay: g } = e, _ = n.data?.dataset || {};
20
+ if (_.component === "input") {
21
+ let v = c(e.markup), y = (e.choices && _ && e.choices[_.id] || [])[0], b = d ? y && y.label : i[_.id] || "", x = f && f[_.id], S = u && u[_.id], C = d || S === "correct", w = !d && S === "incorrect";
22
22
  return /* @__PURE__ */ r(l, {
23
- id: g.id,
23
+ id: _.id,
24
24
  disabled: d || o,
25
25
  disableUnderline: !0,
26
26
  onChange: (e) => {
27
27
  let t = {
28
28
  ...i,
29
- [g.id]: e
29
+ [_.id]: e
30
30
  };
31
- h(t);
31
+ h(t, _.id);
32
32
  },
33
- markup: y || "",
34
- charactersLimit: a ? b : 25,
33
+ idleSaveDelay: g,
34
+ markup: b || "",
35
+ charactersLimit: a ? x : 25,
35
36
  activePlugins: ["languageCharacters"],
36
37
  pluginProps: m,
37
38
  languageCharactersProps: [{ language: "spanish" }],
@@ -47,16 +48,16 @@ var { translator: s } = a, c = (e) => [...new Set(Array.from((e || "").matchAll(
47
48
  isHidden: !!m?.characters?.disabled
48
49
  },
49
50
  className: t({
50
- correct: S,
51
- incorrect: C
51
+ correct: C,
52
+ incorrect: w
52
53
  }),
53
54
  ariaLabel: s.t("explicitConstructedResponse.response", {
54
55
  lng: e.language,
55
- index: _.indexOf(g.id) + 1,
56
- total: _.length
56
+ index: v.indexOf(_.id) + 1,
57
+ total: v.length
57
58
  }),
58
59
  language: e.language
59
- }, `${n.type}-input-${g.id}`);
60
+ }, `${n.type}-input-${_.id}`);
60
61
  }
61
62
  });
62
63
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/mask-markup",
3
- "version": "4.0.5-next.20261014231219",
3
+ "version": "4.1.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,17 +12,17 @@
12
12
  "@emotion/styled": "^11.14.1",
13
13
  "@mui/icons-material": "^7.3.4",
14
14
  "@mui/material": "^7.3.4",
15
- "@pie-element/shared-utils": "0.1.5-next.20261012213240",
16
- "@pie-lib/drag": "5.0.5-next.20261014231219",
17
- "@pie-lib/editable-html-tip-tap": "3.0.5-next.20261014231219",
18
- "@pie-lib/render-ui": "8.0.5-next.20261014231219",
19
- "@pie-lib/translator": "5.0.2-next.20261006160832",
15
+ "@pie-element/shared-utils": "0.1.4",
16
+ "@pie-lib/drag": "5.0.5",
17
+ "@pie-lib/editable-html-tip-tap": "3.1.0",
18
+ "@pie-lib/render-ui": "8.0.5",
19
+ "@pie-lib/translator": "5.0.1",
20
20
  "debug": "^4.1.1",
21
21
  "prop-types": "^15.7.2",
22
22
  "to-style": "^1.3.3",
23
23
  "@dnd-kit/core": "^6.3.1",
24
- "@pie-element/shared-math-rendering-mathjax": "0.2.0-next.20261014231219",
25
- "@pie-element/shared-lodash": "0.1.3-next.20261012213240",
24
+ "@pie-element/shared-math-rendering-mathjax": "0.1.6",
25
+ "@pie-element/shared-lodash": "0.1.2",
26
26
  "clsx": "^2.1.1"
27
27
  },
28
28
  "type": "module",