hyperbook 0.113.1 → 0.113.3

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 (55) hide show
  1. package/dist/asset-manifest.json +9 -9
  2. package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-BNwEKIvk.js} +258 -258
  3. package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-CAvHx5xm.js} +2 -2
  4. package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-7qanePQL.js} +1138 -1073
  5. package/dist/assets/directive-bitflow/{dom-uYx_3K1r.js → dom-B6NPWBb1.js} +1558 -1551
  6. package/dist/assets/directive-bitflow/editor.js +3 -3
  7. package/dist/assets/directive-bitflow/flow.js +4 -4
  8. package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-4JaKZ7WT.js} +2 -2
  9. package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-6CQr_atd.js} +120 -120
  10. package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-B9iG-a48.js} +9 -9
  11. package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-BFYoOtcY.js} +36 -36
  12. package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-BI6aFdIS.js} +21 -21
  13. package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-Bf078mfo.js} +69 -69
  14. package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-BinE5Wvd.js} +19 -19
  15. package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BoX5-jkC.js} +31 -31
  16. package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-BqRsXShM.js} +34 -34
  17. package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-BxihQ8Oo.js} +21 -21
  18. package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-C5YguHZU.js} +101 -101
  19. package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-C8zwSmE6.js} +27 -27
  20. package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-C9JSBTNc.js} +91 -91
  21. package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-CCMI6UK4.js} +75 -75
  22. package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-CGDt8H6s.js} +24 -24
  23. package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-Ca1v0pjV.js} +102 -92
  24. package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-CaYn3Gmh.js} +31 -31
  25. package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-CbQue0If.js} +67 -67
  26. package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CjH3h0OO.js} +79 -79
  27. package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-CkO3QfOS.js} +8 -8
  28. package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-Cz4i5rfe.js} +39 -39
  29. package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-D0NtgeiX.js} +85 -85
  30. package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-D1C_1SPY.js} +14 -14
  31. package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-D45u7EVR.js} +227 -194
  32. package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-D9Ox4YpM.js} +33 -33
  33. package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-DJ1w2Xcm.js} +46 -46
  34. package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-DUqW2fmV.js} +94 -94
  35. package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-Deedj9EF.js} +25 -25
  36. package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-Dg6nnY_v.js} +68 -68
  37. package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DgxEzomz.js} +2 -2
  38. package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-Dl0-ZAT5.js} +52 -52
  39. package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-Do6dmZyj.js} +42 -42
  40. package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-DqnGC-DU.js} +31 -31
  41. package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-DwXXeSwk.js} +73 -73
  42. package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-b6qwcTj9.js} +15 -15
  43. package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-d105UFQI.js} +58 -58
  44. package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-jijMWQB6.js} +8 -8
  45. package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-kxO5_U9Y.js} +24 -24
  46. package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-p5AOgOal.js} +35 -35
  47. package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-q2APknM6.js} +46 -46
  48. package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-zVkWgm5I.js} +70 -70
  49. package/dist/assets/directive-bitflow/index.js +6 -6
  50. package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
  51. package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
  52. package/dist/assets/directive-bitflow/report.js +1 -1
  53. package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-mdyEMdsJ.js} +6 -6
  54. package/dist/index.js +1 -1
  55. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- import { L as k, a4 as v, ab as j, a9 as y, a2 as w, ac as A, ad as N, a5 as H, a as S, j as i, b as g, E as z, aa as P, s as D } from "./dom-uYx_3K1r.js";
