@pie-element/mc-populated-blank 0.2.9 → 0.2.11

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.
Files changed (91) hide show
  1. package/README.md +20 -10
  2. package/dist/author/index.js +186 -152
  3. package/dist/author/index.js.map +1 -1
  4. package/dist/controller/defaults.d.ts +41 -73
  5. package/dist/controller/defaults.d.ts.map +1 -1
  6. package/dist/controller/index.d.ts +154 -10
  7. package/dist/controller/index.d.ts.map +1 -1
  8. package/dist/controller/index.js +30 -30
  9. package/dist/controller/index.js.map +1 -1
  10. package/dist/controller/index.test.d.ts +63 -0
  11. package/dist/controller/index.test.d.ts.map +1 -0
  12. package/dist/delivery/AudioPlayer.test.d.ts +2 -0
  13. package/dist/delivery/AudioPlayer.test.d.ts.map +1 -0
  14. package/dist/delivery/ChoiceRow.test.d.ts +2 -0
  15. package/dist/delivery/ChoiceRow.test.d.ts.map +1 -0
  16. package/dist/delivery/ClozeMarker.test.d.ts +2 -0
  17. package/dist/delivery/ClozeMarker.test.d.ts.map +1 -0
  18. package/dist/delivery/McPopulatedBlank.transcript.test.d.ts +2 -0
  19. package/dist/delivery/McPopulatedBlank.transcript.test.d.ts.map +1 -0
  20. package/dist/delivery/computeAudioMode.d.ts +7 -0
  21. package/dist/delivery/computeAudioMode.d.ts.map +1 -0
  22. package/dist/delivery/computeAudioMode.test.d.ts +2 -0
  23. package/dist/delivery/computeAudioMode.test.d.ts.map +1 -0
  24. package/dist/delivery/computeChoiceCorrectness.d.ts +18 -0
  25. package/dist/delivery/computeChoiceCorrectness.d.ts.map +1 -0
  26. package/dist/delivery/computeChoiceCorrectness.test.d.ts +19 -0
  27. package/dist/delivery/computeChoiceCorrectness.test.d.ts.map +1 -0
  28. package/dist/delivery/computeDisplayState.d.ts +47 -0
  29. package/dist/delivery/computeDisplayState.d.ts.map +1 -0
  30. package/dist/delivery/computeDisplayState.test.d.ts +38 -0
  31. package/dist/delivery/computeDisplayState.test.d.ts.map +1 -0
  32. package/dist/delivery/computeLayoutProfile.d.ts +18 -0
  33. package/dist/delivery/computeLayoutProfile.d.ts.map +1 -0
  34. package/dist/delivery/computeLayoutProfile.test.d.ts +2 -0
  35. package/dist/delivery/computeLayoutProfile.test.d.ts.map +1 -0
  36. package/dist/delivery/computeLayoutStyle.d.ts +27 -0
  37. package/dist/delivery/computeLayoutStyle.d.ts.map +1 -0
  38. package/dist/delivery/computeLayoutStyle.test.d.ts +2 -0
  39. package/dist/delivery/computeLayoutStyle.test.d.ts.map +1 -0
  40. package/dist/delivery/index.d.ts.map +1 -1
  41. package/dist/delivery/index.js +1650 -881
  42. package/dist/delivery/index.js.map +1 -1
  43. package/dist/delivery/variant-css-map.d.ts +10 -0
  44. package/dist/delivery/variant-css-map.d.ts.map +1 -0
  45. package/dist/index.iife.d.ts +151 -10
  46. package/dist/index.iife.d.ts.map +1 -1
  47. package/dist/index.iife.js +409 -16
  48. package/dist/index.js +1650 -881
  49. package/dist/index.js.map +1 -1
  50. package/dist/print/index.js +194 -166
  51. package/dist/print/index.js.map +1 -1
  52. package/dist/shared/layoutLimits.d.ts +40 -0
  53. package/dist/shared/layoutLimits.d.ts.map +1 -0
  54. package/dist/shared/types.d.ts +82 -0
  55. package/dist/shared/types.d.ts.map +1 -0
  56. package/package.json +4 -2
  57. package/src/controller/defaults.ts +9 -39
  58. package/src/controller/index.test.ts +428 -0
  59. package/src/controller/index.ts +64 -50
  60. package/src/delivery/AudioPlayer.svelte +246 -0
  61. package/src/delivery/AudioPlayer.test.ts +149 -0
  62. package/src/delivery/ChoiceRow.svelte +222 -0
  63. package/src/delivery/ChoiceRow.test.ts +179 -0
  64. package/src/delivery/ClozeMarker.svelte +83 -0
  65. package/src/delivery/ClozeMarker.test.ts +128 -0
  66. package/src/delivery/McPopulatedBlank.svelte +234 -709
  67. package/src/delivery/McPopulatedBlank.transcript.test.ts +154 -0
  68. package/src/delivery/computeAudioMode.test.ts +40 -0
  69. package/src/delivery/computeAudioMode.ts +11 -0
  70. package/src/delivery/computeChoiceCorrectness.test.ts +120 -0
  71. package/src/delivery/computeChoiceCorrectness.ts +42 -0
  72. package/src/delivery/computeDisplayState.test.ts +274 -0
  73. package/src/delivery/computeDisplayState.ts +101 -0
  74. package/src/delivery/computeLayoutProfile.test.ts +163 -0
  75. package/src/delivery/computeLayoutProfile.ts +72 -0
  76. package/src/delivery/computeLayoutStyle.test.ts +168 -0
  77. package/src/delivery/computeLayoutStyle.ts +128 -0
  78. package/src/delivery/cqt-css/sel-r1-base.css +59 -0
  79. package/src/delivery/cqt-css/sel-r1-g-stem.css +14 -0
  80. package/src/delivery/cqt-css/sel-r1-gg-plus.css +12 -0
  81. package/src/delivery/cqt-css/sel-r1-ggplus.css +17 -0
  82. package/src/delivery/cqt-css/sel-r1-gplusggg.css +25 -0
  83. package/src/delivery/cqt-css/sel-r1-plusggg.css +17 -0
  84. package/src/delivery/cqt-css/sel-r1-s3.css +85 -0
  85. package/src/delivery/cqt-css/sel-vic.css +99 -0
  86. package/src/delivery/cqt-css/sr-vic.css +63 -0
  87. package/src/delivery/index.ts +14 -23
  88. package/src/delivery/variant-css-map.ts +124 -0
  89. package/src/shared/layoutLimits.ts +76 -0
  90. package/src/shared/types.ts +84 -0
  91. package/src/types/css-raw.d.ts +4 -0
