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,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitflow-space-
|
|
1
|
+
import { P as I, a4 as z, ac as W, ad as q, a2 as k, j as r, am as G, a5 as Z, a as j, b as N, aa as _, s as J } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { $ as Q, e as V, g as y, P as $, M as ee, h as te, C as ie, B as ne, q as oe, y as re, U as ae, H as se } from "./bitLoaders-7qanePQL.js";
|
|
3
|
+
const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-ordering-list{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);padding:0;margin:0;list-style:none}.bitflow-ordering-item{display:flex;gap:var(--bitflow-space-xsmall);align-items:center;width:100%;padding:var(--bitflow-space-xsmall);font:inherit;color:var(--bitflow-color-text);text-align:left;cursor:grab;background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);touch-action:manipulation}.bitflow-ordering-grip{flex:none;align-self:stretch;display:flex;align-items:center;justify-content:center;width:2rem;margin-block:calc(-1 * var(--bitflow-space-xsmall));margin-inline-start:calc(-1 * var(--bitflow-space-xsmall));touch-action:none;cursor:grab}.bitflow-ordering-grip:before{content:"";width:12px;height:18px;background:radial-gradient(circle,var(--bitflow-color-neutral-400) 1.5px,transparent 2px) 0 0 / 6px 6px}.bitflow-ordering-item:disabled{cursor:default}.bitflow-ordering-position{flex:none;width:1.75rem;height:1.75rem;font-variant-numeric:tabular-nums;line-height:1.75rem;text-align:center;background:var(--bitflow-color-neutral-100);border-radius:50%}.bitflow-ordering-image{max-height:4rem}.bitflow-ordering-item.bitflow-ordering-item-gap{background:var(--bitflow-color-neutral-100);border-style:dashed;border-color:var(--bitflow-color-primary)}.bitflow-ordering-lifted{position:fixed;top:0;left:0;z-index:10;cursor:grabbing;pointer-events:none;box-shadow:var(--bitflow-shadow-medium)}.bitflow-ordering-item.bitflow-ordering-item-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-correct)}.bitflow-ordering-item.bitflow-ordering-item-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-wrong)}', de = (e, n) => e.items.filter((a, s) => n[s] === a.id).map((a) => a.id), me = ({
|
|
4
4
|
data: e,
|
|
5
5
|
answer: n
|
|
6
6
|
}) => {
|
|
@@ -54,7 +54,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
54
54
|
* In the order they belong. The learner never sees this order; it is the
|
|
55
55
|
* answer.
|
|
56
56
|
*/
|
|
57
|
-
items:
|
|
57
|
+
items: z(ce).default([]),
|
|
58
58
|
evaluation: W.default(q)
|
|
59
59
|
}).check((e) => {
|
|
60
60
|
const n = e.value.items.map((a) => a.id);
|
|
@@ -81,7 +81,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
81
81
|
path: ["items"],
|
|
82
82
|
message: "Add at least three items. Fewer than that is not an ordering."
|
|
83
83
|
});
|
|
84
|
-
}),
|
|
84
|
+
}), Me = I({
|
|
85
85
|
/**
|
|
86
86
|
* The item ids in the order the learner has put them.
|
|
87
87
|
*
|
|
@@ -89,7 +89,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
89
89
|
* renaming the items — and so a stale answer referring to a deleted item is
|
|
90
90
|
* something the runtime can notice rather than silently misread.
|
|
91
91
|
*/
|
|
92
|
-
order:
|
|
92
|
+
order: z(k()).default([])
|
|
93
93
|
}), he = {
|
|
94
94
|
en: {
|
|
95
95
|
instructionLabel: "Instruction",
|
|
@@ -137,7 +137,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
137
137
|
readonly: o,
|
|
138
138
|
onReorder: h
|
|
139
139
|
}) => {
|
|
140
|
-
const f = (t, l) => N(P, t, s, l), [g, x] = j.useState(""), w = j.useRef(null), i = j.useRef(null), [, m] = j.useReducer((t) => t + 1, 0), d = (t) => e.find((l) => l.id === t), p = (t) => t.label || t.id,
|
|
140
|
+
const f = (t, l) => N(P, t, s, l), [g, x] = j.useState(""), w = j.useRef(null), i = j.useRef(null), [, m] = j.useReducer((t) => t + 1, 0), d = (t) => e.find((l) => l.id === t), p = (t) => t.label || t.id, E = a !== void 0, u = i.current, C = u ? u.order : n, A = (t, l) => {
|
|
141
141
|
const c = d(t);
|
|
142
142
|
x(
|
|
143
143
|
f("moved", {
|
|
@@ -146,18 +146,18 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
146
146
|
total: l.length
|
|
147
147
|
})
|
|
148
148
|
);
|
|
149
|
-
},
|
|
149
|
+
}, U = (t, l) => {
|
|
150
150
|
if (o) return;
|
|
151
151
|
const c = n.indexOf(t), b = Math.min(Math.max(l, 0), n.length - 1);
|
|
152
|
-
c === -1 || c === b || (h(
|
|
153
|
-
},
|
|
152
|
+
c === -1 || c === b || (h(M(n, t, b)), A(t, M(n, t, b)));
|
|
153
|
+
}, F = (t) => {
|
|
154
154
|
const l = [...w.current?.querySelectorAll("li") ?? []];
|
|
155
155
|
for (let c = 0; c < l.length; c++) {
|
|
156
156
|
const b = l[c].getBoundingClientRect();
|
|
157
157
|
if (t < b.top + b.height / 2) return c;
|
|
158
158
|
}
|
|
159
159
|
return Math.max(0, l.length - 1);
|
|
160
|
-
},
|
|
160
|
+
}, O = (t, l) => {
|
|
161
161
|
if (o || t.button !== 0 || be(t.pointerType) && !fe(t.target)) return;
|
|
162
162
|
const c = t.currentTarget.getBoundingClientRect();
|
|
163
163
|
i.current = {
|
|
@@ -176,34 +176,34 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
176
176
|
}, D = (t) => {
|
|
177
177
|
const l = i.current;
|
|
178
178
|
if (!l) return;
|
|
179
|
-
const c =
|
|
179
|
+
const c = F(t.clientY);
|
|
180
180
|
i.current = {
|
|
181
181
|
...l,
|
|
182
182
|
x: t.clientX,
|
|
183
183
|
y: t.clientY,
|
|
184
|
-
order:
|
|
184
|
+
order: M(l.order, l.id, c),
|
|
185
185
|
// Measured from where the drag began, not from the last position: a
|
|
186
186
|
// slow drag moves a pixel at a time and would otherwise never count as
|
|
187
187
|
// a drag at all.
|
|
188
188
|
moved: l.moved || Math.abs(t.clientX - l.fromX) > 3 || Math.abs(t.clientY - l.fromY) > 3
|
|
189
|
-
}, i.current.moved &&
|
|
189
|
+
}, i.current.moved && Y.follow(w.current, t.clientX, t.clientY), m();
|
|
190
190
|
}, K = () => {
|
|
191
|
-
|
|
191
|
+
Y.stop();
|
|
192
192
|
const t = i.current;
|
|
193
|
-
i.current = null, m(), !(!t || !t.moved) && t.order.join() !== n.join() && (h(t.order),
|
|
194
|
-
},
|
|
193
|
+
i.current = null, m(), !(!t || !t.moved) && t.order.join() !== n.join() && (h(t.order), A(t.id, t.order));
|
|
194
|
+
}, Y = oe(() => {
|
|
195
195
|
const t = i.current;
|
|
196
196
|
t && D({ clientX: t.x, clientY: t.y });
|
|
197
197
|
});
|
|
198
198
|
re(D, K);
|
|
199
|
-
const
|
|
199
|
+
const S = u?.moved ? d(u.id) : void 0;
|
|
200
200
|
return /* @__PURE__ */ r.jsxs("div", { className: "bitflow-ordering", children: [
|
|
201
201
|
/* @__PURE__ */ r.jsx("p", { className: "bitflow-hint", children: f(o ? "howToReadonly" : "howTo") }),
|
|
202
|
-
/* @__PURE__ */ r.jsx("ol", { className: "bitflow-ordering-list", ref: w, children:
|
|
202
|
+
/* @__PURE__ */ r.jsx("ol", { className: "bitflow-ordering-list", ref: w, children: C.map((t, l) => {
|
|
203
203
|
const c = d(t);
|
|
204
204
|
if (!c) return null;
|
|
205
205
|
const b = a?.includes(t), R = u?.moved === !0 && u.id === t, T = ["bitflow-ordering-item"];
|
|
206
|
-
return
|
|
206
|
+
return E && T.push(
|
|
207
207
|
b ? "bitflow-ordering-item-correct" : "bitflow-ordering-item-wrong"
|
|
208
208
|
), R && T.push("bitflow-ordering-item-gap"), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs(
|
|
209
209
|
"button",
|
|
@@ -215,20 +215,20 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
215
215
|
"aria-label": f("itemLabel", {
|
|
216
216
|
item: p(c),
|
|
217
217
|
position: l + 1,
|
|
218
|
-
total:
|
|
218
|
+
total: C.length
|
|
219
219
|
}),
|
|
220
|
-
onPointerDown: (v) =>
|
|
220
|
+
onPointerDown: (v) => O(v, t),
|
|
221
221
|
onKeyDown: (v) => {
|
|
222
|
-
const
|
|
223
|
-
|
|
222
|
+
const H = v.key === "ArrowUp" ? -1 : v.key === "ArrowDown" ? 1 : 0;
|
|
223
|
+
H !== 0 && (v.preventDefault(), U(t, l + H));
|
|
224
224
|
},
|
|
225
225
|
children: [
|
|
226
226
|
!R && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
227
|
-
!o && /* @__PURE__ */ r.jsx(
|
|
227
|
+
!o && /* @__PURE__ */ r.jsx(L, {}),
|
|
228
228
|
/* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-position", "aria-hidden": "true", children: l + 1 }),
|
|
229
|
-
|
|
229
|
+
X(c)
|
|
230
230
|
] }),
|
|
231
|
-
|
|
231
|
+
E && /* @__PURE__ */ r.jsxs("span", { className: "bitflow-visually-hidden", children: [
|
|
232
232
|
" ",
|
|
233
233
|
f(b ? "itemRight" : "itemWrong")
|
|
234
234
|
] })
|
|
@@ -236,7 +236,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
236
236
|
}
|
|
237
237
|
) }, t);
|
|
238
238
|
}) }),
|
|
239
|
-
|
|
239
|
+
S && u && /* @__PURE__ */ r.jsxs(
|
|
240
240
|
"div",
|
|
241
241
|
{
|
|
242
242
|
className: "bitflow-ordering-item bitflow-ordering-lifted",
|
|
@@ -247,15 +247,15 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
247
247
|
transform: `translate(${u.x - u.grabX}px, ${u.y - u.grabY}px)`
|
|
248
248
|
},
|
|
249
249
|
children: [
|
|
250
|
-
/* @__PURE__ */ r.jsx(
|
|
250
|
+
/* @__PURE__ */ r.jsx(L, {}),
|
|
251
251
|
/* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-position", children: u.order.indexOf(u.id) + 1 }),
|
|
252
|
-
|
|
252
|
+
X(S)
|
|
253
253
|
]
|
|
254
254
|
}
|
|
255
255
|
),
|
|
256
256
|
/* @__PURE__ */ r.jsx("div", { className: "bitflow-visually-hidden", role: "status", "aria-live": "polite", children: g })
|
|
257
257
|
] });
|
|
258
|
-
},
|
|
258
|
+
}, L = () => /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-grip", "aria-hidden": "true" }), be = (e) => e === "touch" || e === "pen", fe = (e) => e instanceof Element && e.closest(".bitflow-ordering-grip") !== null, X = (e) => e.kind === "image" && e.image?.src ? /* @__PURE__ */ r.jsx(
|
|
259
259
|
"img",
|
|
260
260
|
{
|
|
261
261
|
className: "bitflow-ordering-image",
|
|
@@ -263,7 +263,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
263
263
|
alt: "",
|
|
264
264
|
draggable: !1
|
|
265
265
|
}
|
|
266
|
-
) : /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-text", children: e.label || e.id }),
|
|
266
|
+
) : /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-text", children: e.label || e.id }), M = (e, n, a) => {
|
|
267
267
|
const s = e.indexOf(n);
|
|
268
268
|
if (s === -1) return e;
|
|
269
269
|
const o = [...e];
|
|
@@ -373,7 +373,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
373
373
|
y(s, "items") && /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: y(s, "items") }),
|
|
374
374
|
e.items.length === 0 && /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: o("noItems") }),
|
|
375
375
|
e.items.map((i, m) => /* @__PURE__ */ r.jsx("div", { className: "bitflow-rule", children: /* @__PURE__ */ r.jsxs(
|
|
376
|
-
|
|
376
|
+
$,
|
|
377
377
|
{
|
|
378
378
|
...f.props(i.id),
|
|
379
379
|
summary: i.label || o("unnamedItem"),
|
|
@@ -474,7 +474,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
|
|
|
474
474
|
)
|
|
475
475
|
] })
|
|
476
476
|
] }),
|
|
477
|
-
/* @__PURE__ */ r.jsx(
|
|
477
|
+
/* @__PURE__ */ r.jsx($, { summary: o("advanced"), children: /* @__PURE__ */ r.jsx(
|
|
478
478
|
ne,
|
|
479
479
|
{
|
|
480
480
|
evaluation: e.evaluation,
|
|
@@ -504,7 +504,7 @@ _({
|
|
|
504
504
|
se(B);
|
|
505
505
|
J("bitflow-styles-task-ordering", le);
|
|
506
506
|
export {
|
|
507
|
-
|
|
507
|
+
Me as AnswerSchema,
|
|
508
508
|
ue as DataSchema,
|
|
509
509
|
Ne as Form,
|
|
510
510
|
ce as ItemSchema,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflow-space-
|
|
1
|
+
import { P as D, a4 as ee, ac as ue, ad as te, a5 as fe, a9 as B, a2 as M, a as y, j as i, Y as ne, b as P, aa as pe, s as me } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as Z, C as he, g as Y, P as be, M as ge, F as V, B as we, q as ve, y as xe, U as ye, H as ke } from "./bitLoaders-7qanePQL.js";
|
|
3
|
+
const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-parsons-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:var(--bitflow-space-small)}.bitflow-parsons-list{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);padding:0;margin:var(--bitflow-space-xxsmall) 0 0;list-style:none}.bitflow-parsons-columns>*>.bitflow-text-muted{display:flex;align-items:center;justify-content:center;min-height:6rem;margin-top:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-small);text-align:center;border:var(--bitflow-border-width) dashed var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-parsons-line{display:flex;gap:var(--bitflow-space-xsmall);align-items:center;margin-inline-start:var(--bitflow-parsons-indent, 0rem);width:calc(100% - var(--bitflow-parsons-indent, 0rem));padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);font:inherit;color:var(--bitflow-color-text);text-align:left;cursor:grab;background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);touch-action:manipulation}.bitflow-parsons-line:disabled{cursor:default}.bitflow-parsons-grip{flex:none;align-self:stretch;display:flex;align-items:center;justify-content:center;width:2rem;margin-block:calc(-1 * var(--bitflow-space-xxsmall));margin-inline-start:calc(-1 * var(--bitflow-space-xsmall));touch-action:none;cursor:grab}.bitflow-parsons-grip:before{content:"";width:12px;height:18px;background:radial-gradient(circle,var(--bitflow-color-neutral-400) 1.5px,transparent 2px) 0 0 / 6px 6px}.bitflow-parsons-line code{flex:1;min-width:0;font-family:var(--bitflow-font-family-mono);font-size:var(--bitflow-font-size-small);white-space:pre-wrap;overflow-wrap:anywhere;padding-inline-start:2ch;text-indent:-2ch}.bitflow-parsons-number{flex:none;width:1.5rem;font-size:var(--bitflow-font-size-small);font-variant-numeric:tabular-nums;color:var(--bitflow-color-text-muted);text-align:right}.bitflow-parsons-line.bitflow-parsons-line-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-correct)}.bitflow-parsons-line.bitflow-parsons-line-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-wrong)}.bitflow-parsons-line.bitflow-parsons-line-stray{background:var(--bitflow-color-neutral-100);border-style:dashed;border-color:var(--bitflow-color-wrong)}.bitflow-parsons-line.bitflow-parsons-line-gap{background:var(--bitflow-color-neutral-100);border-style:dashed;border-color:var(--bitflow-color-primary)}.bitflow-parsons-lifted{position:fixed;top:0;left:0;z-index:10;cursor:grabbing;pointer-events:none;box-shadow:var(--bitflow-shadow-medium)}.bitflow-parsons-lifted.bitflow-parsons-lifted-out{opacity:.55;border-style:dashed}.bitflow-parsons-read{margin:0;padding:var(--bitflow-space-xsmall);list-style:none;background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);overflow-x:auto}.bitflow-parsons-read-line{display:flex;align-items:baseline;gap:var(--bitflow-space-xsmall)}.bitflow-parsons-read-line code{font-family:var(--bitflow-font-family-mono);font-size:var(--bitflow-font-size-small);white-space:pre}.bitflow-parsons-read-level{flex:none;min-width:var(--bitflow-parsons-level-width, 4.5rem);font-size:var(--bitflow-font-size-small);font-variant-numeric:tabular-nums;color:var(--bitflow-color-text-muted);-webkit-user-select:none;user-select:none}.bitflow-parsons-structogram .bitflow-parsons-line code{font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard)}.bitflow-parsons-structogram .bitflow-parsons-program{gap:0}.bitflow-parsons-structogram .bitflow-parsons-program .bitflow-parsons-line{margin-inline-start:0;width:100%;border-radius:0;margin-top:calc(-1 * var(--bitflow-border-width));padding-inline-start:calc(var(--bitflow-parsons-indent, 0rem) + var(--bitflow-space-xsmall));background-image:repeating-linear-gradient(to right,var(--bitflow-color-neutral-200) 0 calc(1.5rem - 2px),var(--bitflow-color-neutral-700) calc(1.5rem - 2px) 1.5rem);background-size:var(--bitflow-parsons-indent, 0rem) 100%;background-repeat:no-repeat}.bitflow-parsons-structogram .bitflow-parsons-program li:first-child .bitflow-parsons-line{margin-top:0;border-start-start-radius:var(--bitflow-radius-standard);border-start-end-radius:var(--bitflow-radius-standard)}.bitflow-parsons-structogram .bitflow-parsons-program li:last-child .bitflow-parsons-line{border-end-start-radius:var(--bitflow-radius-standard);border-end-end-radius:var(--bitflow-radius-standard)}.bitflow-parsons-row{display:flex;align-items:stretch;gap:var(--bitflow-space-xxsmall)}.bitflow-parsons-row>.bitflow-parsons-line{flex:1;min-width:0}.bitflow-parsons-actions{display:none;flex:none;grid-template-rows:1fr 1fr;grid-auto-flow:column;gap:2px}@media(pointer:coarse){.bitflow-parsons-actions{display:grid}}.bitflow-parsons-action{min-width:2rem;min-height:1.5rem;padding:0;font:inherit;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-small);cursor:pointer}.bitflow-parsons-action:disabled{opacity:.4;cursor:default}.bitflow-parsons-structogram .bitflow-parsons-program .bitflow-parsons-line-branch{position:relative;padding-bottom:1.25em;background-image:linear-gradient(to top right,transparent calc(50% - 1px),var(--bitflow-color-neutral-700) 50%,transparent calc(50% + 1px)),linear-gradient(to top left,transparent calc(50% - 1px),var(--bitflow-color-neutral-700) 50%,transparent calc(50% + 1px)),repeating-linear-gradient(to right,var(--bitflow-color-neutral-200) 0 calc(1.5rem - 2px),var(--bitflow-color-neutral-700) calc(1.5rem - 2px) 1.5rem);background-size:calc((100% - var(--bitflow-parsons-indent, 0rem)) / 2) 100%,calc((100% - var(--bitflow-parsons-indent, 0rem)) / 2) 100%,var(--bitflow-parsons-indent, 0rem) 100%;background-position:var(--bitflow-parsons-indent, 0rem) 0,100% 0,0 0;background-repeat:no-repeat}.bitflow-parsons-structogram .bitflow-parsons-line-branch code{text-align:center}.bitflow-parsons-cases{position:absolute;inset-inline:calc(var(--bitflow-parsons-indent, 0rem) + var(--bitflow-space-xsmall)) var(--bitflow-space-xsmall);bottom:2px;display:flex;justify-content:space-between;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted);pointer-events:none}.bitflow-parsons-structogram .bitflow-parsons-program .bitflow-parsons-line-else code{font-style:italic;color:var(--bitflow-color-text-muted)}.bitflow-parsons-structogram .bitflow-parsons-program .bitflow-parsons-line-else{border-top-style:double;border-top-width:4px}', ae = (e) => e.lines.filter((n) => !n.distractor), ze = (e, n) => {
|
|
4
4
|
const l = ae(e), r = (a) => e.lines.find((c) => c.id === a)?.distractor === !0;
|
|
5
5
|
return n.map((a, c) => {
|
|
6
6
|
const s = l[c], m = s !== void 0 && s.id === a.lineId;
|
|
@@ -11,7 +11,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
11
11
|
distractor: r(a.lineId)
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
|
-
},
|
|
14
|
+
}, Ie = ({
|
|
15
15
|
data: e,
|
|
16
16
|
answer: n
|
|
17
17
|
}) => {
|
|
@@ -89,7 +89,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
89
89
|
lineStray: "gehört nicht ins Programm",
|
|
90
90
|
usedDistractors: "{count} Zeile(n) verwendet, die nicht dazugehören."
|
|
91
91
|
}
|
|
92
|
-
},
|
|
92
|
+
}, Le = D({
|
|
93
93
|
/** Stable across edits, so an answer keeps pointing at the same line. */
|
|
94
94
|
id: M().min(1),
|
|
95
95
|
text: M().default(""),
|
|
@@ -104,7 +104,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
104
104
|
* to decide what is not part of the answer.
|
|
105
105
|
*/
|
|
106
106
|
distractor: B().default(!1)
|
|
107
|
-
}), Se =
|
|
107
|
+
}), Se = D({
|
|
108
108
|
instruction: M().default(""),
|
|
109
109
|
/**
|
|
110
110
|
* Recorded so the code can be shown as what it is. Nothing highlights it:
|
|
@@ -113,7 +113,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
113
113
|
*/
|
|
114
114
|
language: M().default(""),
|
|
115
115
|
/** The solution lines in order, with the distractors mixed among them. */
|
|
116
|
-
lines: ee(
|
|
116
|
+
lines: ee(Le).default([]),
|
|
117
117
|
/**
|
|
118
118
|
* Whether indentation is part of the answer. Off, the learner is asked
|
|
119
119
|
* only for the order and indentation is shown but not adjustable.
|
|
@@ -163,10 +163,10 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
163
163
|
path: ["indentationMatters"],
|
|
164
164
|
message: "Every line is at the same indentation, so asking for indentation adds nothing. Indent the nested lines, or switch it off."
|
|
165
165
|
});
|
|
166
|
-
}), Me =
|
|
166
|
+
}), Me = D({
|
|
167
167
|
lineId: M().min(1),
|
|
168
168
|
indent: ne().int().min(0).default(0)
|
|
169
|
-
}), Ge =
|
|
169
|
+
}), Ge = D({
|
|
170
170
|
/** The lines the learner has put in the program, in order. */
|
|
171
171
|
lines: ee(Me).default([])
|
|
172
172
|
}), Ne = {
|
|
@@ -236,7 +236,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
236
236
|
readonly: a,
|
|
237
237
|
onChange: c
|
|
238
238
|
}) => {
|
|
239
|
-
const s = (t, o) =>
|
|
239
|
+
const s = (t, o) => P($, t, r, o), [m, h] = y.useState(""), g = y.useRef(null), d = y.useRef(null), p = y.useRef(null), w = y.useRef(null), S = y.useRef(!1), [, E] = y.useReducer((t) => t + 1, 0), b = w.current, j = b?.moved ? b.order : n, R = (t) => e.lines.find((o) => o.id === t), z = (t) => R(t)?.text ?? t, re = new Set(j.map((t) => t.lineId)), A = e.lines.filter((t) => !re.has(t.id)), oe = (t) => {
|
|
240
240
|
if (a || S.current) {
|
|
241
241
|
S.current = !1;
|
|
242
242
|
return;
|
|
@@ -268,7 +268,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
268
268
|
s("indentedTo", { code: z(u.lineId), indent: f })
|
|
269
269
|
));
|
|
270
270
|
}, se = () => J * parseFloat(getComputedStyle(document.documentElement).fontSize || "16"), F = (t, o, u) => {
|
|
271
|
-
if (a || t.button !== 0 || Te(t.pointerType) && !
|
|
271
|
+
if (a || t.button !== 0 || Te(t.pointerType) && !Pe(t.target)) return;
|
|
272
272
|
const f = t.currentTarget.getBoundingClientRect();
|
|
273
273
|
w.current = {
|
|
274
274
|
lineId: o,
|
|
@@ -284,7 +284,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
284
284
|
order: n,
|
|
285
285
|
overBank: u,
|
|
286
286
|
moved: !1
|
|
287
|
-
},
|
|
287
|
+
}, E();
|
|
288
288
|
}, U = (t) => {
|
|
289
289
|
const o = w.current;
|
|
290
290
|
if (!o) return;
|
|
@@ -296,16 +296,16 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
296
296
|
const v = [...d.current?.querySelectorAll("li") ?? []].filter(
|
|
297
297
|
(k) => k.querySelector(".bitflow-parsons-line")?.getAttribute("data-line") !== o.lineId
|
|
298
298
|
);
|
|
299
|
-
let
|
|
299
|
+
let I = v.length;
|
|
300
300
|
for (let k = 0; k < v.length; k++) {
|
|
301
301
|
const G = v[k].getBoundingClientRect();
|
|
302
302
|
if (t.clientY < G.top + G.height / 2) {
|
|
303
|
-
|
|
303
|
+
I = k;
|
|
304
304
|
break;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
const
|
|
308
|
-
x = [...f], x.splice(
|
|
307
|
+
const L = t.clientX - o.grabX, H = (p.current ?? d.current)?.getBoundingClientRect(), ce = e.indentationMatters ? Math.max(0, Math.round((L - (H?.left ?? 0)) / se())) : o.order.find((k) => k.lineId === o.lineId)?.indent ?? 0;
|
|
308
|
+
x = [...f], x.splice(I, 0, { lineId: o.lineId, indent: ce });
|
|
309
309
|
}
|
|
310
310
|
w.current = {
|
|
311
311
|
...o,
|
|
@@ -317,11 +317,11 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
317
317
|
// slow drag moves a pixel at a time and would otherwise never count as
|
|
318
318
|
// a drag at all — it would end as a click and take the line out.
|
|
319
319
|
moved: o.moved || Math.abs(t.clientX - o.fromX) > 3 || Math.abs(t.clientY - o.fromY) > 3
|
|
320
|
-
}, w.current.moved && q.follow(d.current, t.clientX, t.clientY),
|
|
320
|
+
}, w.current.moved && q.follow(d.current, t.clientX, t.clientY), E();
|
|
321
321
|
}, le = () => {
|
|
322
322
|
q.stop();
|
|
323
323
|
const t = w.current;
|
|
324
|
-
if (w.current = null,
|
|
324
|
+
if (w.current = null, E(), !t || !t.moved) return;
|
|
325
325
|
S.current = !0;
|
|
326
326
|
const o = JSON.stringify(n);
|
|
327
327
|
if (JSON.stringify(t.order) === o) return;
|
|
@@ -365,7 +365,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
365
365
|
onPointerDown: (u) => F(u, t.id, !0),
|
|
366
366
|
onClick: () => oe(t),
|
|
367
367
|
children: [
|
|
368
|
-
!a && /* @__PURE__ */ i.jsx(
|
|
368
|
+
!a && /* @__PURE__ */ i.jsx(W, {}),
|
|
369
369
|
/* @__PURE__ */ i.jsx("code", { children: t.text })
|
|
370
370
|
]
|
|
371
371
|
}
|
|
@@ -376,8 +376,8 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
376
376
|
j.length === 0 ? /* @__PURE__ */ i.jsx("p", { className: "bitflow-text-muted", children: s("programEmpty") }) : /* @__PURE__ */ i.jsx("ol", { ref: p, className: "bitflow-parsons-list bitflow-parsons-program", children: j.map((t, o) => {
|
|
377
377
|
const u = R(t.lineId);
|
|
378
378
|
if (!u) return null;
|
|
379
|
-
const f = l?.[o], x = b?.moved === !0 && b.lineId === t.lineId, v = ["bitflow-parsons-line"],
|
|
380
|
-
return
|
|
379
|
+
const f = l?.[o], x = b?.moved === !0 && b.lineId === t.lineId, v = ["bitflow-parsons-line"], I = e.display === "structogram" ? Re(j, o, R) : void 0;
|
|
380
|
+
return I && v.push(`bitflow-parsons-line-${I}`), x && v.push("bitflow-parsons-line-gap"), f && v.push(
|
|
381
381
|
f.distractor ? "bitflow-parsons-line-stray" : f.placed && f.indented !== !1 ? "bitflow-parsons-line-correct" : "bitflow-parsons-line-wrong"
|
|
382
382
|
), /* Keyed by the line, not by where it sits: a line keeps its
|
|
383
383
|
element as the program is rearranged, so the browser keeps
|
|
@@ -400,21 +400,21 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
400
400
|
total: j.length,
|
|
401
401
|
indent: t.indent
|
|
402
402
|
}),
|
|
403
|
-
onPointerDown: (
|
|
404
|
-
onKeyDown: (
|
|
403
|
+
onPointerDown: (L) => F(L, t.lineId, !1),
|
|
404
|
+
onKeyDown: (L) => {
|
|
405
405
|
const H = {
|
|
406
406
|
ArrowUp: () => N(o, -1),
|
|
407
407
|
ArrowDown: () => N(o, 1),
|
|
408
408
|
ArrowLeft: () => C(o, -1),
|
|
409
409
|
ArrowRight: () => C(o, 1),
|
|
410
410
|
Backspace: () => O(o)
|
|
411
|
-
}[
|
|
412
|
-
H && (
|
|
411
|
+
}[L.key];
|
|
412
|
+
H && (L.preventDefault(), H());
|
|
413
413
|
},
|
|
414
414
|
onClick: () => O(o),
|
|
415
415
|
children: [
|
|
416
416
|
!x && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
417
|
-
!a && /* @__PURE__ */ i.jsx(
|
|
417
|
+
!a && /* @__PURE__ */ i.jsx(W, {}),
|
|
418
418
|
/* @__PURE__ */ i.jsx(
|
|
419
419
|
"span",
|
|
420
420
|
{
|
|
@@ -424,7 +424,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
424
424
|
}
|
|
425
425
|
),
|
|
426
426
|
/* @__PURE__ */ i.jsx("code", { children: u.text }),
|
|
427
|
-
|
|
427
|
+
I === "branch" && /* @__PURE__ */ i.jsxs("span", { className: "bitflow-parsons-cases", "aria-hidden": "true", children: [
|
|
428
428
|
/* @__PURE__ */ i.jsx("span", { children: s("yes") }),
|
|
429
429
|
/* @__PURE__ */ i.jsx("span", { children: s("no") })
|
|
430
430
|
] })
|
|
@@ -498,7 +498,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
498
498
|
transform: `translate(${b.x - b.grabX}px, ${b.y - b.grabY}px)`
|
|
499
499
|
},
|
|
500
500
|
children: [
|
|
501
|
-
/* @__PURE__ */ i.jsx(
|
|
501
|
+
/* @__PURE__ */ i.jsx(W, {}),
|
|
502
502
|
/* @__PURE__ */ i.jsx("code", { children: z(b.lineId) })
|
|
503
503
|
]
|
|
504
504
|
}
|
|
@@ -507,14 +507,14 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
507
507
|
]
|
|
508
508
|
}
|
|
509
509
|
);
|
|
510
|
-
},
|
|
510
|
+
}, W = () => /* @__PURE__ */ i.jsx("span", { className: "bitflow-parsons-grip", "aria-hidden": "true" }), Te = (e) => e === "touch" || e === "pen", Pe = (e) => e instanceof Element && e.closest(".bitflow-parsons-grip") !== null, De = /^\s*(wenn|falls|if)\b/i, Ee = /^\s*(sonst|else)\b/i, Re = (e, n, l) => {
|
|
511
511
|
const r = l(e[n].lineId)?.text ?? "";
|
|
512
|
-
if (
|
|
512
|
+
if (Ee.test(r)) return "else";
|
|
513
513
|
const a = e[n + 1];
|
|
514
514
|
if (!(!a || a.indent <= e[n].indent))
|
|
515
|
-
return
|
|
515
|
+
return De.test(r) ? "branch" : "loop";
|
|
516
516
|
}, Ae = (e, n) => {
|
|
517
|
-
const l =
|
|
517
|
+
const l = We(Ye(n)), r = [...e];
|
|
518
518
|
for (let a = r.length - 1; a > 0; a--) {
|
|
519
519
|
const c = Math.floor(l() * (a + 1));
|
|
520
520
|
[r[a], r[c]] = [r[c], r[a]];
|
|
@@ -526,16 +526,16 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
526
526
|
if (!l(a, e)) return a;
|
|
527
527
|
}
|
|
528
528
|
return [...e].reverse();
|
|
529
|
-
},
|
|
529
|
+
}, Ye = (e) => {
|
|
530
530
|
let n = 2166136261;
|
|
531
531
|
for (let l = 0; l < e.length; l++)
|
|
532
532
|
n ^= e.charCodeAt(l), n = Math.imul(n, 16777619);
|
|
533
533
|
return n >>> 0;
|
|
534
|
-
},
|
|
534
|
+
}, We = (e) => () => {
|
|
535
535
|
e |= 0, e = e + 1831565813 | 0;
|
|
536
536
|
let n = Math.imul(e ^ e >>> 15, 1 | e);
|
|
537
537
|
return n = n + Math.imul(n ^ n >>> 7, 61 | n) ^ n, ((n ^ n >>> 14) >>> 0) / 4294967296;
|
|
538
|
-
},
|
|
538
|
+
}, Xe = " ", X = (e) => e.filter((n) => !n.distractor), K = (e) => e.filter((n) => n.distractor), T = (e) => e.map((n) => Xe.repeat(n.indent) + n.text).join(`
|
|
539
539
|
`), Be = (e) => {
|
|
540
540
|
const n = e.split(`
|
|
541
541
|
`).filter((l) => l.trim() !== "").map((l) => l.length - l.trimStart().length).filter((l) => l > 0);
|
|
@@ -601,21 +601,21 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
601
601
|
onChange: l,
|
|
602
602
|
errors: r
|
|
603
603
|
}) => {
|
|
604
|
-
const a = (d, p) =>
|
|
605
|
-
program: T(
|
|
604
|
+
const a = (d, p) => P(Ne, d, n, p), c = (d) => l({ ...e, ...d }), [s, m] = y.useState(() => ({
|
|
605
|
+
program: T(X(e.lines)),
|
|
606
606
|
distractors: T(K(e.lines))
|
|
607
607
|
}));
|
|
608
608
|
y.useEffect(() => {
|
|
609
609
|
const d = _(s.program, s.distractors, e.lines);
|
|
610
610
|
$e(d, e.lines) || m({
|
|
611
|
-
program: T(
|
|
611
|
+
program: T(X(e.lines)),
|
|
612
612
|
distractors: T(K(e.lines))
|
|
613
613
|
});
|
|
614
614
|
}, [e.lines]);
|
|
615
615
|
const h = (d) => {
|
|
616
616
|
const p = { ...s, ...d };
|
|
617
617
|
m(p), c({ lines: _(p.program, p.distractors, e.lines) });
|
|
618
|
-
}, g =
|
|
618
|
+
}, g = X(e.lines);
|
|
619
619
|
return /* @__PURE__ */ i.jsxs("div", { className: "bitflow-stack", children: [
|
|
620
620
|
/* @__PURE__ */ i.jsx(
|
|
621
621
|
Z,
|
|
@@ -644,7 +644,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
644
644
|
rows: 10,
|
|
645
645
|
value: s.program,
|
|
646
646
|
placeholder: a("programPlaceholder"),
|
|
647
|
-
error:
|
|
647
|
+
error: Y(r, "lines"),
|
|
648
648
|
onChange: (d) => h({ program: d })
|
|
649
649
|
}
|
|
650
650
|
),
|
|
@@ -689,7 +689,7 @@ const je = '.bitflow-parsons{display:flex;flex-direction:column;gap:var(--bitflo
|
|
|
689
689
|
onChange: (d) => c({ indentationMatters: d })
|
|
690
690
|
}
|
|
691
691
|
),
|
|
692
|
-
|
|
692
|
+
Y(r, "indentationMatters") && /* @__PURE__ */ i.jsx("span", { className: "bitflow-field-error", role: "alert", children: Y(r, "indentationMatters") }),
|
|
693
693
|
/* @__PURE__ */ i.jsx(
|
|
694
694
|
V,
|
|
695
695
|
{
|
|
@@ -714,12 +714,12 @@ pe({
|
|
|
714
714
|
type: ie,
|
|
715
715
|
kind: "task",
|
|
716
716
|
schema: Se,
|
|
717
|
-
evaluate:
|
|
717
|
+
evaluate: Ie,
|
|
718
718
|
Task: Oe,
|
|
719
719
|
Form: Fe,
|
|
720
720
|
info: (e) => ({
|
|
721
|
-
name:
|
|
722
|
-
description:
|
|
721
|
+
name: P($, "name", e),
|
|
722
|
+
description: P($, "description", e)
|
|
723
723
|
}),
|
|
724
724
|
defaultData: () => ({
|
|
725
725
|
instruction: "",
|
|
@@ -737,12 +737,12 @@ export {
|
|
|
737
737
|
Ge as AnswerSchema,
|
|
738
738
|
Se as DataSchema,
|
|
739
739
|
Fe as Form,
|
|
740
|
-
|
|
740
|
+
Le as LineSchema,
|
|
741
741
|
Me as PlacedLineSchema,
|
|
742
742
|
He as Puzzle,
|
|
743
743
|
ie as TYPE,
|
|
744
744
|
Oe as Task,
|
|
745
|
-
|
|
745
|
+
Ie as evaluate,
|
|
746
746
|
Ne as formMessages,
|
|
747
747
|
$ as messages,
|
|
748
748
|
ze as outcomes,
|