hyperbook 0.113.1 → 0.113.2

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.
Files changed (54) hide show
  1. package/dist/asset-manifest.json +9 -9
  2. package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-CE3Yr86b.js} +155 -155
  3. package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-eYGRtw6N.js} +1 -1
  4. package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-CxvZkGrY.js} +1138 -1073
  5. package/dist/assets/directive-bitflow/editor.js +3 -3
  6. package/dist/assets/directive-bitflow/flow.js +3 -3
  7. package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-88c3K20U.js} +31 -31
  8. package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-B61LKxr1.js} +45 -45
  9. package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BG0PL-Z6.js} +30 -30
  10. package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-BNdpL6Ss.js} +78 -78
  11. package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-BO-d4HVC.js} +48 -48
  12. package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-BZhNY0lo.js} +12 -12
  13. package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-BadyFTU5.js} +8 -8
  14. package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-BlT1EcFH.js} +34 -34
  15. package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-BuQ-K_tR.js} +7 -7
  16. package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-Bw0pL0hW.js} +28 -28
  17. package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-BwBVUdJ9.js} +94 -94
  18. package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-BydYlLy4.js} +73 -73
  19. package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-C7RJxxAx.js} +63 -63
  20. package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-CERSJ9uS.js} +70 -70
  21. package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-CLHtOGrW.js} +11 -11
  22. package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-CWe2GjBK.js} +14 -14
  23. package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CfKpkSVC.js} +72 -72
  24. package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-CjKhq7gY.js} +23 -23
  25. package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-Cm4w1Zyc.js} +38 -38
  26. package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-D0U3nepG.js} +52 -52
  27. package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-D4PdXMcj.js} +33 -33
  28. package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-D9LOuqr2.js} +99 -99
  29. package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-DIb3CXwC.js} +42 -42
  30. package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-DQP0cUsP.js} +70 -70
  31. package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-DUOrQfVe.js} +27 -27
  32. package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DW3cUBvZ.js} +1 -1
  33. package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-DYWo0PUv.js} +24 -24
  34. package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-D_QhyFcx.js} +101 -91
  35. package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-Dn5hHVuT.js} +226 -193
  36. package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-DruC5d43.js} +69 -69
  37. package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-EKIgFddO.js} +105 -105
  38. package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-HXNGIC7K.js} +70 -70
  39. package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-ISbOe239.js} +42 -42
  40. package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-IsMJtrUT.js} +31 -31
  41. package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-TUXuIR22.js} +6 -6
  42. package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-WbE9UOFa.js} +24 -24
  43. package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-d5ebPDeY.js} +13 -13
  44. package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-ledofrbo.js} +33 -33
  45. package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-oNmOArKu.js} +1 -1
  46. package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-rp4UTV85.js} +84 -84
  47. package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-xTX3CXJW.js} +23 -23
  48. package/dist/assets/directive-bitflow/index.js +6 -6
  49. package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
  50. package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
  51. package/dist/assets/directive-bitflow/report.js +1 -1
  52. package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-vjEU4OvA.js} +2 -2
  53. package/dist/index.js +1 -1
  54. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
