@vue-skuilder/db 0.2.1 → 0.2.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.
Files changed (44) hide show
  1. package/dist/{contentSource-Ht3N2f-y.d.ts → contentSource-Cplhv3bJ.d.ts} +1 -1
  2. package/dist/{contentSource-BMlMwSiG.d.cts → contentSource-kI9_jwTu.d.cts} +1 -1
  3. package/dist/core/index.d.cts +5 -5
  4. package/dist/core/index.d.ts +5 -5
  5. package/dist/core/index.js +76 -21
  6. package/dist/core/index.js.map +1 -1
  7. package/dist/core/index.mjs +76 -21
  8. package/dist/core/index.mjs.map +1 -1
  9. package/dist/{dataLayerProvider-BEqB8VBR.d.cts → dataLayerProvider-CiA2Rr0v.d.cts} +1 -1
  10. package/dist/{dataLayerProvider-DObSXjnf.d.ts → dataLayerProvider-DrBqOUa3.d.ts} +1 -1
  11. package/dist/impl/couch/index.d.cts +35 -3
  12. package/dist/impl/couch/index.d.ts +35 -3
  13. package/dist/impl/couch/index.js +76 -21
  14. package/dist/impl/couch/index.js.map +1 -1
  15. package/dist/impl/couch/index.mjs +76 -21
  16. package/dist/impl/couch/index.mjs.map +1 -1
  17. package/dist/impl/static/index.d.cts +4 -4
  18. package/dist/impl/static/index.d.ts +4 -4
  19. package/dist/impl/static/index.js +4 -5
  20. package/dist/impl/static/index.js.map +1 -1
  21. package/dist/impl/static/index.mjs +4 -5
  22. package/dist/impl/static/index.mjs.map +1 -1
  23. package/dist/{index-BWvO-_rJ.d.ts → index-BLLT5BYE.d.ts} +1 -1
  24. package/dist/{index-Ba7hYbHj.d.cts → index-k9NFHpS1.d.cts} +1 -1
  25. package/dist/index.d.cts +164 -10
  26. package/dist/index.d.ts +164 -10
  27. package/dist/index.js +215 -28
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +215 -28
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/{types-W8n-B6HG.d.cts → types-BFUa1pa3.d.cts} +1 -1
  32. package/dist/{types-CJrLM1Ew.d.ts → types-CHgpWQAY.d.ts} +1 -1
  33. package/dist/{types-legacy-JXDxinpU.d.cts → types-legacy-4tlwHnXo.d.cts} +1 -1
  34. package/dist/{types-legacy-JXDxinpU.d.ts → types-legacy-4tlwHnXo.d.ts} +1 -1
  35. package/dist/util/packer/index.d.cts +3 -3
  36. package/dist/util/packer/index.d.ts +3 -3
  37. package/docs/session-lifecycle-and-replan.md +418 -0
  38. package/package.json +3 -3
  39. package/src/core/navigators/Pipeline.ts +5 -1
  40. package/src/core/navigators/generators/elo.ts +19 -6
  41. package/src/core/navigators/generators/srs.ts +10 -0
  42. package/src/impl/couch/courseDB.ts +146 -17
  43. package/src/study/SessionController.ts +295 -13
  44. package/src/study/services/CardHydrationService.ts +24 -0
@@ -1,8 +1,8 @@
1
- import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-BMlMwSiG.cjs';
2
- import { D as DataLayerProvider } from '../../dataLayerProvider-BEqB8VBR.cjs';
3
- import { S as StaticCourseManifest } from '../../types-W8n-B6HG.cjs';
1
+ import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-kI9_jwTu.cjs';
2
+ import { D as DataLayerProvider } from '../../dataLayerProvider-CiA2Rr0v.cjs';
3
+ import { S as StaticCourseManifest } from '../../types-BFUa1pa3.cjs';
4
4
  import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
5
- import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-JXDxinpU.cjs';
5
+ import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-4tlwHnXo.cjs';
6
6
  import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.cjs';
7
7
  import 'moment';
8
8
 
@@ -1,8 +1,8 @@
1
- import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-Ht3N2f-y.js';
2
- import { D as DataLayerProvider } from '../../dataLayerProvider-DObSXjnf.js';
3
- import { S as StaticCourseManifest } from '../../types-CJrLM1Ew.js';
1
+ import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, R as ReplanHints, G as GeneratorResult } from '../../contentSource-Cplhv3bJ.js';
2
+ import { D as DataLayerProvider } from '../../dataLayerProvider-DrBqOUa3.js';
3
+ import { S as StaticCourseManifest } from '../../types-CHgpWQAY.js';
4
4
  import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
5
- import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-JXDxinpU.js';
5
+ import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-4tlwHnXo.js';
6
6
  import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.js';
7
7
  import 'moment';
8
8
 
@@ -1632,10 +1632,8 @@ var init_elo = __esm({
1632
1632
  { limit, elo: "user" },
1633
1633
  (c) => !activeCards.some((ac) => c.cardID === ac.cardID)
1634
1634
  )).map((c) => ({ ...c, status: "new" }));
1635
- const cardIds = newCards.map((c) => c.cardID);
1636
- const cardEloData = await this.course.getCardEloData(cardIds);
1637
- const scored = newCards.map((c, i) => {
1638
- const cardElo = cardEloData[i]?.global?.score ?? 1e3;
1635
+ const scored = newCards.map((c) => {
1636
+ const cardElo = c.elo ?? 1e3;
1639
1637
  const distance = Math.abs(cardElo - userGlobalElo);
1640
1638
  const rawScore = Math.max(0, 1 - distance / 500);
1641
1639
  const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
@@ -3613,7 +3611,8 @@ var init_orchestration = __esm({
3613
3611
  // src/core/navigators/Pipeline.ts
3614
3612
  var Pipeline_exports = {};
3615
3613
  __export(Pipeline_exports, {
3616
- Pipeline: () => Pipeline
3614
+ Pipeline: () => Pipeline,
3615
+ mergeHints: () => mergeHints2
3617
3616
  });
3618
3617
  function globToRegex(pattern) {
3619
3618
  const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, "\\$&");