@pie-element/mc-populated-blank 0.2.11 → 0.2.13-next.0
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/configure.js +2 -0
- package/dist/author/index.d.ts +0 -1
- package/dist/author/index.js +292 -171
- package/dist/author/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +0 -1
- package/dist/controller/index.d.ts +0 -1
- package/dist/controller/index.js.map +1 -1
- package/dist/delivery/computeAudioMode.d.ts +0 -1
- package/dist/delivery/computeChoiceCorrectness.d.ts +0 -1
- package/dist/delivery/computeDisplayState.d.ts +0 -1
- package/dist/delivery/computeLayoutProfile.d.ts +0 -1
- package/dist/delivery/computeLayoutStyle.d.ts +0 -1
- package/dist/delivery/index.d.ts +0 -1
- package/dist/delivery/index.js +409 -284
- package/dist/delivery/index.js.map +1 -1
- package/dist/delivery/variant-css-map.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -1
- package/dist/index.iife.js +6 -6
- package/dist/index.js +409 -284
- package/dist/index.js.map +1 -1
- package/dist/print/index.d.ts +0 -1
- package/dist/print/index.js +363 -238
- package/dist/print/index.js.map +1 -1
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +14 -0
- package/dist/runtime-support.js.map +1 -0
- package/dist/shared/layoutLimits.d.ts +0 -1
- package/dist/shared/types.d.ts +0 -1
- package/package.json +21 -18
- package/dist/author/index.d.ts.map +0 -1
- package/dist/controller/defaults.d.ts.map +0 -1
- package/dist/controller/index.d.ts.map +0 -1
- package/dist/controller/index.test.d.ts +0 -63
- package/dist/controller/index.test.d.ts.map +0 -1
- package/dist/delivery/AudioPlayer.test.d.ts +0 -2
- package/dist/delivery/AudioPlayer.test.d.ts.map +0 -1
- package/dist/delivery/ChoiceRow.test.d.ts +0 -2
- package/dist/delivery/ChoiceRow.test.d.ts.map +0 -1
- package/dist/delivery/ClozeMarker.test.d.ts +0 -2
- package/dist/delivery/ClozeMarker.test.d.ts.map +0 -1
- package/dist/delivery/McPopulatedBlank.transcript.test.d.ts +0 -2
- package/dist/delivery/McPopulatedBlank.transcript.test.d.ts.map +0 -1
- package/dist/delivery/computeAudioMode.d.ts.map +0 -1
- package/dist/delivery/computeAudioMode.test.d.ts +0 -2
- package/dist/delivery/computeAudioMode.test.d.ts.map +0 -1
- package/dist/delivery/computeChoiceCorrectness.d.ts.map +0 -1
- package/dist/delivery/computeChoiceCorrectness.test.d.ts +0 -19
- package/dist/delivery/computeChoiceCorrectness.test.d.ts.map +0 -1
- package/dist/delivery/computeDisplayState.d.ts.map +0 -1
- package/dist/delivery/computeDisplayState.test.d.ts +0 -38
- package/dist/delivery/computeDisplayState.test.d.ts.map +0 -1
- package/dist/delivery/computeLayoutProfile.d.ts.map +0 -1
- package/dist/delivery/computeLayoutProfile.test.d.ts +0 -2
- package/dist/delivery/computeLayoutProfile.test.d.ts.map +0 -1
- package/dist/delivery/computeLayoutStyle.d.ts.map +0 -1
- package/dist/delivery/computeLayoutStyle.test.d.ts +0 -2
- package/dist/delivery/computeLayoutStyle.test.d.ts.map +0 -1
- package/dist/delivery/index.d.ts.map +0 -1
- package/dist/delivery/variant-css-map.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.iife.d.ts.map +0 -1
- package/dist/print/index.d.ts.map +0 -1
- package/dist/shared/layoutLimits.d.ts.map +0 -1
- package/dist/shared/types.d.ts.map +0 -1
- package/src/author/Author.svelte +0 -41
- package/src/author/index.ts +0 -28
- package/src/controller/defaults.ts +0 -61
- package/src/controller/index.test.ts +0 -428
- package/src/controller/index.ts +0 -372
- package/src/delivery/AudioPlayer.svelte +0 -246
- package/src/delivery/AudioPlayer.test.ts +0 -149
- package/src/delivery/ChoiceRow.svelte +0 -222
- package/src/delivery/ChoiceRow.test.ts +0 -179
- package/src/delivery/ClozeMarker.svelte +0 -83
- package/src/delivery/ClozeMarker.test.ts +0 -128
- package/src/delivery/McPopulatedBlank.svelte +0 -739
- package/src/delivery/McPopulatedBlank.transcript.test.ts +0 -154
- package/src/delivery/computeAudioMode.test.ts +0 -40
- package/src/delivery/computeAudioMode.ts +0 -11
- package/src/delivery/computeChoiceCorrectness.test.ts +0 -120
- package/src/delivery/computeChoiceCorrectness.ts +0 -42
- package/src/delivery/computeDisplayState.test.ts +0 -274
- package/src/delivery/computeDisplayState.ts +0 -101
- package/src/delivery/computeLayoutProfile.test.ts +0 -163
- package/src/delivery/computeLayoutProfile.ts +0 -72
- package/src/delivery/computeLayoutStyle.test.ts +0 -168
- package/src/delivery/computeLayoutStyle.ts +0 -128
- package/src/delivery/cqt-css/sel-r1-base.css +0 -59
- package/src/delivery/cqt-css/sel-r1-g-stem.css +0 -14
- package/src/delivery/cqt-css/sel-r1-gg-plus.css +0 -12
- package/src/delivery/cqt-css/sel-r1-ggplus.css +0 -17
- package/src/delivery/cqt-css/sel-r1-gplusggg.css +0 -25
- package/src/delivery/cqt-css/sel-r1-plusggg.css +0 -17
- package/src/delivery/cqt-css/sel-r1-s3.css +0 -85
- package/src/delivery/cqt-css/sel-vic.css +0 -99
- package/src/delivery/cqt-css/sr-vic.css +0 -63
- package/src/delivery/index.ts +0 -94
- package/src/delivery/variant-css-map.ts +0 -124
- package/src/index.iife.ts +0 -13
- package/src/index.ts +0 -1
- package/src/print/Print.svelte +0 -95
- package/src/print/index.ts +0 -18
- package/src/shared/layoutLimits.ts +0 -76
- package/src/shared/types.ts +0 -84
- package/src/types/css-raw.d.ts +0 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/runtime-support.ts
|
|
2
|
+
var e = {
|
|
3
|
+
schemaVersion: 1,
|
|
4
|
+
packageName: "@pie-element/mc-populated-blank",
|
|
5
|
+
supports: { esm: {
|
|
6
|
+
delivery: !1,
|
|
7
|
+
author: !1,
|
|
8
|
+
print: !1
|
|
9
|
+
} }
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as default, e as runtimeSupport };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=runtime-support.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-support.js","names":[],"sources":["../src/runtime-support.ts"],"sourcesContent":["export const runtimeSupport = {\n schemaVersion: 1,\n packageName: '@pie-element/mc-populated-blank',\n supports: {\n esm: {\n delivery: false,\n author: false,\n print: false,\n },\n },\n};\n\nexport default runtimeSupport;\n"],"mappings":";AAAA,IAAa,IAAiB;CAC5B,eAAe;CACf,aAAa;CACb,UAAU,EACR,KAAK;EACH,UAAU;EACV,QAAQ;EACR,OAAO;CACT,EACF;AACF"}
|
package/dist/shared/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,59 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/mc-populated-blank",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13-next.0",
|
|
4
4
|
"description": "Multiple-choice option populates an inline blank in a sentence template (Svelte 5 PIE element)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"pie": {
|
|
9
|
-
"controller": "@pie-element/mc-populated-blank/controller"
|
|
9
|
+
"controller": "@pie-element/mc-populated-blank/controller",
|
|
10
|
+
"configure": "@pie-element/mc-populated-blank/configure"
|
|
10
11
|
},
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
13
|
-
"development": "./src/index.ts",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
16
|
},
|
|
17
17
|
"./delivery": {
|
|
18
|
-
"development": "./src/delivery/index.ts",
|
|
19
18
|
"types": "./dist/delivery/index.d.ts",
|
|
20
19
|
"default": "./dist/delivery/index.js"
|
|
21
20
|
},
|
|
22
21
|
"./controller": {
|
|
23
|
-
"
|
|
22
|
+
"types": "./dist/controller/index.d.ts",
|
|
23
|
+
"default": "./dist/controller/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./controller.js": {
|
|
24
26
|
"types": "./dist/controller/index.d.ts",
|
|
25
27
|
"default": "./dist/controller/index.js"
|
|
26
28
|
},
|
|
27
29
|
"./author": {
|
|
28
|
-
"
|
|
30
|
+
"types": "./dist/author/index.d.ts",
|
|
31
|
+
"default": "./dist/author/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./configure": {
|
|
29
34
|
"types": "./dist/author/index.d.ts",
|
|
30
35
|
"default": "./dist/author/index.js"
|
|
31
36
|
},
|
|
32
37
|
"./print": {
|
|
33
|
-
"development": "./src/print/index.ts",
|
|
34
38
|
"types": "./dist/print/index.d.ts",
|
|
35
39
|
"default": "./dist/print/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./runtime-support": {
|
|
42
|
+
"types": "./dist/runtime-support.d.ts",
|
|
43
|
+
"default": "./dist/runtime-support.js"
|
|
36
44
|
}
|
|
37
45
|
},
|
|
38
46
|
"files": [
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
47
|
+
"configure.js",
|
|
48
|
+
"controller.js",
|
|
49
|
+
"dist"
|
|
42
50
|
],
|
|
43
51
|
"sideEffects": false,
|
|
44
52
|
"scripts": {
|
|
45
|
-
"build": "vite build && vite build --config vite.delivery.config.ts && vite build --config vite.controller.config.ts && vite build --config vite.author.config.ts && vite build --config vite.print.config.ts && vite build --config vite.config.iife.ts && tsc --emitDeclarationOnly",
|
|
53
|
+
"build": "vite build && vite build --config vite.delivery.config.ts && vite build --config vite.controller.config.ts && vite build --config vite.author.config.ts && vite build --config vite.print.config.ts && vite build --config vite.runtime-support.config.ts && vite build --config vite.config.iife.ts && tsc --emitDeclarationOnly",
|
|
46
54
|
"dev": "vite",
|
|
47
55
|
"clean": "rm -rf dist tsconfig.tsbuildinfo"
|
|
48
56
|
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@pie-lib/delivery-events-svelte": "0.1.0",
|
|
51
|
-
"@pie-lib/styling-svelte": "0.1.2"
|
|
52
|
-
},
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"svelte": "^5.0.0"
|
|
55
|
-
},
|
|
56
57
|
"devDependencies": {
|
|
58
|
+
"@pie-lib/delivery-events-svelte": "0.1.0",
|
|
59
|
+
"@pie-lib/styling-svelte": "0.1.2",
|
|
57
60
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
58
61
|
"svelte": "^5.54.0",
|
|
59
62
|
"typescript": "^5.9.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/author/index.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,kBAAkB,KAAmC,CAAC;AAE5D,cAAM,sBAAuB,SAAQ,kBAAkB;IACrD,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,SAAS,CAAuC;IAExD,IAAI,KAAK,CAAC,CAAC,EAAE,GAAG,EAGf;IAED,IAAI,KAAK,IALI,GAAG,CAOf;IAED,IAAI,QAAQ,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,EAGpC;IAED,IAAI,QAAQ,IALK,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAOpC;CACF;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/controller/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,oEAAoE;AACpE,eAAO,MAAM,WAAW,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvC,wBAqDE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":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E,UAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,2BAuH1F,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for the McPopulatedBlank controller.
|
|
3
|
-
*
|
|
4
|
-
* Cases are grouped by exported function.
|
|
5
|
-
*
|
|
6
|
-
* getCorrectness
|
|
7
|
-
* G1. No session → unanswered
|
|
8
|
-
* G2. No choiceId → unanswered
|
|
9
|
-
* G3. Correct choice selected → correct
|
|
10
|
-
* G4. Wrong choice selected → incorrect
|
|
11
|
-
*
|
|
12
|
-
* outcome
|
|
13
|
-
* O1. Empty session → score 0, empty: true
|
|
14
|
-
* O2. No choiceId → score 0, empty: true
|
|
15
|
-
* O3. Correct choice → score 1, empty: false
|
|
16
|
-
* O4. Wrong choice → score 0, empty: false
|
|
17
|
-
* O5. traceLog includes mode, selected id, correct id, final score
|
|
18
|
-
*
|
|
19
|
-
* model — choice ordering
|
|
20
|
-
* M1. shuffle=false → original order preserved
|
|
21
|
-
* M2. shuffle=true, instructor role → original order locked
|
|
22
|
-
* M3. shuffle=true, lockChoiceOrder=true → original order locked
|
|
23
|
-
* M4. shuffle=true, stored shuffle in session.data.shuffledValues → restored
|
|
24
|
-
* M5. shuffle=true, stored shuffle in session.shuffledValues (legacy) → restored
|
|
25
|
-
* M6. shuffle=true, stored shuffle has unknown ids → extras appended at end
|
|
26
|
-
* M7. shuffle=true, no stored shuffle → shuffled; updateSession called with new order
|
|
27
|
-
* M8. shuffle=true, no stored shuffle, no updateSession → shuffled silently (no throw)
|
|
28
|
-
*
|
|
29
|
-
* model — output fields
|
|
30
|
-
* M9. evaluate mode → correctness, responseCorrect, correctChoiceId present
|
|
31
|
-
* M10. gather mode → correctness fields absent
|
|
32
|
-
* M11. instructor + view mode → teacherInstructions included when enabled
|
|
33
|
-
* M12. student role → teacherInstructions always null
|
|
34
|
-
* M13. prompt included when promptEnabled=true
|
|
35
|
-
* M14. prompt null when promptEnabled=false
|
|
36
|
-
* M15. audioUrl null when hasAudio=false
|
|
37
|
-
* M16. audioUrl passed through when hasAudio=true
|
|
38
|
-
* M17. disabled=true in view/evaluate mode, false in gather
|
|
39
|
-
*
|
|
40
|
-
* validate
|
|
41
|
-
* V1. Valid question → empty errors object
|
|
42
|
-
* V2. promptEnabled + empty prompt → prompt error
|
|
43
|
-
* V3. populate_blank with no blank token → template error
|
|
44
|
-
* V4. populate_blank with two blank tokens → template error
|
|
45
|
-
* V5. audio_mc_only with a blank token → template error
|
|
46
|
-
* V6. Unknown interactionMode → interactionMode error
|
|
47
|
-
* V7. Fewer than two choices → choices error
|
|
48
|
-
* V8. Choice missing id → choices error
|
|
49
|
-
* V9. Text mode choice missing labelHtml → choices error
|
|
50
|
-
* V10. Image mode choice missing imageUrl → choices error
|
|
51
|
-
* V11. Image mode choice missing imageAlt → choices error
|
|
52
|
-
* V12. correctChoiceId not in choices → correctChoiceId error
|
|
53
|
-
* V13. hasAudio=true with no audioUrl → audioUrl error
|
|
54
|
-
* V14. layoutLimits with a non-positive value → layoutLimits error
|
|
55
|
-
* V15. layoutLimits with a valid value → no error
|
|
56
|
-
*
|
|
57
|
-
* createCorrectResponseSession
|
|
58
|
-
* CR1. Instructor + mode≠evaluate → session with correct choiceId
|
|
59
|
-
* CR2. Student role → null
|
|
60
|
-
* CR3. Evaluate mode → null
|
|
61
|
-
*/
|
|
62
|
-
export {};
|
|
63
|
-
//# sourceMappingURL=index.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/controller/index.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AudioPlayer.test.d.ts","sourceRoot":"","sources":["../../src/delivery/AudioPlayer.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceRow.test.d.ts","sourceRoot":"","sources":["../../src/delivery/ChoiceRow.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClozeMarker.test.d.ts","sourceRoot":"","sources":["../../src/delivery/ClozeMarker.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"McPopulatedBlank.transcript.test.d.ts","sourceRoot":"","sources":["../../src/delivery/McPopulatedBlank.transcript.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeAudioMode.d.ts","sourceRoot":"","sources":["../../src/delivery/computeAudioMode.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;CAChC,GAAG,SAAS,CAIZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeAudioMode.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeAudioMode.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeChoiceCorrectness.d.ts","sourceRoot":"","sources":["../../src/delivery/computeChoiceCorrectness.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,uBAAuB,GAC9B,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAC,CAsBtC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for computeChoiceCorrectness.
|
|
3
|
-
*
|
|
4
|
-
* This is the harness for extracting the choiceCorrectnessById state machine
|
|
5
|
-
* from McPopulatedBlank.svelte. The function takes five pure inputs and returns
|
|
6
|
-
* a Map — no component rendering required.
|
|
7
|
-
*
|
|
8
|
-
* Cases:
|
|
9
|
-
* C1. Not evaluate mode → empty map
|
|
10
|
-
* C2. Evaluate mode, no correctChoiceId → empty map
|
|
11
|
-
* C3. Reveal active, student chose correctly → { correctId: 'correct' } only
|
|
12
|
-
* C4. Reveal active, student chose wrong → { correctId: 'correct' } only (student badge suppressed)
|
|
13
|
-
* C5. Evaluate, unanswered → { correctId: 'incorrect' }
|
|
14
|
-
* C6. Evaluate, student chose correctly → { correctId: 'correct' }
|
|
15
|
-
* C7. Evaluate, student chose wrong → { studentId: 'incorrect', correctId: 'incorrect' }
|
|
16
|
-
* C8. Empty-string ids treated as "no selection" → C5 path, not C7
|
|
17
|
-
*/
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=computeChoiceCorrectness.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeChoiceCorrectness.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeChoiceCorrectness.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeDisplayState.d.ts","sourceRoot":"","sources":["../../src/delivery/computeDisplayState.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAatE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,EAAE,OAAO,CAAC;IACzB,wBAAwB,EAAE,OAAO,CAAC;CACnC,GAAG,eAAe,CAmBlB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,MAAM,CAMT;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAMT;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,GAAG,MAAM,CAST"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for computeDisplayState.
|
|
3
|
-
*
|
|
4
|
-
* computeFeatureAudioSkin
|
|
5
|
-
* A1. No locale, no overrides → default English skin
|
|
6
|
-
* A2. Spanish locale (es-MX) → built-in es skin
|
|
7
|
-
* A3. Exact locale match in byLocale → that skin
|
|
8
|
-
* A4. No exact match, lang prefix match (es) → lang skin
|
|
9
|
-
* A5. byLocale.default when no locale/lang match → byLocale.default skin
|
|
10
|
-
* A6. customSingle fallback when byLocale empty → customSingle
|
|
11
|
-
* A7. byLocale.default wins over customSingle
|
|
12
|
-
*
|
|
13
|
-
* computeDisplayChoiceId
|
|
14
|
-
* D1. Normal gather: returns selectedId
|
|
15
|
-
* D2. alwaysShowCorrect=true: returns correctChoiceId regardless
|
|
16
|
-
* D3. alwaysShowCorrect=true, no correctChoiceId: returns selectedId
|
|
17
|
-
* D4. evaluate + showCorrectAnswer=true: returns correctChoiceId
|
|
18
|
-
* D5. evaluate + showCorrectAnswer=false: returns selectedId
|
|
19
|
-
* D6. Not evaluate + showCorrectAnswer=true: returns selectedId (not overridden outside evaluate)
|
|
20
|
-
*
|
|
21
|
-
* computeResultText
|
|
22
|
-
* R1. Not evaluate mode → empty string
|
|
23
|
-
* R2. Evaluate + showCorrectAnswer=true → empty string (suppressed while reveal active)
|
|
24
|
-
* R3. Evaluate + correct → 'Correct answer selected'
|
|
25
|
-
* R4. Evaluate + incorrect + has selection → 'Incorrect answer selected'
|
|
26
|
-
* R5. Evaluate + incorrect + no selection → empty string (unanswered, no message)
|
|
27
|
-
* R6. Evaluate + unanswered (not correct, not incorrect) → empty string
|
|
28
|
-
*
|
|
29
|
-
* computeLegendText
|
|
30
|
-
* L1. Plain text prompt under limit → prompt text as-is
|
|
31
|
-
* L2. HTML prompt → tags stripped
|
|
32
|
-
* L3. Prompt over legendMaxChars → truncated with ellipsis
|
|
33
|
-
* L4. Empty prompt → answerChoicesLabel fallback
|
|
34
|
-
* L5. legendMaxChars < 8 → clamped to 8 before truncation
|
|
35
|
-
* L6. Whitespace-only prompt (after strip) → fallback
|
|
36
|
-
*/
|
|
37
|
-
export {};
|
|
38
|
-
//# sourceMappingURL=computeDisplayState.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeDisplayState.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeDisplayState.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeLayoutProfile.d.ts","sourceRoot":"","sources":["../../src/delivery/computeLayoutProfile.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,4BAA4B,EAAE,OAAO,CAAC;IACtC,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAQD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,CA6CrF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeLayoutProfile.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeLayoutProfile.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeLayoutStyle.d.ts","sourceRoot":"","sources":["../../src/delivery/computeLayoutStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAClF,YAAY,EAAE,YAAY,EAAE,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAC/B,OAAO,CAAC,MAAM,YAAY,EAAE,gBAAgB,CAAC,EAC7C;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CA0ClC,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,CAiBhF,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;CAChC,GAAG,iBAAiB,CAwCpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeLayoutStyle.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeLayoutStyle.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,kBAAkB,KAA6C,CAAC;AAEtE,cAAM,uBAAwB,SAAQ,kBAAkB;IACtD,gBAAgB,EAAE,GAAG,CAAQ;IAC7B,MAAM,EAAE,GAAG,CAAQ;IACnB,QAAQ,EAAE,GAAG,CAAQ;IACrB,aAAa,UAAS;IAEtB,iBAAiB,aAIf;IAEF,uBAAuB,aAErB;IAEF,IAAI,KAAK,CAAC,CAAC,EAAE,GAAG,EAKf;IAED,IAAI,KAAK,IAPI,GAAG,CASf;IAED,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,EAIjB;IAED,IAAI,OAAO,IANI,GAAG,CAQjB;IAED,IAAI,OAAO,CAAC,CAAC,EAAE,GAAG,EAGjB;IAED,IAAI,OAAO,IALI,GAAG,CAOjB;IAED,eAAe,GAAI,gBAAgB,GAAG,UAIpC;IAEF,cAAc,aAKZ;IAEF,YAAY,aAOV;IAEF,WAAW,gBAET;IAEF,iBAAiB;CAMlB;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variant-css-map.d.ts","sourceRoot":"","sources":["../../src/delivery/variant-css-map.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAqEF,eAAO,MAAM,mBAAmB,GAAI,YAAY,OAAO,KAAG,gBAAgB,GAAG,SAG5E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,YAAY,OAAO,KAAG,MAEzD,CAAC;AAwBF,eAAO,MAAM,wBAAwB,GAAI,SAAS,gBAAgB,KAAG,IAQpE,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.iife.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.iife.d.ts","sourceRoot":"","sources":["../src/index.iife.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,OAAO,MAAM,YAAY,CAAC;AAKjC,QAAA,MAAM,UAAU;;qBAI8F,+CAAsB,EAAC,6CAAqB;sBAA8P,gDAAuB,EAAC,6CAAqB;cAAkI,+CAAsB,EAAC,6CAAqB,EAAC,qCAAa;yBAAs4B,6CAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAiK,gDAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAAqE,uCAAc;YAAm4E,+CAAyB,EAAC,oDAA8B,EAAC,4CAAsB,EAAC;;uBAAkC;mCAAu3F,+CAAsB,EAAC,qCAAa;eAA2T,gDAA2B,EAAC,iCAAsC;CAJjhP,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/print/index.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,kBAAkB,KAAkC,CAAC;AAE3D,cAAM,qBAAsB,SAAQ,kBAAkB;IACpD,OAAO,CAAC,MAAM,CAAa;IAE3B,IAAI,KAAK,CAAC,CAAC,EAAE,GAAG,EAGf;IAED,IAAI,KAAK,IALI,GAAG,CAOf;CACF;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layoutLimits.d.ts","sourceRoot":"","sources":["../../src/shared/layoutLimits.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yBAAyB,EAAE,MAAM,CAAC;IAClC,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,gCAAgC,EAAE,MAAM,CAAC;IACzC,mCAAmC,EAAE,MAAM,CAAC;IAC5C,yBAAyB,EAAE,MAAM,CAAC;IAClC,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CA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AC,EAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAChD"}
|
package/src/author/Author.svelte
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<svelte:options
|
|
2
|
-
customElement={{
|
|
3
|
-
shadow: 'none',
|
|
4
|
-
props: {
|
|
5
|
-
model: { type: 'Object' },
|
|
6
|
-
},
|
|
7
|
-
}}
|
|
8
|
-
/>
|
|
9
|
-
|
|
10
|
-
<script lang="ts">
|
|
11
|
-
// Keep the same prop shape expected by the wrapper.
|
|
12
|
-
let { model = $bindable(), onChange }: { model?: any; onChange?: (model: any) => void } = $props();
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<div class="mc-populated-blank-author-placeholder" role="status" aria-live="polite">
|
|
16
|
-
<p class="title">Author view placeholder</p>
|
|
17
|
-
<p class="body">This authoring interface is a placeholder and will be implemented later.</p>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<style>
|
|
21
|
-
.mc-populated-blank-author-placeholder {
|
|
22
|
-
max-width: 56rem;
|
|
23
|
-
margin: 24px auto;
|
|
24
|
-
padding: 20px;
|
|
25
|
-
border: 1px dashed #cbd5e1;
|
|
26
|
-
border-radius: 8px;
|
|
27
|
-
background: #f8fafc;
|
|
28
|
-
color: #334155;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.title {
|
|
32
|
-
margin: 0 0 8px;
|
|
33
|
-
font-size: 1rem;
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.body {
|
|
38
|
-
margin: 0;
|
|
39
|
-
font-size: 0.9rem;
|
|
40
|
-
}
|
|
41
|
-
</style>
|
package/src/author/index.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import AuthorComponent from './Author.svelte';
|
|
2
|
-
|
|
3
|
-
const SvelteElementClass = (AuthorComponent as any).element;
|
|
4
|
-
|
|
5
|
-
class McPopulatedBlankAuthor extends SvelteElementClass {
|
|
6
|
-
private _model: any = null;
|
|
7
|
-
private _onChange: ((model: any) => void) | null = null;
|
|
8
|
-
|
|
9
|
-
set model(m: any) {
|
|
10
|
-
this._model = m;
|
|
11
|
-
super.model = m;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
get model() {
|
|
15
|
-
return this._model;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
set onChange(fn: (model: any) => void) {
|
|
19
|
-
this._onChange = fn;
|
|
20
|
-
(this as any).onChange = fn;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
get onChange() {
|
|
24
|
-
return this._onChange || (() => {});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default McPopulatedBlankAuthor;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_LAYOUT_LIMITS } from '../shared/layoutLimits';
|
|
2
|
-
|
|
3
|
-
export { DEFAULT_LAYOUT_LIMITS };
|
|
4
|
-
|
|
5
|
-
/** Token authors must include exactly once in `template` (HTML). */
|
|
6
|
-
export const BLANK_TOKEN = '{{blank}}';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
model: {
|
|
10
|
-
id: '1',
|
|
11
|
-
element: 'mc-populated-blank',
|
|
12
|
-
prompt: '<p><strong>Demo prompt</strong></p>',
|
|
13
|
-
promptEnabled: true,
|
|
14
|
-
interactionMode: 'populate_blank' as const,
|
|
15
|
-
layoutProfile: '',
|
|
16
|
-
choiceLayout: '',
|
|
17
|
-
layoutProfilePresets: {},
|
|
18
|
-
layoutLimits: { ...DEFAULT_LAYOUT_LIMITS },
|
|
19
|
-
audioButtonSkin: null,
|
|
20
|
-
audioButtonSkinsByLocale: {},
|
|
21
|
-
uiText: {
|
|
22
|
-
answerChoices: 'Answer choices',
|
|
23
|
-
selectedAnswerInSentence: 'blank',
|
|
24
|
-
showCorrectAnswer: 'Show correct answer',
|
|
25
|
-
hideCorrectAnswer: 'Hide correct answer',
|
|
26
|
-
clickToEnableAutoplay: 'Click to enable audio autoplay',
|
|
27
|
-
audioResourceUnavailable: 'Audio is enabled but no playable audio URL is configured.',
|
|
28
|
-
transcriptLabel: 'Transcript',
|
|
29
|
-
listenLabelEn: 'Listen',
|
|
30
|
-
listenLabelEs: 'Escuchar',
|
|
31
|
-
listenSilentAlt: 'Repeat instructions',
|
|
32
|
-
listenPlayingAlt: 'Instructions are playing',
|
|
33
|
-
listenSilentAltEs: 'Escuchar. Repetir las instrucciones.',
|
|
34
|
-
listenPlayingAltEs: 'Escuchar. Estas son las instrucciones.',
|
|
35
|
-
},
|
|
36
|
-
sentenceHtml: '',
|
|
37
|
-
template: `<p>The answer is ${BLANK_TOKEN}.</p>`,
|
|
38
|
-
choiceMode: 'text' as const,
|
|
39
|
-
choices: [
|
|
40
|
-
{ id: 'c1', labelHtml: '<p>Option A</p>' },
|
|
41
|
-
{ id: 'c2', labelHtml: '<p>Option B</p>' },
|
|
42
|
-
{ id: 'c3', labelHtml: '<p>Option C</p>' },
|
|
43
|
-
],
|
|
44
|
-
correctChoiceId: 'c2',
|
|
45
|
-
hasAudio: false,
|
|
46
|
-
autoplayAudioEnabled: false,
|
|
47
|
-
completeAudioEnabled: false,
|
|
48
|
-
audioUrl: '',
|
|
49
|
-
audioTranscript: '',
|
|
50
|
-
showVisibleTranscript: false,
|
|
51
|
-
locale: '',
|
|
52
|
-
teacherInstructions: '',
|
|
53
|
-
teacherInstructionsEnabled: false,
|
|
54
|
-
},
|
|
55
|
-
configuration: {
|
|
56
|
-
prompt: {
|
|
57
|
-
label: 'Prompt',
|
|
58
|
-
settings: true,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
};
|