- import { L as j, a2 as R, ac as O, ad as T, a9 as p, P as M, j as o, a5 as A, a as U, b as w, aa as $, s as Z } from "./dom-uYx_3K1r.js";
2
- import { v as G, P as k, y as Y, A as b, t as _, M as f, e as J, E as K, L as Q, R as X } from "./bitLoaders-DIGwTcpd.js";
3
- const C = [
1
+ import { L as j, a2 as S, ac as M, ad as T, a9 as p, P as O, j as o, a5 as C, a as U, b as w, aa as $, s as Z } from "./dom-uYx_3K1r.js";
2
+ import { e as G, M as k, C as Y, g as b, r as _, F as f, P as J, B as K, U as Q, H as X } from "./bitLoaders-CxvZkGrY.js";
3
+ const A = [
4
4
  "decimal",
5
5
  "binary",
6
6
  "octal",
@@ -15,7 +15,7 @@ const C = [
15
15
  binary: ["0b"],
16
16
  octal: ["0o"],
17
17
  hex: ["0x"]
18
- }, D = "0123456789abcdef", fe = [
18
+ }, H = "0123456789abcdef", fe = [
19
19
  "empty",
20
20
  "badDigit",
21
21
  "negative",
@@ -46,7 +46,7 @@ const C = [
46
46
  n = n.slice(d.length);
47
47
  }
48
48
  if (n === "") return { ok: !1, reason: "empty" };
49
- const c = D.slice(0, r);
49
+ const c = H.slice(0, r);
50
50
  if ([...n].some((d) => !c.includes(d)))
51
51
  return { ok: !1, reason: "badDigit" };
52
52
  const u = m(a.bitWidth, t);
@@ -56,7 +56,7 @@ const C = [
56
56
  return { ok: !1, reason: "notFullWidth" };
57
57
  }
58
58
  let i = 0n;
59
- for (const d of n) i = i * BigInt(r) + BigInt(D.indexOf(d));
59
+ for (const d of n) i = i * BigInt(r) + BigInt(H.indexOf(d));
60
60
  return !s && a.signed && a.bitWidth > 0 && t !== "decimal" && i >= g(a.bitWidth - 1) && (i -= g(a.bitWidth)), s && (i = -i), z(i, a.bitWidth, a.signed) ? { ok: !0, values: [i] } : { ok: !1, reason: "tooWide" };
61
61
  }, x = (e, t, a) => {
62
62
  if (t === "text") {
@@ -82,16 +82,16 @@ const C = [
82
82
  if (r < 0n) return `-${(-r).toString(n)}`;
83
83
  const l = r.toString(n), s = m(a.bitWidth, t);
84
84
  return s > 0 ? l.padStart(s, "0") : l;
85
- }, S = (e, t, a) => t === "text" ? e.map(
85
+ }, R = (e, t, a) => t === "text" ? e.map(
86
86
  (n) => n >= 0n && n <= 0x10ffffn ? String.fromCodePoint(Number(n)) : "?"
87
- ).join("") : e.map((n) => ie(n, t, a)).join(" "), ne = (e, t) => e.length === t.length && e.every((a, n) => a === t[n]), re = (e) => e.map((t) => t.toString(10)).join(" "), H = A(C), B = A(["answer", "digits"]), F = j({
88
- instruction: R().default(""),
89
- sourceRepresentation: H.default("decimal"),
87
+ ).join("") : e.map((n) => ie(n, t, a)).join(" "), ne = (e, t) => e.length === t.length && e.every((a, n) => a === t[n]), re = (e) => e.map((t) => t.toString(10)).join(" "), D = C(A), B = C(["answer", "digits"]), F = j({
88
+ instruction: S().default(""),
89
+ sourceRepresentation: D.default("decimal"),
90
90
  /** The value as the author writes it, in the source representation. */
91
- sourceValue: R().default(""),
92
- targetRepresentation: H.default("binary"),
91
+ sourceValue: S().default(""),
92
+ targetRepresentation: D.default("binary"),
93
93
  /** Bits the value is held in. `0` for a plain integer of no fixed width. */
94
- bitWidth: M().int().min(0).max(64).default(8),
94
+ bitWidth: O().int().min(0).max(64).default(8),
95
95
  signed: p().default(!1),
96
96
  /** Whether `0b`, `0o` and `0x` are accepted in front of the answer. */
97
97
  allowPrefix: p().default(!0),
@@ -100,7 +100,7 @@ const C = [
100
100
  /** Whether the leading zeros of the width have to be written out. */
101
101
  requireFullWidth: p().default(!0),
102
102
  scoring: B.default("answer"),
103
- evaluation: O.default(T)
103
+ evaluation: M.default(T)
104
104
  }).check((e) => {
105
105
  if (e.value.evaluation.mode !== "auto") return;
106
106
  const t = e.value;
@@ -137,7 +137,7 @@ const C = [
137
137
  * stored copy that can disagree with the box after a reload is worse than
138
138
  * reading it twice.
139
139
  */
140
- raw: R().default("")
140
+ raw: S().default("")
141
141
  }), v = (e) => ({
142
142
  bitWidth: e.bitWidth,
143
143
  signed: e.signed,
@@ -152,16 +152,16 @@ const C = [
152
152
  return t.ok ? t.values : void 0;
153
153
  }, se = (e) => {
154
154
  const t = V(e);
155
- return t === void 0 ? "" : S(t, e.targetRepresentation, v(e));
155
+ return t === void 0 ? "" : R(t, e.targetRepresentation, v(e));
156
156
  }, oe = (e, t) => {
157
157
  const a = V(e);
158
158
  if (a === void 0) return { correct: !1, reason: "empty" };
159
- const n = v(e), r = x(t?.raw ?? "", e.targetRepresentation, n), l = e.scoring === "digits", s = S(a, e.targetRepresentation, n).toLowerCase();
159
+ const n = v(e), r = x(t?.raw ?? "", e.targetRepresentation, n), l = e.scoring === "digits", s = R(a, e.targetRepresentation, n).toLowerCase();
160
160
  if (!r.ok)
161
161
  return l ? { correct: !1, reason: r.reason, rightDigits: 0, totalDigits: s.length } : { correct: !1, reason: r.reason };
162
162
  const c = ne(r.values, a);
163
163
  if (!l) return { correct: c, reason: c ? "correct" : "wrongValue" };
164
- const u = S(r.values, e.targetRepresentation, n).toLowerCase();
164
+ const u = R(r.values, e.targetRepresentation, n).toLowerCase();
165
165
  let i = 0;
166
166
  for (let d = 0; d < s.length; d++)
167
167
  u[d] === s[d] && (i += 1);
@@ -316,7 +316,7 @@ const C = [
316
316
  locale: r,
317
317
  onAnswerChange: l
318
318
  }) => {
319
- const s = (h, q) => w(L, h, r, q), c = U.useId(), u = N(e.targetRepresentation, s), i = m(e.bitWidth, e.targetRepresentation), d = x(t?.raw ?? "", e.targetRepresentation, v(e)), W = a?.detail?.reason, E = [
319
+ const s = (h, E) => w(L, h, r, E), c = U.useId(), u = N(e.targetRepresentation, s), i = m(e.bitWidth, e.targetRepresentation), d = x(t?.raw ?? "", e.targetRepresentation, v(e)), W = a?.detail?.reason, q = [
320
320
  e.requireFullWidth && i > 0 ? s("fullWidthHint", { digits: i }) : "",
321
321
  e.allowPrefix && e.targetRepresentation !== "text" ? s("prefixHint") : "",
322
322
  e.allowSeparators && e.targetRepresentation !== "text" ? s("separatorHint") : ""
@@ -339,7 +339,7 @@ const C = [
339
339
  /* @__PURE__ */ o.jsx("p", { className: "bitflow-text-muted", children: n ? s("howToReadonly") : s("howTo", { target: u }) }),
340
340
  /* @__PURE__ */ o.jsxs("div", { className: "bitflow-field", children: [
341
341
  /* @__PURE__ */ o.jsx("label", { className: "bitflow-label", htmlFor: c, children: s("answerLabel", { target: u }) }),
342
- E.map((h) => /* @__PURE__ */ o.jsx("span", { className: "bitflow-hint", children: h }, h)),
342
+ q.map((h) => /* @__PURE__ */ o.jsx("span", { className: "bitflow-hint", children: h }, h)),
343
343
  /* @__PURE__ */ o.jsx(
344
344
  "input",
345
345
  {
@@ -377,7 +377,7 @@ const C = [
377
377
  onChange: a,
378
378
  errors: n
379
379
  }) => {
380
- const r = (i, d) => w(de, i, t, d), l = (i) => a({ ...e, ...i }), s = C.map((i) => ({
380
+ const r = (i, d) => w(de, i, t, d), l = (i) => a({ ...e, ...i }), s = A.map((i) => ({
381
381
  value: i,
382
382
  label: r(
383
383
  `representation${i[0].toUpperCase()}${i.slice(1)}`
@@ -541,8 +541,8 @@ export {
541
541
  ge as Form,
542
542
  y as RADIX,
543
543
  fe as READ_FAILURES,
544
- C as REPRESENTATIONS,
545
- H as RepresentationSchema,
544
+ A as REPRESENTATIONS,
545
+ D as RepresentationSchema,
546
546
  B as ScoringSchema,
547
547
  P as TYPE,
548
548
  ue as Task,
@@ -560,5 +560,5 @@ export {
560
560
  x as read,
561
561
  ne as sameValue,
562
562
  I as sourceOptions,
563
- S as write
563
+ R as write
564
564
  };