@vue-skuilder/common-ui 0.1.33 → 0.1.34
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/assets/index.css +1 -1
- package/dist/common-ui.es.js +6 -3
- package/dist/common-ui.es.js.map +1 -1
- package/dist/common-ui.umd.js +3 -3
- package/dist/common-ui.umd.js.map +1 -1
- package/dist/components/StudySession.types.d.ts +11 -0
- package/dist/components/StudySession.types.d.ts.map +1 -1
- package/dist/components/StudySession.vue.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/StudySession.types.ts +12 -0
- package/src/components/StudySession.vue +15 -3
|
@@ -17,6 +17,17 @@ export type StudySessionConfig = {
|
|
|
17
17
|
* Default (when omitted): 20
|
|
18
18
|
*/
|
|
19
19
|
defaultBatchLimit?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Maximum number of reviews enqueued at session start.
|
|
22
|
+
*
|
|
23
|
+
* Reviews live outside the replan flow — they're loaded once at session
|
|
24
|
+
* setup and drain via consumption (no mid-session refill). The session
|
|
25
|
+
* timer caps total exposure, so overfilling is intentional.
|
|
26
|
+
*
|
|
27
|
+
* Default (when omitted): 200, generous enough for Anki-style power
|
|
28
|
+
* users. Apps targeting short, nimble sessions should set this lower.
|
|
29
|
+
*/
|
|
30
|
+
initialReviewCap?: number;
|
|
20
31
|
/**
|
|
21
32
|
* Optional hints to apply to the very first pipeline run (session init).
|
|
22
33
|
* Uses the same format as `ReplanOptions.hints` — boost/exclude/require tags.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StudySession.types.d.ts","sourceRoot":"","sources":["../../src/components/StudySession.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,YAAY,GAAG,YAAY,CAAC;AAElF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"StudySession.types.d.ts","sourceRoot":"","sources":["../../src/components/StudySession.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,YAAY,GAAG,YAAY,CAAC;AAElF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StudySession.vue.d.ts","sourceRoot":"","sources":["../../src/components/StudySession.vue"],"names":[],"mappings":"AAiFA;AAAA,
|
|
1
|
+
{"version":3,"file":"StudySession.vue.d.ts","sourceRoot":"","sources":["../../src/components/StudySession.vue"],"names":[],"mappings":"AAiFA;AAAA,OAmzBO,EAAE,eAAe,EAAW,QAAQ,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAM/C,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAGxD,OAAO,EAAE,SAAS,EAAuB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EACL,WAAW,EACX,UAAU,EAEV,eAAe,EACf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AM,WAAW,MAAM,GAAG,MAAM;0BAI9B,aAAa,KAAK,UAAU;6BAiF/B,cAAc;;qBAsDhB,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;mBAO/C,YAAY,GAAG,IAAI;;;;;;;cAjdvB,QAAQ,CAAC,eAAe,EAAE,CAAC;;;;cAI1B,QAAQ,CAAC,eAAe,CAAC;;;;cAIzB,QAAQ,CAAC,iBAAiB,CAAC;;;;cAI3B,QAAQ,CAAC,kBAAkB,CAAC;;;;;;cAI1B,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,aAAa,CAAC;;;;;;;;;;;;cAY7C,QAAQ,CAAC,oBAAoB,GAAG,MAAM,CAAC;;;;cAIvC,QAAQ,CAAC,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnDlD,wBA+gBG"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.34",
|
|
7
7
|
"main": "./dist/common-ui.umd.js",
|
|
8
8
|
"module": "./dist/common-ui.es.js",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@highlightjs/vue-plugin": "^2.1.2",
|
|
34
34
|
"@mdi/font": "^7.3.67",
|
|
35
35
|
"@vojtechlanka/vue-tags-input": "^3",
|
|
36
|
-
"@vue-skuilder/common": "0.1.
|
|
37
|
-
"@vue-skuilder/db": "0.1.
|
|
36
|
+
"@vue-skuilder/common": "0.1.34",
|
|
37
|
+
"@vue-skuilder/db": "0.1.34",
|
|
38
38
|
"highlight.js": "^11.0.1",
|
|
39
39
|
"marked": "^15.0.6",
|
|
40
40
|
"moment": "^2.29.4",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
59
59
|
"@vue/eslint-config-typescript": "^14.4.0",
|
|
60
60
|
"@vue/test-utils": "^2.4.6",
|
|
61
|
-
"cypress": "^15.
|
|
61
|
+
"cypress": "^15.14.0",
|
|
62
62
|
"cypress-vite": "^1.6.0",
|
|
63
63
|
"eslint": "^9.21.0",
|
|
64
64
|
"eslint-config-prettier": "^10.0.2",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"vite-plugin-dts": "^4.5.3",
|
|
71
71
|
"vitest": "^4.1.0"
|
|
72
72
|
},
|
|
73
|
-
"stableVersion": "0.1.
|
|
73
|
+
"stableVersion": "0.1.34"
|
|
74
74
|
}
|
|
@@ -19,6 +19,18 @@ export type StudySessionConfig = {
|
|
|
19
19
|
*/
|
|
20
20
|
defaultBatchLimit?: number;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Maximum number of reviews enqueued at session start.
|
|
24
|
+
*
|
|
25
|
+
* Reviews live outside the replan flow — they're loaded once at session
|
|
26
|
+
* setup and drain via consumption (no mid-session refill). The session
|
|
27
|
+
* timer caps total exposure, so overfilling is intentional.
|
|
28
|
+
*
|
|
29
|
+
* Default (when omitted): 200, generous enough for Anki-style power
|
|
30
|
+
* users. Apps targeting short, nimble sessions should set this lower.
|
|
31
|
+
*/
|
|
32
|
+
initialReviewCap?: number;
|
|
33
|
+
|
|
22
34
|
/**
|
|
23
35
|
* Optional hints to apply to the very first pipeline run (session init).
|
|
24
36
|
* Uses the same format as `ReplanOptions.hints` — boost/exclude/require tags.
|
|
@@ -262,6 +262,14 @@ export default defineComponent({
|
|
|
262
262
|
console.log('[StudySession] InitSession completed in created hook');
|
|
263
263
|
},
|
|
264
264
|
|
|
265
|
+
errorCaptured(err: unknown, _instance: unknown, info: string) {
|
|
266
|
+
console.error(`[StudySession] Card render error (${info}), skipping card "${this.cardID}":`, err);
|
|
267
|
+
if (this.sessionController) {
|
|
268
|
+
void this.sessionController.nextCard().then((card) => this.loadCard(card));
|
|
269
|
+
}
|
|
270
|
+
return false; // prevent propagation
|
|
271
|
+
},
|
|
272
|
+
|
|
265
273
|
methods: {
|
|
266
274
|
/**
|
|
267
275
|
* Handle a `ready-to-advance` event from a card view that previously
|
|
@@ -377,9 +385,13 @@ export default defineComponent({
|
|
|
377
385
|
// db.setChangeFcn(this.handleClassroomMessage());
|
|
378
386
|
});
|
|
379
387
|
|
|
380
|
-
const scOptions
|
|
381
|
-
|
|
382
|
-
|
|
388
|
+
const scOptions: { defaultBatchLimit?: number; initialReviewCap?: number } = {};
|
|
389
|
+
if (this.sessionConfig?.defaultBatchLimit !== undefined) {
|
|
390
|
+
scOptions.defaultBatchLimit = this.sessionConfig.defaultBatchLimit;
|
|
391
|
+
}
|
|
392
|
+
if (this.sessionConfig?.initialReviewCap !== undefined) {
|
|
393
|
+
scOptions.initialReviewCap = this.sessionConfig.initialReviewCap;
|
|
394
|
+
}
|
|
383
395
|
|
|
384
396
|
this.sessionController = markRaw(
|
|
385
397
|
new SessionController<ViewComponent>(
|