@edpire/sdk 0.8.1 → 0.8.3

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/CHANGELOG.md CHANGED
@@ -9,6 +9,51 @@ integrators pin a version and had no way to tell what a bump would change.
9
9
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
10
10
  the package follows [semantic versioning](https://semver.org/spec/v2.0.0.html).
11
11
 
12
+ ## [0.8.3] - 2026-10-24
13
+
14
+ ### Fixed
15
+
16
+ - **No hydration error with a time limit.** On a server-rendered page (Next.js,
17
+ Remix), the countdown worked out the time left while rendering, so the HTML
18
+ from the server and the first render in the browser differed and React
19
+ threw a hydration error. The countdown now appears once the page runs in the
20
+ browser.
21
+
22
+ ### Added
23
+
24
+ All optional; nothing changes for a host that doesn't pass them.
25
+
26
+ - `AssessmentShell` `initialAnswers`: answers saved earlier in the attempt,
27
+ filled in and editable, and part of what `onSubmit` receives even if the
28
+ learner changes nothing.
29
+ - `AssessmentShell` `onAnswersChange`: the whole set of answers on every
30
+ change, for hosts that save progress.
31
+ - `AssessmentShell` `saveState` (`"saving" | "saved" | "failed"`, type
32
+ `ShellSaveState`): shown quietly in the top bar; `"failed"` says plainly that
33
+ answers aren't being saved.
34
+ - `AssessmentShell` `resumed`: a short note when the learner comes back, with
35
+ the time left when there is a limit.
36
+ - `SubmitResult.showVerdict`: `false` shows the score without "passed" or "not
37
+ passed". Default `true`.
38
+
39
+ ## [0.8.2] - 2026-10-17
40
+
41
+ ### Fixed
42
+
43
+ - **Maths renders in KaTeX's own fonts again.** The KaTeX stylesheet was
44
+ inlined into the bundles, so its relative `url(fonts/...)` resolved against
45
+ the page's address and every font request 404'd (maths fell back to system
46
+ fonts). The npm builds (`index.mjs`, `react.mjs`) now import
47
+ `katex/dist/katex.min.css` instead of inlining it: the app's bundler serves
48
+ the fonts from its own origin. The script-tag (UMD) build points the fonts at
49
+ jsDelivr, which already serves that bundle, for the KaTeX version bundled in.
50
+
51
+ ### Changed
52
+
53
+ - The npm builds now contain one CSS import, from `katex`. Next.js, Vite and
54
+ webpack handle it as is; Jest users need a CSS `moduleNameMapper`. Both npm
55
+ bundles are about 23 KB smaller.
56
+
12
57
  ## [0.8.1] - 2026-09-29
13
58
 
14
59
  ### Fixed
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  Embeddable assessment SDK for Edpire. Deliver, render, and grade assessments from your own application.
4
4
 
5
5
  > 📚 **Full documentation** lives in the Edpire docs site under [**SDK Reference**](https://docs.edpire.com/developer/sdk/overview) — complete option/prop/type tables for the Embedded Player, React components, Custom Flow, server client, and branding. This README is a condensed quick-start.
6
+ >
7
+ > 📝 **What changed in each version:** the [Changelog](https://docs.edpire.com/changelog). Pin a version and read it before you bump.
6
8
 
7
9
  ---
8
10
 
@@ -90,7 +92,7 @@ embed.unmount()
90
92
  **CDN (no bundler):**
91
93
 
92
94
  ```html
93
- <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.1/dist/umd/index.global.js"></script>
95
+ <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.3/dist/umd/index.global.js"></script>
94
96
  <script>
95
97
  EdpireSDK.EdpireAssessment.mount({ token, container: "#root", onComplete: handleDone })
96
98
  </script>
@@ -328,7 +330,7 @@ The integration uses two parts:
328
330
  </head>
329
331
  <body>
330
332
  <div id="root"></div>
331
- <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.1/dist/umd/index.global.js"></script>
333
+ <script src="https://cdn.jsdelivr.net/npm/@edpire/sdk@0.8.3/dist/umd/index.global.js"></script>
332
334
  <script>
333
335
  EdpireSDK.EdpireAssessment.mount({
334
336
  token: "{{EMBED_TOKEN}}", // replace server-side before loading
package/dist/index.d.mts CHANGED
@@ -91,6 +91,11 @@ interface SubmitResult {
91
91
  maxScore: number;
92
92
  percentage: number;
93
93
  passed: boolean;
94
+ /**
95
+ * False when the assessment has no pass mark: the banner shows the score in
96
+ * ink, with no "passed" / "not passed". Default true (unchanged).
97
+ */
98
+ showVerdict?: boolean;
94
99
  /** If null/undefined, the shell hides the "View Full Report" button. */
95
100
  returnUrl?: string | null;
96
101
  exerciseFeedback: ExerciseFeedbackData[];