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,36 +1,36 @@
1
- import { L as z, ak as q, a4 as M, a2 as w, P as U, j as t, ac as _, ad as B, a9 as y, a as P, b as v, aa as G, s as K } from "./dom-uYx_3K1r.js";
2
- import { S as Q, v as A, y as E, A as Z, _ as R, e as F, t as $, M as N, E as X, L as Y, R as ee } from "./bitLoaders-DIGwTcpd.js";
3
- const W = z({
1
+ import { L as H, ak as V, a4 as M, a2 as w, P as q, j as t, ac as G, ad as D, a9 as N, a as z, b as v, aa as K, s as Q } from "./dom-uYx_3K1r.js";
2
+ import { $ as X, e as Z, C as A, g as E, i as R, P as F, r as $, F as y, B as Y, U as _, H as ee } from "./bitLoaders-CxvZkGrY.js";
3
+ const W = H({
4
4
  /** The call, as it would be written: `fak(3)`, `sum(list, 2)`. */
5
5
  call: w().default(""),
6
6
  /** Its local variables, as one line: `n = 3, result = ?`. Only asked for
7
7
  * when the task shows the column. */
8
8
  locals: w().default("")
9
- }), ae = z({
9
+ }), ae = H({
10
10
  /** Stable across edits, so an answer keeps pointing at the same moment. */
11
11
  id: w().min(1),
12
12
  /** "Before the base case returns" — short, and plain text: it is also read
13
13
  * out inside the stack's accessible name. */
14
14
  label: w().default(""),
15
15
  /** The line the moment belongs to, marked beside the listing. 1-based. */
16
- line: U().int().positive().optional(),
16
+ line: q().int().positive().optional(),
17
17
  /** The stack at this moment, the running call first. */
18
18
  expected: M(W).default([])
19
19
  }), O = (e) => e.replace(/\n$/, "").split(`
20
- `), te = z({
20
+ `), te = H({
21
21
  instruction: w().default(""),
22
22
  /** Names the language for the reader. It picks no parser and no
23
23
  * highlighter, and nothing here ever runs the code. */
24
24
  language: w().default(""),
25
25
  code: w().default(""),
26
- showLineNumbers: y().default(!0),
26
+ showLineNumbers: N().default(!0),
27
27
  /** Whether each frame also asks for its local variables. */
28
- showLocals: y().default(!1),
28
+ showLocals: N().default(!1),
29
29
  checkpoints: M(ae).default([]),
30
- caseSensitive: y().default(!1),
30
+ caseSensitive: N().default(!1),
31
31
  /** A point per moment rather than one for the whole run. */
32
- partialCredit: y().default(!0),
33
- evaluation: _.default(B)
32
+ partialCredit: N().default(!0),
33
+ evaluation: G.default(D)
34
34
  }).check((e) => {
35
35
  const { checkpoints: n, code: o, evaluation: r, showLocals: a } = e.value, s = n.map((d) => d.id);
36
36
  new Set(s).size !== s.length && e.issues.push({
@@ -72,10 +72,10 @@ const W = z({
72
72
  });
73
73
  });
74
74
  }));
75
- }), we = z({
75
+ }), we = H({
76
76
  /** Checkpoint id → the stack the learner wrote, the running call first. A
77
77
  * moment not yet touched has no entry — see `carriedStack`. */
78
- stacks: q(w(), M(W)).default({})
78
+ stacks: V(w(), M(W)).default({})
79
79
  }), J = (e, n, o) => {
80
80
  for (let r = o; r >= 0; r--) {
81
81
  const a = n?.stacks?.[e.checkpoints[r]?.id ?? ""];
@@ -237,7 +237,7 @@ const W = z({
237
237
  locale: a,
238
238
  onChange: s
239
239
  }) => {
240
- const i = (h, b) => v(j, h, a, b), [d, f] = P.useState("");
240
+ const i = (h, b) => v(j, h, a, b), [d, f] = z.useState("");
241
241
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-callstack-moments", children: [
242
242
  e.checkpoints.map((h, b) => {
243
243
  const l = I(h, b, i), c = J(e, n, b), m = o?.[b], u = (k) => s(le(n, h.id, k)), x = (k, p) => u(c.map((g, L) => L === k ? { ...g, ...p } : g));
@@ -269,7 +269,7 @@ const W = z({
269
269
  autoCapitalize: "off",
270
270
  autoCorrect: "off",
271
271
  spellCheck: !1,
272
- onChange: (H) => x(p, { call: H.target.value })
272
+ onChange: (P) => x(p, { call: P.target.value })
273
273
  }
274
274
  ),
275
275
  e.showLocals && /* @__PURE__ */ t.jsx(
@@ -284,7 +284,7 @@ const W = z({
284
284
  autoCapitalize: "off",
285
285
  autoCorrect: "off",
286
286
  spellCheck: !1,
287
- onChange: (H) => x(p, { locals: H.target.value })
287
+ onChange: (P) => x(p, { locals: P.target.value })
288
288
  }
289
289
  ),
290
290
  g !== void 0 && /* @__PURE__ */ t.jsx("span", { className: "bitflow-visually-hidden", children: i(g ? "correct" : "wrong") })
@@ -329,7 +329,7 @@ const W = z({
329
329
  }) => {
330
330
  const i = (f) => v(j, f, a), d = o?.detail?.stacks;
331
331
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-stack", children: [
332
- /* @__PURE__ */ t.jsx(Y, { markdown: e.instruction }),
332
+ /* @__PURE__ */ t.jsx(_, { markdown: e.instruction }),
333
333
  /* @__PURE__ */ t.jsx(ce, { data: e, locale: a }),
334
334
  /* @__PURE__ */ t.jsx("p", { className: "bitflow-hint", children: i(r ? "howToReadonly" : "howTo") }),
335
335
  /* @__PURE__ */ t.jsx(
@@ -345,7 +345,7 @@ const W = z({
345
345
  )
346
346
  ] });
347
347
  }, S = (e) => e.map((n) => n.locals ? `${n.call} | ${n.locals}` : n.call).join(`
348
- `), D = (e) => e.split(`
348
+ `), B = (e) => e.split(`
349
349
  `).map((n) => n.trim()).filter((n) => n !== "").map((n) => {
350
350
  const o = n.indexOf("|");
351
351
  return o === -1 ? { call: n, locals: "" } : { call: n.slice(0, o).trim(), locals: n.slice(o + 1).trim() };
@@ -354,9 +354,9 @@ const W = z({
354
354
  onChange: n,
355
355
  ...o
356
356
  }) => {
357
- const [r, a] = P.useState(() => S(e));
358
- return P.useEffect(() => {
359
- S(D(r)) !== S(e) && a(S(e));
357
+ const [r, a] = z.useState(() => S(e));
358
+ return z.useEffect(() => {
359
+ S(B(r)) !== S(e) && a(S(e));
360
360
  }, [e]), /* @__PURE__ */ t.jsx($, { ...o, children: (s) => /* @__PURE__ */ t.jsx(
361
361
  "textarea",
362
362
  {
@@ -368,7 +368,7 @@ const W = z({
368
368
  autoCapitalize: "off",
369
369
  autoCorrect: "off",
370
370
  onChange: (i) => {
371
- a(i.target.value), n(D(i.target.value));
371
+ a(i.target.value), n(B(i.target.value));
372
372
  }
373
373
  }
374
374
  ) });
@@ -378,7 +378,7 @@ const W = z({
378
378
  if (!e.includes(o)) return o;
379
379
  }
380
380
  }, ue = ({ data: e, locale: n, onChange: o, errors: r }) => {
381
- const a = (l, c) => v(re, l, n, c), s = (l) => o({ ...e, ...l }), i = Q(e.checkpoints.map((l) => l.id)), d = (l, c) => s({
381
+ const a = (l, c) => v(re, l, n, c), s = (l) => o({ ...e, ...l }), i = X(e.checkpoints.map((l) => l.id)), d = (l, c) => s({
382
382
  checkpoints: e.checkpoints.map(
383
383
  (m) => m.id === l ? { ...m, ...c } : m
384
384
  )
@@ -399,7 +399,7 @@ const W = z({
399
399
  }), b = (l) => (r ?? []).filter((c) => c.path.startsWith(`checkpoints.${l}.expected.`)).map((c) => c.message)[0];
400
400
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-stack", children: [
401
401
  /* @__PURE__ */ t.jsx(
402
- A,
402
+ Z,
403
403
  {
404
404
  label: a("instructionLabel"),
405
405
  hint: a("instructionHint"),
@@ -409,7 +409,7 @@ const W = z({
409
409
  }
410
410
  ),
411
411
  /* @__PURE__ */ t.jsx(
412
- E,
412
+ A,
413
413
  {
414
414
  label: a("languageLabel"),
415
415
  hint: a("languageHint"),
@@ -418,13 +418,13 @@ const W = z({
418
418
  }
419
419
  ),
420
420
  /* @__PURE__ */ t.jsx(
421
- A,
421
+ Z,
422
422
  {
423
423
  label: a("codeLabel"),
424
424
  hint: a("codeHint"),
425
425
  rows: 8,
426
426
  value: e.code,
427
- error: Z(r, "code"),
427
+ error: E(r, "code"),
428
428
  onChange: (l) => s({ code: l })
429
429
  }
430
430
  ),
@@ -441,7 +441,7 @@ const W = z({
441
441
  aside: a("framesSummary", { count: l.expected.length }),
442
442
  children: [
443
443
  /* @__PURE__ */ t.jsx(
444
- E,
444
+ A,
445
445
  {
446
446
  label: a("momentLabelLabel"),
447
447
  placeholder: a("momentLabelPlaceholder"),
@@ -454,7 +454,7 @@ const W = z({
454
454
  {
455
455
  label: a("momentLineLabel"),
456
456
  hint: a("momentLineHint"),
457
- error: Z(r, `checkpoints.${c}.line`),
457
+ error: E(r, `checkpoints.${c}.line`),
458
458
  children: (m) => /* @__PURE__ */ t.jsx(
459
459
  "input",
460
460
  {
@@ -524,7 +524,7 @@ const W = z({
524
524
  ] }),
525
525
  /* @__PURE__ */ t.jsxs(F, { summary: a("advanced"), children: [
526
526
  /* @__PURE__ */ t.jsx(
527
- N,
527
+ y,
528
528
  {
529
529
  label: a("showLineNumbersLabel"),
530
530
  hint: a("showLineNumbersHint"),
@@ -533,7 +533,7 @@ const W = z({
533
533
  }
534
534
  ),
535
535
  /* @__PURE__ */ t.jsx(
536
- N,
536
+ y,
537
537
  {
538
538
  label: a("showLocalsLabel"),
539
539
  hint: a("showLocalsHint"),
@@ -542,7 +542,7 @@ const W = z({
542
542
  }
543
543
  ),
544
544
  /* @__PURE__ */ t.jsx(
545
- N,
545
+ y,
546
546
  {
547
547
  label: a("caseSensitiveLabel"),
548
548
  hint: a("caseSensitiveHint"),
@@ -551,7 +551,7 @@ const W = z({
551
551
  }
552
552
  ),
553
553
  /* @__PURE__ */ t.jsx(
554
- N,
554
+ y,
555
555
  {
556
556
  label: a("partialCreditLabel"),
557
557
  hint: a("partialCreditHint"),
@@ -560,7 +560,7 @@ const W = z({
560
560
  }
561
561
  ),
562
562
  /* @__PURE__ */ t.jsx(
563
- X,
563
+ Y,
564
564
  {
565
565
  evaluation: e.evaluation,
566
566
  locale: n,
@@ -569,9 +569,9 @@ const W = z({
569
569
  )
570
570
  ] })
571
571
  ] });
572
- }, V = "task-call-stack";
573
- G({
574
- type: V,
572
+ }, U = "task-call-stack";
573
+ K({
574
+ type: U,
575
575
  kind: "task",
576
576
  schema: te,
577
577
  evaluate: se,
@@ -590,11 +590,11 @@ G({
590
590
  checkpoints: [],
591
591
  caseSensitive: !1,
592
592
  partialCredit: !0,
593
- evaluation: B()
593
+ evaluation: D()
594
594
  })
595
595
  });
596
- ee(V);
597
- K("bitflow-styles-task-call-stack", ie);
596
+ ee(U);
597
+ Q("bitflow-styles-task-call-stack", ie);
598
598
  export {
599
599
  we as AnswerSchema,
600
600
  ae as CheckpointSchema,
@@ -603,7 +603,7 @@ export {
603
603
  ue as Form,
604
604
  W as FrameSchema,
605
605
  me as Stacks,
606
- V as TYPE,
606
+ U as TYPE,
607
607
  de as Task,
608
608
  J as carriedStack,
609
609
  se as evaluate,
@@ -614,6 +614,6 @@ export {
614
614
  j as messages,
615
615
  C as normalise,
616
616
  oe as stackStates,
617
- D as textToFrames,
617
+ B as textToFrames,
618
618
  le as withStack
619
619
  };