@pie-element/mc-populated-blank 0.2.13 → 0.3.0-next.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 (69) hide show
  1. package/README.md +9 -6
  2. package/author.js +2 -0
  3. package/configure.js +2 -0
  4. package/dist/author/defaults.d.ts +74 -0
  5. package/dist/author/index.d.ts +0 -1
  6. package/dist/author/index.js +1732 -1553
  7. package/dist/author/index.js.map +1 -1
  8. package/dist/browser/McPopulatedBlank-DbmR6UWn.js +2542 -0
  9. package/dist/browser/McPopulatedBlank-DbmR6UWn.js.map +1 -0
  10. package/dist/browser/author/index.js +41 -0
  11. package/dist/browser/author/index.js.map +1 -0
  12. package/dist/browser/client-CWh3mUUV.js +2385 -0
  13. package/dist/browser/client-CWh3mUUV.js.map +1 -0
  14. package/dist/browser/controller/index.js +2 -0
  15. package/dist/browser/controller-D_ITRCYG.js +209 -0
  16. package/dist/browser/controller-D_ITRCYG.js.map +1 -0
  17. package/dist/browser/delivery/index.js +124 -0
  18. package/dist/browser/delivery/index.js.map +1 -0
  19. package/dist/browser/layoutLimits-Bp17YP2V.js +42 -0
  20. package/dist/browser/layoutLimits-Bp17YP2V.js.map +1 -0
  21. package/dist/browser/print/index.js +129 -0
  22. package/dist/browser/print/index.js.map +1 -0
  23. package/dist/controller/defaults.d.ts +8 -30
  24. package/dist/controller/index.d.ts +79 -63
  25. package/dist/controller/index.js +108 -85
  26. package/dist/controller/index.js.map +1 -1
  27. package/dist/delivery/computeAudioMode.d.ts +0 -1
  28. package/dist/delivery/computeChoiceCorrectness.d.ts +0 -1
  29. package/dist/delivery/computeDisplayState.d.ts +7 -8
  30. package/dist/delivery/computeLayoutProfile.d.ts +0 -1
  31. package/dist/delivery/computeLayoutStyle.d.ts +0 -2
  32. package/dist/delivery/i18n.d.ts +8 -0
  33. package/dist/delivery/index.d.ts +8 -17
  34. package/dist/delivery/index.js +6138 -3662
  35. package/dist/delivery/index.js.map +1 -1
  36. package/dist/delivery/variant-css-map.d.ts +15 -2
  37. package/dist/index.d.ts +0 -1
  38. package/dist/index.iife.d.ts +0 -156
  39. package/dist/index.iife.js +139 -38
  40. package/dist/index.js +2 -6811
  41. package/dist/print/index.d.ts +4 -1
  42. package/dist/print/index.js +8158 -3655
  43. package/dist/print/index.js.map +1 -1
  44. package/dist/print/preparePrint.d.ts +15 -0
  45. package/dist/runtime-support.d.ts +12 -0
  46. package/dist/runtime-support.js +14 -0
  47. package/dist/runtime-support.js.map +1 -0
  48. package/dist/shared/layoutLimits.d.ts +1 -2
  49. package/dist/shared/types.d.ts +21 -19
  50. package/module/print.js +5192 -0
  51. package/module/print.js.map +1 -0
  52. package/package.json +42 -14
  53. package/print.js +2 -0
  54. package/dist/author/index.d.ts.map +0 -1
  55. package/dist/controller/defaults.d.ts.map +0 -1
  56. package/dist/controller/index.d.ts.map +0 -1
  57. package/dist/delivery/computeAudioMode.d.ts.map +0 -1
  58. package/dist/delivery/computeChoiceCorrectness.d.ts.map +0 -1
  59. package/dist/delivery/computeDisplayState.d.ts.map +0 -1
  60. package/dist/delivery/computeLayoutProfile.d.ts.map +0 -1
  61. package/dist/delivery/computeLayoutStyle.d.ts.map +0 -1
  62. package/dist/delivery/index.d.ts.map +0 -1
  63. package/dist/delivery/variant-css-map.d.ts.map +0 -1
  64. package/dist/index.d.ts.map +0 -1
  65. package/dist/index.iife.d.ts.map +0 -1
  66. package/dist/index.js.map +0 -1
  67. package/dist/print/index.d.ts.map +0 -1
  68. package/dist/shared/layoutLimits.d.ts.map +0 -1
  69. package/dist/shared/types.d.ts.map +0 -1