@@ -0,0 +1,63 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/controller/index.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AudioPlayer.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioPlayer.test.d.ts","sourceRoot":"","sources":["../../src/delivery/AudioPlayer.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ChoiceRow.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChoiceRow.test.d.ts","sourceRoot":"","sources":["../../src/delivery/ChoiceRow.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ClozeMarker.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClozeMarker.test.d.ts","sourceRoot":"","sources":["../../src/delivery/ClozeMarker.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=McPopulatedBlank.transcript.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"McPopulatedBlank.transcript.test.d.ts","sourceRoot":"","sources":["../../src/delivery/McPopulatedBlank.transcript.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type AudioMode = 'feature-button' | 'controls' | 'error' | 'none';
2
+ export declare function computeAudioMode(params: {
3
+ hasAudio: boolean;
4
+ audioUrl: string | undefined;
5
+ useFeatureButtonAudio: boolean;
6
+ }): AudioMode;
7
+ //# sourceMappingURL=computeAudioMode.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=computeAudioMode.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeAudioMode.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeAudioMode.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ export interface ChoiceCorrectnessParams {
2
+ isEvaluateMode: boolean;
3
+ correctChoiceId: string;
4
+ selectedId: string;
5
+ showCorrectAnswer: boolean;
6
+ }
7
+ /**
8
+ * Computes which choice ids should display a correctness badge and what kind.
9
+ *
10
+ * Reveal mode (showCorrectAnswer=true) shows only the canonical correct answer —
11
+ * the student's wrong selection is deliberately suppressed so the UI only
12
+ * highlights what to remember, not what to regret.
13
+ *
14
+ * Unanswered-in-evaluate (selectedId='') treats the correct choice as missed
15
+ * (incorrect badge) rather than triggering the two-badge wrong-answer path.
16
+ */
17
+ export declare function computeChoiceCorrectness(params: ChoiceCorrectnessParams): Map<string, 'correct' | 'incorrect'>;
18
+ //# sourceMappingURL=computeChoiceCorrectness.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,19 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeChoiceCorrectness.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeChoiceCorrectness.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
@@ -0,0 +1,47 @@
1
+ export type AudioButtonSkin = {
2
+ silentUrl: string;
3
+ playingUrl: string;
4
+ };
5
+ export declare const DEFAULT_AUDIO_BUTTON_SKINS: Record<string, AudioButtonSkin>;
6
+ /**
7
+ * Resolves the audio button skin to display.
8
+ * Priority: byLocale[exact] > byLocale[lang] > byLocale.default > customSingle > built-in default
9
+ */
10
+ export declare function computeFeatureAudioSkin(params: {
11
+ locale: unknown;
12
+ audioButtonSkin: unknown;
13
+ audioButtonSkinsByLocale: unknown;
14
+ }): AudioButtonSkin;
15
+ /**
16
+ * Returns the choice id that the ClozeMarker and selected-state highlight should display.
17
+ * When the correct answer is revealed (alwaysShowCorrect or evaluate+showCorrectAnswer),
18
+ * it shows the correct choice rather than the student's selection.
19
+ */
20
+ export declare function computeDisplayChoiceId(params: {
21
+ selectedId: string;
22
+ isEvaluateMode: boolean;
23
+ showCorrectAnswer: boolean;
24
+ alwaysShowCorrect: boolean;
25
+ correctChoiceId: string;
26
+ }): string;
27
+ /**
28
+ * Returns the screen-reader-only result announcement text shown after evaluate mode scoring.
29
+ * Empty string means nothing is announced.
30
+ */
31
+ export declare function computeResultText(params: {
32
+ isEvaluateMode: boolean;
33
+ showCorrectAnswer: boolean;
34
+ isCorrect: boolean;
35
+ isIncorrect: boolean;
36
+ selectedId: string;
37
+ }): string;
38
+ /**
39
+ * Returns the visible legend text for the choices fieldset.
40
+ * Strips HTML, truncates to legendMaxChars with an ellipsis, falls back to answerChoicesLabel.
41
+ */
42
+ export declare function computeLegendText(params: {
43
+ prompt: string;
44
+ legendMaxChars: number;
45
+ answerChoicesLabel: string;
46
+ }): string;
47
+ //# sourceMappingURL=computeDisplayState.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,38 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeDisplayState.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeDisplayState.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG"}
@@ -0,0 +1,18 @@
1
+ export interface LayoutProfileParams {
2
+ interactionMode?: string;
3
+ template?: string;
4
+ choiceLayout?: string;
5
+ layoutProfile?: string;
6
+ hasAudio?: boolean;
7
+ useFeatureButtonAudio?: boolean | null;
8
+ }
9
+ export interface LayoutProfileResult {
10
+ isAudioOnlyMode: boolean;
11
+ isBlankOnlyTemplate: boolean;
12
+ choiceLayout: 'horizontal' | 'vertical';
13
+ isHorizontalChoices: boolean;
14
+ hasInlineSentenceAudioLayout: boolean;
15
+ useFeatureButtonAudio: boolean;
16
+ }
17
+ export declare function computeLayoutProfile(params: LayoutProfileParams): LayoutProfileResult;
18
+ //# sourceMappingURL=computeLayoutProfile.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=computeLayoutProfile.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeLayoutProfile.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeLayoutProfile.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import { type LayoutLimits, DEFAULT_LAYOUT_LIMITS } from '../shared/layoutLimits';
2
+ export type { LayoutLimits };
3
+ export { DEFAULT_LAYOUT_LIMITS };
4
+ /**
5
+ * Maps every LayoutLimits key (except legendMaxChars, which is a return value not a CSS var)
6
+ * to its --mpb-* CSS variable name and CSS unit.
7
+ * Add a single entry here when adding a new layout limit.
8
+ */
9
+ export declare const CSS_VAR_SPEC: Record<Exclude<keyof LayoutLimits, 'legendMaxChars'>, {
10
+ varName: string;
11
+ unit: string;
12
+ }>;
13
+ export declare const DEFAULT_LAYOUT_PROFILE_PRESETS: Record<string, Partial<LayoutLimits>>;
14
+ export interface LayoutStyleResult {
15
+ rootStyle: string;
16
+ blankWidth: string;
17
+ blankBorderWidth: string;
18
+ legendMaxChars: number;
19
+ }
20
+ export declare function computeLayoutStyle(params: {
21
+ layoutProfile: string;
22
+ isBlankOnlyTemplate: boolean;
23
+ configuredLimits: unknown;
24
+ customProfilePresets: unknown;
25
+ correctAnswerStyleVars: string;
26
+ }): LayoutStyleResult;
27
+ //# sourceMappingURL=computeLayoutStyle.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=computeLayoutStyle.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"computeLayoutStyle.test.d.ts","sourceRoot":"","sources":["../../src/delivery/computeLayoutStyle.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AAGA,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,aAYf;IAEF,uBAAuB,aAWrB;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
+ {"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"}