@vue-skuilder/db 0.1.32-a → 0.1.32-c

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 (51) hide show
  1. package/dist/core/index.d.cts +16 -12
  2. package/dist/core/index.d.ts +16 -12
  3. package/dist/core/index.js +2279 -227
  4. package/dist/core/index.js.map +1 -1
  5. package/dist/core/index.mjs +2256 -200
  6. package/dist/core/index.mjs.map +1 -1
  7. package/dist/{contentSource-Bdwkvqa8.d.ts → dataLayerProvider-BAn-LRh5.d.ts} +626 -83
  8. package/dist/{contentSource-DF1nUbPQ.d.cts → dataLayerProvider-BJqBlMIl.d.cts} +626 -83
  9. package/dist/impl/couch/index.d.cts +18 -3
  10. package/dist/impl/couch/index.d.ts +18 -3
  11. package/dist/impl/couch/index.js +2323 -224
  12. package/dist/impl/couch/index.js.map +1 -1
  13. package/dist/impl/couch/index.mjs +2311 -208
  14. package/dist/impl/couch/index.mjs.map +1 -1
  15. package/dist/impl/static/index.d.cts +5 -4
  16. package/dist/impl/static/index.d.ts +5 -4
  17. package/dist/impl/static/index.js +2283 -231
  18. package/dist/impl/static/index.js.map +1 -1
  19. package/dist/impl/static/index.mjs +2268 -212
  20. package/dist/impl/static/index.mjs.map +1 -1
  21. package/dist/{index-BWvO-_rJ.d.ts → index-X6wHrURm.d.ts} +1 -1
  22. package/dist/{index-Ba7hYbHj.d.cts → index-m8MMGxxR.d.cts} +1 -1
  23. package/dist/index.d.cts +9 -381
  24. package/dist/index.d.ts +9 -381
  25. package/dist/index.js +9626 -8815
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +9559 -8748
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/{types-CJrLM1Ew.d.ts → types-DZ5dUqbL.d.ts} +1 -1
  30. package/dist/{types-W8n-B6HG.d.cts → types-ZL8tOPQZ.d.cts} +1 -1
  31. package/dist/{types-legacy-JXDxinpU.d.cts → types-legacy-C7r0T4OV.d.cts} +1 -1
  32. package/dist/{types-legacy-JXDxinpU.d.ts → types-legacy-C7r0T4OV.d.ts} +1 -1
  33. package/dist/util/packer/index.d.cts +3 -3
  34. package/dist/util/packer/index.d.ts +3 -3
  35. package/docs/navigators-architecture.md +2 -2
  36. package/package.json +2 -2
  37. package/src/core/interfaces/contentSource.ts +2 -1
  38. package/src/core/navigators/Pipeline.ts +51 -25
  39. package/src/core/navigators/PipelineDebugger.ts +49 -1
  40. package/src/core/navigators/filters/hierarchyDefinition.ts +92 -5
  41. package/src/core/navigators/filters/relativePriority.ts +7 -1
  42. package/src/core/navigators/generators/prescribed.ts +618 -43
  43. package/src/core/navigators/index.ts +2 -1
  44. package/src/impl/couch/CourseSyncService.ts +72 -4
  45. package/src/impl/couch/courseDB.ts +11 -0
  46. package/src/impl/static/courseDB.ts +13 -0
  47. package/src/study/SessionController.ts +276 -24
  48. package/src/study/services/EloService.ts +22 -3
  49. package/src/study/services/ResponseProcessor.ts +7 -3
  50. package/dist/dataLayerProvider-BKmVoyJR.d.ts +0 -67
  51. package/dist/dataLayerProvider-BQdfJuBN.d.cts +0 -67
@@ -1,7 +1,7 @@
1
- import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-JXDxinpU.cjs';
1
+ import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-C7r0T4OV.cjs';
2
2
  import { Moment } from 'moment';
3
- import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, W as WeightedCard, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, S as StudySessionItem, j as ScheduledCard } from '../../contentSource-DF1nUbPQ.cjs';
4
- export { q as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, r as getStudySource, p as isReview } from '../../contentSource-DF1nUbPQ.cjs';
3
+ import { A as AdminDBInterface, h as AssignedContent, i as StudyContentSource, j as StudentClassroomDBInterface, U as UserDBInterface, W as WeightedCard, T as TeacherClassroomDBInterface, a as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, e as DataLayerResult, f as ContentNavigationStrategyData, g as ContentNavigator, R as ReplanHints, S as StudySessionItem, k as ScheduledCard } from '../../dataLayerProvider-BJqBlMIl.cjs';
4
+ export { r as ContentSourceID, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, o as StudySessionNewItem, p as StudySessionReviewItem, s as getStudySource, q as isReview } from '../../dataLayerProvider-BJqBlMIl.cjs';
5
5
  import * as _vue_skuilder_common from '@vue-skuilder/common';
