@astl/astrolabe 0.1.2 → 0.1.4
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/CHANGELOG.md +30 -0
- package/dist/cdn/astrolabe-editor.js +3 -3
- package/dist/cdn/astrolabe-player.js +1 -1
- package/dist/cdn/astrolabe.js +1 -1
- package/dist/cdn/astrolabe.standalone.js +1094 -1060
- package/dist/cdn/chunks/{audio-B0LSIn5N.js → audio-Biof5aA3.js} +2 -2
- package/dist/cdn/chunks/{audio-B0LSIn5N.js.map → audio-Biof5aA3.js.map} +1 -1
- package/dist/cdn/chunks/{block-styles-CKo9x7Vt.js → block-styles-CCtSFM4j.js} +2 -2
- package/dist/cdn/chunks/{block-styles-CKo9x7Vt.js.map → block-styles-CCtSFM4j.js.map} +1 -1
- package/dist/cdn/chunks/{book-CHzDDaim.js → book-IFipARhv.js} +2 -2
- package/dist/cdn/chunks/{book-CHzDDaim.js.map → book-IFipARhv.js.map} +1 -1
- package/dist/cdn/chunks/{callout-QFLFLPc5.js → callout-CuajbbYY.js} +2 -2
- package/dist/cdn/chunks/{callout-QFLFLPc5.js.map → callout-CuajbbYY.js.map} +1 -1
- package/dist/cdn/chunks/{categorise-BO2tNVJ3.js → categorise-Cm6kXLXw.js} +2 -2
- package/dist/cdn/chunks/{categorise-BO2tNVJ3.js.map → categorise-Cm6kXLXw.js.map} +1 -1
- package/dist/cdn/chunks/{chip-styles-Dme5daTO.js → chip-styles--gboWK2Z.js} +2 -2
- package/dist/cdn/chunks/{chip-styles-Dme5daTO.js.map → chip-styles--gboWK2Z.js.map} +1 -1
- package/dist/cdn/chunks/{choice-CExBvqKj.js → choice-BSpB6LHl.js} +2 -2
- package/dist/cdn/chunks/{choice-CExBvqKj.js.map → choice-BSpB6LHl.js.map} +1 -1
- package/dist/cdn/chunks/{color-control-Cl5cuMSO.js → color-control-1kkdM8ns.js} +2 -2
- package/dist/cdn/chunks/{color-control-Cl5cuMSO.js.map → color-control-1kkdM8ns.js.map} +1 -1
- package/dist/cdn/chunks/{crossword-Cb-a3Tjj.js → crossword-BdOAEPcL.js} +2 -2
- package/dist/cdn/chunks/{crossword-Cb-a3Tjj.js.map → crossword-BdOAEPcL.js.map} +1 -1
- package/dist/cdn/chunks/{definitions-CNX90WtL.js → definitions-BybSa1mq.js} +2 -2
- package/dist/cdn/chunks/{definitions-CNX90WtL.js.map → definitions-BybSa1mq.js.map} +1 -1
- package/dist/cdn/chunks/{directive-helpers-D7lOZKnB.js → directive-helpers-US6zRjJ1.js} +2 -2
- package/dist/cdn/chunks/{directive-helpers-D7lOZKnB.js.map → directive-helpers-US6zRjJ1.js.map} +1 -1
- package/dist/cdn/chunks/{drop-vRXndjHu.js → drop-D4NQ0WK_.js} +2 -2
- package/dist/cdn/chunks/{drop-vRXndjHu.js.map → drop-D4NQ0WK_.js.map} +1 -1
- package/dist/cdn/chunks/{flash-cards-0NrrKdrx.js → flash-cards-D4ebb5m6.js} +2 -2
- package/dist/cdn/chunks/{flash-cards-0NrrKdrx.js.map → flash-cards-D4ebb5m6.js.map} +1 -1
- package/dist/cdn/chunks/{gap-lor-khst.js → gap-D-Sipuyu.js} +2 -2
- package/dist/cdn/chunks/{gap-lor-khst.js.map → gap-D-Sipuyu.js.map} +1 -1
- package/dist/cdn/chunks/{help-C-woafz5.js → help-CmCFuNXk.js} +2 -2
- package/dist/cdn/chunks/{help-C-woafz5.js.map → help-CmCFuNXk.js.map} +1 -1
- package/dist/cdn/chunks/{help-form-CDg3TCwI.js → help-form-Di2NtKDp.js} +14 -10
- package/dist/cdn/chunks/help-form-Di2NtKDp.js.map +1 -0
- package/dist/cdn/chunks/{hotspot-oel1Eelo.js → hotspot-B3bvqVzf.js} +2 -2
- package/dist/cdn/chunks/{hotspot-oel1Eelo.js.map → hotspot-B3bvqVzf.js.map} +1 -1
- package/dist/cdn/chunks/{image-drop-Dkprw0Kn.js → image-drop-vLc2B7rF.js} +2 -2
- package/dist/cdn/chunks/{image-drop-Dkprw0Kn.js.map → image-drop-vLc2B7rF.js.map} +1 -1
- package/dist/cdn/chunks/{image-label-Dm5shQSh.js → image-label-DsKxQDTQ.js} +2 -2
- package/dist/cdn/chunks/{image-label-Dm5shQSh.js.map → image-label-DsKxQDTQ.js.map} +1 -1
- package/dist/cdn/chunks/{inline-styles-CTgXWnHb.js → inline-styles-CFNlb6f2.js} +2 -2
- package/dist/cdn/chunks/{inline-styles-CTgXWnHb.js.map → inline-styles-CFNlb6f2.js.map} +1 -1
- package/dist/cdn/chunks/{insert-menu-7vANVmTK.js → insert-menu-DAQglwtG.js} +2 -2
- package/dist/cdn/chunks/{insert-menu-7vANVmTK.js.map → insert-menu-DAQglwtG.js.map} +1 -1
- package/dist/cdn/chunks/{issue-list-BT9qvnZU.js → issue-list-CzSmohtT.js} +2 -2
- package/dist/cdn/chunks/{issue-list-BT9qvnZU.js.map → issue-list-CzSmohtT.js.map} +1 -1
- package/dist/cdn/chunks/{live-jdiyYln2.js → live-qnReIRtj.js} +2 -2
- package/dist/cdn/chunks/{live-jdiyYln2.js.map → live-qnReIRtj.js.map} +1 -1
- package/dist/cdn/chunks/{long-answer-CtzClLAx.js → long-answer-NSWJiK0z.js} +2 -2
- package/dist/cdn/chunks/{long-answer-CtzClLAx.js.map → long-answer-NSWJiK0z.js.map} +1 -1
- package/dist/cdn/chunks/{mark-words-CpH3gTcX.js → mark-words-BKu-_uIl.js} +2 -2
- package/dist/cdn/chunks/{mark-words-CpH3gTcX.js.map → mark-words-BKu-_uIl.js.map} +1 -1
- package/dist/cdn/chunks/{match-DKE_4o-x.js → match-BpnJGW_5.js} +21 -13
- package/dist/cdn/chunks/match-BpnJGW_5.js.map +1 -0
- package/dist/cdn/chunks/{memory-B6hSyHyz.js → memory-BgTHujsU.js} +2 -2
- package/dist/cdn/chunks/{memory-B6hSyHyz.js.map → memory-BgTHujsU.js.map} +1 -1
- package/dist/cdn/chunks/messages-Qzse5KMX.js +2 -0
- package/dist/cdn/chunks/messages-Qzse5KMX.js.map +1 -0
- package/dist/cdn/chunks/{option-styles-WKzjKmCH.js → option-styles-B2sBX5Oz.js} +2 -2
- package/dist/cdn/chunks/{option-styles-WKzjKmCH.js.map → option-styles-B2sBX5Oz.js.map} +1 -1
- package/dist/cdn/chunks/{order-BhG_6IC-.js → order-B9gqH5wm.js} +2 -2
- package/dist/cdn/chunks/{order-BhG_6IC-.js.map → order-B9gqH5wm.js.map} +1 -1
- package/dist/cdn/chunks/{picture-view-BKnAyScQ.js → picture-view-Deodu_mb.js} +2 -2
- package/dist/cdn/chunks/{picture-view-BKnAyScQ.js.map → picture-view-Deodu_mb.js.map} +1 -1
- package/dist/cdn/chunks/{repeat-CY2W2URZ.js → repeat-BDXokpxQ.js} +2 -2
- package/dist/cdn/chunks/{repeat-CY2W2URZ.js.map → repeat-BDXokpxQ.js.map} +1 -1
- package/dist/cdn/chunks/{runtime-DxAbpr3S.js → runtime-C25QK5B0.js} +3 -3
- package/dist/cdn/chunks/{runtime-DxAbpr3S.js.map → runtime-C25QK5B0.js.map} +1 -1
- package/dist/cdn/chunks/{scan-jWgPnVxA.js → scan-BVhxT2Hw.js} +2 -2
- package/dist/cdn/chunks/{scan-jWgPnVxA.js.map → scan-BVhxT2Hw.js.map} +1 -1
- package/dist/cdn/chunks/{select-DTA3dJzr.js → select-DPpKJwSg.js} +2 -2
- package/dist/cdn/chunks/{select-DTA3dJzr.js.map → select-DPpKJwSg.js.map} +1 -1
- package/dist/cdn/chunks/select-QZ35cyns.js +2 -0
- package/dist/cdn/chunks/select-QZ35cyns.js.map +1 -0
- package/dist/cdn/chunks/{source-view-CZVxgTNQ.js → source-view-gqFlZzwR.js} +2 -2
- package/dist/cdn/chunks/{source-view-CZVxgTNQ.js.map → source-view-gqFlZzwR.js.map} +1 -1
- package/dist/cdn/chunks/{style-form-DUGbG_kL.js → style-form-DuR0EEum.js} +2 -2
- package/dist/cdn/chunks/{style-form-DUGbG_kL.js.map → style-form-DuR0EEum.js.map} +1 -1
- package/dist/cdn/chunks/{style-messages-qdf3pZbT.js → style-messages-B136zSom.js} +2 -2
- package/dist/cdn/chunks/{style-messages-qdf3pZbT.js.map → style-messages-B136zSom.js.map} +1 -1
- package/dist/cdn/chunks/{style-popups-BobgX1WK.js → style-popups-Bcl5imdP.js} +2 -2
- package/dist/cdn/chunks/{style-popups-BobgX1WK.js.map → style-popups-Bcl5imdP.js.map} +1 -1
- package/dist/cdn/chunks/{style-rules-D17QGzXk.js → style-rules-ozpLz2ec.js} +2 -2
- package/dist/cdn/chunks/{style-rules-D17QGzXk.js.map → style-rules-ozpLz2ec.js.map} +1 -1
- package/dist/cdn/chunks/{styled-Dmx5Yjv7.js → styled-bQqnDxBf.js} +2 -2
- package/dist/cdn/chunks/{styled-Dmx5Yjv7.js.map → styled-bQqnDxBf.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CdJT6Pp9.js → styles-DiY3VA_T.js} +5 -5
- package/dist/cdn/chunks/styles-DiY3VA_T.js.map +1 -0
- package/dist/cdn/chunks/surface-CIz1z2oY.js +1059 -0
- package/dist/cdn/chunks/surface-CIz1z2oY.js.map +1 -0
- package/dist/cdn/chunks/{true-false-DP3MO599.js → true-false-C-S6RmZY.js} +2 -2
- package/dist/cdn/chunks/{true-false-DP3MO599.js.map → true-false-C-S6RmZY.js.map} +1 -1
- package/dist/cdn/chunks/{video-j9MCH6Kw.js → video-Dae8Gguf.js} +2 -2
- package/dist/cdn/chunks/{video-j9MCH6Kw.js.map → video-Dae8Gguf.js.map} +1 -1
- package/dist/cdn/chunks/{word-bank-ARjwUKZf.js → word-bank-CsIle0Ro.js} +2 -2
- package/dist/cdn/chunks/{word-bank-ARjwUKZf.js.map → word-bank-CsIle0Ro.js.map} +1 -1
- package/dist/cdn/chunks/{word-search-AHvM7yCJ.js → word-search-IOCwqo3y.js} +2 -2
- package/dist/cdn/chunks/{word-search-AHvM7yCJ.js.map → word-search-IOCwqo3y.js.map} +1 -1
- package/package.json +9 -9
- package/dist/cdn/chunks/help-form-CDg3TCwI.js.map +0 -1
- package/dist/cdn/chunks/match-DKE_4o-x.js.map +0 -1
- package/dist/cdn/chunks/messages-D1aJfyS_.js +0 -2
- package/dist/cdn/chunks/messages-D1aJfyS_.js.map +0 -1
- package/dist/cdn/chunks/styles-CdJT6Pp9.js.map +0 -1
- package/dist/cdn/chunks/surface-C6wtQkTY.js +0 -1037
- package/dist/cdn/chunks/surface-C6wtQkTY.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astl/astrolabe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Open-source building blocks for interactive exercises (gaps, choice, crosswords and more) with practice and test modes: engine, player, editor, server and a one-file script for plain HTML.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astrolabe",
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@astl/components": "0.1.
|
|
71
|
-
"@astl/core": "0.1.
|
|
72
|
-
"@astl/editor": "0.1.
|
|
73
|
-
"@astl/editor-tiptap": "0.1.
|
|
74
|
-
"@astl/engine": "0.1.
|
|
75
|
-
"@astl/player": "0.1.
|
|
76
|
-
"@astl/server": "0.1.
|
|
77
|
-
"@astl/tokens": "0.1.
|
|
70
|
+
"@astl/components": "0.1.4",
|
|
71
|
+
"@astl/core": "0.1.4",
|
|
72
|
+
"@astl/editor": "0.1.4",
|
|
73
|
+
"@astl/editor-tiptap": "0.1.4",
|
|
74
|
+
"@astl/engine": "0.1.4",
|
|
75
|
+
"@astl/player": "0.1.4",
|
|
76
|
+
"@astl/server": "0.1.4",
|
|
77
|
+
"@astl/tokens": "0.1.4"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"vite": "8.3.4"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help-form-CDg3TCwI.js","names":["en","pl","nothing","live","parseHtml","b","HINT_TAG","i","HELP_TAGS","A","FEEDBACK_VARIANTS","isElement","textContent","EXPLANATION_TAG","FEEDBACK_TAG","escapeAttribute","spaceBefore","attributeValue","escapeText","elementTree","applyEdits","EDITOR_NAMESPACE","kitStyles","AuthoringElement","l","inner","range","source","helpChildren","root","c","isVariant","value","readHelp","html","hints","explanation","feedback","child","content","when","helpSource","cost","help","h","text","writeHelp","first","cleared","added","last","at","gap","sep","a","lines","node","helpText","nodes","part","helpFormatted","plain","inline","depth","formatted","textHelp","helpMessages","pending","graded","authoring","tag","addHelp","selection","adapter","current","block","kind","next","field","FEEDBACK_ORDER","w","percentOf","n","inputValue","event","AstlHelpForm","changed","#drafts","#help","change","#write","to","from","moved","hint","index","#formatted","over","#dragged","on","#move","#text","#typed","x","#done","percent","label","e","set","lang","dir","#hint","#area"],"sources":["../../../../editor/src/help.ts","../../../../editor/src/messages/help/en.json","../../../../editor/src/messages/help/pl.json","../../../../editor/src/elements/help-form.ts"],"sourcesContent":["/**\n * The help for students of one graded element, read from and written to its source HTML: its hints (in order, each\n * with its cost), its explanation and its feedback texts, its direct children. Writing replaces them all, after the\n * element's other children, and leaves everything else byte-identical. The help form edits plain text: a text becomes\n * paragraphs (text alone in an element in a line of text); a text not edited keeps its HTML.\n */\nimport {\n type ElementNode,\n EXPLANATION_TAG,\n FEEDBACK_TAG,\n FEEDBACK_VARIANTS,\n type FeedbackVariant,\n HELP_TAGS,\n HINT_TAG,\n isElement,\n type Node,\n textContent,\n} from '@astl/core';\nimport { parseHtml } from '@astl/engine';\nimport {\n applyEdits,\n attributeValue,\n type ElementRange,\n elementTree,\n escapeAttribute,\n escapeText,\n spaceBefore,\n} from './scan.js';\n\nexport interface HelpHint {\n /** Its content as written. */\n readonly html: string;\n /** Its `cost` attribute as written, null when it has none (free). */\n readonly cost: string | null;\n}\n\n/** An element's help. Contents are HTML as written; an absent explanation or feedback text is null or missing. */\nexport interface HelpValue {\n readonly hints: readonly HelpHint[];\n readonly explanation: string | null;\n readonly feedback: Readonly<Partial<Record<FeedbackVariant, string>>>;\n}\n\nconst inner = (source: string, range: ElementRange): string =>\n range.endTag === null && range.startTag.selfClosing\n ? ''\n : source.slice(range.startTag.end, range.endTag?.start ?? range.end);\n\nconst helpChildren = (root: ElementRange): ElementRange[] =>\n root.children.filter((c) => HELP_TAGS.has(c.name));\n\nconst isVariant = (value: string | null): value is FeedbackVariant =>\n FEEDBACK_VARIANTS.includes(value as FeedbackVariant);\n\n/** The help of the first element in `html`. Later duplicates of an explanation or a feedback text are left out. */\nexport function readHelp(html: string): HelpValue {\n const root = elementTree(html)[0];\n const hints: HelpHint[] = [];\n let explanation: string | null = null;\n const feedback: Partial<Record<FeedbackVariant, string>> = {};\n for (const child of root === undefined ? [] : helpChildren(root)) {\n const content = inner(html, child);\n if (child.name === HINT_TAG) hints.push({ html: content, cost: attributeValue(child.startTag, 'cost') });\n else if (child.name === EXPLANATION_TAG) explanation ??= content;\n else {\n const when = attributeValue(child.startTag, 'when');\n if (isVariant(when)) feedback[when] ??= content;\n }\n }\n return { hints, explanation, feedback };\n}\n\n/** The help as source: hints, the explanation, then the feedback texts in the order of `FEEDBACK_VARIANTS`. */\nfunction helpSource(help: HelpValue): string[] {\n const cost = (value: string | null) => (value === null ? '' : ` cost=\"${escapeAttribute(value)}\"`);\n return [\n ...help.hints.map((h) => `<${HINT_TAG}${cost(h.cost)}>${h.html}</${HINT_TAG}>`),\n ...(help.explanation === null ? [] : [`<${EXPLANATION_TAG}>${help.explanation}</${EXPLANATION_TAG}>`]),\n ...FEEDBACK_VARIANTS.flatMap((when) => {\n const text = help.feedback[when];\n return text === undefined ? [] : [`<${FEEDBACK_TAG} when=\"${when}\">${text}</${FEEDBACK_TAG}>`];\n }),\n ];\n}\n\n/** Replaces the help of the first element in `html` with `help`, after its other children. */\nexport function writeHelp(html: string, help: HelpValue): string {\n const first = elementTree(html)[0];\n if (first === undefined) return html;\n // Out first, then in: an insertion where a removal starts would shift it.\n const cleared = applyEdits(\n html,\n helpChildren(first).map((c) => ({ start: spaceBefore(html, c.start), end: c.end, text: '' })),\n );\n const added = helpSource(help);\n const root = elementTree(cleared)[0];\n if (root === undefined || added.length === 0) return cleared;\n const last = root.children.at(-1);\n if (last === undefined) {\n const at = root.endTag?.start ?? root.end;\n const closed = root.endTag === null && root.startTag.selfClosing;\n return closed\n ? `${cleared.slice(0, root.start)}${cleared.slice(root.start, spaceBefore(cleared, root.startTag.end - 2))}>${added.join('')}</${root.name}>${cleared.slice(root.end)}`\n : applyEdits(cleared, [{ start: at, end: at, text: added.join('') }]);\n }\n // On their own lines when the children are.\n const gap = cleared.slice(spaceBefore(cleared, last.start), last.start);\n const sep = /^\\s*$/.test(gap) ? gap : '';\n return applyEdits(cleared, [{ start: last.end, end: last.end, text: added.map((a) => sep + a).join('') }]);\n}\n\n/** The text of a node with its line breaks, as a field shows them (`textHelp` writes them back as `<br>`). */\nconst lines = (node: Node): string =>\n !isElement(node) ? textContent(node) : node.tag === 'br' ? '\\n' : node.children.map(lines).join('');\n\n/** What a help text says, for a text field: its paragraphs apart by a blank line, its line breaks kept. */\nexport function helpText(html: string): string {\n const blocks = (nodes: readonly Node[]): string[] =>\n nodes.flatMap((node) => {\n if (!isElement(node)) return [textContent(node)];\n return node.tag === 'p' || node.tag === 'li' ? [`\\n\\n${lines(node).trim()}\\n\\n`] : [lines(node)];\n });\n return blocks(parseHtml(html))\n .join('')\n .replace(/[ \\t]+/g, ' ')\n .split(/\\n{2,}/)\n .map((part) => part.trim())\n .filter(Boolean)\n .join('\\n\\n');\n}\n\n/**\n * Whether a help text holds more than its field writes back (paragraphs of plain text, or text alone for an element in\n * a line of text): a change in the field keeps the words and drops the rest, so the form says so first.\n */\nexport function helpFormatted(html: string, inline: boolean): boolean {\n // What a field writes: paragraphs holding text and line breaks; text alone in a line of text.\n const plain = (node: ElementNode, depth: number): boolean =>\n !inline &&\n Object.keys(node.attrs).length === 0 &&\n (depth === 0 ? node.tag === 'p' : depth === 1 && node.tag === 'br');\n const formatted = (nodes: readonly Node[], depth: number): boolean =>\n nodes.some((node) => isElement(node) && (!plain(node, depth) || formatted(node.children, depth + 1)));\n return formatted(parseHtml(html), 0);\n}\n\n/** HTML from a field's text: paragraphs (blank lines part them), or text alone for an element in a line of text. */\nexport function textHelp(text: string, inline: boolean): string {\n if (inline) return escapeText(text.replace(/\\s+/g, ' ').trim());\n return text\n .split(/\\n\\s*\\n/)\n .map((part) => part.trim())\n .filter(Boolean)\n .map((part) => `<p>${escapeText(part).replace(/\\n/g, '<br>')}</p>`)\n .join('');\n}\n","{\n \"help.title\": \"Help for students\",\n \"help.hints\": \"Hints\",\n \"help.hintsNote\": \"Students ask for them one at a time, in this order. A cost is the share of the question's points a student loses for using that hint.\",\n \"help.hintN\": \"Hint {n}\",\n \"help.cost\": \"Cost (% of the points)\",\n \"help.costN\": \"Hint {n}: cost (% of the points)\",\n \"help.addHint\": \"Add a hint\",\n \"help.up\": \"Up\",\n \"help.down\": \"Down\",\n \"help.upN\": \"Move hint {n} up\",\n \"help.downN\": \"Move hint {n} down\",\n \"help.removeN\": \"Remove hint {n}\",\n \"help.drag\": \"Drag to reorder\",\n \"help.explanationNote\": \"Students open it under \\\"Why?\\\" once their answer is checked. Leave it empty for none.\",\n \"help.feedbackNote\": \"Shown after a check, by the verdict. Leave a text empty for none.\",\n \"help.formatted\": \"This text has formatting. A change in this field keeps only the text.\"\n}\n","{\n \"help.title\": \"Pomoc dla ucznia\",\n \"help.hints\": \"Podpowiedzi\",\n \"help.hintsNote\": \"Uczeń prosi o nie po kolei, w tej kolejności. Koszt to część punktów za to pytanie, którą uczeń traci, gdy użyje podpowiedzi.\",\n \"help.hintN\": \"Podpowiedź {n}\",\n \"help.cost\": \"Koszt (% punktów)\",\n \"help.costN\": \"Podpowiedź {n}: koszt (% punktów)\",\n \"help.addHint\": \"Dodaj podpowiedź\",\n \"help.up\": \"W górę\",\n \"help.down\": \"W dół\",\n \"help.upN\": \"Przenieś podpowiedź {n} w górę\",\n \"help.downN\": \"Przenieś podpowiedź {n} w dół\",\n \"help.removeN\": \"Usuń podpowiedź {n}\",\n \"help.drag\": \"Przeciągnij, aby zmienić kolejność\",\n \"help.explanationNote\": \"Uczeń otwiera je pod „Dlaczego?”, gdy jego odpowiedź zostanie sprawdzona. Zostaw puste, jeśli nie ma.\",\n \"help.feedbackNote\": \"Widać ją po sprawdzeniu, zależnie od wyniku. Zostaw tekst pusty, jeśli nie ma.\",\n \"help.formatted\": \"Ten tekst ma formatowanie. Zmiana w tym polu zostawi sam tekst.\"\n}\n","/**\n * `<astl-help-form>`: the inspector's \"Help for students\" section of a graded element: its hints in order, each with\n * its cost (Up, Down, a drag, Remove, Add), its explanation and its four feedback texts. Every edit rewrites the\n * element's help (`writeHelp`) through `EditorAdapter.replaceElement`. A module of its own, outside the editor's first\n * load (`loadHelpForm`), with its messages; `addHelp` is the insert menu's way in.\n */\nimport { type EditorAdapter, FEEDBACK_VARIANTS, type FeedbackVariant, type MessageCatalog } from '@astl/core';\nimport {\n type CSSResultGroup,\n css,\n html,\n nothing,\n type PropertyDeclarations,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { live } from 'lit/directives/live.js';\nimport type { Authoring } from '../authoring.js';\nimport { type HelpValue, helpFormatted, helpText, readHelp, textHelp, writeHelp } from '../help.js';\nimport en from '../messages/help/en.json' with { type: 'json' };\nimport pl from '../messages/help/pl.json' with { type: 'json' };\nimport { EDITOR_NAMESPACE } from '../messages.js';\nimport { AuthoringElement } from './base.js';\nimport { kitStyles } from './styles.js';\n\nconst helpMessages: readonly MessageCatalog[] = [\n { namespace: EDITOR_NAMESPACE, locale: 'en', messages: en },\n { namespace: EDITOR_NAMESPACE, locale: 'pl', messages: pl },\n];\n\n/** What the insert menu adds: a hint, the explanation, or the next feedback text the element lacks. */\nexport type HelpKind = 'hint' | 'explanation' | 'feedback';\n\n/** The field to focus once the form shows it (after an insert), by element id. */\nlet pending: { readonly element: string; readonly field: string } | null = null;\n\nconst graded = (authoring: Authoring, tag: string) => authoring.descriptor(tag)?.manifest.graded === true;\n\n/**\n * Adds help to the graded element at the cursor (and asks the form to focus it), or else to the page at the cursor.\n * Returns the HTML inserted on a page, or null when the element got it.\n */\nexport function addHelp(authoring: Authoring, adapter: EditorAdapter, kind: HelpKind): string | null {\n const selection = adapter.getSelection();\n const current = selection === null ? null : adapter.getElement(selection.id);\n if (selection === null || current === null || !graded(authoring, selection.tag)) {\n const block =\n kind === 'feedback'\n ? '<astl-feedback when=\"correct\"><p></p></astl-feedback>'\n : `<astl-${kind}><p></p></astl-${kind}>`;\n adapter.insert(block);\n return block;\n }\n const help = readHelp(current);\n let next: HelpValue;\n let field: string;\n if (kind === 'hint') {\n next = { ...help, hints: [...help.hints, { html: '', cost: null }] };\n field = `hint-${help.hints.length}`;\n } else if (kind === 'explanation') {\n next = { ...help, explanation: help.explanation ?? '' };\n field = 'explanation';\n } else {\n const when = FEEDBACK_ORDER.find((w) => help.feedback[w] === undefined) ?? 'correct';\n next = { ...help, feedback: { ...help.feedback, [when]: help.feedback[when] ?? '' } };\n field = `feedback-${when}`;\n }\n pending = { element: selection.id, field };\n adapter.replaceElement(selection.id, writeHelp(current, next));\n return null;\n}\n\n/** The order the menu fills feedback texts in: right and wrong first. */\nconst FEEDBACK_ORDER: readonly FeedbackVariant[] = ['correct', 'incorrect', 'omitted', 'partial'];\n\n/** A cost in percent of the points (0 to 100) from a `cost` attribute, or '' when there is none or it is not one. */\nconst percentOf = (cost: string | null): string => {\n if (cost === null) return '0';\n const n = Number(cost);\n return Number.isFinite(n) && n >= 0 && n <= 1 ? String(Math.round(n * 100)) : '';\n};\n\nconst inputValue = (event: Event) => (event.target as HTMLInputElement | HTMLTextAreaElement).value;\n\nexport class AstlHelpForm extends AuthoringElement {\n static override properties: PropertyDeclarations = {\n ...AuthoringElement.properties,\n element: {},\n inline: { type: Boolean },\n };\n\n static override styles: CSSResultGroup = [\n kitStyles,\n css`\n :host {\n display: block;\n }\n section {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-3);\n padding-block-start: var(--astl-space-3);\n border-block-start: var(--astl-outline-width) solid var(--astl-line);\n }\n h3 {\n margin: 0;\n font-size: 1rem;\n }\n fieldset,\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-1);\n min-inline-size: 0;\n margin: 0;\n padding: 0;\n border: 0;\n }\n legend,\n label {\n padding: 0;\n font-weight: 600;\n }\n ol {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-3);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-1);\n padding: var(--astl-space-2);\n border: var(--astl-outline-width) solid var(--astl-line);\n border-radius: var(--astl-radius-s);\n }\n li[data-over] {\n border-color: var(--astl-accent);\n }\n .row {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--astl-space-2);\n }\n .handle {\n cursor: grab;\n user-select: none;\n }\n .cost {\n display: flex;\n align-items: center;\n gap: var(--astl-space-1);\n font-weight: 400;\n }\n .cost input {\n inline-size: 6em;\n }\n textarea {\n field-sizing: content;\n min-block-size: 3lh;\n resize: vertical;\n }\n .delete {\n color: var(--astl-danger);\n }\n `,\n ];\n\n /** Source id of the element whose help this is. */\n declare element: string | null;\n /** The element sits in a line of text: its help holds text, not paragraphs. */\n declare inline: boolean;\n /** What the author is typing in a field, by field: the source has it cleaned, the field keeps it as typed. */\n #drafts = new Map<string, string>();\n #dragged: number | null = null;\n\n constructor() {\n super();\n this.element = null;\n this.inline = false;\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n super.willUpdate(changed);\n if (changed.has('authoring')) this.authoring?.addMessages(helpMessages);\n if (changed.has('element')) this.#drafts.clear();\n }\n\n protected override updated(): void {\n if (pending === null || pending.element !== this.element) return;\n const field = this.renderRoot.querySelector<HTMLElement>(`[data-help=\"${pending.field}\"]`);\n if (field === null) return;\n pending = null;\n field.focus();\n }\n\n #help(): { readonly html: string; readonly help: HelpValue } | null {\n const html = this.element === null ? null : (this.adapter?.getElement(this.element) ?? null);\n return html === null ? null : { html, help: readHelp(html) };\n }\n\n #write(change: (help: HelpValue) => HelpValue): void {\n const current = this.#help();\n if (current === null || this.element === null || this.adapter === null) return;\n const next = writeHelp(current.html, change(current.help));\n if (next !== current.html) this.adapter.replaceElement(this.element, next);\n }\n\n /** A text field's value: as typed while it is being edited, else what the source says. */\n #text(field: string, html: string): string {\n return this.#drafts.get(field) ?? helpText(html);\n }\n\n /** The note under a field whose text has formatting a change there would drop; null when there is none. */\n #formatted(field: string, source: string): TemplateResult | null {\n return helpFormatted(source, this.inline)\n ? html`<p class=\"note\" id=${`${field}-formatted`}>${this.t('help.formatted')}</p>`\n : null;\n }\n\n #typed(field: string, event: Event): string {\n const value = inputValue(event);\n this.#drafts.set(field, value);\n return textHelp(value, this.inline);\n }\n\n #done(field: string): void {\n this.#drafts.delete(field);\n this.requestUpdate();\n }\n\n #move(from: number, to: number): void {\n this.#write((help) => {\n if (to < 0 || to >= help.hints.length || from === to) return help;\n const hints = [...help.hints];\n const [moved] = hints.splice(from, 1);\n if (moved !== undefined) hints.splice(to, 0, moved);\n return { ...help, hints };\n });\n this.#drafts.clear();\n }\n\n #hint(help: HelpValue, index: number): TemplateResult {\n const hint = help.hints[index] as HelpValue['hints'][number];\n const n = index + 1;\n const field = `hint-${index}`;\n const last = index === help.hints.length - 1;\n const formatted = this.#formatted(field, hint.html);\n const over = (event: DragEvent, on: boolean) => {\n if (this.#dragged === null) return;\n event.preventDefault();\n (event.currentTarget as HTMLElement).toggleAttribute('data-over', on);\n };\n return html`<li\n @dragover=${(e: DragEvent) => over(e, true)}\n @dragleave=${(e: DragEvent) => over(e, false)}\n @drop=${(e: DragEvent) => {\n over(e, false);\n if (this.#dragged !== null) this.#move(this.#dragged, index);\n this.#dragged = null;\n }}\n >\n <div class=\"row\">\n <span\n class=\"handle\"\n draggable=\"true\"\n aria-hidden=\"true\"\n title=${this.t('help.drag')}\n @dragstart=${(e: DragEvent) => {\n this.#dragged = index;\n e.dataTransfer?.setData('text/plain', String(n));\n }}\n @dragend=${() => {\n this.#dragged = null;\n }}\n >⠿</span\n >\n <label for=${field}>${this.t('help.hintN', { n })}</label>\n </div>\n <textarea\n id=${field}\n data-help=${field}\n dir=\"auto\"\n aria-describedby=${formatted === null ? nothing : `${field}-formatted`}\n .value=${live(this.#text(field, hint.html))}\n @input=${(e: Event) => {\n const text = this.#typed(field, e);\n this.#write((h) => ({\n ...h,\n hints: h.hints.map((x, i) => (i === index ? { ...x, html: text } : x)),\n }));\n }}\n @change=${() => this.#done(field)}\n ></textarea>\n ${formatted ?? nothing}\n <div class=\"row\">\n <label class=\"cost\">\n ${this.t('help.cost')}\n <input\n type=\"number\"\n aria-label=${this.t('help.costN', { n })}\n min=\"0\"\n max=\"100\"\n step=\"5\"\n inputmode=\"numeric\"\n data-help=${`cost-${index}`}\n .value=${live(percentOf(hint.cost))}\n @change=${(e: Event) => {\n const percent = Number(inputValue(e));\n if (!Number.isFinite(percent) || percent < 0 || percent > 100) return;\n const cost = percent === 0 ? null : String(Math.round(percent) / 100);\n this.#write((h) => ({\n ...h,\n hints: h.hints.map((x, i) => (i === index ? { ...x, cost } : x)),\n }));\n }}\n />\n </label>\n <button type=\"button\" aria-label=${this.t('help.upN', { n })} aria-disabled=${String(index === 0)}\n @click=${() => this.#move(index, index - 1)}>${this.t('help.up')}</button>\n <button type=\"button\" aria-label=${this.t('help.downN', { n })} aria-disabled=${String(last)}\n @click=${() => this.#move(index, index + 1)}>${this.t('help.down')}</button>\n <button type=\"button\" class=\"delete\" aria-label=${this.t('help.removeN', { n })}\n @click=${() => {\n this.#drafts.clear();\n this.#write((h) => ({ ...h, hints: h.hints.filter((_, i) => i !== index) }));\n pending = {\n element: this.element ?? '',\n field: help.hints.length > 1 ? `hint-${Math.max(0, index - 1)}` : 'add-hint',\n };\n }}>${this.t('inspector.remove')}</button>\n </div>\n </li>`;\n }\n\n #area(\n field: string,\n label: string,\n value: string | null | undefined,\n set: (html: string | null) => void,\n ): TemplateResult {\n const formatted = this.#formatted(field, value ?? '');\n return html`<div class=\"field\">\n <label for=${field}>${label}</label>\n <textarea\n id=${field}\n data-help=${field}\n dir=\"auto\"\n aria-describedby=${formatted === null ? nothing : `${field}-formatted`}\n .value=${live(this.#text(field, value ?? ''))}\n @input=${(e: Event) => {\n const text = this.#typed(field, e);\n set(text === '' ? null : text);\n }}\n @change=${() => this.#done(field)}\n ></textarea>\n ${formatted ?? nothing}\n </div>`;\n }\n\n protected override render(): TemplateResult | typeof nothing {\n const current = this.#help();\n if (current === null || this.authoring === null) return nothing;\n const { help } = current;\n const { lang, dir } = this.ui;\n return html`<section class=\"kit\" part=\"help\" lang=${lang} dir=${dir} aria-labelledby=\"help-title\">\n <h3 id=\"help-title\">${this.t('help.title')}</h3>\n <fieldset aria-describedby=\"hints-note\">\n <legend>${this.t('help.hints')}</legend>\n <p class=\"note\" id=\"hints-note\">${this.t('help.hintsNote')}</p>\n ${help.hints.length === 0 ? nothing : html`<ol>${help.hints.map((_, i) => this.#hint(help, i))}</ol>`}\n <div class=\"row\">\n <button type=\"button\" data-help=\"add-hint\"\n @click=${() => {\n pending = { element: this.element ?? '', field: `hint-${help.hints.length}` };\n this.#write((h) => ({ ...h, hints: [...h.hints, { html: '', cost: null }] }));\n }}>${this.t('help.addHint')}</button>\n </div>\n </fieldset>\n ${this.#area('explanation', this.t('insert.explanation'), help.explanation, (text) =>\n this.#write((h) => ({ ...h, explanation: text })),\n )}\n <p class=\"note\">${this.t('help.explanationNote')}</p>\n <fieldset aria-describedby=\"feedback-note\">\n <legend>${this.t('insert.feedback')}</legend>\n <p class=\"note\" id=\"feedback-note\">${this.t('help.feedbackNote')}</p>\n ${FEEDBACK_VARIANTS.map((when) =>\n this.#area(`feedback-${when}`, this.t(`help.when.${when}`), help.feedback[when], (text) =>\n this.#write((h) => {\n const feedback: Partial<Record<FeedbackVariant, string>> = { ...h.feedback };\n if (text === null) delete feedback[when];\n else feedback[when] = text;\n return { ...h, feedback };\n }),\n ),\n )}\n </fieldset>\n </section>`;\n }\n}\n"],"mappings":"A,0WA2CA,IAAMyB,GAAS,EAAgB,IAC7BC,EAAM,SAAW,MAAQA,EAAM,SAAS,YACpC,GACAC,EAAO,MAAMD,EAAM,SAAS,IAAKA,EAAM,QAAQ,OAASA,EAAM,GAAG,EAEjEE,EAAgB,GACpBC,EAAK,SAAS,OAAQ,GAAMrB,EAAU,IAAIsB,EAAE,IAAI,CAAC,EAE7CC,EAAa,GACjBrB,EAAkB,SAASsB,CAAwB,EAGrD,SAAgBC,EAAS,EAAyB,CAChD,IAAMJ,EAAOV,EAAYe,CAAI,CAAC,CAAC,GACzBC,EAAoB,CAAC,EACvBC,EAA6B,KAC3BC,EAAqD,CAAC,EAC5D,IAAK,IAAMC,KAAST,IAAS,IAAA,GAAY,CAAC,EAAID,EAAaC,CAAI,EAAG,CAChE,IAAMU,EAAUd,EAAMS,EAAMI,CAAK,EACjC,GAAIA,EAAM,OAAA,YAAmBH,EAAM,KAAK,CAAE,KAAMI,EAAS,KAAMtB,EAAeqB,EAAM,SAAU,MAAM,CAAE,CAAC,OAClG,GAAIA,EAAM,OAAA,mBAA0B,IAAgBC,MACpD,CACH,IAAMC,EAAOvB,EAAeqB,EAAM,SAAU,MAAM,EAC9CP,EAAUS,CAAI,IAAG,EAASA,KAAUD,EAC1C,CACF,CACA,MAAO,CAAE,QAAO,cAAa,UAAS,CACxC,CAGA,SAASE,EAAW,EAA2B,CAC7C,IAAMC,EAAQ,GAA0BV,IAAU,KAAO,GAAK,UAAUjB,EAAgBiB,CAAK,EAAE,GAC/F,MAAO,CACL,GAAGW,EAAK,MAAM,IAAK,GAAM,IAAIrC,IAAWoC,EAAKE,EAAE,IAAI,EAAE,GAAGA,EAAE,KAAK,IAAItC,EAAS,EAAE,EAC9E,GAAIqC,EAAK,cAAgB,KAAO,CAAC,EAAI,CAAC,IAAI9B,EAAgB,GA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E,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE;;;QAGhC,KAAKoE,GAAM,cAAe,KAAK,EAAE,oBAAoB,EAAGrE,EAAK,YAAc,GAC3E,KAAK+C,GAAQ,IAAO,CAAE,GAAG9C,EAAG,YAAaC,CAAK,EAAE,CAClD,EAAE;wBACgB,KAAK,EAAE,sBAAsB,EAAE;;kBAErC,KAAK,EAAE,iBAAiB,EAAE;6CACC,KAAK,EAAE,mBAAmB,EAAE;UAC/DnC,EAAkB,IAAK,GACvB,KAAKsG,GAAM,YAAYxE,IAAQ,KAAK,EAAE,aAAaA,GAAM,EAAGG,EAAK,SAASH,GAAQ,GAChF,KAAKkD,GAAQ,GAAM,CACjB,IAAMrD,EAAqD,CAAE,GAAGO,EAAE,QAAS,EAG3E,OAFIC,IAAS,KAAM,OAAOR,EAASG,GAC9B,EAASA,GAAQK,EACf,CAAE,GAAGD,EAAG,UAAS,CAC1B,CAAC,CACH,CACF,EAAE;;eAGR,CACF,E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match-DKE_4o-x.js","names":["en","pl","LitElement","unsafeCSS","nothing","ifDefined","html","b","r","i$1","w","A","verdictIcon","renderVerdict","AstlElement","o","i","en_default","matchManifest","pl_default","PickAndPlace","blockStyles","optionStyles","namespace","matchUiMessages","NONE","LONG_PRESS","textOf","el","slotOf","index","MatchElement","#facing","item","#dragged","#pointer","x","y","#aim","box","#tile","#draw","#isRow","#join","to","#message","moment","#children","row","rows","columns","column","next","id","value","answers","#pick","#observer","ui","lines","#lines","group","#renderLines","#renderGrid","key","params","names","content","picked","#feedback","label","verdict","j","refs","notes","pick","from","drafting","#palette","#remove","#renderTile","event","partners","first","#press","#keydown","marked","correct","answer","root","prompt","child","items","slot","tag","tile","dragged","name","canvas","centre","dot","aim","g","a","x1","y1","x2","y2","line","matchElement"],"sources":["../../../../components/src/match/ui-messages.ts","../../../../components/src/match/element.ts"],"sourcesContent":["import type { MessageCatalog } from '@astl/core';\nimport en from './messages/ui/en.json' with { type: 'json' };\nimport pl from './messages/ui/pl.json' with { type: 'json' };\n\nconst namespace = 'astl.match';\n\n/**\n * The student strings (`ui.*`): the element's catalogs. A module of their own, because bundlers split by module: one\n * that also built `matchMessages` would put the authoring strings into the element's chunk.\n */\nexport const matchUiMessages: readonly MessageCatalog[] = [\n { namespace, locale: 'en', messages: en },\n { namespace, locale: 'pl', messages: pl },\n];\n","import type { Answers, ComponentManifest, MessageCatalog, Units } from '@astl/core';\nimport { AstlElement, type ElementRegistration, renderVerdict, verdictIcon } from '@astl/player';\nimport { PickAndPlace, type PickMoment } from '@astl/player/interaction';\nimport {\n type CSSResultGroup,\n css,\n html,\n LitElement,\n nothing,\n type PropertyDeclarations,\n svg,\n type TemplateResult,\n unsafeCSS,\n} from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { blockStyles } from '../block-styles.js';\nimport { optionStyles } from '../option-styles.js';\nimport { matchManifest } from './manifest.js';\nimport { matchUiMessages } from './ui-messages.js';\n\n/** The answer of a row without a partner, and the first destination of a picked item (Enter there: no line). */\nconst NONE = '';\n\n/** A touch held this long (ms) without moving starts a drag; a touch that moves sooner scrolls the page. */\nconst LONG_PRESS = 250;\n\nconst textOf = (el: Element | undefined): string => (el?.textContent ?? '').replace(/\\s+/g, ' ').trim();\n\n/** Palette slot 1 to 8 of the row at `index`, starting again after the eighth. */\nconst slotOf = (index: number): number => (index % 8) + 1;\n\n/**\n * `<astl-match>`: every row gets one partner from the columns. Slots: one per row (its id), answered with the id of\n * a column. The light-DOM `<astl-prompt>`, `<astl-row>` and `<astl-column>` children are slotted manually and never\n * moved or changed; where a name repeats (option buttons, lists, announcements) it is the child's text.\n * - `grid`: a table whose rows each hold a native radio group named by the row, one radio per column, each named\n * \"row: column\"; the browser gives the keyboard. Narrower than 34rem, each row is a card of option buttons.\n * - `lines`: rows and columns as two sides of toggle buttons with dots. Press an item, then its partner (either side\n * first), or choose the partner with the arrow keys and press Enter; or drag from one to the other (a touch after\n * a long press). Tapping a line, pressing a picked row again, or Delete and Backspace on a row remove its line.\n * Lines are for the eye only: the buttons say what they are joined to, and a disclosure offers one native select\n * per row.\n */\nexport class MatchElement extends AstlElement {\n static override manifest: ComponentManifest = matchManifest;\n static override messages: readonly MessageCatalog[] = matchUiMessages;\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n slotAssignment: 'manual',\n };\n\n static override properties: PropertyDeclarations = {\n joined: { state: true },\n };\n\n static override styles: CSSResultGroup = [\n // Narrow first: each row a card, its options as buttons. The layout follows the width the block gets, through a\n // container that is that width divided by max(1, columns / 5): from six columns on, the table needs more room\n // before it replaces the cards. The table inside takes the full width back.\n css`\n .fit {\n --astl-match-k: max(1, var(--astl-match-columns) / 5);\n container-type: inline-size;\n inline-size: calc(100% / var(--astl-match-k));\n }\n .table {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-2);\n inline-size: calc(100% * var(--astl-match-k));\n }\n .head {\n display: none;\n }\n .row,\n .tile {\n position: relative;\n border: var(--astl-outline-width) solid var(--astl-line);\n border-radius: var(--astl-radius-m);\n background: var(--astl-surface);\n }\n .row {\n display: grid;\n gap: var(--astl-space-2);\n padding: var(--astl-space-3);\n }\n .tile {\n border-color: var(--astl-outline);\n }\n .label,\n .column,\n .text {\n min-inline-size: 0;\n overflow-wrap: anywhere;\n }\n .options {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--astl-space-2);\n }\n `,\n // Selected: an option takes the fill and the bar of optionStyles, a picked tile the same here; in hc also bold text\n // (selected-weight), so a pick shows without the radio mark and without colour.\n css`\n .option {\n position: relative;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: var(--astl-space-2);\n min-block-size: var(--astl-target-min);\n padding-block: var(--astl-space-1);\n padding-inline: var(--astl-space-3);\n border: var(--astl-outline-width) solid var(--astl-outline);\n border-radius: var(--astl-radius-m);\n font-size: var(--astl-size-ui);\n cursor: pointer;\n overflow: clip;\n }\n .option:has(input:disabled) {\n cursor: default;\n }\n .option[data-selected],\n .tile[data-picked] {\n font-weight: var(--astl-selected-weight);\n }\n .tile[data-picked] {\n border-color: var(--astl-selected);\n background: var(--astl-selected-soft);\n }\n .tile[data-picked]::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: var(--astl-selected-bar);\n background: var(--astl-selected);\n }\n `,\n // The solution line (block-styles.ts) closes its row or tile; the verdict line sits under the task. In the cards,\n // a row's verdict icon stands by the row's label, at the end of its first line (the label keeps room for it), so\n // it never reads as the verdict of the option before it.\n css`\n .options > .astl-solution {\n flex-basis: 100%;\n }\n .options > .astl-verdict {\n position: absolute;\n inset-block-start: var(--astl-space-3);\n inset-inline-end: var(--astl-space-3);\n block-size: 1lh;\n }\n .row:has(.options > .astl-verdict) > .label {\n margin-inline-end: calc(1.1em + var(--astl-space-2));\n }\n .group-verdict {\n margin-block: var(--astl-space-3) 0;\n }\n `,\n // Wide: one table. Rows, their answer cell and its radio group share the table's columns (subgrids): the row\n // label, one column per option under its header (each half the label's share), then the verdict; the solution\n // line runs under the options. Option names move to the headers, and the checked radio alone shows the pick (by\n // its shape, also in hc). The radio sits at the inline start of its cell, like every radio, so the cell keeps\n // more room after it than before. A cell is no option box, so no look's box shadow (a ::part() rule from outside)\n // draws one: only an important rule inside wins over it.\n css`\n @container (min-inline-size: 34rem) {\n .table {\n display: grid;\n grid-template-columns:\n minmax(0, 1fr) repeat(var(--astl-match-columns), minmax(var(--astl-target-min), 0.5fr))\n auto;\n column-gap: var(--astl-space-1);\n }\n .head,\n .row,\n .cell,\n .options {\n display: grid;\n grid-column: 1 / -1;\n grid-template-columns: subgrid;\n align-items: center;\n }\n .head {\n align-items: end;\n padding-inline: calc(var(--astl-space-3) + var(--astl-outline-width));\n font-size: var(--astl-size-ui);\n font-weight: 600;\n }\n .cell {\n grid-column: 2 / -1;\n }\n .options > .astl-verdict {\n position: static;\n grid-column: -2;\n }\n .row:has(.options > .astl-verdict) > .label {\n margin-inline-end: 0;\n }\n .options > .astl-solution {\n grid-column: 1 / -1;\n }\n .option,\n .cell .option[data-selected] {\n padding-inline: var(--astl-space-1) var(--astl-space-3);\n border-color: transparent;\n background: none;\n box-shadow: none !important;\n }\n .cell .option[data-selected]::before {\n content: none;\n }\n .name {\n display: none;\n }\n }\n `,\n // Lines: rows on the inline-start side, columns on the inline-end side, the lines between them. The SVG lies\n // under the tiles, so a press near a dot reaches the tile; only the wide, invisible stroke of a line takes taps.\n css`\n .board {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(var(--astl-space-7), 0.4fr) minmax(0, 1fr);\n align-items: center;\n }\n .side {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-3);\n }\n .side + .side {\n grid-column: 3;\n }\n .lines {\n position: absolute;\n inset: 0;\n inline-size: 100%;\n block-size: 100%;\n overflow: visible;\n pointer-events: none;\n }\n .lines line {\n stroke: var(--astl-match-ink);\n stroke-width: 3px;\n stroke-linecap: round;\n }\n .lines .hit {\n stroke: transparent;\n stroke-width: 24px;\n pointer-events: stroke;\n cursor: pointer;\n }\n .lines .draft {\n stroke: var(--astl-selected);\n opacity: 0.6;\n }\n `,\n // A tile: its button, the verdict icon (at the end, on a line of its own when the text needs the room) and a dot\n // on the edge facing the other side: a ring in the row's palette colour, filled once joined (also under forced\n // colours). The solution line wraps under them.\n css`\n .tile {\n --astl-match-ink: var(--astl-outline);\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n .tile[data-target] {\n border-color: var(--astl-accent);\n outline: var(--astl-outline-width) solid var(--astl-accent);\n outline-offset: calc(-2 * var(--astl-outline-width));\n }\n .tile > button {\n flex: 1 1 auto;\n min-inline-size: var(--astl-target-min);\n min-block-size: var(--astl-target-min);\n margin: 0;\n padding-block: var(--astl-space-2);\n padding-inline: var(--astl-space-3);\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: pointer;\n touch-action: manipulation;\n user-select: none;\n -webkit-user-select: none;\n -webkit-touch-callout: none;\n }\n .tile > .astl-verdict {\n margin-inline-start: auto;\n padding-inline-end: var(--astl-space-3);\n }\n .tile > .astl-solution {\n flex-basis: 100%;\n padding-inline: var(--astl-space-3);\n padding-block-end: var(--astl-space-2);\n }\n .dot {\n position: absolute;\n inset-block-start: calc(50% - 0.5rem);\n inset-inline-end: -0.5rem;\n box-sizing: border-box;\n inline-size: 1rem;\n block-size: 1rem;\n border: 3px solid var(--astl-match-ink);\n border-radius: 50%;\n background: var(--astl-surface);\n forced-color-adjust: none;\n }\n .side + .side .dot {\n inset-inline: -0.5rem auto;\n }\n [data-joined] > .dot {\n background: var(--astl-match-ink);\n }\n `,\n // The disclosure with one native select per row.\n css`\n .fallback {\n margin-block-start: var(--astl-space-4);\n font-size: var(--astl-size-ui);\n }\n summary {\n min-block-size: var(--astl-target-min);\n align-content: center;\n color: var(--astl-accent);\n cursor: pointer;\n }\n .pick {\n display: grid;\n gap: var(--astl-space-1);\n margin-block-start: var(--astl-space-3);\n }\n select {\n min-block-size: var(--astl-target-min);\n max-inline-size: 100%;\n font: inherit;\n }\n `,\n // Palette slots of rows and their lines, through an attribute: a strict Content Security Policy blocks inline\n // style attributes.\n unsafeCSS(\n Array.from(\n { length: 8 },\n (_, i) => `[data-palette='${i + 1}']{--astl-match-ink:var(--astl-palette-${i + 1})}`,\n ).join(''),\n ),\n optionStyles,\n blockStyles,\n ];\n\n /** Row id to column id, in the order they were joined: a column's dot takes the colour of its first row. */\n declare protected joined: ReadonlyMap<string, string>;\n /** Where a drag points (viewport) and the partner under it: the end of the line being drawn. */\n #pointer: readonly [number, number] | null = null;\n #aim: string | null = null;\n /** A press turned into a drag: the click after its release is not a tap. */\n #dragged = false;\n #observer: ResizeObserver | null = null;\n\n /**\n * Joining with the keyboard, taps or a drag: an item (a row or a column) is picked; its destinations are \"no\n * partner\", then the items of the other side, in arrow key order with wrap-around. A touch drags after a long press.\n */\n readonly #pick: PickAndPlace<string> = new PickAndPlace<string>(this, {\n destinations: (item) => [NONE, ...this.#facing(item).map((el) => el.id)],\n // A row is where its line goes; a column is never anywhere (it may have many lines).\n current: (item) => this.joined.get(item) ?? NONE,\n at: (x, y, item) => {\n this.#dragged = true;\n this.#pointer = [x, y];\n this.#aim =\n this.#facing(item).find((el) => {\n const box = this.#tile(el.id)?.getBoundingClientRect();\n return box !== undefined && x >= box.left && x <= box.right && y >= box.top && y <= box.bottom;\n })?.id ?? null;\n this.#draw();\n return this.#aim;\n },\n commit: (item, to) => (this.#isRow(item) ? this.#join(item, to) : this.#join(to, item)),\n say: (moment, item, to) => this.#message(moment, item, to),\n wrap: true,\n hold: LONG_PRESS,\n });\n\n constructor() {\n super();\n this.joined = new Map();\n }\n\n /** `<astl-row>` children in rendered order: view order, or shuffled per attempt with a seed. */\n get rows(): readonly HTMLElement[] {\n return this.shuffled(this.#children('astl-row'));\n }\n\n /** `<astl-column>` children, always in view order (the authored order). */\n get columns(): readonly HTMLElement[] {\n return this.#children('astl-column');\n }\n\n get slotIds(): readonly string[] {\n return this.rows.map((row) => row.id);\n }\n\n getAnswers(): Answers {\n return Object.fromEntries(this.joined);\n }\n\n setAnswers(answers: Answers): void {\n const rows = new Set(this.slotIds);\n const columns = new Set(this.columns.map((column) => column.id));\n const next = new Map(this.joined);\n for (const [id, value] of Object.entries(answers)) {\n if (!rows.has(id) || next.get(id) === value) continue;\n next.delete(id);\n // '' removes the line; an unknown column cannot be shown, so the row is unanswered, as the player sends it.\n if (columns.has(value)) next.set(id, value);\n }\n this.joined = next;\n this.#pick.reset();\n }\n\n units(): Units {\n return { answered: this.joined.size, total: this.rows.length };\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.#observer?.observe(this);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#observer?.disconnect();\n }\n\n protected override render(): TemplateResult {\n const ui = this.uiLanguage;\n const lines = this.#lines;\n const group = this.groupVerdict;\n return html`<fieldset part=\"match\">\n <legend part=\"prompt\">\n <slot class=\"prompt-slot\"></slot>\n <span class=\"hint\" lang=${ui.lang}><bdi>${this.t(lines ? 'ui.hint.lines' : 'ui.hint.grid')}</bdi></span>\n </legend>\n ${lines ? this.#renderLines() : this.#renderGrid()}\n ${\n group === null\n ? nothing\n : html`<p class=\"group-verdict\" part=\"verdict\" data-verdict=${group}>\n ${renderVerdict(group, (key, params) => this.t(key, params), ui)}\n </p>`\n }\n </fieldset>`;\n }\n\n #renderGrid(): TemplateResult {\n const columns = this.columns;\n const names = columns.map(textOf);\n const content = this.contentLang || undefined;\n return html`<div class=\"fit\"><div class=\"table\" role=\"table\">\n <div class=\"head\" role=\"row\">\n <span role=\"cell\"></span>\n ${columns.map(\n (column) =>\n html`<span class=\"column\" part=\"column\" role=\"columnheader\"><slot data-item=${column.id}></slot></span>`,\n )}\n </div>\n ${this.rows.map((row, i) => {\n const picked = this.joined.get(row.id);\n const { verdict, refs, notes } = this.#feedback(row.id, i);\n const label = textOf(row);\n return html`<div class=\"row astl-box\" part=\"row\" role=\"row\" data-verdict=${ifDefined(verdict)}>\n <span class=\"label\" role=\"rowheader\" id=\"row-${i}\"><slot data-item=${row.id}></slot></span>\n <div class=\"cell\" role=\"cell\" aria-colspan=${columns.length}>\n <div class=\"options\" role=\"radiogroup\" aria-labelledby=\"row-${i}\">\n ${columns.map(\n (\n column,\n j,\n ) => html`<label class=\"option astl-ring\" part=\"option\" ?data-selected=${picked === column.id}>\n <input\n part=\"control\"\n type=\"radio\"\n name=${row.id}\n value=${column.id}\n .checked=${picked === column.id}\n ?disabled=${this.disabled}\n aria-label=${this.t('ui.option', { row: label, column: names[j] ?? '' })}\n aria-describedby=${refs || nothing}\n @change=${() => this.#join(row.id, column.id)}\n /><span class=\"name\" lang=${ifDefined(content)} aria-hidden=\"true\">${names[j]}</span>\n </label>`,\n )}\n ${notes}\n </div>\n </div>\n </div>`;\n })}\n </div></div>`;\n }\n\n #renderLines(): TemplateResult {\n const ui = this.uiLanguage;\n const rows = this.rows;\n const columns = this.columns;\n const pick = this.#pick;\n const from = pick.dragging ?? pick.picked;\n const drafting = from !== null && (pick.dragging !== null || (pick.target ?? NONE) !== NONE);\n const content = this.contentLang || undefined;\n return html`<span class=\"astl-vh\" id=\"instructions\" lang=${ui.lang} dir=${ui.dir}>${this.t('ui.instructions')}</span>\n <div class=\"board\">\n <svg class=\"lines\" part=\"line\" aria-hidden=\"true\" focusable=\"false\">\n ${[...this.joined].map(\n ([row, column]) =>\n svg`<g data-palette=${this.#palette(row)} data-from=${row} data-to=${column}><line></line>${\n this.disabled ? nothing : svg`<line class=\"hit\" @click=${() => this.#remove(row)}></line>`\n }</g>`,\n )}\n ${drafting ? svg`<g data-from=${from}><line class=\"draft\"></line></g>` : nothing}\n </svg>\n <div class=\"side\">${rows.map((row) => this.#renderTile(row, true))}</div>\n <div class=\"side\">${columns.map((column) => this.#renderTile(column, false))}</div>\n </div>\n <details class=\"fallback\" part=\"fallback\">\n <summary lang=${ui.lang} dir=${ui.dir}>${this.t('ui.fallback')}</summary>\n ${rows.map((row, i) => {\n const picked = this.joined.get(row.id) ?? NONE;\n return html`<label class=\"pick\">\n <span lang=${ifDefined(content)}>${textOf(row)}</span>\n <select\n part=\"control\"\n lang=${ifDefined(content)}\n ?disabled=${this.disabled}\n aria-describedby=${this.#feedback(row.id, i).refs || nothing}\n @change=${(event: Event) => this.#join(row.id, (event.target as HTMLSelectElement).value)}\n >\n <option value=\"\" lang=${ui.lang} .selected=${picked === NONE}>${this.t('ui.choose')}</option>\n ${columns.map(\n (column) =>\n html`<option value=${column.id} .selected=${picked === column.id}>${textOf(column)}</option>`,\n )}\n </select>\n </label>`;\n })}\n </details>`;\n }\n\n #renderTile(item: HTMLElement, row: boolean): TemplateResult {\n const id = item.id;\n const pick = this.#pick;\n const i = this.rows.indexOf(item);\n const partners = row\n ? this.columns.filter((column) => column.id === this.joined.get(id))\n : this.rows.filter((r) => this.joined.get(r.id) === id);\n const first = row ? id : [...this.joined].find(([, column]) => column === id)?.[0];\n const { verdict, refs, notes } = row\n ? this.#feedback(id, i)\n : { verdict: undefined, refs: '', notes: nothing };\n const ui = this.uiLanguage;\n const names = new Intl.ListFormat(ui.lang).format(partners.map(textOf));\n return html`<div\n class=\"tile astl-box astl-ring\"\n part=${row ? 'row' : 'column'}\n data-item=${id}\n data-palette=${ifDefined(first === undefined ? undefined : this.#palette(first))}\n data-verdict=${ifDefined(verdict)}\n ?data-joined=${partners.length > 0}\n ?data-picked=${pick.picked === id || pick.dragging === id}\n ?data-target=${pick.target === id || (pick.dragging !== null && pick.over === id)}\n >\n <button\n type=\"button\"\n data-item=${id}\n aria-pressed=${pick.picked === id ? 'true' : 'false'}\n aria-describedby=${this.disabled ? refs || nothing : `instructions ${refs}`.trim()}\n ?disabled=${this.disabled}\n @click=${(event: MouseEvent) => this.#press(event, id)}\n @keydown=${(event: KeyboardEvent) => this.#keydown(event, id)}\n @pointerdown=${(event: PointerEvent) => {\n this.#dragged = false;\n this.#pointer = null;\n pick.pointerdown(event, id);\n }}\n @touchmove=${pick.touchmove}\n >\n <span class=\"text\"><slot data-item=${id}></slot></span\n ><span class=\"astl-vh\" lang=${ui.lang} dir=${ui.dir}\n >, ${partners.length > 0 ? this.t('ui.joined', { names }) : this.t('ui.notJoined')}</span\n >\n </button>\n <span class=\"dot\" part=\"dot\"></span>\n ${notes}\n </div>`;\n }\n\n /**\n * A row's verdict (answered rows; where rows are marked one by one, an unanswered one shows \"no answer\"), its\n * solution line (unless the answer is the correct one) and their ids.\n */\n #feedback(id: string, i: number) {\n const picked = this.joined.get(id);\n const marked = Object.keys(this.feedback?.slots ?? {}).length > 0;\n const verdict = (picked === undefined ? (marked ? 'empty' : null) : this.slotVerdict(id)) ?? undefined;\n const correct = this.solution?.[id];\n const answer = correct === picked ? undefined : this.columns.find((column) => column.id === correct);\n const ui = this.uiLanguage;\n const content = this.contentLang || undefined;\n const refs = [verdict && `verdict-${i}`, answer && `solution-${i}`].filter(Boolean).join(' ');\n const notes = html`${\n verdict === undefined\n ? nothing\n : renderVerdict(verdict, (key, params) => this.t(key, params), {\n hiddenWord: true,\n id: `verdict-${i}`,\n part: 'verdict',\n ...ui,\n })\n }${\n answer === undefined\n ? nothing\n : // A UI sentence around a content name: it reads in the UI's direction, the name keeps its language.\n html`<p class=\"astl-solution\" part=\"solution\" id=\"solution-${i}\" data-column=${answer.id} lang=${ui.lang} dir=${ui.dir}>\n ${verdictIcon('correct')}<span class=\"astl-solution-label\">${this.t('ui.solution')}</span>\n <bdi lang=${ifDefined(content)}>${textOf(answer)}</bdi>\n </p>`\n }`;\n return { verdict, refs, notes };\n }\n\n protected override updated(): void {\n // Manual slot assignment: the view's light DOM is projected as is, never moved or rewritten.\n const root = this.renderRoot as ShadowRoot;\n const prompt = Array.from(this.children).find((child) => child.localName === 'astl-prompt');\n root.querySelector<HTMLSlotElement>('slot.prompt-slot')?.assign(...(prompt ? [prompt] : []));\n const items = new Map([...this.rows, ...this.columns].map((el) => [el.id, el]));\n for (const slot of root.querySelectorAll<HTMLSlotElement>('slot[data-item]')) {\n const item = items.get(slot.dataset.item ?? '');\n slot.assign(...(item ? [item] : []));\n }\n // Through the CSSOM, which a strict Content Security Policy allows (an inline style attribute it blocks).\n root\n .querySelector<HTMLElement>('.fit')\n ?.style.setProperty('--astl-match-columns', `${this.columns.length}`);\n if (this.#lines && this.#observer === null) {\n // Lines follow the tiles: on resize (the host's size changes with every tile) and once fonts are loaded.\n this.#observer = new ResizeObserver(() => this.#draw());\n this.#observer.observe(this);\n void document.fonts.ready.then(() => this.#draw());\n }\n this.#draw();\n }\n\n // Joining\n\n get #lines(): boolean {\n return this.stringAttribute('variant') === 'lines';\n }\n\n #children(tag: string): HTMLElement[] {\n return Array.from(this.children).filter(\n (child): child is HTMLElement => child.localName === tag && child.id !== '',\n );\n }\n\n #isRow(id: string): boolean {\n return this.rows.some((row) => row.id === id);\n }\n\n /** The items on the other side from `id`. */\n #facing(id: string): readonly HTMLElement[] {\n return this.#isRow(id) ? this.columns : this.rows;\n }\n\n #palette(row: string): number {\n return slotOf(this.rows.findIndex((r) => r.id === row));\n }\n\n #tile(id: string): HTMLElement | undefined {\n return [...(this.renderRoot as ShadowRoot).querySelectorAll<HTMLElement>('.tile')].find(\n (tile) => tile.dataset.item === id,\n );\n }\n\n /** Gives `row` the partner `column` (NONE: none) and reports it. */\n #join(row: string, column: string): void {\n if (this.disabled || (this.joined.get(row) ?? NONE) === column) return;\n const next = new Map(this.joined);\n next.delete(row);\n if (column !== NONE) next.set(row, column);\n this.joined = next;\n this.emitChange({ [row]: column });\n }\n\n /** Removes the line of `row` (a tap on the line, Delete or Backspace, a second press), announced. */\n #remove(row: string): void {\n if (this.disabled || !this.joined.has(row)) return;\n this.#pick.reset();\n this.#join(row, NONE);\n this.announce(this.#message('put', row, NONE));\n }\n\n /**\n * A press on an item (a tap, Space or Enter). A picked row pressed again, with no other partner chosen, loses its\n * line (\"tap the row again\"); else PickAndPlace picks, and a press on the other side puts the picked item there.\n */\n #press(event: MouseEvent, id: string): void {\n const pick = this.#pick;\n const picked = pick.picked;\n const dragged = this.#dragged && event.detail !== 0;\n this.#dragged = false;\n if (!dragged && picked === id && pick.target === null && this.joined.has(id)) this.#remove(id);\n else pick.click(event, id, picked !== null && this.#isRow(picked) !== this.#isRow(id) ? id : undefined);\n }\n\n #keydown(event: KeyboardEvent, id: string): void {\n if ((event.key === 'Delete' || event.key === 'Backspace') && this.joined.has(id)) {\n event.preventDefault();\n this.#remove(id);\n } else this.#pick.keydown(event, id);\n }\n\n /** `ui.announce.pick`, `target` (or `none`), `cancel`, and for a put `join` (or `unjoin`: no partner). */\n #message(moment: PickMoment, item: string, to: string): string {\n const name = (id: string) => textOf([...this.rows, ...this.columns].find((el) => el.id === id));\n const [row, column] = this.#isRow(item) ? [item, to] : [to, item];\n const key =\n moment === 'put'\n ? column === NONE\n ? 'unjoin'\n : 'join'\n : moment === 'target' && to === NONE\n ? 'none'\n : moment;\n return this.t(`ui.announce.${key}`, {\n item: name(moment === 'target' ? to : item),\n row: name(row),\n column: name(column),\n joined: this.joined.size,\n total: this.rows.length,\n });\n }\n\n /** Puts every line between the centres of its dots, and the line being made towards its partner or the pointer. */\n #draw(): void {\n const canvas = (this.renderRoot as ShadowRoot).querySelector('svg.lines');\n if (canvas === null) return;\n // The viewBox is the box on screen: no correction needed for CSS zoom or scaling.\n const box = canvas.getBoundingClientRect();\n canvas.setAttribute('viewBox', `0 0 ${box.width} ${box.height}`);\n const centre = (id: string | null | undefined): readonly [number, number] | null => {\n const dot = id ? this.#tile(id)?.querySelector('.dot')?.getBoundingClientRect() : undefined;\n return dot ? [dot.x + dot.width / 2, dot.y + dot.height / 2] : null;\n };\n const pick = this.#pick;\n const aim = centre(pick.dragging === null ? pick.target : this.#aim) ?? this.#pointer;\n for (const g of canvas.querySelectorAll('g')) {\n const a = centre(g.dataset.from);\n // A line without an end yet stays a point under its own dot.\n const b = (g.dataset.to === undefined ? aim : centre(g.dataset.to)) ?? a;\n const [x1, y1, x2, y2] =\n a && b ? [a[0] - box.x, a[1] - box.y, b[0] - box.x, b[1] - box.y] : [0, 0, 0, 0];\n for (const line of g.querySelectorAll('line')) {\n line.setAttribute('x1', `${x1}`);\n line.setAttribute('y1', `${y1}`);\n line.setAttribute('x2', `${x2}`);\n line.setAttribute('y2', `${y2}`);\n }\n }\n }\n}\n\nexport const matchElement: ElementRegistration = {\n manifest: matchManifest,\n element: MatchElement,\n messages: matchUiMessages,\n};\n"],"mappings":"A,wTAIA,IAAMuB,EAAY,aAMLC,EAA6C,CACxD,CAAE,YAAW,OAAQ,KAAM,SAAUxB,CAAG,EACxC,CAAE,YAAW,OAAQ,KAAM,SAAUC,CAAG,CAC1C,ECQMwB,EAAO,GAGPC,EAAa,IAEbC,EAAU,IAAqCC,GAAI,aAAe,GAAA,CAAI,QAAQ,OAAQ,GAAG,CAAC,CAAC,KAAK,EAGhGC,EAAU,GAA2BC,EAAQ,EAAK,EAc3CC,EAAb,cAAkCjB,CAAY,CAC5C,OAAgB,SAA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AsB,EAAI,IAAA,GAClF,OAAO+C,EAAM,CAACA,EAAI,EAAIA,EAAI,MAAQ,EAAGA,EAAI,EAAIA,EAAI,OAAS,CAAC,EAAI,IACjE,EACMzB,EAAO,KAAKnB,GACZ6C,EAAMF,EAAOxB,EAAK,WAAa,KAAOA,EAAK,OAAS,KAAKrC,EAAI,GAAK,KAAKH,GAC7E,IAAK,IAAMmE,KAAKJ,EAAO,iBAAiB,GAAG,EAAG,CAC5C,IAAMK,EAAIJ,EAAOG,EAAE,QAAQ,IAAI,EAEzB/F,GAAK+F,EAAE,QAAQ,KAAO,IAAA,GAAYD,EAAMF,EAAOG,EAAE,QAAQ,EAAE,IAAMC,EACjE,CAACC,EAAIC,EAAIC,EAAIC,GACjBJ,GAAKhG,EAAI,CAACgG,EAAE,GAAKhE,EAAI,EAAGgE,EAAE,GAAKhE,EAAI,EAAGhC,EAAE,GAAKgC,EAAI,EAAGhC,EAAE,GAAKgC,EAAI,CAAC,EAAI,CAAC,EAAG,EAAG,EAAG,CAAC,EACjF,IAAK,IAAMqE,KAAQN,EAAE,iBAAiB,MAAM,EAC1CM,EAAK,aAAa,KAAM,GAAGJ,GAAI,EAC/BI,EAAK,aAAa,KAAM,GAAGH,GAAI,EAC/BG,EAAK,aAAa,KAAM,GAAGF,GAAI,EAC/BE,EAAK,aAAa,KAAM,GAAGD,GAAI,CAEnC,CACF,CACF,EAEaE,EAAoC,CAC/C,SAAU3F,EACV,QAASa,EACT,SAAUP,CACZ,E"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={"insert.title":`Insert`,"insert.components":`Components`,"insert.exercises":`Exercises`,"insert.content":`Content`,"insert.picture":`Picture`,"insert.picture.description":`A picture with alt text and an optional caption`,"insert.pageBreak":`Page break`,"insert.pageBreak.description":`Split the exercise into steps at the cursor`,"insert.hint":`Hint`,"insert.hint.description":`One students ask for: for the question at the cursor, else for the page`,"insert.explanation":`Explanation`,"insert.explanation.description":`Why the answer is right, shown once it is checked`,"insert.feedback":`Feedback`,"insert.feedback.description":`A text by the verdict, shown once the answer is checked`,"insert.text":`Text`,"insert.text.description":`A paragraph after this block`,"insert.noMatch":`Nothing matches “{query}”.`,"toolbar.label":`Format and insert`,"toolbar.style":`Text style: {style}`,"toolbar.paragraph":`Paragraph`,"toolbar.heading":`Heading`,"toolbar.subheading":`Subheading`,"toolbar.bold":`Bold`,"toolbar.italic":`Italic`,"toolbar.underline":`Underline`,"toolbar.link":`Link`,"toolbar.link.address":`Link address`,"toolbar.link.apply":`Apply`,"toolbar.link.remove":`Remove link`,"toolbar.link.blocked":`This address is not allowed here.`,"toolbar.bulleted":`Bulleted list`,"toolbar.numbered":`Numbered list`,"toolbar.undo":`Undo`,"toolbar.redo":`Redo`,"toolbar.elements":`Elements`,"toolbar.templates":`Templates`,"toolbar.layouts":`Layout`,"toolbar.view":`View`,"toolbar.search":`Search`,"block.text":`Text`,"block.gap":`Gap`,"issue.onPage":`{n} on page {page}`,"picture.title":`Add a picture`,"picture.editTitle":`Edit the picture`,"picture.file":`Upload a picture`,"picture.library":`Choose from the library`,"picture.urlOnly":`This editor adds pictures by their address only: it has no upload.`,"picture.src":`Picture address (URL)`,"picture.alt":`Alt text`,"picture.altHelp":`What the picture shows, for students who cannot see it. Do not give an answer away.`,"picture.decorative":`Decorative: screen readers skip it (alt="")`,"picture.caption":`Caption (optional)`,"picture.cancel":`Cancel`,"picture.insert":`Insert`,"picture.save":`Save`,"picture.uploading":`Uploading…`,"picture.uploaded":`Uploaded.`,"picture.uploadFailed":`The upload failed. Try again, or give the picture's address.`,"picture.uploadBlocked":`The upload gave an address the URL policy does not allow.`,"picture.picked":`Chosen from the library.`,"picture.pickFailed":`The library did not open. Try again, or give the picture's address.`,"picture.pickBlocked":`The library returned an address the URL policy does not allow.`,"picture.srcMissing":`Give the picture's address, or upload it.`,"picture.srcBlocked":`The URL policy does not allow this address.`,"picture.altMissing":`Describe the picture, or mark it as decorative.`,"picture.altRequired":`Describe the picture: students who cannot see it need its alt text for the task.`,"picture.pasteRefused":`This editor has no upload, so a picture file cannot be pasted or dropped. Add it with Insert, Picture, by its address.`,"field.picture.src":`Picture address (URL)`,"field.regions.draw":`Drag on the picture to draw a zone, or add one and type its numbers.`,"field.points.place":`Click the picture to place a pin, or add one and type its position.`,"field.region":`Zone {n}`,"field.region.add":`Add a zone`,"field.region.remove":`Remove zone {n}`,"field.point":`Pin {n}`,"field.point.add":`Add a pin`,"field.point.remove":`Remove pin {n}`,"field.shape":`Shape`,"field.shape.rect":`Rectangle`,"field.shape.circle":`Circle`,"field.shape.polygon":`Polygon`,"field.x":`From the left (%)`,"field.y":`From the top (%)`,"field.width":`Width (%)`,"field.height":`Height (%)`,"field.cx":`Centre from the left (%)`,"field.cy":`Centre from the top (%)`,"field.r":`Radius (% of the width)`,"field.vertex.x":`Point {n} from the left (%)`,"field.vertex.y":`Point {n} from the top (%)`,"field.vertex.add":`Add a point`,"field.vertex.remove":`Remove point {n}`,"field.label":`Label`,"field.label.optional":`Label (optional)`,"field.more":`Only the first {shown} of {count} are listed here: edit the others in the source.`,"inspector.title":`Properties`,"inspector.delete":`Delete`,"inspector.moveUp":`Move up`,"inspector.moveDown":`Move down`,"inspector.empty":`Put the cursor in an exercise element to edit its answers and settings.`,"inspector.unsupported":`Element {tag} cannot be edited here.`,"inspector.unset":`(not set)`,"inspector.item":`{label} {n}`,"inspector.add":`Add`,"inspector.remove":`Remove`,"inspector.removeItem":`Remove: {label} {n}`,"inspector.untitled":`Item {n} (empty)`,"inspector.variant":`Variant`,"inspector.styleTemplate":`Element style`,"inspector.styleTemplate.inherit":`Same as the exercise`,"inspector.styleTemplate.default":`Default look`,"inspector.document":`Exercise`,"inspector.documentStyle":`Look of the whole exercise`,"inspector.upload":`Upload a file`,"inspector.uploadItem":`Upload a file: {label}`,"inspector.uploading":`Uploading…`,"inspector.uploaded":`Uploaded.`,"inspector.uploadFailed":`The upload failed. Try again, or type its address.`,"inspector.uploadBlocked":`The upload gave an address the URL policy does not allow.`,"issues.title":`Problems`,"issues.errors":`{count, plural, one {# error} other {# errors}}`,"issues.warnings":`{count, plural, one {# warning} other {# warnings}}`,"issues.summary":`{errors}, {warnings}`,"issues.none":`No errors or warnings.`,"severity.error":`Error`,"severity.warning":`Warning`,"label.text":`{label}: {text}`,"preview.title":`Student view`,"preview.show":`Preview`,"preview.refresh":`Refresh preview`,"preview.hint":`Press Preview to try the exercise the way a student will see it.`,"preview.loading":`Preparing the preview…`,"preview.stale":`The document changed after this preview. Refresh it to see the changes.`,"preview.invalid":`{count, plural, one {Fix this error to see the preview:} other {Fix these # errors to see the preview:}}`,"preview.failed":`The preview could not be shown.`,"surface.label":`Exercise content`,"surface.pageNumber":`Page {page} of {pages}`,"surface.pageTitle":`Page title`,"surface.pageJoin":`Join with page {previous}`,"surface.pageAdded":`Page {page} added`,"surface.pageJoined":`Page {page} joined with page {previous}`,"surface.pageDelete":`Delete page`,"surface.pageDeleted":`Deleted page {n}`,"surface.pageAddTitle":`Add title`,"surface.pageRemoveTitle":`Remove title`,"surface.pageTitleOf":`Title of page {page}`,"surface.pageTitleRemoved":`Removed the title of page {page}`,"surface.points":`{points, plural, one {# pt} other {# pts}}`,"surface.items":`{n, plural, one {# item} other {# items}}`,"surface.blockMovedUp":`Block moved up, now block {n}`,"surface.blockMovedDown":`Block moved down, now block {n}`,"surface.blockRemoved":`Block {n} deleted`,"surface.addOption":`Add option`,"surface.chip.empty":`No answer`,"surface.chip.more":`+{n}`,"surface.picture.alt":`Picture: {alt}`,"surface.picture.decorative":`Picture, decorative (no alt text)`,"surface.picture.noAlt":`Picture without alt text`,"surface.picture.blocked":`(not shown: the URL policy does not allow its address)`,"surface.picture.edit":`Edit`,"surface.loading":`Loading the editor…`,"surface.failed":`The editor could not be loaded. Reload the page to try again.`,"view.visual":`Visual`,"view.source":`HTML`,"view.visualHint":`Edit the exercise as formatted text`,"view.sourceHint":`Edit the exercise as HTML`,"view.sourceLabel":`The exercise as HTML`,"view.sourceErrors":`{n, plural, one {The HTML has # error. Fix it to go back.} other {The HTML has # errors. Fix them to go back.}}`,"status.elements":`{n, plural, one {# element} other {# elements}}`,"status.errors":`{n, plural, one {# error} other {# errors}}`,"status.warnings":`{n, plural, one {# warning} other {# warnings}}`,"status.ready":`Ready to share`,"insert.layouts":`Layout`,"insert.layout.two":`Two columns`,"insert.layout.two.description":`Two columns of the same width.`,"insert.layout.three":`Three columns`,"insert.layout.three.description":`Three columns of the same width.`,"insert.layout.wide-narrow":`Wide + narrow`,"insert.layout.wide-narrow.description":`A wide column, then a narrow one.`,"insert.layout.narrow-wide":`Narrow + wide`,"insert.layout.narrow-wide.description":`A narrow column, then a wide one.`,"insert.layout.picture-text":`Picture beside text`,"insert.layout.picture-text.description":`A picture you choose, with text next to it.`,"layout.section":`Columns`,"layout.change":`Change layout`,"layout.other":`Another layout`,"layout.unwrap":`Remove layout`,"layout.delete":`Delete with content`,"layout.confirm":`Delete the layout and its content?`,"layout.confirmDelete":`Yes, delete`,"layout.cancel":`Cancel`,"toolbar.font":`Font: {value}`,"toolbar.font.name":`Font`,"toolbar.size":`Size: {value}`,"toolbar.size.name":`Size`,"toolbar.color":`Text colour`,"toolbar.highlight":`Highlight`,"toolbar.align":`Alignment`,"toolbar.align.start":`Left`,"toolbar.align.center":`Centre`,"toolbar.align.end":`Right`,"toolbar.align.justify":`Justified`,"toolbar.spacing":`Spacing`,"toolbar.spacing.line":`Line height`,"toolbar.spacing.after":`Space after`,"toolbar.spacing.none":`None`,"toolbar.spacing.small":`Small`,"toolbar.spacing.medium":`Medium`,"toolbar.spacing.large":`Large`,"toolbar.clear":`Clear formatting`,"toolbar.default":`Default`,"toolbar.myStyles":`My styles`,"toolbar.readyStyles":`Ready styles`,"style.preset.note":`Note`,"style.preset.tip":`Tip`,"style.preset.important":`Important`,"style.preset.definition":`Definition`,"style.preset.example":`Example`,"style.preset.quote":`Quote`,"style.preset.highlight":`Highlight`,"style.preset.small-print":`Small print`,"style.color.theme":`Theme colours`,"style.color.swatch":`Theme colour {n}`,"style.color.custom":`Custom colour`,"style.color.picker":`Pick a colour`,"style.color.invalid":`Write a colour as #rrggbb.`,"style.color.none":`No colour`,"style.close":`Close`,"style.form.none":`Put the cursor in what you want to style.`,"style.target.picture":`Picture style`,"style.target.figure":`Picture and caption style`,"style.target.block":`Block style`,"style.target.component":`Element style`,"style.target.column":`Column style`,"style.target.layout":`Layout style`,"style.position.inline":`In the text`,"style.position.start":`On the left`,"style.position.end":`On the right`,"style.position.center":`Centred`,"style.position.full":`Full width`,"style.rules.open":`Manage styles…`,"style.rules.title":`Styles`,"inspector.style":`Style`,"surface.picture.place":`Position and size: {position}, {width}`,"surface.picture.placeAuto":`Position and size: {position}`,"style.target.more":`{target}…`,"help.cost":`costs {percent}%`,"help.when.correct":`Correct`,"help.when.incorrect":`Wrong`,"help.when.partial":`Partly correct`,"help.when.omitted":`Skipped`,"help.costLabel":`Cost of the hint`,"help.whenLabel":`For the result`},t={"insert.title":`Wstaw`,"insert.components":`Elementy`,"insert.exercises":`Ćwiczenia`,"insert.content":`Treść`,"insert.picture":`Obrazek`,"insert.picture.description":`Obrazek z tekstem alternatywnym i podpisem do wyboru`,"insert.pageBreak":`Podział strony`,"insert.pageBreak.description":`Podziel ćwiczenie na kroki od miejsca kursora`,"insert.hint":`Podpowiedź`,"insert.hint.description":`Na prośbę ucznia: do pytania przy kursorze, a poza nim do strony`,"insert.explanation":`Wyjaśnienie`,"insert.explanation.description":`Dlaczego odpowiedź jest dobra, widoczne po sprawdzeniu`,"insert.feedback":`Informacja zwrotna`,"insert.feedback.description":`Tekst zależny od wyniku, widoczny po sprawdzeniu`,"insert.text":`Tekst`,"insert.text.description":`Akapit po tym bloku`,"insert.noMatch":`Nic nie pasuje do „{query}”.`,"toolbar.label":`Formatowanie i wstawianie`,"toolbar.style":`Styl tekstu: {style}`,"toolbar.paragraph":`Akapit`,"toolbar.heading":`Nagłówek`,"toolbar.subheading":`Podtytuł`,"toolbar.bold":`Pogrubienie`,"toolbar.italic":`Kursywa`,"toolbar.underline":`Podkreślenie`,"toolbar.link":`Link`,"toolbar.link.address":`Adres linku`,"toolbar.link.apply":`Zastosuj`,"toolbar.link.remove":`Usuń link`,"toolbar.link.blocked":`Tego adresu nie można tu użyć.`,"toolbar.bulleted":`Lista punktowana`,"toolbar.numbered":`Lista numerowana`,"toolbar.undo":`Cofnij`,"toolbar.redo":`Ponów`,"toolbar.elements":`Elementy`,"toolbar.templates":`Szablony`,"toolbar.layouts":`Układ`,"toolbar.view":`Widok`,"toolbar.search":`Szukaj`,"block.text":`Tekst`,"block.gap":`Luka`,"issue.onPage":`{n} na stronie {page}`,"picture.title":`Dodaj obrazek`,"picture.editTitle":`Edytuj obrazek`,"picture.file":`Wgraj obrazek`,"picture.library":`Wybierz z biblioteki`,"picture.urlOnly":`Ten edytor dodaje obrazki tylko po adresie: nie ma wgrywania.`,"picture.src":`Adres obrazka (URL)`,"picture.alt":`Tekst alternatywny`,"picture.altHelp":`Co przedstawia obrazek, dla uczniów, którzy go nie widzą. Nie zdradzaj odpowiedzi.`,"picture.decorative":`Ozdobny: czytniki ekranu go pomijają (alt="")`,"picture.caption":`Podpis (opcjonalny)`,"picture.cancel":`Anuluj`,"picture.insert":`Wstaw`,"picture.save":`Zapisz`,"picture.uploading":`Wgrywam…`,"picture.uploaded":`Wgrano.`,"picture.uploadFailed":`Nie udało się wgrać obrazka. Spróbuj ponownie albo podaj jego adres.`,"picture.uploadBlocked":`Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.`,"picture.picked":`Wybrano z biblioteki.`,"picture.pickFailed":`Nie udało się otworzyć biblioteki. Spróbuj ponownie albo podaj adres obrazka.`,"picture.pickBlocked":`Biblioteka zwróciła adres, na który nie pozwala polityka adresów.`,"picture.srcMissing":`Podaj adres obrazka albo go wgraj.`,"picture.srcBlocked":`Polityka adresów nie pozwala na ten adres.`,"picture.altMissing":`Opisz obrazek albo oznacz go jako ozdobny.`,"picture.altRequired":`Opisz obrazek: uczniowie, którzy go nie widzą, potrzebują tekstu alternatywnego do zadania.`,"picture.pasteRefused":`Ten edytor nie ma wgrywania, więc nie można wkleić ani upuścić pliku obrazka. Dodaj go przez Wstaw, Obrazek, podając adres.`,"field.picture.src":`Adres obrazka (URL)`,"field.regions.draw":`Przeciągnij po obrazku, aby narysować strefę, albo dodaj ją i wpisz jej liczby.`,"field.points.place":`Kliknij obrazek, aby wbić pinezkę, albo dodaj ją i wpisz jej położenie.`,"field.region":`Strefa {n}`,"field.region.add":`Dodaj strefę`,"field.region.remove":`Usuń strefę {n}`,"field.point":`Pinezka {n}`,"field.point.add":`Dodaj pinezkę`,"field.point.remove":`Usuń pinezkę {n}`,"field.shape":`Kształt`,"field.shape.rect":`Prostokąt`,"field.shape.circle":`Koło`,"field.shape.polygon":`Wielokąt`,"field.x":`Od lewej (%)`,"field.y":`Od góry (%)`,"field.width":`Szerokość (%)`,"field.height":`Wysokość (%)`,"field.cx":`Środek od lewej (%)`,"field.cy":`Środek od góry (%)`,"field.r":`Promień (% szerokości)`,"field.vertex.x":`Punkt {n} od lewej (%)`,"field.vertex.y":`Punkt {n} od góry (%)`,"field.vertex.add":`Dodaj punkt`,"field.vertex.remove":`Usuń punkt {n}`,"field.label":`Etykieta`,"field.label.optional":`Etykieta (opcjonalna)`,"field.more":`Tu widać tylko pierwsze {shown} z {count}: pozostałe edytuj w źródle.`,"inspector.title":`Właściwości`,"inspector.delete":`Usuń`,"inspector.moveUp":`Przenieś wyżej`,"inspector.moveDown":`Przenieś niżej`,"inspector.empty":`Umieść kursor w elemencie ćwiczenia, aby edytować jego odpowiedzi i ustawienia.`,"inspector.unsupported":`Elementu {tag} nie można tu edytować.`,"inspector.unset":`(nie ustawiono)`,"inspector.item":`{label} {n}`,"inspector.add":`Dodaj`,"inspector.remove":`Usuń`,"inspector.removeItem":`Usuń: {label} {n}`,"inspector.untitled":`Element {n} (pusty)`,"inspector.variant":`Wariant`,"inspector.styleTemplate":`Styl elementu`,"inspector.styleTemplate.inherit":`Jak całe ćwiczenie`,"inspector.styleTemplate.default":`Domyślny wygląd`,"inspector.document":`Ćwiczenie`,"inspector.documentStyle":`Wygląd całego ćwiczenia`,"inspector.upload":`Wgraj plik`,"inspector.uploadItem":`Wgraj plik: {label}`,"inspector.uploading":`Wgrywam…`,"inspector.uploaded":`Wgrano.`,"inspector.uploadFailed":`Nie udało się wgrać pliku. Spróbuj ponownie albo wpisz jego adres.`,"inspector.uploadBlocked":`Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.`,"issues.title":`Problemy`,"issues.errors":`{count, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}`,"issues.warnings":`{count, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}`,"issues.summary":`{errors}, {warnings}`,"issues.none":`Brak błędów i ostrzeżeń.`,"severity.error":`Błąd`,"severity.warning":`Ostrzeżenie`,"label.text":`{label}: {text}`,"preview.title":`Widok ucznia`,"preview.show":`Podgląd`,"preview.refresh":`Odśwież podgląd`,"preview.hint":`Naciśnij „Podgląd”, aby wypróbować ćwiczenie tak, jak zobaczy je uczeń.`,"preview.loading":`Przygotowuję podgląd…`,"preview.stale":`Dokument zmienił się po tym podglądzie. Odśwież go, aby zobaczyć zmiany.`,"preview.invalid":`{count, plural, one {Popraw ten błąd, aby zobaczyć podgląd:} few {Popraw te # błędy, aby zobaczyć podgląd:} many {Popraw tych # błędów, aby zobaczyć podgląd:} other {Popraw te # błędu, aby zobaczyć podgląd:}}`,"preview.failed":`Nie udało się pokazać podglądu.`,"surface.label":`Treść ćwiczenia`,"surface.pageNumber":`Strona {page} z {pages}`,"surface.pageTitle":`Tytuł strony`,"surface.pageJoin":`Połącz ze stroną {previous}`,"surface.pageAdded":`Dodano stronę {page}`,"surface.pageJoined":`Strona {page} połączona ze stroną {previous}`,"surface.pageDelete":`Usuń stronę`,"surface.pageDeleted":`Usunięto stronę {n}`,"surface.pageAddTitle":`Dodaj tytuł`,"surface.pageRemoveTitle":`Usuń tytuł`,"surface.pageTitleOf":`Tytuł strony {page}`,"surface.pageTitleRemoved":`Usunięto tytuł strony {page}`,"surface.points":`{points, plural, one {# pkt} few {# pkt} many {# pkt} other {# pkt}}`,"surface.items":`{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}`,"surface.blockMovedUp":`Blok przesunięty w górę, teraz to blok {n}`,"surface.blockMovedDown":`Blok przesunięty w dół, teraz to blok {n}`,"surface.blockRemoved":`Usunięto blok {n}`,"surface.addOption":`Dodaj odpowiedź`,"surface.chip.empty":`Brak odpowiedzi`,"surface.chip.more":`+{n}`,"surface.picture.alt":`Obrazek: {alt}`,"surface.picture.decorative":`Obrazek ozdobny (bez tekstu alternatywnego)`,"surface.picture.noAlt":`Obrazek bez tekstu alternatywnego`,"surface.picture.blocked":`(niepokazany: polityka adresów nie pozwala na jego adres)`,"surface.picture.edit":`Edytuj`,"surface.loading":`Wczytuję edytor…`,"surface.failed":`Nie udało się wczytać edytora. Odśwież stronę, aby spróbować ponownie.`,"view.visual":`Wizualny`,"view.source":`HTML`,"view.visualHint":`Edytuj ćwiczenie jako sformatowany tekst`,"view.sourceHint":`Edytuj ćwiczenie jako HTML`,"view.sourceLabel":`Ćwiczenie jako HTML`,"view.sourceErrors":`{n, plural, one {HTML ma # błąd. Popraw go, aby wrócić.} few {HTML ma # błędy. Popraw je, aby wrócić.} many {HTML ma # błędów. Popraw je, aby wrócić.} other {HTML ma # błędu. Popraw go, aby wrócić.}}`,"status.elements":`{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}`,"status.errors":`{n, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}`,"status.warnings":`{n, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}`,"status.ready":`Gotowe do udostępnienia`,"insert.layouts":`Układ`,"insert.layout.two":`Dwie kolumny`,"insert.layout.two.description":`Dwie kolumny tej samej szerokości.`,"insert.layout.three":`Trzy kolumny`,"insert.layout.three.description":`Trzy kolumny tej samej szerokości.`,"insert.layout.wide-narrow":`Szeroka + wąska`,"insert.layout.wide-narrow.description":`Szeroka kolumna, a po niej wąska.`,"insert.layout.narrow-wide":`Wąska + szeroka`,"insert.layout.narrow-wide.description":`Wąska kolumna, a po niej szeroka.`,"insert.layout.picture-text":`Obrazek obok tekstu`,"insert.layout.picture-text.description":`Wybrany obrazek, a obok niego tekst.`,"layout.section":`Kolumny`,"layout.change":`Zmień układ`,"layout.other":`Inny układ`,"layout.unwrap":`Usuń układ`,"layout.delete":`Usuń z zawartością`,"layout.confirm":`Usunąć układ razem z zawartością?`,"layout.confirmDelete":`Tak, usuń`,"layout.cancel":`Anuluj`,"toolbar.font":`Czcionka: {value}`,"toolbar.font.name":`Czcionka`,"toolbar.size":`Rozmiar: {value}`,"toolbar.size.name":`Rozmiar`,"toolbar.color":`Kolor tekstu`,"toolbar.highlight":`Wyróżnienie`,"toolbar.align":`Wyrównanie`,"toolbar.align.start":`Do lewej`,"toolbar.align.center":`Do środka`,"toolbar.align.end":`Do prawej`,"toolbar.align.justify":`Wyjustowane`,"toolbar.spacing":`Odstępy`,"toolbar.spacing.line":`Interlinia`,"toolbar.spacing.after":`Odstęp po`,"toolbar.spacing.none":`Brak`,"toolbar.spacing.small":`Mały`,"toolbar.spacing.medium":`Średni`,"toolbar.spacing.large":`Duży`,"toolbar.clear":`Wyczyść formatowanie`,"toolbar.default":`Domyślnie`,"toolbar.myStyles":`Moje style`,"toolbar.readyStyles":`Gotowe style`,"style.preset.note":`Uwaga`,"style.preset.tip":`Wskazówka`,"style.preset.important":`Ważne`,"style.preset.definition":`Definicja`,"style.preset.example":`Przykład`,"style.preset.quote":`Cytat`,"style.preset.highlight":`Wyróżnienie`,"style.preset.small-print":`Mały druk`,"style.color.theme":`Kolory motywu`,"style.color.swatch":`Kolor motywu {n}`,"style.color.custom":`Własny kolor`,"style.color.picker":`Wybierz kolor`,"style.color.invalid":`Wpisz kolor jako #rrggbb.`,"style.color.none":`Bez koloru`,"style.close":`Zamknij`,"style.form.none":`Ustaw kursor w tym, co chcesz ostylować.`,"style.target.picture":`Styl obrazka`,"style.target.figure":`Styl obrazka z podpisem`,"style.target.block":`Styl bloku`,"style.target.component":`Styl elementu`,"style.target.column":`Styl kolumny`,"style.target.layout":`Styl układu`,"style.position.inline":`W tekście`,"style.position.start":`Po lewej`,"style.position.end":`Po prawej`,"style.position.center":`Na środku`,"style.position.full":`Cała szerokość`,"style.rules.open":`Zarządzaj stylami…`,"style.rules.title":`Style`,"inspector.style":`Styl`,"surface.picture.place":`Położenie i rozmiar: {position}, {width}`,"surface.picture.placeAuto":`Położenie i rozmiar: {position}`,"style.target.more":`{target}…`,"help.cost":`koszt {percent}%`,"help.when.correct":`Dobrze`,"help.when.incorrect":`Źle`,"help.when.partial":`Częściowo dobrze`,"help.when.omitted":`Pominięte`,"help.costLabel":`Koszt podpowiedzi`,"help.whenLabel":`Dla wyniku`},n=`astl.editor`,r=[{namespace:n,locale:`en`,messages:e},{namespace:n,locale:`pl`,messages:t}];export{r as n,n as t};
|
|
2
|
-
//# sourceMappingURL=messages-D1aJfyS_.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messages-D1aJfyS_.js","names":["en","pl","en_default","pl_default","EDITOR_NAMESPACE","editorMessages"],"sources":["../../../../editor/src/messages/en.json","../../../../editor/src/messages/pl.json","../../../../editor/src/messages.ts"],"sourcesContent":["{\n \"insert.title\": \"Insert\",\n \"insert.components\": \"Components\",\n \"insert.exercises\": \"Exercises\",\n \"insert.content\": \"Content\",\n \"insert.picture\": \"Picture\",\n \"insert.picture.description\": \"A picture with alt text and an optional caption\",\n \"insert.pageBreak\": \"Page break\",\n \"insert.pageBreak.description\": \"Split the exercise into steps at the cursor\",\n \"insert.hint\": \"Hint\",\n \"insert.hint.description\": \"One students ask for: for the question at the cursor, else for the page\",\n \"insert.explanation\": \"Explanation\",\n \"insert.explanation.description\": \"Why the answer is right, shown once it is checked\",\n \"insert.feedback\": \"Feedback\",\n \"insert.feedback.description\": \"A text by the verdict, shown once the answer is checked\",\n \"insert.text\": \"Text\",\n \"insert.text.description\": \"A paragraph after this block\",\n \"insert.noMatch\": \"Nothing matches “{query}”.\",\n \"toolbar.label\": \"Format and insert\",\n \"toolbar.style\": \"Text style: {style}\",\n \"toolbar.paragraph\": \"Paragraph\",\n \"toolbar.heading\": \"Heading\",\n \"toolbar.subheading\": \"Subheading\",\n \"toolbar.bold\": \"Bold\",\n \"toolbar.italic\": \"Italic\",\n \"toolbar.underline\": \"Underline\",\n \"toolbar.link\": \"Link\",\n \"toolbar.link.address\": \"Link address\",\n \"toolbar.link.apply\": \"Apply\",\n \"toolbar.link.remove\": \"Remove link\",\n \"toolbar.link.blocked\": \"This address is not allowed here.\",\n \"toolbar.bulleted\": \"Bulleted list\",\n \"toolbar.numbered\": \"Numbered list\",\n \"toolbar.undo\": \"Undo\",\n \"toolbar.redo\": \"Redo\",\n \"toolbar.elements\": \"Elements\",\n \"toolbar.templates\": \"Templates\",\n \"toolbar.layouts\": \"Layout\",\n \"toolbar.view\": \"View\",\n \"toolbar.search\": \"Search\",\n \"block.text\": \"Text\",\n \"block.gap\": \"Gap\",\n \"issue.onPage\": \"{n} on page {page}\",\n \"picture.title\": \"Add a picture\",\n \"picture.editTitle\": \"Edit the picture\",\n \"picture.file\": \"Upload a picture\",\n \"picture.library\": \"Choose from the library\",\n \"picture.urlOnly\": \"This editor adds pictures by their address only: it has no upload.\",\n \"picture.src\": \"Picture address (URL)\",\n \"picture.alt\": \"Alt text\",\n \"picture.altHelp\": \"What the picture shows, for students who cannot see it. Do not give an answer away.\",\n \"picture.decorative\": \"Decorative: screen readers skip it (alt=\\\"\\\")\",\n \"picture.caption\": \"Caption (optional)\",\n \"picture.cancel\": \"Cancel\",\n \"picture.insert\": \"Insert\",\n \"picture.save\": \"Save\",\n \"picture.uploading\": \"Uploading…\",\n \"picture.uploaded\": \"Uploaded.\",\n \"picture.uploadFailed\": \"The upload failed. Try again, or give the picture's address.\",\n \"picture.uploadBlocked\": \"The upload gave an address the URL policy does not allow.\",\n \"picture.picked\": \"Chosen from the library.\",\n \"picture.pickFailed\": \"The library did not open. Try again, or give the picture's address.\",\n \"picture.pickBlocked\": \"The library returned an address the URL policy does not allow.\",\n \"picture.srcMissing\": \"Give the picture's address, or upload it.\",\n \"picture.srcBlocked\": \"The URL policy does not allow this address.\",\n \"picture.altMissing\": \"Describe the picture, or mark it as decorative.\",\n \"picture.altRequired\": \"Describe the picture: students who cannot see it need its alt text for the task.\",\n \"picture.pasteRefused\": \"This editor has no upload, so a picture file cannot be pasted or dropped. Add it with Insert, Picture, by its address.\",\n \"field.picture.src\": \"Picture address (URL)\",\n \"field.regions.draw\": \"Drag on the picture to draw a zone, or add one and type its numbers.\",\n \"field.points.place\": \"Click the picture to place a pin, or add one and type its position.\",\n \"field.region\": \"Zone {n}\",\n \"field.region.add\": \"Add a zone\",\n \"field.region.remove\": \"Remove zone {n}\",\n \"field.point\": \"Pin {n}\",\n \"field.point.add\": \"Add a pin\",\n \"field.point.remove\": \"Remove pin {n}\",\n \"field.shape\": \"Shape\",\n \"field.shape.rect\": \"Rectangle\",\n \"field.shape.circle\": \"Circle\",\n \"field.shape.polygon\": \"Polygon\",\n \"field.x\": \"From the left (%)\",\n \"field.y\": \"From the top (%)\",\n \"field.width\": \"Width (%)\",\n \"field.height\": \"Height (%)\",\n \"field.cx\": \"Centre from the left (%)\",\n \"field.cy\": \"Centre from the top (%)\",\n \"field.r\": \"Radius (% of the width)\",\n \"field.vertex.x\": \"Point {n} from the left (%)\",\n \"field.vertex.y\": \"Point {n} from the top (%)\",\n \"field.vertex.add\": \"Add a point\",\n \"field.vertex.remove\": \"Remove point {n}\",\n \"field.label\": \"Label\",\n \"field.label.optional\": \"Label (optional)\",\n \"field.more\": \"Only the first {shown} of {count} are listed here: edit the others in the source.\",\n \"inspector.title\": \"Properties\",\n \"inspector.delete\": \"Delete\",\n \"inspector.moveUp\": \"Move up\",\n \"inspector.moveDown\": \"Move down\",\n \"inspector.empty\": \"Put the cursor in an exercise element to edit its answers and settings.\",\n \"inspector.unsupported\": \"Element {tag} cannot be edited here.\",\n \"inspector.unset\": \"(not set)\",\n \"inspector.item\": \"{label} {n}\",\n \"inspector.add\": \"Add\",\n \"inspector.remove\": \"Remove\",\n \"inspector.removeItem\": \"Remove: {label} {n}\",\n \"inspector.untitled\": \"Item {n} (empty)\",\n \"inspector.variant\": \"Variant\",\n \"inspector.styleTemplate\": \"Element style\",\n \"inspector.styleTemplate.inherit\": \"Same as the exercise\",\n \"inspector.styleTemplate.default\": \"Default look\",\n \"inspector.document\": \"Exercise\",\n \"inspector.documentStyle\": \"Look of the whole exercise\",\n \"inspector.upload\": \"Upload a file\",\n \"inspector.uploadItem\": \"Upload a file: {label}\",\n \"inspector.uploading\": \"Uploading…\",\n \"inspector.uploaded\": \"Uploaded.\",\n \"inspector.uploadFailed\": \"The upload failed. Try again, or type its address.\",\n \"inspector.uploadBlocked\": \"The upload gave an address the URL policy does not allow.\",\n \"issues.title\": \"Problems\",\n \"issues.errors\": \"{count, plural, one {# error} other {# errors}}\",\n \"issues.warnings\": \"{count, plural, one {# warning} other {# warnings}}\",\n \"issues.summary\": \"{errors}, {warnings}\",\n \"issues.none\": \"No errors or warnings.\",\n \"severity.error\": \"Error\",\n \"severity.warning\": \"Warning\",\n \"label.text\": \"{label}: {text}\",\n \"preview.title\": \"Student view\",\n \"preview.show\": \"Preview\",\n \"preview.refresh\": \"Refresh preview\",\n \"preview.hint\": \"Press Preview to try the exercise the way a student will see it.\",\n \"preview.loading\": \"Preparing the preview…\",\n \"preview.stale\": \"The document changed after this preview. Refresh it to see the changes.\",\n \"preview.invalid\": \"{count, plural, one {Fix this error to see the preview:} other {Fix these # errors to see the preview:}}\",\n \"preview.failed\": \"The preview could not be shown.\",\n \"surface.label\": \"Exercise content\",\n \"surface.pageNumber\": \"Page {page} of {pages}\",\n \"surface.pageTitle\": \"Page title\",\n \"surface.pageJoin\": \"Join with page {previous}\",\n \"surface.pageAdded\": \"Page {page} added\",\n \"surface.pageJoined\": \"Page {page} joined with page {previous}\",\n \"surface.pageDelete\": \"Delete page\",\n \"surface.pageDeleted\": \"Deleted page {n}\",\n \"surface.pageAddTitle\": \"Add title\",\n \"surface.pageRemoveTitle\": \"Remove title\",\n \"surface.pageTitleOf\": \"Title of page {page}\",\n \"surface.pageTitleRemoved\": \"Removed the title of page {page}\",\n \"surface.points\": \"{points, plural, one {# pt} other {# pts}}\",\n \"surface.items\": \"{n, plural, one {# item} other {# items}}\",\n \"surface.blockMovedUp\": \"Block moved up, now block {n}\",\n \"surface.blockMovedDown\": \"Block moved down, now block {n}\",\n \"surface.blockRemoved\": \"Block {n} deleted\",\n \"surface.addOption\": \"Add option\",\n \"surface.chip.empty\": \"No answer\",\n \"surface.chip.more\": \"+{n}\",\n \"surface.picture.alt\": \"Picture: {alt}\",\n \"surface.picture.decorative\": \"Picture, decorative (no alt text)\",\n \"surface.picture.noAlt\": \"Picture without alt text\",\n \"surface.picture.blocked\": \"(not shown: the URL policy does not allow its address)\",\n \"surface.picture.edit\": \"Edit\",\n \"surface.loading\": \"Loading the editor…\",\n \"surface.failed\": \"The editor could not be loaded. Reload the page to try again.\",\n \"view.visual\": \"Visual\",\n \"view.source\": \"HTML\",\n \"view.visualHint\": \"Edit the exercise as formatted text\",\n \"view.sourceHint\": \"Edit the exercise as HTML\",\n \"view.sourceLabel\": \"The exercise as HTML\",\n \"view.sourceErrors\": \"{n, plural, one {The HTML has # error. Fix it to go back.} other {The HTML has # errors. Fix them to go back.}}\",\n \"status.elements\": \"{n, plural, one {# element} other {# elements}}\",\n \"status.errors\": \"{n, plural, one {# error} other {# errors}}\",\n \"status.warnings\": \"{n, plural, one {# warning} other {# warnings}}\",\n \"status.ready\": \"Ready to share\",\n \"insert.layouts\": \"Layout\",\n \"insert.layout.two\": \"Two columns\",\n \"insert.layout.two.description\": \"Two columns of the same width.\",\n \"insert.layout.three\": \"Three columns\",\n \"insert.layout.three.description\": \"Three columns of the same width.\",\n \"insert.layout.wide-narrow\": \"Wide + narrow\",\n \"insert.layout.wide-narrow.description\": \"A wide column, then a narrow one.\",\n \"insert.layout.narrow-wide\": \"Narrow + wide\",\n \"insert.layout.narrow-wide.description\": \"A narrow column, then a wide one.\",\n \"insert.layout.picture-text\": \"Picture beside text\",\n \"insert.layout.picture-text.description\": \"A picture you choose, with text next to it.\",\n \"layout.section\": \"Columns\",\n \"layout.change\": \"Change layout\",\n \"layout.other\": \"Another layout\",\n \"layout.unwrap\": \"Remove layout\",\n \"layout.delete\": \"Delete with content\",\n \"layout.confirm\": \"Delete the layout and its content?\",\n \"layout.confirmDelete\": \"Yes, delete\",\n \"layout.cancel\": \"Cancel\",\n \"toolbar.font\": \"Font: {value}\",\n \"toolbar.font.name\": \"Font\",\n \"toolbar.size\": \"Size: {value}\",\n \"toolbar.size.name\": \"Size\",\n \"toolbar.color\": \"Text colour\",\n \"toolbar.highlight\": \"Highlight\",\n \"toolbar.align\": \"Alignment\",\n \"toolbar.align.start\": \"Left\",\n \"toolbar.align.center\": \"Centre\",\n \"toolbar.align.end\": \"Right\",\n \"toolbar.align.justify\": \"Justified\",\n \"toolbar.spacing\": \"Spacing\",\n \"toolbar.spacing.line\": \"Line height\",\n \"toolbar.spacing.after\": \"Space after\",\n \"toolbar.spacing.none\": \"None\",\n \"toolbar.spacing.small\": \"Small\",\n \"toolbar.spacing.medium\": \"Medium\",\n \"toolbar.spacing.large\": \"Large\",\n \"toolbar.clear\": \"Clear formatting\",\n \"toolbar.default\": \"Default\",\n \"toolbar.myStyles\": \"My styles\",\n \"toolbar.readyStyles\": \"Ready styles\",\n \"style.preset.note\": \"Note\",\n \"style.preset.tip\": \"Tip\",\n \"style.preset.important\": \"Important\",\n \"style.preset.definition\": \"Definition\",\n \"style.preset.example\": \"Example\",\n \"style.preset.quote\": \"Quote\",\n \"style.preset.highlight\": \"Highlight\",\n \"style.preset.small-print\": \"Small print\",\n \"style.color.theme\": \"Theme colours\",\n \"style.color.swatch\": \"Theme colour {n}\",\n \"style.color.custom\": \"Custom colour\",\n \"style.color.picker\": \"Pick a colour\",\n \"style.color.invalid\": \"Write a colour as #rrggbb.\",\n \"style.color.none\": \"No colour\",\n \"style.close\": \"Close\",\n \"style.form.none\": \"Put the cursor in what you want to style.\",\n \"style.target.picture\": \"Picture style\",\n \"style.target.figure\": \"Picture and caption style\",\n \"style.target.block\": \"Block style\",\n \"style.target.component\": \"Element style\",\n \"style.target.column\": \"Column style\",\n \"style.target.layout\": \"Layout style\",\n \"style.position.inline\": \"In the text\",\n \"style.position.start\": \"On the left\",\n \"style.position.end\": \"On the right\",\n \"style.position.center\": \"Centred\",\n \"style.position.full\": \"Full width\",\n \"style.rules.open\": \"Manage styles…\",\n \"style.rules.title\": \"Styles\",\n \"inspector.style\": \"Style\",\n \"surface.picture.place\": \"Position and size: {position}, {width}\",\n \"surface.picture.placeAuto\": \"Position and size: {position}\",\n \"style.target.more\": \"{target}…\",\n \"help.cost\": \"costs {percent}%\",\n \"help.when.correct\": \"Correct\",\n \"help.when.incorrect\": \"Wrong\",\n \"help.when.partial\": \"Partly correct\",\n \"help.when.omitted\": \"Skipped\",\n \"help.costLabel\": \"Cost of the hint\",\n \"help.whenLabel\": \"For the result\"\n}\n","{\n \"insert.title\": \"Wstaw\",\n \"insert.components\": \"Elementy\",\n \"insert.exercises\": \"Ćwiczenia\",\n \"insert.content\": \"Treść\",\n \"insert.picture\": \"Obrazek\",\n \"insert.picture.description\": \"Obrazek z tekstem alternatywnym i podpisem do wyboru\",\n \"insert.pageBreak\": \"Podział strony\",\n \"insert.pageBreak.description\": \"Podziel ćwiczenie na kroki od miejsca kursora\",\n \"insert.hint\": \"Podpowiedź\",\n \"insert.hint.description\": \"Na prośbę ucznia: do pytania przy kursorze, a poza nim do strony\",\n \"insert.explanation\": \"Wyjaśnienie\",\n \"insert.explanation.description\": \"Dlaczego odpowiedź jest dobra, widoczne po sprawdzeniu\",\n \"insert.feedback\": \"Informacja zwrotna\",\n \"insert.feedback.description\": \"Tekst zależny od wyniku, widoczny po sprawdzeniu\",\n \"insert.text\": \"Tekst\",\n \"insert.text.description\": \"Akapit po tym bloku\",\n \"insert.noMatch\": \"Nic nie pasuje do „{query}”.\",\n \"toolbar.label\": \"Formatowanie i wstawianie\",\n \"toolbar.style\": \"Styl tekstu: {style}\",\n \"toolbar.paragraph\": \"Akapit\",\n \"toolbar.heading\": \"Nagłówek\",\n \"toolbar.subheading\": \"Podtytuł\",\n \"toolbar.bold\": \"Pogrubienie\",\n \"toolbar.italic\": \"Kursywa\",\n \"toolbar.underline\": \"Podkreślenie\",\n \"toolbar.link\": \"Link\",\n \"toolbar.link.address\": \"Adres linku\",\n \"toolbar.link.apply\": \"Zastosuj\",\n \"toolbar.link.remove\": \"Usuń link\",\n \"toolbar.link.blocked\": \"Tego adresu nie można tu użyć.\",\n \"toolbar.bulleted\": \"Lista punktowana\",\n \"toolbar.numbered\": \"Lista numerowana\",\n \"toolbar.undo\": \"Cofnij\",\n \"toolbar.redo\": \"Ponów\",\n \"toolbar.elements\": \"Elementy\",\n \"toolbar.templates\": \"Szablony\",\n \"toolbar.layouts\": \"Układ\",\n \"toolbar.view\": \"Widok\",\n \"toolbar.search\": \"Szukaj\",\n \"block.text\": \"Tekst\",\n \"block.gap\": \"Luka\",\n \"issue.onPage\": \"{n} na stronie {page}\",\n \"picture.title\": \"Dodaj obrazek\",\n \"picture.editTitle\": \"Edytuj obrazek\",\n \"picture.file\": \"Wgraj obrazek\",\n \"picture.library\": \"Wybierz z biblioteki\",\n \"picture.urlOnly\": \"Ten edytor dodaje obrazki tylko po adresie: nie ma wgrywania.\",\n \"picture.src\": \"Adres obrazka (URL)\",\n \"picture.alt\": \"Tekst alternatywny\",\n \"picture.altHelp\": \"Co przedstawia obrazek, dla uczniów, którzy go nie widzą. Nie zdradzaj odpowiedzi.\",\n \"picture.decorative\": \"Ozdobny: czytniki ekranu go pomijają (alt=\\\"\\\")\",\n \"picture.caption\": \"Podpis (opcjonalny)\",\n \"picture.cancel\": \"Anuluj\",\n \"picture.insert\": \"Wstaw\",\n \"picture.save\": \"Zapisz\",\n \"picture.uploading\": \"Wgrywam…\",\n \"picture.uploaded\": \"Wgrano.\",\n \"picture.uploadFailed\": \"Nie udało się wgrać obrazka. Spróbuj ponownie albo podaj jego adres.\",\n \"picture.uploadBlocked\": \"Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.\",\n \"picture.picked\": \"Wybrano z biblioteki.\",\n \"picture.pickFailed\": \"Nie udało się otworzyć biblioteki. Spróbuj ponownie albo podaj adres obrazka.\",\n \"picture.pickBlocked\": \"Biblioteka zwróciła adres, na który nie pozwala polityka adresów.\",\n \"picture.srcMissing\": \"Podaj adres obrazka albo go wgraj.\",\n \"picture.srcBlocked\": \"Polityka adresów nie pozwala na ten adres.\",\n \"picture.altMissing\": \"Opisz obrazek albo oznacz go jako ozdobny.\",\n \"picture.altRequired\": \"Opisz obrazek: uczniowie, którzy go nie widzą, potrzebują tekstu alternatywnego do zadania.\",\n \"picture.pasteRefused\": \"Ten edytor nie ma wgrywania, więc nie można wkleić ani upuścić pliku obrazka. Dodaj go przez Wstaw, Obrazek, podając adres.\",\n \"field.picture.src\": \"Adres obrazka (URL)\",\n \"field.regions.draw\": \"Przeciągnij po obrazku, aby narysować strefę, albo dodaj ją i wpisz jej liczby.\",\n \"field.points.place\": \"Kliknij obrazek, aby wbić pinezkę, albo dodaj ją i wpisz jej położenie.\",\n \"field.region\": \"Strefa {n}\",\n \"field.region.add\": \"Dodaj strefę\",\n \"field.region.remove\": \"Usuń strefę {n}\",\n \"field.point\": \"Pinezka {n}\",\n \"field.point.add\": \"Dodaj pinezkę\",\n \"field.point.remove\": \"Usuń pinezkę {n}\",\n \"field.shape\": \"Kształt\",\n \"field.shape.rect\": \"Prostokąt\",\n \"field.shape.circle\": \"Koło\",\n \"field.shape.polygon\": \"Wielokąt\",\n \"field.x\": \"Od lewej (%)\",\n \"field.y\": \"Od góry (%)\",\n \"field.width\": \"Szerokość (%)\",\n \"field.height\": \"Wysokość (%)\",\n \"field.cx\": \"Środek od lewej (%)\",\n \"field.cy\": \"Środek od góry (%)\",\n \"field.r\": \"Promień (% szerokości)\",\n \"field.vertex.x\": \"Punkt {n} od lewej (%)\",\n \"field.vertex.y\": \"Punkt {n} od góry (%)\",\n \"field.vertex.add\": \"Dodaj punkt\",\n \"field.vertex.remove\": \"Usuń punkt {n}\",\n \"field.label\": \"Etykieta\",\n \"field.label.optional\": \"Etykieta (opcjonalna)\",\n \"field.more\": \"Tu widać tylko pierwsze {shown} z {count}: pozostałe edytuj w źródle.\",\n \"inspector.title\": \"Właściwości\",\n \"inspector.delete\": \"Usuń\",\n \"inspector.moveUp\": \"Przenieś wyżej\",\n \"inspector.moveDown\": \"Przenieś niżej\",\n \"inspector.empty\": \"Umieść kursor w elemencie ćwiczenia, aby edytować jego odpowiedzi i ustawienia.\",\n \"inspector.unsupported\": \"Elementu {tag} nie można tu edytować.\",\n \"inspector.unset\": \"(nie ustawiono)\",\n \"inspector.item\": \"{label} {n}\",\n \"inspector.add\": \"Dodaj\",\n \"inspector.remove\": \"Usuń\",\n \"inspector.removeItem\": \"Usuń: {label} {n}\",\n \"inspector.untitled\": \"Element {n} (pusty)\",\n \"inspector.variant\": \"Wariant\",\n \"inspector.styleTemplate\": \"Styl elementu\",\n \"inspector.styleTemplate.inherit\": \"Jak całe ćwiczenie\",\n \"inspector.styleTemplate.default\": \"Domyślny wygląd\",\n \"inspector.document\": \"Ćwiczenie\",\n \"inspector.documentStyle\": \"Wygląd całego ćwiczenia\",\n \"inspector.upload\": \"Wgraj plik\",\n \"inspector.uploadItem\": \"Wgraj plik: {label}\",\n \"inspector.uploading\": \"Wgrywam…\",\n \"inspector.uploaded\": \"Wgrano.\",\n \"inspector.uploadFailed\": \"Nie udało się wgrać pliku. Spróbuj ponownie albo wpisz jego adres.\",\n \"inspector.uploadBlocked\": \"Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.\",\n \"issues.title\": \"Problemy\",\n \"issues.errors\": \"{count, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}\",\n \"issues.warnings\": \"{count, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}\",\n \"issues.summary\": \"{errors}, {warnings}\",\n \"issues.none\": \"Brak błędów i ostrzeżeń.\",\n \"severity.error\": \"Błąd\",\n \"severity.warning\": \"Ostrzeżenie\",\n \"label.text\": \"{label}: {text}\",\n \"preview.title\": \"Widok ucznia\",\n \"preview.show\": \"Podgląd\",\n \"preview.refresh\": \"Odśwież podgląd\",\n \"preview.hint\": \"Naciśnij „Podgląd”, aby wypróbować ćwiczenie tak, jak zobaczy je uczeń.\",\n \"preview.loading\": \"Przygotowuję podgląd…\",\n \"preview.stale\": \"Dokument zmienił się po tym podglądzie. Odśwież go, aby zobaczyć zmiany.\",\n \"preview.invalid\": \"{count, plural, one {Popraw ten błąd, aby zobaczyć podgląd:} few {Popraw te # błędy, aby zobaczyć podgląd:} many {Popraw tych # błędów, aby zobaczyć podgląd:} other {Popraw te # błędu, aby zobaczyć podgląd:}}\",\n \"preview.failed\": \"Nie udało się pokazać podglądu.\",\n \"surface.label\": \"Treść ćwiczenia\",\n \"surface.pageNumber\": \"Strona {page} z {pages}\",\n \"surface.pageTitle\": \"Tytuł strony\",\n \"surface.pageJoin\": \"Połącz ze stroną {previous}\",\n \"surface.pageAdded\": \"Dodano stronę {page}\",\n \"surface.pageJoined\": \"Strona {page} połączona ze stroną {previous}\",\n \"surface.pageDelete\": \"Usuń stronę\",\n \"surface.pageDeleted\": \"Usunięto stronę {n}\",\n \"surface.pageAddTitle\": \"Dodaj tytuł\",\n \"surface.pageRemoveTitle\": \"Usuń tytuł\",\n \"surface.pageTitleOf\": \"Tytuł strony {page}\",\n \"surface.pageTitleRemoved\": \"Usunięto tytuł strony {page}\",\n \"surface.points\": \"{points, plural, one {# pkt} few {# pkt} many {# pkt} other {# pkt}}\",\n \"surface.items\": \"{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}\",\n \"surface.blockMovedUp\": \"Blok przesunięty w górę, teraz to blok {n}\",\n \"surface.blockMovedDown\": \"Blok przesunięty w dół, teraz to blok {n}\",\n \"surface.blockRemoved\": \"Usunięto blok {n}\",\n \"surface.addOption\": \"Dodaj odpowiedź\",\n \"surface.chip.empty\": \"Brak odpowiedzi\",\n \"surface.chip.more\": \"+{n}\",\n \"surface.picture.alt\": \"Obrazek: {alt}\",\n \"surface.picture.decorative\": \"Obrazek ozdobny (bez tekstu alternatywnego)\",\n \"surface.picture.noAlt\": \"Obrazek bez tekstu alternatywnego\",\n \"surface.picture.blocked\": \"(niepokazany: polityka adresów nie pozwala na jego adres)\",\n \"surface.picture.edit\": \"Edytuj\",\n \"surface.loading\": \"Wczytuję edytor…\",\n \"surface.failed\": \"Nie udało się wczytać edytora. Odśwież stronę, aby spróbować ponownie.\",\n \"view.visual\": \"Wizualny\",\n \"view.source\": \"HTML\",\n \"view.visualHint\": \"Edytuj ćwiczenie jako sformatowany tekst\",\n \"view.sourceHint\": \"Edytuj ćwiczenie jako HTML\",\n \"view.sourceLabel\": \"Ćwiczenie jako HTML\",\n \"view.sourceErrors\": \"{n, plural, one {HTML ma # błąd. Popraw go, aby wrócić.} few {HTML ma # błędy. Popraw je, aby wrócić.} many {HTML ma # błędów. Popraw je, aby wrócić.} other {HTML ma # błędu. Popraw go, aby wrócić.}}\",\n \"status.elements\": \"{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}\",\n \"status.errors\": \"{n, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}\",\n \"status.warnings\": \"{n, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}\",\n \"status.ready\": \"Gotowe do udostępnienia\",\n \"insert.layouts\": \"Układ\",\n \"insert.layout.two\": \"Dwie kolumny\",\n \"insert.layout.two.description\": \"Dwie kolumny tej samej szerokości.\",\n \"insert.layout.three\": \"Trzy kolumny\",\n \"insert.layout.three.description\": \"Trzy kolumny tej samej szerokości.\",\n \"insert.layout.wide-narrow\": \"Szeroka + wąska\",\n \"insert.layout.wide-narrow.description\": \"Szeroka kolumna, a po niej wąska.\",\n \"insert.layout.narrow-wide\": \"Wąska + szeroka\",\n \"insert.layout.narrow-wide.description\": \"Wąska kolumna, a po niej szeroka.\",\n \"insert.layout.picture-text\": \"Obrazek obok tekstu\",\n \"insert.layout.picture-text.description\": \"Wybrany obrazek, a obok niego tekst.\",\n \"layout.section\": \"Kolumny\",\n \"layout.change\": \"Zmień układ\",\n \"layout.other\": \"Inny układ\",\n \"layout.unwrap\": \"Usuń układ\",\n \"layout.delete\": \"Usuń z zawartością\",\n \"layout.confirm\": \"Usunąć układ razem z zawartością?\",\n \"layout.confirmDelete\": \"Tak, usuń\",\n \"layout.cancel\": \"Anuluj\",\n \"toolbar.font\": \"Czcionka: {value}\",\n \"toolbar.font.name\": \"Czcionka\",\n \"toolbar.size\": \"Rozmiar: {value}\",\n \"toolbar.size.name\": \"Rozmiar\",\n \"toolbar.color\": \"Kolor tekstu\",\n \"toolbar.highlight\": \"Wyróżnienie\",\n \"toolbar.align\": \"Wyrównanie\",\n \"toolbar.align.start\": \"Do lewej\",\n \"toolbar.align.center\": \"Do środka\",\n \"toolbar.align.end\": \"Do prawej\",\n \"toolbar.align.justify\": \"Wyjustowane\",\n \"toolbar.spacing\": \"Odstępy\",\n \"toolbar.spacing.line\": \"Interlinia\",\n \"toolbar.spacing.after\": \"Odstęp po\",\n \"toolbar.spacing.none\": \"Brak\",\n \"toolbar.spacing.small\": \"Mały\",\n \"toolbar.spacing.medium\": \"Średni\",\n \"toolbar.spacing.large\": \"Duży\",\n \"toolbar.clear\": \"Wyczyść formatowanie\",\n \"toolbar.default\": \"Domyślnie\",\n \"toolbar.myStyles\": \"Moje style\",\n \"toolbar.readyStyles\": \"Gotowe style\",\n \"style.preset.note\": \"Uwaga\",\n \"style.preset.tip\": \"Wskazówka\",\n \"style.preset.important\": \"Ważne\",\n \"style.preset.definition\": \"Definicja\",\n \"style.preset.example\": \"Przykład\",\n \"style.preset.quote\": \"Cytat\",\n \"style.preset.highlight\": \"Wyróżnienie\",\n \"style.preset.small-print\": \"Mały druk\",\n \"style.color.theme\": \"Kolory motywu\",\n \"style.color.swatch\": \"Kolor motywu {n}\",\n \"style.color.custom\": \"Własny kolor\",\n \"style.color.picker\": \"Wybierz kolor\",\n \"style.color.invalid\": \"Wpisz kolor jako #rrggbb.\",\n \"style.color.none\": \"Bez koloru\",\n \"style.close\": \"Zamknij\",\n \"style.form.none\": \"Ustaw kursor w tym, co chcesz ostylować.\",\n \"style.target.picture\": \"Styl obrazka\",\n \"style.target.figure\": \"Styl obrazka z podpisem\",\n \"style.target.block\": \"Styl bloku\",\n \"style.target.component\": \"Styl elementu\",\n \"style.target.column\": \"Styl kolumny\",\n \"style.target.layout\": \"Styl układu\",\n \"style.position.inline\": \"W tekście\",\n \"style.position.start\": \"Po lewej\",\n \"style.position.end\": \"Po prawej\",\n \"style.position.center\": \"Na środku\",\n \"style.position.full\": \"Cała szerokość\",\n \"style.rules.open\": \"Zarządzaj stylami…\",\n \"style.rules.title\": \"Style\",\n \"inspector.style\": \"Styl\",\n \"surface.picture.place\": \"Położenie i rozmiar: {position}, {width}\",\n \"surface.picture.placeAuto\": \"Położenie i rozmiar: {position}\",\n \"style.target.more\": \"{target}…\",\n \"help.cost\": \"koszt {percent}%\",\n \"help.when.correct\": \"Dobrze\",\n \"help.when.incorrect\": \"Źle\",\n \"help.when.partial\": \"Częściowo dobrze\",\n \"help.when.omitted\": \"Pominięte\",\n \"help.costLabel\": \"Koszt podpowiedzi\",\n \"help.whenLabel\": \"Dla wyniku\"\n}\n","import type { MessageCatalog } from '@astl/core';\nimport en from './messages/en.json' with { type: 'json' };\nimport pl from './messages/pl.json' with { type: 'json' };\n\n/** i18n namespace of the authoring kit's own UI (insert menu, inspector, issues, preview). */\nexport const EDITOR_NAMESPACE = 'astl.editor';\n\nexport const editorMessages: readonly MessageCatalog[] = [\n { namespace: EDITOR_NAMESPACE, locale: 'en', messages: en },\n { namespace: EDITOR_NAMESPACE, locale: 'pl', messages: pl },\n];\n"],"mappings":"A,28rBEKaI,EAAmB,cAEnBC,EAA4C,CACvD,CAAE,UAAWD,EAAkB,OAAQ,KAAM,SAAUJ,CAAG,EAC1D,CAAE,UAAWI,EAAkB,OAAQ,KAAM,SAAUH,CAAG,CAC5D,E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles-CdJT6Pp9.js","names":["LitElement","unsafeCSS","r","i$1","tokens","directionOf","visuallyHidden","tokensCss","i","AuthoringElement","#subscribe","#unsubscribe","changed","adapter","#subscription","offs","selection","off","key","params","lang","inheritTokens","lines","name","selector","kitStyles"],"sources":["../../../../editor/src/elements/base.ts","../../../../editor/src/elements/styles.ts"],"sourcesContent":["import {\n type Direction,\n directionOf,\n type EditorAdapter,\n type EditorSelection,\n type MessageParams,\n} from '@astl/core';\nimport { LitElement, type PropertyDeclarations, type PropertyValues } from 'lit';\nimport type { Authoring } from '../authoring.js';\nimport { EDITOR_NAMESPACE } from '../messages.js';\n\n/**\n * Base of the kit elements: `authoring` and `adapter` properties, a subscription to the adapter's events while\n * connected (re-rendering by default) and UI strings in the authoring locale.\n */\nexport class AuthoringElement extends LitElement {\n static override properties: PropertyDeclarations = {\n authoring: { attribute: false },\n adapter: { attribute: false },\n };\n\n declare authoring: Authoring | null;\n declare adapter: EditorAdapter | null;\n\n #subscription: { readonly adapter: EditorAdapter; readonly off: () => void } | null = null;\n\n constructor() {\n super();\n this.authoring = null;\n this.adapter = null;\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.#subscribe();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#unsubscribe();\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (changed.has('adapter')) this.#subscribe();\n }\n\n #subscribe(): void {\n const adapter = this.isConnected ? this.adapter : null;\n if ((this.#subscription?.adapter ?? null) === adapter) return;\n this.#unsubscribe();\n if (adapter === null) return;\n const offs = [\n adapter.onChange(() => this.sourceChanged()),\n adapter.onSelectionChange((selection) => this.selectionChanged(selection)),\n adapter.onCursorChange?.(() => this.cursorChanged()) ?? (() => {}),\n ];\n this.#subscription = {\n adapter,\n off: () => {\n for (const off of offs) off();\n },\n };\n }\n\n #unsubscribe(): void {\n this.#subscription?.off();\n this.#subscription = null;\n }\n\n /** The document changed. */\n protected sourceChanged(): void {\n this.requestUpdate();\n }\n\n /** The cursor entered or left a component. */\n protected selectionChanged(_selection: EditorSelection | null): void {\n this.requestUpdate();\n }\n\n /** The cursor moved, or the document or its history changed. Most elements have nothing to do. */\n protected cursorChanged(): void {}\n\n /** A kit message (`astl.editor`) in the authoring locale. */\n protected t(key: string, params?: MessageParams): string {\n return this.authoring?.t(EDITOR_NAMESPACE, key, params) ?? key;\n }\n\n /** Language and direction of the UI strings. */\n protected get ui(): { readonly lang: string; readonly dir: Direction } {\n const lang = this.authoring?.locale ?? 'en';\n return { lang, dir: directionOf(lang) };\n }\n}\n","import { visuallyHidden } from '@astl/player';\nimport { tokens, tokensCss } from '@astl/tokens';\nimport { type CSSResult, type CSSResultGroup, css, unsafeCSS } from 'lit';\n\n/**\n * Every token as `inherit` on `selector`, for elements that redeclare the tokens on their own `:host` (the player): a\n * rule from the outer tree wins over `:host`, so tokens set on the kit element reach them.\n */\nexport function inheritTokens(selector: string): CSSResult {\n const names = [tokens.scale, tokens.themes.light, tokens.themeScale.light].flatMap(Object.keys);\n const lines = ['color-scheme: inherit;', ...names.map((name) => `--astl-${name}: inherit;`)];\n return unsafeCSS(`${selector} {\\n${lines.join('\\n')}\\n}`);\n}\n\n/** Shared look of the kit elements: a card, native controls with 44px targets, visible focus. Tokens only. */\nexport const kitStyles: CSSResultGroup = [\n // Tokens sit on :host so host pages can override any --astl-* property on the element itself.\n unsafeCSS(tokensCss(':host')),\n visuallyHidden,\n css`\n :host {\n display: block;\n color: var(--astl-ink);\n font-family: var(--astl-font-body);\n font-size: var(--astl-size-ui);\n line-height: 1.4;\n }\n :host([hidden]) {\n display: none;\n }\n .kit {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-3);\n min-inline-size: 0;\n padding: var(--astl-space-4);\n border: var(--astl-outline-width) solid var(--astl-line);\n border-radius: var(--astl-radius-l);\n background: var(--astl-surface);\n color: var(--astl-ink);\n overflow-wrap: anywhere;\n }\n .title {\n margin: 0;\n font-family: var(--astl-font-display);\n font-size: 1.125rem;\n line-height: 1.3;\n }\n .note {\n margin: 0;\n color: var(--astl-ink-muted);\n }\n ul {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-2);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n gap: var(--astl-space-2);\n min-block-size: var(--astl-target-min);\n min-inline-size: var(--astl-target-min);\n margin: 0;\n padding-block: var(--astl-space-2);\n padding-inline: var(--astl-space-3);\n border: var(--astl-outline-width) solid var(--astl-outline);\n border-radius: var(--astl-radius-m);\n background: var(--astl-surface);\n color: var(--astl-ink);\n font: inherit;\n text-align: start;\n cursor: pointer;\n }\n button:hover:not(:disabled) {\n background: var(--astl-accent-soft);\n }\n `,\n // Disabled shows without colour too: a dashed border and no fill. In the high contrast theme the line and muted\n // colours are as dark as the enabled ones. Disabled (no editor yet), the primary button must not look pressable.\n css`\n button:is(:disabled, [aria-disabled='true']) {\n border-color: var(--astl-line);\n border-style: dashed;\n background: transparent;\n color: var(--astl-ink-muted);\n cursor: not-allowed;\n }\n button.primary {\n border-color: var(--astl-accent);\n background: var(--astl-accent);\n color: var(--astl-on-accent);\n font-weight: 600;\n }\n button.primary:hover:not(:disabled) {\n background: var(--astl-accent);\n text-decoration: underline;\n }\n button.primary:disabled {\n border-color: var(--astl-line);\n background: transparent;\n color: var(--astl-ink-muted);\n }\n input:not([type='checkbox'], [type='radio']),\n select,\n textarea {\n box-sizing: border-box;\n inline-size: 100%;\n min-inline-size: 0;\n min-block-size: var(--astl-target-min);\n margin: 0;\n padding-block: var(--astl-space-1);\n padding-inline: var(--astl-space-2);\n border: var(--astl-outline-width) solid var(--astl-outline);\n border-radius: var(--astl-radius-s);\n background: var(--astl-surface);\n color: var(--astl-ink);\n font: inherit;\n }\n input[type='checkbox'],\n input[type='radio'] {\n flex: none;\n inline-size: 1.25rem;\n block-size: 1.25rem;\n margin: 0;\n accent-color: var(--astl-accent);\n }\n :focus-visible {\n outline: var(--astl-focus-width) solid var(--astl-focus);\n outline-offset: var(--astl-focus-offset);\n }\n .icon {\n flex: none;\n inline-size: 1.25rem;\n block-size: 1.25rem;\n }\n `,\n // Forced colours: disabled as the system draws disabled controls (the dashed border stays). The Canvas backplate\n // forced colours draw behind text would hide the HighlightText label on the Highlight fill, so the primary button\n // uses only system colours here and keeps its own. Disabled, it stays forced: its muted label would not read on the\n // fill.\n css`\n @media (forced-colors: active) {\n button.primary {\n border-color: ButtonText;\n }\n button:disabled,\n button.primary:disabled {\n border-color: GrayText;\n color: GrayText;\n }\n button.primary:not(:disabled) {\n forced-color-adjust: none;\n }\n }\n `,\n];\n"],"mappings":"A,oHAeA,IAAaS,EAAb,cAAsCT,CAAW,CAC/C,OAAgB,WAAmC,CACjD,UAAW,CAAE,UAAW,EAAM,EAC9B,QAAS,CAAE,UAAW,EAAM,CAC9B,EAKA,GAAsF,KAEtF,aAAc,CACZ,MAAM,EACN,KAAK,UAAY,KACjB,KAAK,QAAU,IACjB,CAEA,mBAAmC,CACjC,MAAM,kBAAkB,EACxB,KAAKU,GAAW,CAClB,CAEA,sBAAsC,CACpC,MAAM,qBAAqB,EAC3B,KAAKC,GAAa,CACpB,CAEA,WAA8B,EAAqC,CAC7DC,EAAQ,IAAI,SAAS,GAAG,KAAKF,GAAW,CAC9C,CAEA,IAAmB,CACjB,IAAMG,EAAU,KAAK,YAAc,KAAK,Q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