@0m0g1/griot 0.1.20 → 0.1.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0m0g1/griot",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "A self-contained block-based rich text editor and renderer built for historical document authoring.",
5
5
  "type": "module",
6
6
  "main": "./src/Griot.js",
@@ -44,6 +44,10 @@ export class Viewer {
44
44
  this._render();
45
45
  }
46
46
 
47
+ setOnQuizSubmit(fn) {
48
+ this._options.onQuizSubmit = fn ?? null;
49
+ }
50
+
47
51
  /** Scroll to block and briefly highlight it */
48
52
  setHighlight(blockId, { scroll = true, behavior = 'smooth' } = {}) {
49
53
  clearTimeout(this._hlTimer);
@@ -119,6 +123,7 @@ export class Viewer {
119
123
  books: this._books,
120
124
  onEventClick: this._options.onEventClick,
121
125
  onCiteClick: this._options.onCiteClick,
126
+ onQuizSubmit: this._options.onQuizSubmit, // ← add this
122
127
  };
123
128
 
124
129
  for (const block of this._doc.blocks) {