6
6
  import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
7
7
  import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.cjs';
@@ -278,6 +278,8 @@ declare class CourseDB implements CourseDBInterface {
278
278
  * @param limit - Maximum number of cards to return
279
279
  * @returns Cards sorted by score descending
280
280
  */
281
+ private _pendingHints;
282
+ setEphemeralHints(hints: ReplanHints): void;
281
283
  getWeightedCards(limit: number): Promise<WeightedCard[]>;
282
284
  getCardsCenteredAtELO(options?: {
283
285
  limit: number;
@@ -410,6 +412,19 @@ declare class CourseSyncService {
410
412
  * (during a loading phase) rather than on first pipeline query.
411
413
  */
412
414
  private warmViewIndices;
415
+ /**
416
+ * Check whether the local replica's `db-epoch` doc matches the remote.
417
+ *
418
+ * The seed script (and optionally upload-cards) writes a `db-epoch`
419
+ * document with a numeric timestamp. If the remote epoch differs from
420
+ * the local copy, the remote DB was recreated (e.g., `yarn db:seed`)
421
+ * and the local PouchDB is stale.
422
+ *
423
+ * Returns `true` if stale (epoch mismatch or remote has epoch but local
424
+ * doesn't). Returns `false` (not stale) if epochs match, or if the
425
+ * remote doesn't have an epoch doc at all (backwards compat).
426
+ */
427
+ private isLocalEpochStale;
413
428
  /**
414
429
  * Get a remote PouchDB handle for a course.
415
430
  */
@@ -1,7 +1,7 @@
1
- import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-JXDxinpU.js';
1
+ import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-C7r0T4OV.js';
2
2
  import { Moment } from 'moment';
3
- import { A as AdminDBInterface, g as AssignedContent, h as StudyContentSource, i as StudentClassroomDBInterface, U as UserDBInterface, W as WeightedCard, T as TeacherClassroomDBInterface, b as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, S as StudySessionItem, j as ScheduledCard } from '../../contentSource-Bdwkvqa8.js';
4
- export { q as ContentSourceID, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, r as getStudySource, p as isReview } from '../../contentSource-Bdwkvqa8.js';
3
+ import { A as AdminDBInterface, h as AssignedContent, i as StudyContentSource, j as StudentClassroomDBInterface, U as UserDBInterface, W as WeightedCard, T as TeacherClassroomDBInterface, a as CoursesDBInterface, C as CourseDBInterface, d as CourseInfo, e as DataLayerResult, f as ContentNavigationStrategyData, g as ContentNavigator, R as ReplanHints, S as StudySessionItem, k as ScheduledCard } from '../../dataLayerProvider-BAn-LRh5.js';
4
+ export { r as ContentSourceID, l as StudySessionFailedItem, m as StudySessionFailedNewItem, n as StudySessionFailedReviewItem, o as StudySessionNewItem, p as StudySessionReviewItem, s as getStudySource, q as isReview } from '../../dataLayerProvider-BAn-LRh5.js';
5
5
  import * as _vue_skuilder_common from '@vue-skuilder/common';
6
6
  import { ClassroomConfig, DataShape, CourseElo, CourseConfig as CourseConfig$1 } from '@vue-skuilder/common';
7
7
  import { S as SyncStrategy, A as AccountCreationResult, a as AuthenticationResult } from '../../SyncStrategy-CyATpyLQ.js';
@@ -278,6 +278,8 @@ declare class CourseDB implements CourseDBInterface {
278
278
  * @param limit - Maximum number of cards to return
279
279
  * @returns Cards sorted by score descending
280
280
  */
281
+ private _pendingHints;
282
+ setEphemeralHints(hints: ReplanHints): void;
281
283
  getWeightedCards(limit: number): Promise<WeightedCard[]>;
282
284
  getCardsCenteredAtELO(options?: {
283
285
  limit: number;
@@ -410,6 +412,19 @@ declare class CourseSyncService {
410
412
  * (during a loading phase) rather than on first pipeline query.
411
413
  */
412
414
  private warmViewIndices;
415
+ /**
416
+ * Check whether the local replica's `db-epoch` doc matches the remote.
417
+ *
418
+ * The seed script (and optionally upload-cards) writes a `db-epoch`
419
+ * document with a numeric timestamp. If the remote epoch differs from
420
+ * the local copy, the remote DB was recreated (e.g., `yarn db:seed`)
421
+ * and the local PouchDB is stale.
422
+ *
423
+ * Returns `true` if stale (epoch mismatch or remote has epoch but local
424
+ * doesn't). Returns `false` (not stale) if epochs match, or if the
425
+ * remote doesn't have an epoch doc at all (backwards compat).
426
+ */
427
+ private isLocalEpochStale;
413
428
  /**
414
429
  * Get a remote PouchDB handle for a course.
415
430
  */