@edpire/sdk 0.6.12 → 0.7.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/dist/react.d.mts CHANGED
@@ -80,6 +80,28 @@ interface TakeBranding {
80
80
  showPoweredBy?: boolean;
81
81
  } | null;
82
82
  }
83
+ /**
84
+ * Geometry of the question column. Branding covers colour and type; this covers
85
+ * the one thing branding could not reach.
86
+ */
87
+ interface ShellLayout {
88
+ /**
89
+ * Max width of the question column. Any CSS length, or `"none"` to fill the
90
+ * container. Default `"48rem"` (768px).
91
+ *
92
+ * The default is a reading measure, not an arbitrary cap: at the runtime's
93
+ * base size it yields roughly 70–90 characters per line, already the top of
94
+ * the comfortable range. Past about `"60rem"` the eye starts losing its place
95
+ * on the return sweep, which costs a learner more on a long comprehension
96
+ * passage than the empty gutters ever did.
97
+ *
98
+ * Keep the default when the player owns the whole page (`h-dvh`, no host
99
+ * chrome) — that is what it was measured for. Set `"none"` when you mount the
100
+ * player inside your own layout and your container already supplies the
101
+ * measure, otherwise learners see a column inside a column.
102
+ */
103
+ maxWidth?: string;
104
+ }
83
105
  type NodeDetail = {
84
106
  type: "choiceSet";
85
107
  correctChoiceIds: string[];
@@ -241,6 +263,16 @@ interface EdpireAssessmentPlayerProps {
241
263
  locale?: ShellLocale;
242
264
  /** Branding overrides. Org branding loads from Edpire automatically; pass this to override (white-labelling). */
243
265
  branding?: TakeBranding;
266
+ /**
267
+ * Geometry of the question column.
268
+ *
269
+ * `className` sizes the player's outer box; this sizes the question column
270
+ * inside it. They are different boxes: by default the questions sit in a
271
+ * centred 768px reading column whatever the outer box is. Keep that for a
272
+ * full-page player, pass `{ maxWidth: "none" }` when the player is embedded
273
+ * in a layout that already constrains width.
274
+ */
275
+ layout?: ShellLayout;
244
276
  /**
245
277
  * When set, the post-submit "View Full Report" button redirects here with
246
278
  * `?submission_id=...&score=...&max_score=...` appended. Omit to hide the button.
@@ -360,6 +392,12 @@ interface AssessmentShellProps {
360
392
  overlayConfig?: OverlayConfig;
361
393
  /** Scope grading/time-up overlays to this component instead of the viewport. */
362
394
  contained?: boolean;
395
+ /**
396
+ * Geometry of the question column. Omit for the default reading measure,
397
+ * which is what a full-page player wants. Pass `{ maxWidth: "none" }` when
398
+ * the shell is embedded inside a host layout that already constrains width.
399
+ */
400
+ layout?: ShellLayout;
363
401
  /** Media upload handler — required for file-upload and recording modes in
364
402
  * OpenResponse questions. */
365
403
  mediaHandler?: QuestionRuntimeProps["mediaHandler"];
@@ -379,6 +417,6 @@ interface AssessmentShellProps {
379
417
  */
380
418
  fallbackLogoUrl?: string;
381
419
  }
382
- declare function AssessmentShell({ assessment, meta, locale, branding, timeLimitMinutes, startedAt, onSubmit, onViewReport, reportLabel, onBack, backLabel, allowReset, onReset, overlayConfig, contained, onClose, mediaHandler, onAddAnnex, fallbackLogoUrl, }: AssessmentShellProps): react_jsx_runtime.JSX.Element;
420
+ declare function AssessmentShell({ assessment, meta, locale, branding, timeLimitMinutes, startedAt, onSubmit, onViewReport, reportLabel, onBack, backLabel, allowReset, onReset, overlayConfig, contained, layout, onClose, mediaHandler, onAddAnnex, fallbackLogoUrl, }: AssessmentShellProps): react_jsx_runtime.JSX.Element;
383
421
 
384
- export { AssessmentShell, type AssessmentShellProps, EdpireAssessmentPlayer, type EdpireAssessmentPlayerProps, EdpireQuestion, type EdpireQuestionProps, type ExerciseFeedbackData, type NodeDetail, type NodeFeedback, type OverlayConfig, type QuestionFeedback, type ShellLocale, type SpinnerTheme, type SubmitResult, type TakeBranding };
422
+ export { AssessmentShell, type AssessmentShellProps, EdpireAssessmentPlayer, type EdpireAssessmentPlayerProps, EdpireQuestion, type EdpireQuestionProps, type ExerciseFeedbackData, type NodeDetail, type NodeFeedback, type OverlayConfig, type QuestionFeedback, type ShellLayout, type ShellLocale, type SpinnerTheme, type SubmitResult, type TakeBranding };