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.
- package/dist/asset-manifest.json +9 -9
- package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-BNwEKIvk.js} +258 -258
- package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-CAvHx5xm.js} +2 -2
- package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-7qanePQL.js} +1138 -1073
- package/dist/assets/directive-bitflow/{dom-uYx_3K1r.js → dom-B6NPWBb1.js} +1558 -1551
- package/dist/assets/directive-bitflow/editor.js +3 -3
- package/dist/assets/directive-bitflow/flow.js +4 -4
- package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-4JaKZ7WT.js} +2 -2
- package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-6CQr_atd.js} +120 -120
- package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-B9iG-a48.js} +9 -9
- package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-BFYoOtcY.js} +36 -36
- package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-BI6aFdIS.js} +21 -21
- package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-Bf078mfo.js} +69 -69
- package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-BinE5Wvd.js} +19 -19
- package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BoX5-jkC.js} +31 -31
- package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-BqRsXShM.js} +34 -34
- package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-BxihQ8Oo.js} +21 -21
- package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-C5YguHZU.js} +101 -101
- package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-C8zwSmE6.js} +27 -27
- package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-C9JSBTNc.js} +91 -91
- package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-CCMI6UK4.js} +75 -75
- package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-CGDt8H6s.js} +24 -24
- package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-Ca1v0pjV.js} +102 -92
- package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-CaYn3Gmh.js} +31 -31
- package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-CbQue0If.js} +67 -67
- package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CjH3h0OO.js} +79 -79
- package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-CkO3QfOS.js} +8 -8
- package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-Cz4i5rfe.js} +39 -39
- package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-D0NtgeiX.js} +85 -85
- package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-D1C_1SPY.js} +14 -14
- package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-D45u7EVR.js} +227 -194
- package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-D9Ox4YpM.js} +33 -33
- package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-DJ1w2Xcm.js} +46 -46
- package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-DUqW2fmV.js} +94 -94
- package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-Deedj9EF.js} +25 -25
- package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-Dg6nnY_v.js} +68 -68
- package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DgxEzomz.js} +2 -2
- package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-Dl0-ZAT5.js} +52 -52
- package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-Do6dmZyj.js} +42 -42
- package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-DqnGC-DU.js} +31 -31
- package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-DwXXeSwk.js} +73 -73
- package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-b6qwcTj9.js} +15 -15
- package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-d105UFQI.js} +58 -58
- package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-jijMWQB6.js} +8 -8
- package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-kxO5_U9Y.js} +24 -24
- package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-p5AOgOal.js} +35 -35
- package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-q2APknM6.js} +46 -46
- package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-zVkWgm5I.js} +70 -70
- package/dist/assets/directive-bitflow/index.js +6 -6
- package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
- package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
- package/dist/assets/directive-bitflow/report.js +1 -1
- package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-mdyEMdsJ.js} +6 -6
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { P as k, a2 as o, a9 as w, j as a, b as d, s as f, aa as L } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { C as c, e as v, F as x, U as y, H as F } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);margin:0}.bitflow-consent-option{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);min-height:44px;cursor:pointer}.bitflow-consent-required{margin:0;min-height:1.5em;color:var(--bitflow-color-warning);font-size:var(--bitflow-font-size-small)}", b = {
|
|
4
4
|
en: {
|
|
5
5
|
name: "Consent",
|
|
@@ -89,7 +89,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
|
|
|
89
89
|
*/
|
|
90
90
|
allowDecline: w().default(!0),
|
|
91
91
|
declineLabel: o().default("")
|
|
92
|
-
}), u = (e, l) => l === !0 || e.allowDecline && l === !1,
|
|
92
|
+
}), u = (e, l) => l === !0 || e.allowDecline && l === !1, C = {
|
|
93
93
|
en: {
|
|
94
94
|
titleLabel: "Title",
|
|
95
95
|
markdownLabel: "What the learner is agreeing to",
|
|
@@ -116,7 +116,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
|
|
|
116
116
|
requiredHintLabel: "Hinweis, solange nichts gewählt ist",
|
|
117
117
|
requiredHintHint: "Leer lassen für „Wähle eins aus, bevor es losgeht.“"
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, j = ({
|
|
120
120
|
data: e,
|
|
121
121
|
answer: l,
|
|
122
122
|
readonly: t,
|
|
@@ -126,7 +126,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
|
|
|
126
126
|
const s = (r) => d(b, r, i), m = e.agreeLabel || s("agreeFallback"), g = e.declineLabel || s("declineFallback"), p = u(e, l);
|
|
127
127
|
return /* @__PURE__ */ a.jsxs("div", { className: "bitflow-stack", children: [
|
|
128
128
|
e.title && /* @__PURE__ */ a.jsx("h1", { className: "bitflow-heading", children: e.title }),
|
|
129
|
-
/* @__PURE__ */ a.jsx(
|
|
129
|
+
/* @__PURE__ */ a.jsx(y, { markdown: e.markdown }),
|
|
130
130
|
e.allowDecline ? /* @__PURE__ */ a.jsxs("fieldset", { className: "bitflow-consent", children: [
|
|
131
131
|
/* @__PURE__ */ a.jsx("legend", { className: "bitflow-label", children: s("choiceLegend") }),
|
|
132
132
|
[
|
|
@@ -164,7 +164,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
|
|
|
164
164
|
locale: l,
|
|
165
165
|
onChange: t
|
|
166
166
|
}) => {
|
|
167
|
-
const i = (n) => d(
|
|
167
|
+
const i = (n) => d(C, n, l);
|
|
168
168
|
return /* @__PURE__ */ a.jsxs("div", { className: "bitflow-stack", children: [
|
|
169
169
|
/* @__PURE__ */ a.jsx(
|
|
170
170
|
c,
|
|
@@ -194,7 +194,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
|
|
|
194
194
|
}
|
|
195
195
|
),
|
|
196
196
|
/* @__PURE__ */ a.jsx(
|
|
197
|
-
|
|
197
|
+
x,
|
|
198
198
|
{
|
|
199
199
|
label: i("allowDeclineLabel"),
|
|
200
200
|
hint: i("allowDeclineHint"),
|
|
@@ -228,7 +228,7 @@ L({
|
|
|
228
228
|
type: h,
|
|
229
229
|
kind: "start",
|
|
230
230
|
schema: q,
|
|
231
|
-
Task:
|
|
231
|
+
Task: j,
|
|
232
232
|
Form: D,
|
|
233
233
|
info: (e) => ({
|
|
234
234
|
name: d(b, "name", e),
|
|
@@ -251,7 +251,7 @@ export {
|
|
|
251
251
|
q as DataSchema,
|
|
252
252
|
D as Form,
|
|
253
253
|
h as TYPE,
|
|
254
|
-
|
|
254
|
+
j as Task,
|
|
255
255
|
u as isDecided,
|
|
256
256
|
b as messages
|
|
257
257
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-space-
|
|
1
|
+
import { P as M, a9 as H, a4 as E, a as g, j as a, ac as q, ad as I, Y as w, a2 as A, a5 as G, b as j, aa as U, s as V } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { y as _, e as J, g as P, P as $, r as T, M as Q, F as ee, B as te, U as ae, H as se } from "./bitLoaders-7qanePQL.js";
|
|
3
|
+
const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-mouse-touch-notice.bitflow-alert-warning{display:none}@media(pointer:coarse){.bitflow-mouse-touch-notice.bitflow-alert-warning{display:flex}}.bitflow-mouse-area{position:relative;width:100%;overflow:hidden;background:var(--bitflow-color-neutral-100);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);-webkit-user-select:none;user-select:none;touch-action:none;cursor:crosshair}.bitflow-mouse-target{position:absolute;transform:translate(-50%,-50%);border-radius:var(--bitflow-radius-full);background:var(--bitflow-color-primary)}.bitflow-mouse-target-past{background:none;border:var(--bitflow-border-width) dashed var(--bitflow-color-neutral-400)}.bitflow-mouse-target-editing{display:flex;align-items:center;justify-content:center;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-bold);color:var(--bitflow-color-on-primary);cursor:grab}.bitflow-mouse-area-editing{cursor:copy}.bitflow-mouse-mark{position:absolute;width:.75rem;height:.75rem;transform:translate(-50%,-50%);border-radius:var(--bitflow-radius-full);border:2px solid var(--bitflow-color-white)}.bitflow-mouse-mark-hit{background:var(--bitflow-color-correct)}.bitflow-mouse-mark-miss{background:var(--bitflow-color-wrong)}.bitflow-mouse-rounds{width:100%;border-collapse:collapse;font-size:var(--bitflow-font-size-small)}.bitflow-mouse-rounds th,.bitflow-mouse-rounds td{padding:var(--bitflow-space-xxsmall);text-align:start;border-bottom:var(--bitflow-border-width) solid var(--bitflow-color-border)}.bitflow-mouse-rounds th{color:var(--bitflow-color-text-muted);font-weight:var(--bitflow-font-weight-medium)}", ne = M({
|
|
4
4
|
/** Stable across edits, so an answer keeps pointing at the same target. */
|
|
5
|
-
id:
|
|
5
|
+
id: A().min(1),
|
|
6
6
|
/** The centre, as a fraction of the play area, so it lands the same on any screen. */
|
|
7
7
|
x: w().min(0).max(1).default(0.5),
|
|
8
8
|
y: w().min(0).max(1).default(0.5),
|
|
@@ -13,8 +13,8 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
13
13
|
*/
|
|
14
14
|
radius: w().min(0.01).max(0.5).default(0.06)
|
|
15
15
|
}), oe = G(["hits", "hitsAndSpeed"]), re = M({
|
|
16
|
-
instruction:
|
|
17
|
-
targets:
|
|
16
|
+
instruction: A().default(""),
|
|
17
|
+
targets: E(ne).default([]),
|
|
18
18
|
/** How tall the play area is, as a fraction of its width. */
|
|
19
19
|
aspectRatio: w().min(0.2).max(3).default(0.6),
|
|
20
20
|
scoring: oe.default("hits"),
|
|
@@ -29,7 +29,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
29
29
|
* device. On by default, because the alternative is asking someone to
|
|
30
30
|
* fail at something they were never able to do.
|
|
31
31
|
*/
|
|
32
|
-
allowOptOut:
|
|
32
|
+
allowOptOut: H().default(!0),
|
|
33
33
|
evaluation: q.default(I)
|
|
34
34
|
}).check((e) => {
|
|
35
35
|
const { targets: s } = e.value, n = s.map((r) => r.id);
|
|
@@ -53,11 +53,11 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
53
53
|
});
|
|
54
54
|
}));
|
|
55
55
|
}), le = M({
|
|
56
|
-
targetId:
|
|
56
|
+
targetId: A().min(1),
|
|
57
57
|
/** Where the click landed, in the same fractions the targets use. */
|
|
58
58
|
x: w(),
|
|
59
59
|
y: w(),
|
|
60
|
-
hit:
|
|
60
|
+
hit: H(),
|
|
61
61
|
/** Milliseconds from the target appearing to the click, measured monotonically. */
|
|
62
62
|
ms: w().min(0)
|
|
63
63
|
}), ye = M({
|
|
@@ -69,9 +69,9 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
69
69
|
* coordinates, no pointer type, no device or input trace — the task measures
|
|
70
70
|
* a person's aim, and has no business describing their hardware.
|
|
71
71
|
*/
|
|
72
|
-
rounds:
|
|
72
|
+
rounds: E(le).default([]),
|
|
73
73
|
/** Set when the learner stood down from a task that needs a pointing device. */
|
|
74
|
-
optedOut:
|
|
74
|
+
optedOut: H().default(!1)
|
|
75
75
|
}), ce = (e, s, n) => Math.hypot(s.x - e.x, (s.y - e.y) * n), de = (e, s) => s > 0 ? Math.log2(2 * e / s + 1) : 0, Y = (e, s) => {
|
|
76
76
|
const n = new Map(e.targets.map((i) => [i.id, i]));
|
|
77
77
|
let r = { x: 0.5, y: 0.5 };
|
|
@@ -189,29 +189,29 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
189
189
|
readonly: i,
|
|
190
190
|
onChange: c
|
|
191
191
|
}) => {
|
|
192
|
-
const o = (u, h) => j(O, u, r, h), m = g.useRef(null), p = g.useRef(0), [v, y] = g.useState(!1), [
|
|
192
|
+
const o = (u, h) => j(O, u, r, h), m = g.useRef(null), p = g.useRef(0), [v, y] = g.useState(!1), [N, k] = g.useState(""), b = s.rounds, x = b.length >= e.targets.length, f = e.targets[b.length], t = i || s.optedOut || x, l = g.useRef(!1);
|
|
193
193
|
g.useEffect(() => {
|
|
194
194
|
const u = i === !0;
|
|
195
195
|
l.current && !u && x && !s.optedOut && (y(!1), c({ rounds: [], optedOut: !1 })), l.current = u;
|
|
196
196
|
});
|
|
197
197
|
const d = () => {
|
|
198
198
|
y(!0), p.current = performance.now(), k(o("started", { total: e.targets.length }));
|
|
199
|
-
},
|
|
199
|
+
}, R = () => {
|
|
200
200
|
c({ rounds: [], optedOut: !0 }), k(o("stoodDown"));
|
|
201
|
-
},
|
|
201
|
+
}, W = (u) => {
|
|
202
202
|
if (t || !v || !f) return;
|
|
203
203
|
const h = m.current?.getBoundingClientRect();
|
|
204
204
|
if (!h || h.width === 0) return;
|
|
205
|
-
const S = (u.clientX - h.left) / h.width, D = (u.clientY - h.top) / h.height,
|
|
205
|
+
const S = (u.clientX - h.left) / h.width, D = (u.clientY - h.top) / h.height, z = f.radius * Math.min(1, e.aspectRatio), K = z / e.aspectRatio, L = ((S - f.x) / z) ** 2 + ((D - f.y) / K) ** 2 <= 1, C = performance.now(), Z = {
|
|
206
206
|
targetId: f.id,
|
|
207
207
|
x: Number(S.toFixed(4)),
|
|
208
208
|
y: Number(D.toFixed(4)),
|
|
209
|
-
hit:
|
|
209
|
+
hit: L,
|
|
210
210
|
// Monotonic, so a clock change mid-task cannot produce a negative time.
|
|
211
211
|
ms: Math.max(0, Math.round(C - p.current))
|
|
212
212
|
};
|
|
213
213
|
p.current = C, c({ ...s, rounds: [...b, Z] }), k(
|
|
214
|
-
o(
|
|
214
|
+
o(L ? "roundHit" : "roundMiss", {
|
|
215
215
|
round: b.length + 1,
|
|
216
216
|
total: e.targets.length,
|
|
217
217
|
ms: Z.ms
|
|
@@ -220,13 +220,13 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
220
220
|
};
|
|
221
221
|
if (s.optedOut)
|
|
222
222
|
return /* @__PURE__ */ a.jsx("div", { className: "bitflow-mouse", children: /* @__PURE__ */ a.jsx("p", { className: "bitflow-hint", children: o("stoodDownNotice") }) });
|
|
223
|
-
const
|
|
223
|
+
const X = (u) => /* @__PURE__ */ a.jsx(
|
|
224
224
|
"div",
|
|
225
225
|
{
|
|
226
226
|
ref: m,
|
|
227
227
|
className: "bitflow-mouse-area",
|
|
228
228
|
style: { aspectRatio: `1 / ${e.aspectRatio}` },
|
|
229
|
-
onPointerDown:
|
|
229
|
+
onPointerDown: W,
|
|
230
230
|
children: u
|
|
231
231
|
}
|
|
232
232
|
);
|
|
@@ -244,7 +244,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
244
244
|
{
|
|
245
245
|
type: "button",
|
|
246
246
|
className: "bitflow-button bitflow-button-secondary",
|
|
247
|
-
onClick:
|
|
247
|
+
onClick: R,
|
|
248
248
|
children: o("optOut")
|
|
249
249
|
}
|
|
250
250
|
)
|
|
@@ -252,13 +252,13 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
252
252
|
e.allowOptOut && /* @__PURE__ */ a.jsx("p", { className: "bitflow-hint", children: o("optOutHint") })
|
|
253
253
|
] }) : /* @__PURE__ */ a.jsxs("div", { className: "bitflow-mouse", children: [
|
|
254
254
|
/* @__PURE__ */ a.jsx("p", { className: "bitflow-hint", children: t ? o("allDone", { total: e.targets.length }) : o("progress", { round: b.length + 1, total: e.targets.length }) }),
|
|
255
|
-
|
|
255
|
+
X(
|
|
256
256
|
/* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
257
257
|
!t && f && /* @__PURE__ */ a.jsx(
|
|
258
258
|
"span",
|
|
259
259
|
{
|
|
260
260
|
className: "bitflow-mouse-target",
|
|
261
|
-
style:
|
|
261
|
+
style: F(f, e),
|
|
262
262
|
"aria-hidden": "true"
|
|
263
263
|
}
|
|
264
264
|
),
|
|
@@ -275,7 +275,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
275
275
|
"span",
|
|
276
276
|
{
|
|
277
277
|
className: "bitflow-mouse-target bitflow-mouse-target-past",
|
|
278
|
-
style:
|
|
278
|
+
style: F(u, e),
|
|
279
279
|
"aria-hidden": "true"
|
|
280
280
|
},
|
|
281
281
|
u.id
|
|
@@ -297,9 +297,9 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
297
297
|
/* @__PURE__ */ a.jsx("td", { children: u.difficulty.toFixed(2) })
|
|
298
298
|
] }, `${u.targetId}-${h}`)) })
|
|
299
299
|
] }),
|
|
300
|
-
/* @__PURE__ */ a.jsx("div", { className: "bitflow-visually-hidden", role: "status", "aria-live": "polite", children:
|
|
300
|
+
/* @__PURE__ */ a.jsx("div", { className: "bitflow-visually-hidden", role: "status", "aria-live": "polite", children: N })
|
|
301
301
|
] });
|
|
302
|
-
},
|
|
302
|
+
}, F = (e, s) => {
|
|
303
303
|
const n = e.radius * Math.min(1, s.aspectRatio);
|
|
304
304
|
return {
|
|
305
305
|
left: `${e.x * 100}%`,
|
|
@@ -398,7 +398,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
398
398
|
targets: e.targets.map(
|
|
399
399
|
(d) => d.id === t ? { ...d, ...l } : d
|
|
400
400
|
)
|
|
401
|
-
}),
|
|
401
|
+
}), N = (t, l) => {
|
|
402
402
|
t.button === 0 && (t.stopPropagation(), m.current = { id: l, moved: !1, fromX: t.clientX, fromY: t.clientY }, p());
|
|
403
403
|
}, k = (t) => {
|
|
404
404
|
const l = m.current;
|
|
@@ -446,7 +446,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
446
446
|
/* @__PURE__ */ a.jsxs("fieldset", { className: "bitflow-field", children: [
|
|
447
447
|
/* @__PURE__ */ a.jsx("legend", { className: "bitflow-label", children: i("targetsLabel") }),
|
|
448
448
|
/* @__PURE__ */ a.jsx("span", { className: "bitflow-hint", children: i("targetsHint") }),
|
|
449
|
-
|
|
449
|
+
P(r, "targets") && /* @__PURE__ */ a.jsx("span", { className: "bitflow-field-error", role: "alert", children: P(r, "targets") }),
|
|
450
450
|
/* @__PURE__ */ a.jsx(
|
|
451
451
|
"div",
|
|
452
452
|
{
|
|
@@ -464,7 +464,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
464
464
|
width: `${t.radius * Math.min(1, e.aspectRatio) * 200}%`,
|
|
465
465
|
aspectRatio: "1"
|
|
466
466
|
},
|
|
467
|
-
onPointerDown: (d) =>
|
|
467
|
+
onPointerDown: (d) => N(d, t.id),
|
|
468
468
|
children: l + 1
|
|
469
469
|
},
|
|
470
470
|
t.id
|
|
@@ -472,7 +472,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
472
472
|
}
|
|
473
473
|
),
|
|
474
474
|
e.targets.length === 0 ? /* @__PURE__ */ a.jsx("p", { className: "bitflow-text-muted", children: i("noTargets") }) : e.targets.map((t, l) => /* @__PURE__ */ a.jsx("div", { className: "bitflow-rule", children: /* @__PURE__ */ a.jsxs(
|
|
475
|
-
|
|
475
|
+
$,
|
|
476
476
|
{
|
|
477
477
|
summary: i("targetAt", {
|
|
478
478
|
number: l + 1,
|
|
@@ -491,8 +491,8 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
491
491
|
max: 25,
|
|
492
492
|
step: 1,
|
|
493
493
|
value: Math.round(t.radius * 100),
|
|
494
|
-
onChange: (
|
|
495
|
-
radius: Number(
|
|
494
|
+
onChange: (R) => y(t.id, {
|
|
495
|
+
radius: Number(R.target.value) / 100
|
|
496
496
|
})
|
|
497
497
|
}
|
|
498
498
|
) }),
|
|
@@ -511,7 +511,7 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
511
511
|
}
|
|
512
512
|
) }, t.id))
|
|
513
513
|
] }),
|
|
514
|
-
/* @__PURE__ */ a.jsxs(
|
|
514
|
+
/* @__PURE__ */ a.jsxs($, { summary: i("advanced"), children: [
|
|
515
515
|
/* @__PURE__ */ a.jsx(T, { label: i("aspectLabel"), hint: i("aspectHint"), children: (t) => /* @__PURE__ */ a.jsx(
|
|
516
516
|
"input",
|
|
517
517
|
{
|
|
@@ -575,9 +575,9 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
575
575
|
)
|
|
576
576
|
] })
|
|
577
577
|
] });
|
|
578
|
-
},
|
|
578
|
+
}, B = "task-mouse-accuracy";
|
|
579
579
|
U({
|
|
580
|
-
type:
|
|
580
|
+
type: B,
|
|
581
581
|
kind: "task",
|
|
582
582
|
schema: re,
|
|
583
583
|
evaluate: me,
|
|
@@ -597,7 +597,7 @@ U({
|
|
|
597
597
|
evaluation: I()
|
|
598
598
|
})
|
|
599
599
|
});
|
|
600
|
-
se(
|
|
600
|
+
se(B);
|
|
601
601
|
V("bitflow-styles-task-mouse-accuracy", ie);
|
|
602
602
|
export {
|
|
603
603
|
ye as AnswerSchema,
|
|
@@ -606,7 +606,7 @@ export {
|
|
|
606
606
|
pe as Form,
|
|
607
607
|
le as RoundSchema,
|
|
608
608
|
oe as ScoringSchema,
|
|
609
|
-
|
|
609
|
+
B as TYPE,
|
|
610
610
|
ne as TargetSchema,
|
|
611
611
|
be as Task,
|
|
612
612
|
ce as distanceBetween,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { P as N, a9 as u, a2 as v, j as e, b as r, $ as H, a as A, s as S, aa as B } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { C as R, e as z, F as p, U as C, k as T, x as F, H as E } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weight:var(--bitflow-font-weight-bold);margin:0}.bitflow-end-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-end-item{border-bottom:1px solid var(--bitflow-color-border)}.bitflow-end-row{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xxsmall) 0;width:100%}.bitflow-end-row-button{font:inherit;color:inherit;text-align:left;background:none;border:0;border-radius:var(--bitflow-radius-standard);cursor:pointer;min-height:44px}.bitflow-end-row-button:hover{background:var(--bitflow-color-neutral-100)}.bitflow-end-review{margin-left:auto;color:var(--bitflow-color-primary-dark);font-size:var(--bitflow-font-size-small)}.bitflow-end-answer{padding:var(--bitflow-space-small);margin-bottom:var(--bitflow-space-xsmall);border-left:var(--bitflow-border-width) solid var(--bitflow-color-primary-light);background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-standard)}.bitflow-end-index{min-width:1.5em;color:var(--bitflow-color-text-muted);font-variant-numeric:tabular-nums}", l = {
|
|
4
4
|
en: {
|
|
5
5
|
name: "End",
|
|
@@ -51,7 +51,7 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
51
51
|
it: { name: "Fine", description: "La schermata finale, con un riepilogo." },
|
|
52
52
|
pt: { name: "Fim", description: "O ecrã final, com um resumo." },
|
|
53
53
|
tr: { name: "Son", description: "Özet içeren kapanış ekranı." }
|
|
54
|
-
},
|
|
54
|
+
}, P = N({
|
|
55
55
|
title: v().default(""),
|
|
56
56
|
markdown: v().default(""),
|
|
57
57
|
/** Per-task outcomes and attempt counts. */
|
|
@@ -62,7 +62,7 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
62
62
|
* read-only. Off by default: a teacher may not want the paper handed back.
|
|
63
63
|
*/
|
|
64
64
|
allowReview: u().default(!1)
|
|
65
|
-
}),
|
|
65
|
+
}), M = ({
|
|
66
66
|
data: a,
|
|
67
67
|
locale: o,
|
|
68
68
|
attempt: t,
|
|
@@ -71,8 +71,8 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
71
71
|
const n = (m, w) => r(l, m, o, w);
|
|
72
72
|
return /* @__PURE__ */ e.jsxs("div", { className: "bitflow-stack", children: [
|
|
73
73
|
a.title && /* @__PURE__ */ e.jsx("h2", { className: "bitflow-heading", children: a.title }),
|
|
74
|
-
/* @__PURE__ */ e.jsx(
|
|
75
|
-
t && a.showScore && /* @__PURE__ */ e.jsx(
|
|
74
|
+
/* @__PURE__ */ e.jsx(C, { markdown: a.markdown }),
|
|
75
|
+
t && a.showScore && /* @__PURE__ */ e.jsx(O, { attempt: t, locale: o }),
|
|
76
76
|
t && a.showBreakdown && /* @__PURE__ */ e.jsx(
|
|
77
77
|
W,
|
|
78
78
|
{
|
|
@@ -84,7 +84,7 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
84
84
|
),
|
|
85
85
|
t && a.showBreakdown && V(t) === 0 && /* @__PURE__ */ e.jsx("p", { className: "bitflow-text-muted", children: n("noTasks") })
|
|
86
86
|
] });
|
|
87
|
-
},
|
|
87
|
+
}, O = ({
|
|
88
88
|
attempt: a,
|
|
89
89
|
locale: o
|
|
90
90
|
}) => {
|
|
@@ -103,20 +103,20 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
103
103
|
}) => {
|
|
104
104
|
const [n, m] = A.useState(null), w = Object.entries(a.results);
|
|
105
105
|
if (w.length === 0) return null;
|
|
106
|
-
const
|
|
106
|
+
const k = s && o !== void 0, d = (i, c) => r(l, i, t, c);
|
|
107
107
|
return /* @__PURE__ */ e.jsxs("section", { className: "bitflow-stack-small bitflow-stack", children: [
|
|
108
108
|
/* @__PURE__ */ e.jsx("h3", { className: "bitflow-heading", children: d("summaryHeading") }),
|
|
109
|
-
|
|
109
|
+
k && /* @__PURE__ */ e.jsx("p", { className: "bitflow-hint", children: d("reviewHint") }),
|
|
110
110
|
/* @__PURE__ */ e.jsx("ol", { className: "bitflow-end-list", children: w.map(([i, c], y) => {
|
|
111
|
-
const b = c.state,
|
|
111
|
+
const b = c.state, g = a.tries[i] ?? 0, f = o?.nodes.find((L) => L.id === i), h = n === i, x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
112
112
|
/* @__PURE__ */ e.jsx("span", { className: "bitflow-end-index", children: y + 1 }),
|
|
113
113
|
/* @__PURE__ */ e.jsxs("span", { className: `bitflow-state bitflow-state-${b}`, children: [
|
|
114
|
-
/* @__PURE__ */ e.jsx(
|
|
114
|
+
/* @__PURE__ */ e.jsx(T, { state: b }),
|
|
115
115
|
d(b)
|
|
116
116
|
] }),
|
|
117
|
-
|
|
117
|
+
g > 1 && /* @__PURE__ */ e.jsx("span", { className: "bitflow-text-muted", children: d("attempts", { count: g }) })
|
|
118
118
|
] });
|
|
119
|
-
return /* @__PURE__ */ e.jsx("li", { className: "bitflow-end-item", children:
|
|
119
|
+
return /* @__PURE__ */ e.jsx("li", { className: "bitflow-end-item", children: k && f ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
120
120
|
/* @__PURE__ */ e.jsxs(
|
|
121
121
|
"button",
|
|
122
122
|
{
|
|
@@ -131,7 +131,7 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
131
131
|
}
|
|
132
132
|
),
|
|
133
133
|
h && /* @__PURE__ */ e.jsx("div", { className: "bitflow-end-answer", children: /* @__PURE__ */ e.jsx(
|
|
134
|
-
|
|
134
|
+
F,
|
|
135
135
|
{
|
|
136
136
|
type: f.type,
|
|
137
137
|
data: f.data,
|
|
@@ -152,7 +152,7 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
152
152
|
const s = (n) => r(l, n, o);
|
|
153
153
|
return /* @__PURE__ */ e.jsxs("div", { className: "bitflow-stack", children: [
|
|
154
154
|
/* @__PURE__ */ e.jsx(
|
|
155
|
-
|
|
155
|
+
R,
|
|
156
156
|
{
|
|
157
157
|
label: s("titleLabel"),
|
|
158
158
|
value: a.title,
|
|
@@ -198,11 +198,11 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
198
198
|
};
|
|
199
199
|
S("bitflow-styles-end-tries", D);
|
|
200
200
|
const j = "end-tries";
|
|
201
|
-
|
|
201
|
+
B({
|
|
202
202
|
type: j,
|
|
203
203
|
kind: "end",
|
|
204
|
-
schema:
|
|
205
|
-
Task:
|
|
204
|
+
schema: P,
|
|
205
|
+
Task: M,
|
|
206
206
|
Form: Y,
|
|
207
207
|
info: (a) => ({
|
|
208
208
|
name: r(l, "name", a),
|
|
@@ -216,11 +216,11 @@ R({
|
|
|
216
216
|
allowReview: !1
|
|
217
217
|
})
|
|
218
218
|
});
|
|
219
|
-
|
|
219
|
+
E(j);
|
|
220
220
|
export {
|
|
221
|
-
|
|
221
|
+
P as DataSchema,
|
|
222
222
|
Y as Form,
|
|
223
223
|
j as TYPE,
|
|
224
|
-
|
|
224
|
+
M as Task,
|
|
225
225
|
l as messages
|
|
226
226
|
};
|