@pie-element/mc-populated-blank 0.2.10 → 0.2.12

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 (55) hide show
  1. package/README.md +0 -2
  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 +29 -30
  9. package/dist/controller/index.js.map +1 -1
  10. package/dist/delivery/computeAudioMode.d.ts +7 -0
  11. package/dist/delivery/computeAudioMode.d.ts.map +1 -0
  12. package/dist/delivery/computeChoiceCorrectness.d.ts +18 -0
  13. package/dist/delivery/computeChoiceCorrectness.d.ts.map +1 -0
  14. package/dist/delivery/computeDisplayState.d.ts +47 -0
  15. package/dist/delivery/computeDisplayState.d.ts.map +1 -0
  16. package/dist/delivery/computeLayoutProfile.d.ts +18 -0
  17. package/dist/delivery/computeLayoutProfile.d.ts.map +1 -0
  18. package/dist/delivery/computeLayoutStyle.d.ts +27 -0
  19. package/dist/delivery/computeLayoutStyle.d.ts.map +1 -0
  20. package/dist/delivery/index.d.ts.map +1 -1
  21. package/dist/delivery/index.js +1591 -927
  22. package/dist/delivery/index.js.map +1 -1
  23. package/dist/delivery/variant-css-map.d.ts.map +1 -1
  24. package/dist/index.iife.d.ts +151 -10
  25. package/dist/index.iife.d.ts.map +1 -1
  26. package/dist/index.iife.js +233 -114
  27. package/dist/index.js +1591 -927
  28. package/dist/index.js.map +1 -1
  29. package/dist/print/index.js +194 -166
  30. package/dist/print/index.js.map +1 -1
  31. package/dist/shared/layoutLimits.d.ts +40 -0
  32. package/dist/shared/layoutLimits.d.ts.map +1 -0
  33. package/dist/shared/types.d.ts +82 -0
  34. package/dist/shared/types.d.ts.map +1 -0
  35. package/package.json +5 -14
  36. package/src/author/Author.svelte +0 -41
  37. package/src/author/index.ts +0 -28
  38. package/src/controller/defaults.ts +0 -91
  39. package/src/controller/index.ts +0 -359
  40. package/src/delivery/McPopulatedBlank.svelte +0 -1246
  41. package/src/delivery/cqt-css/sel-r1-g-stem.css +0 -29
  42. package/src/delivery/cqt-css/sel-r1-gg-plus.css +0 -29
  43. package/src/delivery/cqt-css/sel-r1-ggplus.css +0 -34
  44. package/src/delivery/cqt-css/sel-r1-gplusggg.css +0 -20
  45. package/src/delivery/cqt-css/sel-r1-plusggg.css +0 -20
  46. package/src/delivery/cqt-css/sel-r1-s3.css +0 -91
  47. package/src/delivery/cqt-css/sel-vic.css +0 -38
  48. package/src/delivery/cqt-css/sr-vic.css +0 -14
  49. package/src/delivery/index.ts +0 -103
  50. package/src/delivery/variant-css-map.ts +0 -110
  51. package/src/index.iife.ts +0 -13
  52. package/src/index.ts +0 -1
  53. package/src/print/Print.svelte +0 -95
  54. package/src/print/index.ts +0 -18
  55. package/src/types/css-raw.d.ts +0 -4
@@ -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,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,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,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