hyperbook 0.113.2 → 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-CE3Yr86b.js → EditorElement-BNwEKIvk.js} +143 -143
- package/dist/assets/directive-bitflow/{ReportElements-eYGRtw6N.js → ReportElements-CAvHx5xm.js} +2 -2
- package/dist/assets/directive-bitflow/{bitLoaders-CxvZkGrY.js → bitLoaders-7qanePQL.js} +41 -41
- 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-oNmOArKu.js → index-4JaKZ7WT.js} +2 -2
- package/dist/assets/directive-bitflow/{index-EKIgFddO.js → index-6CQr_atd.js} +19 -19
- package/dist/assets/directive-bitflow/{index-BadyFTU5.js → index-B9iG-a48.js} +2 -2
- package/dist/assets/directive-bitflow/{index-D4PdXMcj.js → index-BFYoOtcY.js} +5 -5
- package/dist/assets/directive-bitflow/{index-d5ebPDeY.js → index-BI6aFdIS.js} +10 -10
- package/dist/assets/directive-bitflow/{index-DruC5d43.js → index-Bf078mfo.js} +2 -2
- package/dist/assets/directive-bitflow/{index-CWe2GjBK.js → index-BinE5Wvd.js} +7 -7
- package/dist/assets/directive-bitflow/{index-BG0PL-Z6.js → index-BoX5-jkC.js} +7 -7
- package/dist/assets/directive-bitflow/{index-ledofrbo.js → index-BqRsXShM.js} +4 -4
- package/dist/assets/directive-bitflow/{index-CjKhq7gY.js → index-BxihQ8Oo.js} +13 -13
- package/dist/assets/directive-bitflow/{index-BNdpL6Ss.js → index-C5YguHZU.js} +28 -28
- package/dist/assets/directive-bitflow/{index-xTX3CXJW.js → index-C8zwSmE6.js} +7 -7
- package/dist/assets/directive-bitflow/{index-D9LOuqr2.js → index-C9JSBTNc.js} +21 -21
- package/dist/assets/directive-bitflow/{index-BydYlLy4.js → index-CCMI6UK4.js} +8 -8
- package/dist/assets/directive-bitflow/{index-WbE9UOFa.js → index-CGDt8H6s.js} +5 -5
- package/dist/assets/directive-bitflow/{index-D_QhyFcx.js → index-Ca1v0pjV.js} +5 -5
- package/dist/assets/directive-bitflow/{index-88c3K20U.js → index-CaYn3Gmh.js} +12 -12
- package/dist/assets/directive-bitflow/{index-C7RJxxAx.js → index-CbQue0If.js} +30 -30
- package/dist/assets/directive-bitflow/{index-CfKpkSVC.js → index-CjH3h0OO.js} +28 -28
- package/dist/assets/directive-bitflow/{index-TUXuIR22.js → index-CkO3QfOS.js} +4 -4
- package/dist/assets/directive-bitflow/{index-DIb3CXwC.js → index-Cz4i5rfe.js} +6 -6
- package/dist/assets/directive-bitflow/{index-HXNGIC7K.js → index-D0NtgeiX.js} +17 -17
- package/dist/assets/directive-bitflow/{index-CLHtOGrW.js → index-D1C_1SPY.js} +4 -4
- package/dist/assets/directive-bitflow/{index-Dn5hHVuT.js → index-D45u7EVR.js} +13 -13
- package/dist/assets/directive-bitflow/{index-IsMJtrUT.js → index-D9Ox4YpM.js} +10 -10
- package/dist/assets/directive-bitflow/{index-B61LKxr1.js → index-DJ1w2Xcm.js} +15 -15
- package/dist/assets/directive-bitflow/{index-BwBVUdJ9.js → index-DUqW2fmV.js} +2 -2
- package/dist/assets/directive-bitflow/{index-DUOrQfVe.js → index-Deedj9EF.js} +6 -6
- package/dist/assets/directive-bitflow/{index-DQP0cUsP.js → index-Dg6nnY_v.js} +14 -14
- package/dist/assets/directive-bitflow/{index-DW3cUBvZ.js → index-DgxEzomz.js} +2 -2
- package/dist/assets/directive-bitflow/{index-D0U3nepG.js → index-Dl0-ZAT5.js} +20 -20
- package/dist/assets/directive-bitflow/{index-ISbOe239.js → index-Do6dmZyj.js} +2 -2
- package/dist/assets/directive-bitflow/{index-Bw0pL0hW.js → index-DqnGC-DU.js} +6 -6
- package/dist/assets/directive-bitflow/{index-rp4UTV85.js → index-DwXXeSwk.js} +19 -19
- package/dist/assets/directive-bitflow/{index-BZhNY0lo.js → index-b6qwcTj9.js} +9 -9
- package/dist/assets/directive-bitflow/{index-BO-d4HVC.js → index-d105UFQI.js} +21 -21
- package/dist/assets/directive-bitflow/{index-BuQ-K_tR.js → index-jijMWQB6.js} +2 -2
- package/dist/assets/directive-bitflow/{index-DYWo0PUv.js → index-kxO5_U9Y.js} +2 -2
- package/dist/assets/directive-bitflow/{index-Cm4w1Zyc.js → index-p5AOgOal.js} +21 -21
- package/dist/assets/directive-bitflow/{index-BlT1EcFH.js → index-q2APknM6.js} +15 -15
- package/dist/assets/directive-bitflow/{index-CERSJ9uS.js → index-zVkWgm5I.js} +11 -11
- package/dist/assets/directive-bitflow/index.js +6 -6
- package/dist/assets/directive-bitflow/report.js +1 -1
- package/dist/assets/directive-bitflow/{shareableReport-vjEU4OvA.js → shareableReport-mdyEMdsJ.js} +6 -6
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as o } from "./EditorElement-
|
|
2
|
-
import { B as l } from "./EditorElement-
|
|
3
|
-
import { l as m } from "./bitLoaders-
|
|
1
|
+
import { d as o } from "./EditorElement-BNwEKIvk.js";
|
|
2
|
+
import { B as l } from "./EditorElement-BNwEKIvk.js";
|
|
3
|
+
import { l as m } from "./bitLoaders-7qanePQL.js";
|
|
4
4
|
o();
|
|
5
5
|
export {
|
|
6
6
|
l as BitflowEditorElement,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as e } from "./shareableReport-
|
|
2
|
-
import { B as s, c as t } from "./shareableReport-
|
|
3
|
-
import { K as p, b as f, a as m, c as i } from "./bitLoaders-
|
|
4
|
-
import { O as b, t as d } from "./dom-
|
|
1
|
+
import { d as e } from "./shareableReport-mdyEMdsJ.js";
|
|
2
|
+
import { B as s, c as t } from "./shareableReport-mdyEMdsJ.js";
|
|
3
|
+
import { K as p, b as f, a as m, c as i } from "./bitLoaders-7qanePQL.js";
|
|
4
|
+
import { O as b, t as d } from "./dom-B6NPWBb1.js";
|
|
5
5
|
e();
|
|
6
6
|
export {
|
|
7
7
|
s as BitflowFlowElement,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as k, e as x, U as h, H as b } from "./bitLoaders-
|
|
1
|
+
import { P as c, a2 as l, j as t, b as i, s as m, aa as p } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { C as k, e as x, U as h, H as b } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const w = "", s = {
|
|
4
4
|
en: {
|
|
5
5
|
name: "Explanation",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as g, Y as m, a0 as L, a1 as O, a2 as u, a3 as I, a4 as W, a5 as K, a6 as Q, s as U, k as q, a7 as R, W as M, j as r, Q as k, a as A, b as E, p as j, a8 as B } from "./dom-B6NPWBb1.js";
|
|
2
2
|
const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--bitflow-color-primary-dark: light-dark(#004c45, #7cbfb2);--bitflow-color-primary-light: light-dark(#b5e3d8, #214640);--bitflow-color-on-primary: light-dark(#ffffff, #1e1e1e);--bitflow-color-neutral-900: light-dark(#242428, #f5f5f5);--bitflow-color-neutral-700: light-dark(#3c3c3c, #d6d6d6);--bitflow-color-neutral-400: light-dark(#a4a4a4, #7a7a7a);--bitflow-color-neutral-200: light-dark(#d6d6d6, #464646);--bitflow-color-neutral-100: light-dark(#f5f5f5, #353535);--bitflow-color-black: #000000;--bitflow-color-white: #ffffff;--bitflow-color-correct: light-dark(#017460, #57a396);--bitflow-color-correct-surface: light-dark(#e6f2ef, #18312d);--bitflow-color-wrong: light-dark(#a3282d, #c67a7d);--bitflow-color-wrong-surface: light-dark(#f8eaea, #3b2021);--bitflow-color-warning: light-dark(#8a6100, #af9452);--bitflow-color-warning-surface: light-dark(#fbf2df, #362d17);--bitflow-color-info: light-dark(#1f5673, #7496a8);--bitflow-color-info-surface: light-dark(#e8f0f4, #1e2a31);--bitflow-color-unknown: var(--bitflow-color-neutral-400);--bitflow-color-manual: light-dark(#5a4b8a, #958cb4);--bitflow-color-manual-surface: light-dark(#eeebf6, #2b2836);--bitflow-color-background: light-dark(#f5f5f5, #1e1e1e);--bitflow-color-surface: light-dark(#ffffff, #2c2c2c);--bitflow-color-border: var(--bitflow-color-neutral-200);--bitflow-color-text: var(--bitflow-color-neutral-900);--bitflow-color-text-muted: var(--bitflow-color-neutral-700);--bitflow-font-family: inherit;--bitflow-font-family-mono: "Ubuntu Mono", Menlo, Consolas, monospace;--bitflow-font-size-small: 14px;--bitflow-font-size-standard: 16px;--bitflow-font-size-large: 20px;--bitflow-font-size-xlarge: 24px;--bitflow-font-weight-standard: 400;--bitflow-font-weight-medium: 500;--bitflow-font-weight-bold: 700;--bitflow-line-height-standard: 1.5;--bitflow-line-height-tight: 1.25;--bitflow-space-xxsmall: 4px;--bitflow-space-xsmall: 8px;--bitflow-space-small: 16px;--bitflow-space-medium: 24px;--bitflow-space-large: 32px;--bitflow-space-xlarge: 48px;--bitflow-radius-small: 4px;--bitflow-radius-standard: 8px;--bitflow-radius-large: 12px;--bitflow-radius-full: 9999px;--bitflow-border-width: 2px;--bitflow-shadow-standard: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--bitflow-shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--bitflow-shadow-outline: 0 0 0 3px color-mix(in srgb, var(--bitflow-color-primary) 40%, transparent);--bitflow-motion-scale: 1;--bitflow-duration-fast: calc(.12s * var(--bitflow-motion-scale));--bitflow-duration-standard: calc(.2s * var(--bitflow-motion-scale))}@media(prefers-reduced-motion:reduce){:root,:host{--bitflow-motion-scale: 0}}.bitflow-root{font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard);line-height:var(--bitflow-line-height-standard);color:var(--bitflow-color-text)}.bitflow-root,.bitflow-root *,.bitflow-root *:before,.bitflow-root *:after{box-sizing:border-box}.bitflow-stack{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-stack-small{gap:var(--bitflow-space-xsmall)}.bitflow-stack-large{gap:var(--bitflow-space-medium)}.bitflow-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-row-end{justify-content:flex-end}.bitflow-row-between{justify-content:space-between}.bitflow-grid{display:grid;gap:var(--bitflow-space-small);grid-template-columns:repeat(auto-fit,minmax(var(--bitflow-grid-min, 220px),1fr))}.bitflow-content{max-width:var(--bitflow-max-width-content, none);margin-inline:auto;width:100%}.bitflow-heading{font-family:var(--bitflow-font-family);font-weight:var(--bitflow-font-weight-bold);line-height:var(--bitflow-line-height-tight);margin:0}h1.bitflow-heading{font-size:var(--bitflow-font-size-xlarge)}h2.bitflow-heading{font-size:var(--bitflow-font-size-large)}h3.bitflow-heading,h4.bitflow-heading,h5.bitflow-heading,h6.bitflow-heading{font-size:var(--bitflow-font-size-standard)}.bitflow-text{margin:0}.bitflow-text-muted{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.bitflow-card{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);box-shadow:var(--bitflow-shadow-standard);padding:var(--bitflow-space-medium)}.bitflow-alert{display:flex;gap:var(--bitflow-space-xsmall);align-items:flex-start;padding:var(--bitflow-space-small);border-radius:var(--bitflow-radius-standard);border-left:4px solid var(--bitflow-alert-accent, var(--bitflow-color-info));background:var(--bitflow-alert-surface, var(--bitflow-color-info-surface));color:var(--bitflow-color-text)}.bitflow-alert[hidden]{display:none}.bitflow-alert-success{--bitflow-alert-accent: var(--bitflow-color-correct);--bitflow-alert-surface: var(--bitflow-color-correct-surface)}.bitflow-alert-error{--bitflow-alert-accent: var(--bitflow-color-wrong);--bitflow-alert-surface: var(--bitflow-color-wrong-surface)}.bitflow-alert-warning{--bitflow-alert-accent: var(--bitflow-color-warning);--bitflow-alert-surface: var(--bitflow-color-warning-surface)}.bitflow-alert-info{--bitflow-alert-accent: var(--bitflow-color-info);--bitflow-alert-surface: var(--bitflow-color-info-surface)}.bitflow-button{font:inherit;font-weight:var(--bitflow-font-weight-medium);display:inline-flex;align-items:center;justify-content:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);min-height:44px;border:var(--bitflow-border-width) solid transparent;border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-primary);color:var(--bitflow-color-on-primary);cursor:pointer;transition:background-color var(--bitflow-duration-fast) ease-out}.bitflow-button:hover:not(:disabled){background:var(--bitflow-color-primary-dark)}.bitflow-button:disabled{opacity:.5;cursor:not-allowed}.bitflow-button-secondary{background:transparent;color:var(--bitflow-color-primary-dark);border-color:var(--bitflow-color-border)}.bitflow-button-secondary:hover:not(:disabled){background:var(--bitflow-color-neutral-100)}.bitflow-button-quiet{background:transparent;color:var(--bitflow-color-text-muted);border-color:transparent}.bitflow-button-quiet:hover:not(:disabled){background:var(--bitflow-color-neutral-100);color:var(--bitflow-color-text)}.bitflow-input,.bitflow-select,.bitflow-textarea{font:inherit;width:100%;padding:var(--bitflow-space-xsmall);min-height:44px;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-textarea{min-height:6em;resize:vertical}.bitflow-input:hover,.bitflow-select:hover,.bitflow-textarea:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-input[aria-invalid=true],.bitflow-select[aria-invalid=true],.bitflow-textarea[aria-invalid=true]{border-color:var(--bitflow-color-wrong)}.bitflow-root :focus-visible{outline:none;box-shadow:var(--bitflow-shadow-outline);border-radius:var(--bitflow-radius-small)}.bitflow-option{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer;transition:border-color var(--bitflow-duration-fast) ease-out}.bitflow-option:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-option:has(:checked){border-color:var(--bitflow-color-primary);background:var(--bitflow-color-correct-surface)}.bitflow-option:has(:disabled){cursor:default;opacity:.75}.bitflow-option input{margin:0;width:1.15em;height:1.15em;flex-shrink:0;accent-color:var(--bitflow-color-primary)}.bitflow-field{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-label{font-weight:var(--bitflow-font-weight-medium)}fieldset.bitflow-field{border:0;margin:0;padding:0;min-width:0}fieldset.bitflow-field>legend{padding:0;margin-bottom:var(--bitflow-space-xxsmall)}:is(h1,h2,h3,h4,h5,h6).bitflow-label{font-size:inherit;line-height:var(--bitflow-line-height-tight)}.bitflow-hint{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-field-error{color:var(--bitflow-color-wrong);font-size:var(--bitflow-font-size-small)}:where(.bitflow-text,.bitflow-text-muted,.bitflow-hint,.bitflow-label,.bitflow-field-error,.bitflow-alert){margin:0}.bitflow-state{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-radius:var(--bitflow-radius-full);font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-medium);background:var(--bitflow-state-surface, var(--bitflow-color-neutral-100));color:var(--bitflow-state-color, var(--bitflow-color-text-muted))}.bitflow-state-correct{--bitflow-state-color: var(--bitflow-color-correct);--bitflow-state-surface: var(--bitflow-color-correct-surface)}.bitflow-state-wrong{--bitflow-state-color: var(--bitflow-color-wrong);--bitflow-state-surface: var(--bitflow-color-wrong-surface)}.bitflow-state-manual{--bitflow-state-color: var(--bitflow-color-manual);--bitflow-state-surface: var(--bitflow-color-manual-surface)}.bitflow-state-unknown{--bitflow-state-color: var(--bitflow-color-text-muted);--bitflow-state-surface: var(--bitflow-color-neutral-100)}.bitflow-report{padding:var(--bitflow-space-medium) var(--bitflow-space-small)}.bitflow-report-score{font-size:var(--bitflow-font-size-xlarge);font-weight:var(--bitflow-font-weight-bold);margin:0}.bitflow-table-scroll{overflow-x:auto;max-width:100%}.bitflow-table{border-collapse:collapse;width:100%;font-size:var(--bitflow-font-size-small)}.bitflow-table th,.bitflow-table td{text-align:left;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-bottom:1px solid var(--bitflow-color-border);white-space:nowrap}.bitflow-table thead th{color:var(--bitflow-color-text-muted);font-weight:var(--bitflow-font-weight-medium);border-bottom:var(--bitflow-border-width) solid var(--bitflow-color-neutral-400)}.bitflow-table tbody th{font-weight:var(--bitflow-font-weight-medium)}.bitflow-table td{font-variant-numeric:tabular-nums}.bitflow-stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:var(--bitflow-space-small);margin:0}.bitflow-stat{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small)}.bitflow-stat-label{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-stat-value{margin:0;font-size:var(--bitflow-font-size-large);font-weight:var(--bitflow-font-weight-bold);font-variant-numeric:tabular-nums}.bitflow-stat-note{margin:0;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}', G = (e) => {
|
|
3
3
|
if (e == null) return "";
|
|
4
4
|
const o = String(e);
|
|
@@ -8,7 +8,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
8
8
|
if (!a?.result) return null;
|
|
9
9
|
const i = R(a.result);
|
|
10
10
|
return i.possible === 0 ? null : i.earned;
|
|
11
|
-
}, Z = (e, o) => e.nodeReports.find((a) => a.nodeId === o)?.result?.state ?? "",
|
|
11
|
+
}, Z = (e, o) => e.nodeReports.find((a) => a.nodeId === o)?.result?.state ?? "", Y = {
|
|
12
12
|
learner: "Learner",
|
|
13
13
|
rank: "Rank",
|
|
14
14
|
earned: "Earned",
|
|
@@ -21,8 +21,8 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
21
21
|
discrimination: "Discrimination",
|
|
22
22
|
averageTries: "Average tries",
|
|
23
23
|
outcome: "Outcome"
|
|
24
|
-
},
|
|
25
|
-
const i = { ...
|
|
24
|
+
}, X = (e, o, a = {}) => {
|
|
25
|
+
const i = { ...Y, ...a.headers }, t = e.items, n = [];
|
|
26
26
|
n.push(
|
|
27
27
|
p([
|
|
28
28
|
i.learner,
|
|
@@ -162,12 +162,12 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
162
162
|
}, ce = (e, o, a, i) => {
|
|
163
163
|
const t = se(), n = [], l = [], s = [], d = [];
|
|
164
164
|
let c = 0;
|
|
165
|
-
return e.forEach((b,
|
|
166
|
-
const w = b.nodeReports.find((
|
|
165
|
+
return e.forEach((b, F) => {
|
|
166
|
+
const w = b.nodeReports.find((V) => V.nodeId === a);
|
|
167
167
|
if (!w) return;
|
|
168
168
|
c += 1, s.push(w.tries), w.elapsedMs !== void 0 && d.push(w.elapsedMs), w.result && (t[w.result.state] += 1);
|
|
169
169
|
const z = T(b, a);
|
|
170
|
-
z !== null && (n.push(z), l.push(o[
|
|
170
|
+
z !== null && (n.push(z), l.push(o[F]));
|
|
171
171
|
}), {
|
|
172
172
|
nodeId: a,
|
|
173
173
|
bitType: i,
|
|
@@ -286,15 +286,15 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
286
286
|
// sends the host results, scores, tries and timings, never what anyone
|
|
287
287
|
// wrote — is still a valid report. Statistics and CSV never read it.
|
|
288
288
|
answer: O().optional(),
|
|
289
|
-
result:
|
|
289
|
+
result: L.optional(),
|
|
290
290
|
tries: m().int().nonnegative(),
|
|
291
291
|
elapsedMs: m().nonnegative().optional()
|
|
292
292
|
}), he = g({
|
|
293
|
-
schemaVersion:
|
|
293
|
+
schemaVersion: Q($),
|
|
294
294
|
flowId: u().min(1),
|
|
295
295
|
flowSchemaVersion: m().int(),
|
|
296
296
|
attemptId: u().min(1),
|
|
297
|
-
status:
|
|
297
|
+
status: K(["completed", "abandoned"]),
|
|
298
298
|
/**
|
|
299
299
|
* Who this report belongs to. Optional and opaque: bitflow never invents an
|
|
300
300
|
* identity, but a group report has to be able to tell one learner from
|
|
@@ -304,7 +304,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
304
304
|
id: u().optional(),
|
|
305
305
|
label: u().optional()
|
|
306
306
|
}).optional(),
|
|
307
|
-
nodeReports:
|
|
307
|
+
nodeReports: W(ue),
|
|
308
308
|
score: g({ earned: m(), possible: m().nonnegative() }).optional(),
|
|
309
309
|
startedAt: I(),
|
|
310
310
|
completedAt: I()
|
|
@@ -341,8 +341,8 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
341
341
|
startedAt: o.startedAt,
|
|
342
342
|
completedAt: o.completedAt ?? o.updatedAt
|
|
343
343
|
};
|
|
344
|
-
},
|
|
345
|
-
const o = typeof e == "string" ?
|
|
344
|
+
}, P = (e) => {
|
|
345
|
+
const o = typeof e == "string" ? C(e) : e;
|
|
346
346
|
if (o === void 0)
|
|
347
347
|
return {
|
|
348
348
|
ok: !1,
|
|
@@ -358,7 +358,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
358
358
|
)
|
|
359
359
|
};
|
|
360
360
|
}, me = (e) => {
|
|
361
|
-
const o = typeof e == "string" ?
|
|
361
|
+
const o = typeof e == "string" ? C(e) : e;
|
|
362
362
|
if (!Array.isArray(o))
|
|
363
363
|
return {
|
|
364
364
|
ok: !1,
|
|
@@ -369,7 +369,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
369
369
|
};
|
|
370
370
|
const a = [];
|
|
371
371
|
for (const [i, t] of o.entries()) {
|
|
372
|
-
const n =
|
|
372
|
+
const n = P(t);
|
|
373
373
|
if (!n.ok)
|
|
374
374
|
return {
|
|
375
375
|
ok: !1,
|
|
@@ -381,7 +381,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
381
381
|
a.push(n.value);
|
|
382
382
|
}
|
|
383
383
|
return { ok: !0, value: a };
|
|
384
|
-
},
|
|
384
|
+
}, C = (e) => {
|
|
385
385
|
try {
|
|
386
386
|
return JSON.parse(e);
|
|
387
387
|
} catch {
|
|
@@ -410,7 +410,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
410
410
|
className: "bitflow-button bitflow-button-secondary",
|
|
411
411
|
onClick: () => pe(
|
|
412
412
|
`${t("csvFilename")}.csv`,
|
|
413
|
-
|
|
413
|
+
X(l, n.value, {
|
|
414
414
|
headers: {
|
|
415
415
|
learner: t("learner"),
|
|
416
416
|
rank: t("rank"),
|
|
@@ -533,7 +533,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
533
533
|
const i = M(o), t = (d, c) => E(D, d, i, c);
|
|
534
534
|
if (e === void 0)
|
|
535
535
|
return /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: t("noReports") });
|
|
536
|
-
const n =
|
|
536
|
+
const n = P(e);
|
|
537
537
|
if (!n.ok)
|
|
538
538
|
return a?.(n.error.message), /* @__PURE__ */ r.jsx("div", { className: "bitflow-alert bitflow-alert-error", role: "alert", children: t("invalidReport") });
|
|
539
539
|
const l = n.value, s = new Date(l.completedAt).getTime() - new Date(l.startedAt).getTime();
|
|
@@ -568,7 +568,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
568
568
|
] }) })
|
|
569
569
|
] });
|
|
570
570
|
};
|
|
571
|
-
|
|
571
|
+
U("bitflow-styles-report", _);
|
|
572
572
|
export {
|
|
573
573
|
ve as N,
|
|
574
574
|
xe as R,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as c, e as v, F as x, U as y, H as F } from "./bitLoaders-
|
|
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",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
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
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
5
|
id: A().min(1),
|
|
@@ -202,16 +202,16 @@ const ie = ".bitflow-mouse{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
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,
|
|
@@ -72,7 +72,7 @@ const D = ".bitflow-end-score{font-size:var(--bitflow-font-size-large);font-weig
|
|
|
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
74
|
/* @__PURE__ */ e.jsx(C, { markdown: a.markdown }),
|
|
75
|
-
t && a.showScore && /* @__PURE__ */ e.jsx(
|
|
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
|
}) => {
|
|
@@ -201,8 +201,8 @@ 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),
|
|
@@ -218,9 +218,9 @@ B({
|
|
|
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
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as X, g as T, F as q, P as he, B as me, U as fe, y as be, r as ge, H as pe } from "./bitLoaders-
|
|
1
|
+
import { P as H, a4 as B, ac as ie, ad as _, a9 as de, a2 as A, Y as W, a5 as ce, a as L, j as w, b as D, aa as ue, s as we } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as X, g as T, F as q, P as he, B as me, U as fe, y as be, r as ge, H as pe } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const xe = ".bitflow-wordsearch{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-wordsearch-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--bitflow-space-medium);align-items:start}.bitflow-wordsearch-grid{display:flex;flex-direction:column;width:min(100%,calc(var(--bitflow-wordsearch-columns, 10) * 2rem));border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);-webkit-user-select:none;user-select:none;touch-action:none;cursor:crosshair}.bitflow-wordsearch-grid:focus-visible{outline:none;box-shadow:var(--bitflow-shadow-outline)}.bitflow-wordsearch-row{display:flex}.bitflow-wordsearch-cell{display:flex;align-items:center;justify-content:center;flex:1 1 0;min-width:0;aspect-ratio:1;container-type:inline-size;color:var(--bitflow-color-text)}.bitflow-wordsearch-letter{font-family:var(--bitflow-font-family-mono);font-size:55cqw;line-height:1;text-transform:uppercase}.bitflow-wordsearch-cell-found{background:var(--bitflow-color-correct-surface);color:var(--bitflow-color-correct);font-weight:var(--bitflow-font-weight-bold);border-radius:var(--bitflow-radius-full)}.bitflow-wordsearch-cell-drawing{background:var(--bitflow-color-primary-light);border-radius:var(--bitflow-radius-full)}.bitflow-wordsearch-cell-cursor{box-shadow:inset 0 0 0 2px var(--bitflow-color-primary);border-radius:var(--bitflow-radius-full)}.bitflow-wordsearch-words{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-wordsearch-list{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall) var(--bitflow-space-small);padding:0;margin:0;list-style:none}.bitflow-wordsearch-word{font-family:var(--bitflow-font-family-mono);text-transform:uppercase;letter-spacing:.05em}.bitflow-wordsearch-word-found{color:var(--bitflow-color-text-muted);text-decoration:line-through}.bitflow-wordsearch-missed{margin-inline-start:var(--bitflow-space-xxsmall);font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-small);letter-spacing:normal;text-transform:none;color:var(--bitflow-color-wrong)}.bitflow-wordsearch-preview{margin-top:var(--bitflow-space-xxsmall);cursor:default}", y = {
|
|
4
4
|
east: { row: 0, column: 1 },
|
|
5
5
|
west: { row: 0, column: -1 },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as v, M as w, C as b, P as N, B as j, U as x, H as
|
|
3
|
-
const
|
|
1
|
+
import { P as u, a9 as f, ac as g, ad as m, ab as c, a2 as y, j as n, b as r, s as p, aa as k } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as v, M as w, C as b, P as N, B as j, U as x, H as W } from "./bitLoaders-7qanePQL.js";
|
|
3
|
+
const q = ".bitflow-yes-no{border:0;margin:0;padding:0;display:flex;gap:var(--bitflow-space-xsmall)}.bitflow-yes-no .bitflow-option{flex:1;justify-content:center;align-items:center}", L = ({
|
|
4
4
|
data: e,
|
|
5
5
|
answer: o
|
|
6
6
|
}) => {
|
|
@@ -147,13 +147,13 @@ const W = ".bitflow-yes-no{border:0;margin:0;padding:0;display:flex;gap:var(--bi
|
|
|
147
147
|
) })
|
|
148
148
|
] });
|
|
149
149
|
};
|
|
150
|
-
p("bitflow-styles-task-yes-no",
|
|
150
|
+
p("bitflow-styles-task-yes-no", q);
|
|
151
151
|
const h = "task-yes-no";
|
|
152
152
|
k({
|
|
153
153
|
type: h,
|
|
154
154
|
kind: "task",
|
|
155
155
|
schema: C,
|
|
156
|
-
evaluate:
|
|
156
|
+
evaluate: L,
|
|
157
157
|
Task: A,
|
|
158
158
|
Form: E,
|
|
159
159
|
info: (e) => ({
|
|
@@ -166,13 +166,13 @@ k({
|
|
|
166
166
|
evaluation: m()
|
|
167
167
|
})
|
|
168
168
|
});
|
|
169
|
-
|
|
169
|
+
W(h);
|
|
170
170
|
export {
|
|
171
171
|
Y as AnswerSchema,
|
|
172
172
|
C as DataSchema,
|
|
173
173
|
E as Form,
|
|
174
174
|
h as TYPE,
|
|
175
175
|
A as Task,
|
|
176
|
-
|
|
176
|
+
L as evaluate,
|
|
177
177
|
d as messages
|
|
178
178
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as T, g as w, P as W, B as
|
|
3
|
-
const
|
|
1
|
+
import { P as v, ac as A, ad as M, al as H, Y as O, a2 as k, a9 as U, j as l, b as u, a as m, a4 as D, a5 as B, aa as $, s as q } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as T, g as w, P as W, B as Y, U as G, H as I } from "./bitLoaders-7qanePQL.js";
|
|
3
|
+
const K = ".bitflow-highlight-maroon{background:#f6d6d6;color:#4a1010}.bitflow-highlight-orange{background:#ffe0bd;color:#4a2c00}.bitflow-highlight-blue{background:#cfe0f7;color:#10294a}.bitflow-highlight-lavender{background:#e2dbf5;color:#2b1f4a}.bitflow-highlight-yellow{background:#fbf1b8;color:#453c00}.bitflow-highlight-palette{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-highlight-swatch{display:inline-flex;align-items:center;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);min-height:44px;border:var(--bitflow-border-width) solid transparent;border-radius:var(--bitflow-radius-standard);cursor:pointer;font-size:var(--bitflow-font-size-small)}.bitflow-highlight-swatch:has(:checked){border-color:var(--bitflow-color-neutral-900);font-weight:var(--bitflow-font-weight-bold)}.bitflow-highlight-swatch:has(:focus-visible){box-shadow:var(--bitflow-shadow-outline)}.bitflow-highlight-eraser{background:var(--bitflow-color-neutral-100)}.bitflow-highlight-text{white-space:pre-wrap;line-height:var(--bitflow-line-height-relaxed, 1.8);margin:0}.bitflow-highlight-text{cursor:text}.bitflow-highlight-token[role=button]{cursor:pointer;border-radius:var(--bitflow-radius-small);text-decoration:underline dotted var(--bitflow-color-neutral-400);text-underline-offset:3px}.bitflow-highlight-token[role=button]:hover{background:var(--bitflow-color-neutral-100);text-decoration-color:var(--bitflow-color-neutral-900)}.bitflow-highlight-token[role=button]:focus-visible{box-shadow:var(--bitflow-shadow-outline)}@media(pointer:coarse){.bitflow-highlight-text{line-height:2.2}.bitflow-highlight-token[role=button]{padding-block:4px;box-decoration-break:clone;-webkit-box-decoration-break:clone}}.bitflow-highlight-text ::selection{background:var(--bitflow-color-primary-light)}.bitflow-highlight-agreement{margin:0;padding-left:var(--bitflow-space-small);color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-highlight-color-row{display:flex;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-highlight-cutoff{display:flex;align-items:center;justify-content:space-between;gap:var(--bitflow-space-xsmall)}.bitflow-highlight-cutoff input{max-width:6em}", f = ["maroon", "orange", "blue", "lavender", "yellow"], j = B(f), P = D(j.nullable()), _ = v({
|
|
4
4
|
instruction: k().default(""),
|
|
5
5
|
text: k().default(""),
|
|
6
6
|
// `partialRecord`, not `record`: a task uses one or two colours, and a
|
|
@@ -294,7 +294,7 @@ const Y = ".bitflow-highlight-maroon{background:#f6d6d6;color:#4a1010}.bitflow-h
|
|
|
294
294
|
}) => {
|
|
295
295
|
const s = i?.detail?.agreement ?? {};
|
|
296
296
|
return /* @__PURE__ */ l.jsxs("div", { className: "bitflow-stack", children: [
|
|
297
|
-
/* @__PURE__ */ l.jsx(
|
|
297
|
+
/* @__PURE__ */ l.jsx(G, { markdown: e.instruction }),
|
|
298
298
|
/* @__PURE__ */ l.jsx(
|
|
299
299
|
z,
|
|
300
300
|
{
|
|
@@ -428,7 +428,7 @@ const Y = ".bitflow-highlight-maroon{background:#f6d6d6;color:#4a1010}.bitflow-h
|
|
|
428
428
|
] }, a))
|
|
429
429
|
] }),
|
|
430
430
|
/* @__PURE__ */ l.jsx(
|
|
431
|
-
|
|
431
|
+
Y,
|
|
432
432
|
{
|
|
433
433
|
evaluation: e.evaluation,
|
|
434
434
|
locale: o,
|
|
@@ -458,8 +458,8 @@ $({
|
|
|
458
458
|
evaluation: M()
|
|
459
459
|
})
|
|
460
460
|
});
|
|
461
|
-
|
|
462
|
-
q("bitflow-styles-task-highlighting",
|
|
461
|
+
I(F);
|
|
462
|
+
q("bitflow-styles-task-highlighting", K);
|
|
463
463
|
export {
|
|
464
464
|
re as AnswerSchema,
|
|
465
465
|
f as COLORS,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as E, C as G, g as C, i as y, P as
|
|
1
|
+
import { P as S, ak as Z, a2 as f, Y as F, j as t, a5 as q, ac as U, ad as R, a9 as T, a4 as $, b as N, aa as V, s as B } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as E, C as G, g as C, i as y, P as Y, F as A, B as _, U as J, H as Q } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const X = ["value", "output", "line"], ee = q(X), te = S({
|
|
4
4
|
/** Stable across edits, so an answer keeps pointing at the same column. */
|
|
5
5
|
id: f().min(1),
|
|
@@ -725,7 +725,7 @@ const X = ["value", "output", "line"], ee = q(X), te = S({
|
|
|
725
725
|
))
|
|
726
726
|
] })
|
|
727
727
|
] }),
|
|
728
|
-
/* @__PURE__ */ t.jsxs(
|
|
728
|
+
/* @__PURE__ */ t.jsxs(Y, { summary: n("advanced"), children: [
|
|
729
729
|
/* @__PURE__ */ t.jsx(
|
|
730
730
|
A,
|
|
731
731
|
{
|
|
@@ -754,7 +754,7 @@ const X = ["value", "output", "line"], ee = q(X), te = S({
|
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
756
|
/* @__PURE__ */ t.jsx(
|
|
757
|
-
|
|
757
|
+
_,
|
|
758
758
|
{
|
|
759
759
|
evaluation: e.evaluation,
|
|
760
760
|
locale: i,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as k, g as m, P, F as T, M as R, r as A, B as F, U as q, H as G } from "./bitLoaders-
|
|
1
|
+
import { P as j, a9 as g, Y as b, a2 as f, ac as z, ad as O, j as t, a5 as D, a as p, b as h, aa as W, s as E } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as k, g as m, P, F as T, M as R, r as A, B as F, U as q, H as G } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const K = ".bitflow-typing{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-typing-passage{margin:0;padding:var(--bitflow-space-xsmall);font-family:var(--bitflow-font-family-mono);font-size:var(--bitflow-font-size-standard);line-height:var(--bitflow-line-height-standard);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-standard)}.bitflow-typing-character-pending{color:var(--bitflow-color-text-muted)}.bitflow-typing-character-right{color:var(--bitflow-color-correct)}.bitflow-typing-character-wrong{color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface);text-decoration:underline}.bitflow-typing-input{width:100%;padding:var(--bitflow-space-xsmall);font-family:var(--bitflow-font-family-mono);font-size:var(--bitflow-font-size-standard);line-height:var(--bitflow-line-height-standard);color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);resize:vertical}.bitflow-typing-input:focus-visible{outline:none;box-shadow:var(--bitflow-shadow-outline)}.bitflow-typing-input:disabled{-webkit-text-fill-color:var(--bitflow-color-text);opacity:1}.bitflow-typing-touch-notice.bitflow-alert-warning{display:none}@media(pointer:coarse){.bitflow-typing-touch-notice.bitflow-alert-warning{display:flex}}.bitflow-typing-meters{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-small);margin:0;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted);font-variant-numeric:tabular-nums}", Z = D(["accuracy", "accuracyAndSpeed"]), U = j({
|
|
4
4
|
instruction: f().default(""),
|
|
5
5
|
/** The text to type back. */
|
|
@@ -49,11 +49,11 @@ const K = ".bitflow-typing{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
49
49
|
for (let o = 0; o < Math.min(e.length, n.length); o++)
|
|
50
50
|
e[o] === n[o] && i++;
|
|
51
51
|
return i;
|
|
52
|
-
},
|
|
52
|
+
}, Y = (e, n) => {
|
|
53
53
|
const i = Math.max(e.length, n.length);
|
|
54
54
|
return i === 0 ? 1 : y(e, n) / i;
|
|
55
|
-
},
|
|
56
|
-
const i = n?.typed ?? "", o = e.timed ? n?.elapsedMs ?? 0 : 0, r =
|
|
55
|
+
}, $ = (e, n, i) => i <= 0 ? 0 : y(e, n) / 5 / (i / 6e4), M = (e, n) => {
|
|
56
|
+
const i = n?.typed ?? "", o = e.timed ? n?.elapsedMs ?? 0 : 0, r = Y(e.text, i), s = e.timed ? $(e.text, i, o) : 0;
|
|
57
57
|
return {
|
|
58
58
|
correct: y(e.text, i),
|
|
59
59
|
accuracy: r,
|
|
@@ -62,10 +62,10 @@ const K = ".bitflow-typing{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
62
62
|
accurateEnough: i.length > 0 && r >= e.requiredAccuracy,
|
|
63
63
|
fastEnough: e.timed && s >= e.targetWpm
|
|
64
64
|
};
|
|
65
|
-
},
|
|
65
|
+
}, B = (e, n) => {
|
|
66
66
|
const i = M(e, n), o = e.scoring === "accuracyAndSpeed" ? 2 : 1;
|
|
67
67
|
return { earned: (i.accurateEnough ? 1 : 0) + (e.scoring === "accuracyAndSpeed" && i.fastEnough ? 1 : 0), possible: o };
|
|
68
|
-
},
|
|
68
|
+
}, I = ({
|
|
69
69
|
data: e,
|
|
70
70
|
answer: n
|
|
71
71
|
}) => {
|
|
@@ -78,7 +78,7 @@ const K = ".bitflow-typing{display:flex;flex-direction:column;gap:var(--bitflow-
|
|
|
78
78
|
allowRetry: !1,
|
|
79
79
|
detail: { optedOut: !0 }
|
|
80
80
|
};
|
|
81
|
-
const i = M(e, n), o =
|
|
81
|
+
const i = M(e, n), o = B(e, n);
|
|
82
82
|
return {
|
|
83
83
|
state: o.earned === o.possible ? "correct" : "wrong",
|
|
84
84
|
score: o,
|
|
@@ -392,7 +392,7 @@ W({
|
|
|
392
392
|
type: N,
|
|
393
393
|
kind: "task",
|
|
394
394
|
schema: U,
|
|
395
|
-
evaluate:
|
|
395
|
+
evaluate: I,
|
|
396
396
|
Task: Q,
|
|
397
397
|
Form: X,
|
|
398
398
|
info: (e) => ({
|
|
@@ -420,12 +420,12 @@ export {
|
|
|
420
420
|
N as TYPE,
|
|
421
421
|
Q as Task,
|
|
422
422
|
J as Typist,
|
|
423
|
-
|
|
423
|
+
Y as accuracyOf,
|
|
424
424
|
y as correctCharacters,
|
|
425
|
-
|
|
425
|
+
I as evaluate,
|
|
426
426
|
V as formMessages,
|
|
427
427
|
M as measure,
|
|
428
428
|
w as messages,
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
B as scoreOf,
|
|
430
|
+
$ as wordsPerMinute
|
|
431
431
|
};
|