@@ -0,0 +1,15 @@
1
+ import type { McpbQuestion, McpbRole, McpbSession } from '../shared/types';
2
+ export interface PrintView {
3
+ model: Record<string, unknown>;
4
+ session: McpbSession | null;
5
+ teacherInstructions: string;
6
+ audioUrl: string;
7
+ audioTranscript: string;
8
+ }
9
+ /**
10
+ * `pie-print` hands over the item's own model and `options.role`, so print asks
11
+ * the controller for what a player shows that role in `view` mode, in the
12
+ * authored choice order. An instructor's key is the correct-response session,
13
+ * the same path a player shows it through; `printAnswerKey: false` withholds it.
14
+ */
15
+ export declare function preparePrint(question: McpbQuestion, role: McpbRole | undefined): Promise<PrintView>;
@@ -0,0 +1,12 @@
1
+ export declare const runtimeSupport: {
2
+ schemaVersion: number;
3
+ packageName: string;
4
+ supports: {
5
+ esm: {
6
+ delivery: boolean;
7
+ author: boolean;
8
+ print: boolean;
9
+ };
10
+ };
11
+ };
12
+ export default runtimeSupport;
@@ -0,0 +1,14 @@
1
+ //#region src/runtime-support.ts
2
+ var runtimeSupport = {
3
+ schemaVersion: 1,
4
+ packageName: "@pie-element/mc-populated-blank",
5
+ supports: { esm: {
6
+ delivery: true,
7
+ author: true,
8
+ print: true
9
+ } }
10
+ };
11
+ //#endregion
12
+ export { runtimeSupport as default, 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: true,\n author: true,\n print: true,\n },\n },\n};\n\nexport default runtimeSupport;\n"],"mappings":";AAAA,IAAa,iBAAiB;CAC5B,eAAe;CACf,aAAa;CACb,UAAU,EACR,KAAK;EACH,UAAU;EACV,QAAQ;EACR,OAAO;CACT,EACF;AACF"}
@@ -7,8 +7,8 @@ export type LayoutLimits = {
7
7
  horizontalChoiceWidthVw: number;
8
8
  horizontalChoiceTileMinHeightRem: number;
9
9
  horizontalChoiceContentMinHeightRem: number;
10
- selectedImageMaxHeightRem: number;
11
10
  choiceImageMaxHeightRem: number;
11
+ choiceImageMaxWidthRem: number;
12
12
  listenButtonSizePx: number;
13
13
  stimulusMinColumnPx: number;
14
14
  textMinColumnPx: number;
@@ -37,4 +37,3 @@ export type LayoutLimits = {
37
37
  };
38
38
  /** Baseline values tuned to match historical CQT visuals; override via model.layoutLimits. */
39
39
  export declare const DEFAULT_LAYOUT_LIMITS: LayoutLimits;
40
- //# sourceMappingURL=layoutLimits.d.ts.map
@@ -14,21 +14,6 @@ export interface McpbAudioButtonSkin {
14
14
  silentUrl: string;
15
15
  playingUrl: string;
16
16
  }
17
- export interface McpbUiText {
18
- answerChoices?: string;
19
- selectedAnswerInSentence?: string;
20
- showCorrectAnswer?: string;
21
- hideCorrectAnswer?: string;
22
- clickToEnableAutoplay?: string;
23
- audioResourceUnavailable?: string;
24
- transcriptLabel?: string;
25
- listenLabelEn?: string;
26
- listenLabelEs?: string;
27
- listenSilentAlt?: string;
28
- listenPlayingAlt?: string;
29
- listenSilentAltEs?: string;
30
- listenPlayingAltEs?: string;
31
- }
32
17
  export interface McpbQuestion {
33
18
  id?: string;
34
19
  element?: string;
@@ -41,24 +26,41 @@ export interface McpbQuestion {
41
26
  layoutLimits?: Partial<LayoutLimits>;
42
27
  audioButtonSkin?: McpbAudioButtonSkin | null;
43
28
  audioButtonSkinsByLocale?: Record<string, McpbAudioButtonSkin>;
44
- uiText?: McpbUiText;
45
29
  sentenceHtml?: string;
46
30
  template?: string;
47
31
  choiceMode?: McpbChoiceMode;
48
32
  choices?: McpbChoice[];
33
+ /** The choice group's accessible name when the item has no prompt to label it. */
34
+ choiceGroupLabel?: string;
49
35
  correctChoiceId?: string;
50
36
  hasAudio?: boolean;
51
37
  autoplayAudioEnabled?: boolean;
52
38
  completeAudioEnabled?: boolean;
53
39
  audioUrl?: string;
40
+ /**
41
+ * Transcript text for the audio prompt.
42
+ *
43
+ * Not rendered by delivery: on `pie-section-player` the toolkit renders it from
44
+ * the item's accessibility catalog, gated by the learner's profile (PIE-902).
45
+ * It stays on the model for the print view, which has no toolkit and renders it
46
+ * unconditionally until print resolves catalogs itself (PIE-904), and as the
47
+ * source the Learnosity import writes the card from.
48
+ */
54
49
  audioTranscript?: string;
55
- showVisibleTranscript?: boolean;
56
50
  useFeatureButtonAudio?: boolean;
51
+ /** Picks the audio button skin; also the learner-facing strings' language when `language` is unset. */
57
52
  locale?: string;
58
- shuffle?: boolean;
53
+ /** The learner-facing strings' language, as `@pie-lib/translator` reads it (`en_US`, `es_ES`, …). */
54
+ language?: string;
55
+ /** `false` shuffles the choices for a student; unset or `true` keeps the authored order. */
59
56
  lockChoiceOrder?: boolean;
57
+ /** The older spelling of `lockChoiceOrder: false`, read only when `lockChoiceOrder` is unset. */
58
+ shuffle?: boolean;
60
59
  teacherInstructions?: string;
60
+ /** `false` hides `teacherInstructions`; unset shows them, as in multiple-choice. */
61
61
  teacherInstructionsEnabled?: boolean;
62
+ /** `false` leaves the answer key out of an instructor's printout; a student's never has it. */
63
+ printAnswerKey?: boolean;
62
64
  customType?: string;
63
65
  }
64
66
  export interface McpbSession {
@@ -67,6 +69,7 @@ export interface McpbSession {
67
69
  choiceId?: string;
68
70
  audioStartTime?: number;
69
71
  audioEndTime?: number;
72
+ waitTime?: number;
70
73
  shuffledValues?: string[];
71
74
  data?: {
72
75
  shuffledValues?: string[];
@@ -79,4 +82,3 @@ export interface McpbEnv {
79
82
  lockChoiceOrder?: boolean;
80
83
  };
81
84
  }
82
- //# sourceMappingURL=types.d.ts.map