2
- import { v as R, A as C, P as W, e as F, M as L, E as T, L as M, R as U } from "./bitLoaders-DIGwTcpd.js";
3
- const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-option.bitflow-option-correct{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-option.bitflow-option-wrong{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-choice-editor{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-choice-editor>.bitflow-input{flex:1 1 var(--bitflow-choice-editor-min, 8rem);min-width:0}.bitflow-choice-editor-actions{flex:none;flex-wrap:nowrap}.bitflow-choice-editor-correct{display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;flex-shrink:0}.bitflow-choice-editor-correct input{width:1.15em;height:1.15em;margin:0;accent-color:var(--bitflow-color-primary)}", K = ({
1
+ import { P as k, a4 as v, ab as j, a9 as y, a2 as w, ac as A, ad as E, a5 as H, a as S, j as i, b as g, E as z, aa as P, s as F } from "./dom-B6NPWBb1.js";
2
+ import { e as D, g as C, M as U, P as W, F as M, B as R, U as N, H as T } from "./bitLoaders-7qanePQL.js";
3
+ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-option.bitflow-option-correct{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-option.bitflow-option-wrong{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-choice-editor{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-choice-editor>.bitflow-input{flex:1 1 var(--bitflow-choice-editor-min, 8rem);min-width:0}.bitflow-choice-editor-actions{flex:none;flex-wrap:nowrap}.bitflow-choice-editor-correct{display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;flex-shrink:0}.bitflow-choice-editor-correct input{width:1.15em;height:1.15em;margin:0;accent-color:var(--bitflow-color-primary)}", I = ({
4
4
  data: e,
5
5
  answer: n
6
6
  }) => {
@@ -17,7 +17,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
17
17
  }
18
18
  }
19
19
  if (e.evaluation.showFeedback) {
20
- const d = q(e, s);
20
+ const d = K(e, s);
21
21
  d && o.push(d);
22
22
  }
23
23
  const r = h === e.choices.length, p = e.partialCredit ? { earned: h / e.choices.length, possible: 1 } : { earned: r ? 1 : 0, possible: 1 };
@@ -28,9 +28,9 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
28
28
  feedback: o.length > 0 ? o : void 0,
29
29
  detail: { choices: l }
30
30
  };
31
- }, q = (e, n) => e.patternFeedback.find(
31
+ }, K = (e, n) => e.patternFeedback.find(
32
32
  (s) => s.choiceIds.length === n.size && s.choiceIds.every((l) => n.has(l))
33
- )?.feedback, I = {
33
+ )?.feedback, q = {
34
34
  en: {
35
35
  instructionLabel: "Question",
36
36
  instructionHint: "Markdown is supported. This is what the learner reads first.",
@@ -71,13 +71,13 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
71
71
  partialCreditLabel: "Teilpunkte vergeben",
72
72
  partialCreditHint: "Jede Antwort einzeln werten statt alles oder nichts."
73
73
  }
74
- }, G = ({
74
+ }, B = ({
75
75
  data: e,
76
76
  locale: n,
77
77
  onChange: s,
78
78
  errors: l
79
79
  }) => {
80
- const o = (t) => g(I, t, n), h = S.useId(), r = (t) => s({ ...e, ...t }), p = (t, a) => r({
80
+ const o = (t) => g(q, t, n), h = S.useId(), r = (t) => s({ ...e, ...t }), p = (t, a) => r({
81
81
  choices: e.choices.map(
82
82
  (c) => c.id === t ? { ...c, ...a } : c
83
83
  )
@@ -104,7 +104,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
104
104
  };
105
105
  return /* @__PURE__ */ i.jsxs("div", { className: "bitflow-stack", children: [
106
106
  /* @__PURE__ */ i.jsx(
107
- R,
107
+ D,
108
108
  {
109
109
  label: o("instructionLabel"),
110
110
  hint: o("instructionHint"),
@@ -114,7 +114,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
114
114
  }
115
115
  ),
116
116
  /* @__PURE__ */ i.jsx(
117
- W,
117
+ U,
118
118
  {
119
119
  label: o("variantLabel"),
120
120
  value: e.variant,
@@ -207,9 +207,9 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
207
207
  }
208
208
  ) })
209
209
  ] }),
210
- /* @__PURE__ */ i.jsxs(F, { summary: o("advanced"), children: [
210
+ /* @__PURE__ */ i.jsxs(W, { summary: o("advanced"), children: [
211
211
  /* @__PURE__ */ i.jsx(
212
- L,
212
+ M,
213
213
  {
214
214
  label: o("shuffleLabel"),
215
215
  hint: o("shuffleHint"),
@@ -218,7 +218,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
218
218
  }
219
219
  ),
220
220
  e.variant === "multiple" && /* @__PURE__ */ i.jsx(
221
- L,
221
+ M,
222
222
  {
223
223
  label: o("partialCreditLabel"),
224
224
  hint: o("partialCreditHint"),
@@ -227,7 +227,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
227
227
  }
228
228
  ),
229
229
  /* @__PURE__ */ i.jsx(
230
- T,
230
+ R,
231
231
  {
232
232
  evaluation: e.evaluation,
233
233
  locale: n,
@@ -302,7 +302,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
302
302
  correct: "doğru",
303
303
  wrong: "yanlış"
304
304
  }
305
- }, J = k({
305
+ }, G = k({
306
306
  /**
307
307
  * Stable across edits, so an answer, a result or a piece of feedback keeps
308
308
  * pointing at the same choice when the teacher reorders the list. The editor
@@ -315,12 +315,12 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
315
315
  feedbackWhenChecked: j.optional(),
316
316
  /** Shown when the learner left this choice unticked. */
317
317
  feedbackWhenNotChecked: j.optional()
318
- }), B = k({
318
+ }), J = k({
319
319
  /** The question, as Markdown. */
320
320
  instruction: w().default(""),
321
321
  /** `single` renders radio buttons, `multiple` renders checkboxes. */
322
322
  variant: H(["single", "multiple"]).default("single"),
323
- choices: v(J).min(2),
323
+ choices: v(G).min(2),
324
324
  /** Present the choices in a different order for each learner. */
325
325
  shuffle: y().default(!1),
326
326
  /**
@@ -328,7 +328,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
328
328
  * all-or-nothing. Only meaningful for `multiple`.
329
329
  */
330
330
  partialCredit: y().default(!1),
331
- evaluation: A.default(N),
331
+ evaluation: A.default(E),
332
332
  /**
333
333
  * Feedback for one exact combination of choices — the successor to the old
334
334
  * "patterns" map, with choice ids in place of positional letters.
@@ -386,7 +386,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
386
386
  [e.choices]
387
387
  );
388
388
  return /* @__PURE__ */ i.jsxs("div", { className: "bitflow-stack", children: [
389
- /* @__PURE__ */ i.jsx(M, { markdown: e.instruction }),
389
+ /* @__PURE__ */ i.jsx(N, { markdown: e.instruction }),
390
390
  /* @__PURE__ */ i.jsxs("fieldset", { className: "bitflow-choice-group", children: [
391
391
  /* @__PURE__ */ i.jsx("legend", { className: "bitflow-visually-hidden", children: g(
392
392
  x,
@@ -410,7 +410,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
410
410
  onChange: (c) => f(t.id, c.target.checked)
411
411
  }
412
412
  ),
413
- /* @__PURE__ */ i.jsx(M, { markdown: t.markdown }),
413
+ /* @__PURE__ */ i.jsx(N, { markdown: t.markdown }),
414
414
  a && a !== "neutral" && /* @__PURE__ */ i.jsx("span", { className: "bitflow-visually-hidden", children: g(x, a, o) })
415
415
  ]
416
416
  },
@@ -426,14 +426,14 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
426
426
  [n[s], n[l]] = [n[l], n[s]];
427
427
  }
428
428
  return n;
429
- }, E = "task-choice";
429
+ }, L = "task-choice";
430
430
  P({
431
- type: E,
431
+ type: L,
432
432
  kind: "task",
433
- schema: B,
434
- evaluate: K,
433
+ schema: J,
434
+ evaluate: I,
435
435
  Task: O,
436
- Form: G,
436
+ Form: B,
437
437
  info: (e) => ({
438
438
  name: g(x, "name", e),
439
439
  description: g(x, "description", e)
@@ -447,19 +447,19 @@ P({
447
447
  ],
448
448
  shuffle: !1,
449
449
  partialCredit: !1,
450
- evaluation: N(),
450
+ evaluation: E(),
451
451
  patternFeedback: []
452
452
  })
453
453
  });
454
- U(E);
455
- D("bitflow-styles-task-choice", $);
454
+ T(L);
455
+ F("bitflow-styles-task-choice", $);
456
456
  export {
457
457
  _ as AnswerSchema,
458
- J as ChoiceSchema,
459
- B as DataSchema,
460
- G as Form,
461
- E as TYPE,
458
+ G as ChoiceSchema,
459
+ J as DataSchema,
460
+ B as Form,
461
+ L as TYPE,
462
462
  O as Task,
463
- K as evaluate,
463
+ I as evaluate,
464
464
  x as messages
465
465
  };
@@ -1,12 +1,12 @@
1
- import { L as R, a2 as k, ac as H, ad as B, a4 as $, P as D, am as P, a as j, j as o, a9 as I, a5 as W, b as C, aa as O, s as Z } from "./dom-uYx_3K1r.js";
2
- import { S as Y, v as S, D as q, A as f, e as z, y as K, M as U, P as G, t as J, E as Q, N as V, L as X, R as _ } from "./bitLoaders-DIGwTcpd.js";
1
+ import { P as C, a2 as k, ac as $, ad as z, a4 as A, Y as B, am as I, a as j, j as o, a9 as P, a5 as W, b as R, aa as O, s as Y } from "./dom-B6NPWBb1.js";
2
+ import { $ as Z, e as S, h as U, g as f, P as F, C as G, F as K, M as q, r as J, B as Q, j as V, U as X, H as _ } from "./bitLoaders-7qanePQL.js";
3
3
  const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-hotspots-picture{position:relative;width:100%;overflow:hidden;border-radius:var(--bitflow-radius-standard)}.bitflow-hotspots-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.bitflow-hotspots-noimage{background:var(--bitflow-color-neutral-100)}.bitflow-hotspots-surface{position:absolute;inset:0;width:100%;height:100%;padding:0;cursor:crosshair;background:none;border:0}.bitflow-hotspots-surface:disabled{cursor:default}.bitflow-hotspots-aim{position:absolute;width:22px;height:22px;margin:-11px 0 0 -11px;pointer-events:none;opacity:0;border:2px solid var(--bitflow-color-primary);border-radius:50%}.bitflow-hotspots-surface:focus-visible~.bitflow-hotspots-aim{opacity:1}.bitflow-hotspots-mark{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;pointer-events:none;background:var(--bitflow-color-primary);border:2px solid var(--bitflow-color-surface);border-radius:50%}.bitflow-hotspots-mark-correct{background:var(--bitflow-color-correct)}.bitflow-hotspots-mark-wrong{background:var(--bitflow-color-wrong)}.bitflow-hotspots-region{position:absolute;pointer-events:none;border:2px solid}.bitflow-hotspots-region-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 15%,transparent);border-color:var(--bitflow-color-correct)}.bitflow-hotspots-region-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 15%,transparent);border-color:var(--bitflow-color-wrong)}.bitflow-hotspots-verdict,.bitflow-hotspots-feedback{margin:0}.bitflow-boxeditor-box.bitflow-hotspots-handle-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 18%,transparent);border-color:var(--bitflow-color-correct)}", te = (e, i) => {
4
4
  if (e.width <= 0 || e.height <= 0) return !1;
5
5
  if (e.shape === "rect")
6
6
  return i.x >= e.x && i.x <= e.x + e.width && i.y >= e.y && i.y <= e.y + e.height;
7
7
  const n = (i.x - (e.x + e.width / 2)) / (e.width / 2), a = (i.y - (e.y + e.height / 2)) / (e.height / 2);
8
8
  return n * n + a * a <= 1;
9
- }, T = (e, i) => [...e].reverse().find((n) => te(n, i)), be = (e) => ({
9
+ }, H = (e, i) => [...e].reverse().find((n) => te(n, i)), be = (e) => ({
10
10
  x: e.x + e.width / 2,
11
11
  y: e.y + e.height / 2
12
12
  }), oe = ({
@@ -15,7 +15,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
15
15
  }) => {
16
16
  if (e.evaluation.mode === "skip")
17
17
  return { state: "unknown", allowRetry: !1 };
18
- const n = i?.selection, a = n ? T(e.hotspots, n) : void 0, s = a?.correct === !0;
18
+ const n = i?.selection, a = n ? H(e.hotspots, n) : void 0, s = a?.correct === !0;
19
19
  return {
20
20
  state: s ? "correct" : "wrong",
21
21
  score: { earned: s ? 1 : 0, possible: 1 },
@@ -30,7 +30,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
30
30
  feedback: a?.feedback ?? (n ? e.missFeedback : void 0)
31
31
  }
32
32
  };
33
- }, L = {
33
+ }, D = {
34
34
  en: {
35
35
  name: "Find the spot",
36
36
  description: "A picture with a place on it the learner has to find.",
@@ -53,7 +53,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
53
53
  landedOn: "Gewählt: {region}.",
54
54
  landedNowhere: "Du hast eine Stelle ohne Bereich gewählt."
55
55
  }
56
- }, v = D().min(0).max(1), se = R({
56
+ }, v = B().min(0).max(1), se = C({
57
57
  /** Stable across edits, so an answer keeps pointing at the same region. */
58
58
  id: k().min(1),
59
59
  /**
@@ -66,7 +66,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
66
66
  width: v,
67
67
  height: v,
68
68
  /** Whether finding this one is the point. Several may be. */
69
- correct: I().default(!1),
69
+ correct: P().default(!1),
70
70
  /**
71
71
  * Shown once this region has been chosen. On a wrong region this is where
72
72
  * the teaching happens — "that is the monitor, not an input device" is worth
@@ -78,18 +78,18 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
78
78
  * never read out before the answer: it says where things are.
79
79
  */
80
80
  label: k().default("")
81
- }), ae = R({
81
+ }), ae = C({
82
82
  instruction: k().default(""),
83
- background: P.default({ src: "", alt: "" }),
83
+ background: I.default({ src: "", alt: "" }),
84
84
  /** The shape of the picture, so the regions keep their proportions. */
85
- size: R({
86
- width: D().positive().default(620),
87
- height: D().positive().default(310)
85
+ size: C({
86
+ width: B().positive().default(620),
87
+ height: B().positive().default(310)
88
88
  }).default({ width: 620, height: 310 }),
89
- hotspots: $(se).default([]),
89
+ hotspots: A(se).default([]),
90
90
  /** Shown when the learner picks a spot no region covers. */
91
91
  missFeedback: k().optional(),
92
- evaluation: H.default(B)
92
+ evaluation: $.default(z)
93
93
  }).check((e) => {
94
94
  const i = e.value.hotspots.map((a) => a.id);
95
95
  if (new Set(i).size !== i.length && e.issues.push({
@@ -133,7 +133,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
133
133
  path: ["hotspots"],
134
134
  message: "Every region is correct, so any of them wins. Add regions that are not, to catch the mistakes worth catching."
135
135
  });
136
- }), ge = R({
136
+ }), ge = C({
137
137
  /**
138
138
  * Where the learner chose, and which region that turned out to be.
139
139
  *
@@ -141,12 +141,12 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
141
141
  * nothing, and because "they clicked just left of the keyboard" is a
142
142
  * different conversation from "they got it wrong".
143
143
  */
144
- selection: R({
144
+ selection: C({
145
145
  x: v,
146
146
  y: v,
147
147
  hotspotId: k().optional()
148
148
  }).optional()
149
- }), A = {
149
+ }), T = {
150
150
  en: {
151
151
  instructionLabel: "Question",
152
152
  instructionHint: "Markdown is supported. Say what the learner should find.",
@@ -215,7 +215,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
215
215
  onDraw: s,
216
216
  onMove: u
217
217
  }) => {
218
- const h = (c) => C(A, c, i);
218
+ const h = (c) => R(T, c, i);
219
219
  return /* @__PURE__ */ o.jsx(
220
220
  V,
221
221
  {
@@ -248,7 +248,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
248
248
  readonly: s,
249
249
  onAnswerChange: u
250
250
  }) => {
251
- const h = (l, d) => C(L, l, a, d), c = j.useRef(null), [w, y] = j.useState({ x: 0.5, y: 0.5 }), [m, x] = j.useState(""), t = i?.selection, p = n !== void 0, r = j.useCallback((l, d) => {
251
+ const h = (l, d) => R(D, l, a, d), c = j.useRef(null), [w, y] = j.useState({ x: 0.5, y: 0.5 }), [m, x] = j.useState(""), t = i?.selection, p = n !== void 0, r = j.useCallback((l, d) => {
252
252
  const g = c.current?.getBoundingClientRect();
253
253
  return !g || g.width === 0 || g.height === 0 ? null : {
254
254
  x: Math.min(1, Math.max(0, (l - g.left) / g.width)),
@@ -256,14 +256,14 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
256
256
  };
257
257
  }, []), N = (l) => {
258
258
  if (s) return;
259
- const d = T(e.hotspots, l);
259
+ const d = H(e.hotspots, l);
260
260
  u({ selection: { ...l, hotspotId: d?.id } }), x(
261
261
  h("chose", {
262
262
  x: Math.round(l.x * 100),
263
263
  y: Math.round(l.y * 100)
264
264
  })
265
265
  );
266
- }, E = (l) => l.label || l.id, b = e.hotspots.find(
266
+ }, M = (l) => l.label || l.id, b = e.hotspots.find(
267
267
  (l) => l.id === n?.hotspotId
268
268
  );
269
269
  return /* @__PURE__ */ o.jsxs("div", { className: "bitflow-hotspots", children: [
@@ -307,14 +307,14 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
307
307
  }[l.key];
308
308
  if (!g) return;
309
309
  l.preventDefault();
310
- const M = {
310
+ const E = {
311
311
  x: Math.min(1, Math.max(0, w.x + g[0])),
312
312
  y: Math.min(1, Math.max(0, w.y + g[1]))
313
313
  };
314
- y(M), x(
314
+ y(E), x(
315
315
  h("aiming", {
316
- x: Math.round(M.x * 100),
317
- y: Math.round(M.y * 100)
316
+ x: Math.round(E.x * 100),
317
+ y: Math.round(E.y * 100)
318
318
  })
319
319
  );
320
320
  }
@@ -354,7 +354,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
354
354
  }
355
355
  ),
356
356
  /* @__PURE__ */ o.jsx("p", { className: "bitflow-hint", children: h(s ? "howToReadonly" : "howTo") }),
357
- p && /* @__PURE__ */ o.jsx("p", { className: "bitflow-hotspots-verdict", children: b ? h("landedOn", { region: E(b) }) : h("landedNowhere") }),
357
+ p && /* @__PURE__ */ o.jsx("p", { className: "bitflow-hotspots-verdict", children: b ? h("landedOn", { region: M(b) }) : h("landedNowhere") }),
358
358
  /* @__PURE__ */ o.jsx("div", { className: "bitflow-visually-hidden", role: "status", "aria-live": "polite", children: m })
359
359
  ] });
360
360
  }, he = ({
@@ -392,7 +392,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
392
392
  onChange: n,
393
393
  errors: a
394
394
  }) => {
395
- const s = (t) => C(A, t, i), u = (t) => n({ ...e, ...t }), [h, c] = j.useState(), w = Y(e.hotspots.map((t) => t.id)), y = (t) => {
395
+ const s = (t) => R(T, t, i), u = (t) => n({ ...e, ...t }), [h, c] = j.useState(), w = Z(e.hotspots.map((t) => t.id)), y = (t) => {
396
396
  c(t), t && w.open(t);
397
397
  }, m = (t, p) => u({
398
398
  hotspots: e.hotspots.map(
@@ -427,7 +427,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
427
427
  }
428
428
  ),
429
429
  /* @__PURE__ */ o.jsx(
430
- q,
430
+ U,
431
431
  {
432
432
  value: e.background,
433
433
  locale: i,
@@ -458,14 +458,14 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
458
458
  {
459
459
  className: h === t.id ? "bitflow-rule bitflow-rule-selected" : "bitflow-rule",
460
460
  children: /* @__PURE__ */ o.jsxs(
461
- z,
461
+ F,
462
462
  {
463
463
  summary: t.label || s("unnamedRegion"),
464
464
  aside: s(t.correct ? "isCorrect" : "isDecoy"),
465
465
  ...w.props(t.id),
466
466
  children: [
467
467
  /* @__PURE__ */ o.jsx(
468
- K,
468
+ G,
469
469
  {
470
470
  label: s("regionName"),
471
471
  hint: s("regionNameHint"),
@@ -476,7 +476,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
476
476
  }
477
477
  ),
478
478
  /* @__PURE__ */ o.jsx(
479
- U,
479
+ K,
480
480
  {
481
481
  label: s("regionCorrect"),
482
482
  checked: t.correct,
@@ -484,7 +484,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
484
484
  }
485
485
  ),
486
486
  /* @__PURE__ */ o.jsx(
487
- G,
487
+ q,
488
488
  {
489
489
  label: s("regionShape"),
490
490
  value: t.shape,
@@ -500,10 +500,10 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
500
500
  ["y", "top"],
501
501
  ["width", "width"],
502
502
  ["height", "height"]
503
- ].map(([r, N]) => /* @__PURE__ */ o.jsx(J, { label: s(N), children: (E) => /* @__PURE__ */ o.jsx(
503
+ ].map(([r, N]) => /* @__PURE__ */ o.jsx(J, { label: s(N), children: (M) => /* @__PURE__ */ o.jsx(
504
504
  "input",
505
505
  {
506
- ...E,
506
+ ...M,
507
507
  type: "number",
508
508
  className: "bitflow-input",
509
509
  min: 0,
@@ -569,7 +569,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
569
569
  )
570
570
  ] })
571
571
  ] }),
572
- /* @__PURE__ */ o.jsxs(z, { summary: s("advanced"), children: [
572
+ /* @__PURE__ */ o.jsxs(F, { summary: s("advanced"), children: [
573
573
  /* @__PURE__ */ o.jsx(
574
574
  S,
575
575
  {
@@ -589,28 +589,28 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
589
589
  )
590
590
  ] })
591
591
  ] });
592
- }, F = "task-find-hotspots";
592
+ }, L = "task-find-hotspots";
593
593
  O({
594
- type: F,
594
+ type: L,
595
595
  kind: "task",
596
596
  schema: ae,
597
597
  evaluate: oe,
598
598
  Task: he,
599
599
  Form: de,
600
600
  info: (e) => ({
601
- name: C(L, "name", e),
602
- description: C(L, "description", e)
601
+ name: R(D, "name", e),
602
+ description: R(D, "description", e)
603
603
  }),
604
604
  defaultData: () => ({
605
605
  instruction: "",
606
606
  background: { src: "", alt: "" },
607
607
  size: { width: 620, height: 310 },
608
608
  hotspots: [],
609
- evaluation: B()
609
+ evaluation: z()
610
610
  })
611
611
  });
612
- _(F);
613
- Z("bitflow-styles-task-find-hotspots", ee);
612
+ _(L);
613
+ Y("bitflow-styles-task-find-hotspots", ee);
614
614
  export {
615
615
  ge as AnswerSchema,
616
616
  ae as DataSchema,
@@ -618,12 +618,12 @@ export {
618
618
  ie as HotspotCanvas,
619
619
  se as HotspotSchema,
620
620
  le as Picture,
621
- F as TYPE,
621
+ L as TYPE,
622
622
  he as Task,
623
623
  be as centreOf,
624
624
  te as contains,
625
625
  oe as evaluate,
626
- A as formMessages,
627
- T as hotspotAt,
628
- L as messages
626
+ T as formMessages,
627
+ H as hotspotAt,
628
+ D as messages
629
629
  };