@vue-skuilder/db 0.1.30 → 0.1.31-a

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.
@@ -1,4 +1,4 @@
1
- import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-B7nXusjk.cjs';
1
+ import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-DfBbaLA-.cjs';
2
2
 
3
3
  /**
4
4
  * Main factory interface for data access
@@ -1,4 +1,4 @@
1
- import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-ygoFw9oV.js';
1
+ import { U as UserDBInterface, a as UserDBReader, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface } from './contentSource-BmnmvH8C.js';
2
2
 
3
3
  /**
4
4
  * Main factory interface for data access
@@ -1,7 +1,7 @@
1
1
  import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-JXDxinpU.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-B7nXusjk.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-B7nXusjk.cjs';
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-DfBbaLA-.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-DfBbaLA-.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';
@@ -1,7 +1,7 @@
1
1
  import { T as TagStub, a as Tag, S as SkuilderCourseData, Q as QualifiedCardID } from '../../types-legacy-JXDxinpU.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-ygoFw9oV.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-ygoFw9oV.js';
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-BmnmvH8C.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-BmnmvH8C.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';
@@ -1153,19 +1153,20 @@ var init_elo = __esm({
1153
1153
  const scored = newCards.map((c, i) => {
1154
1154
  const cardElo = cardEloData[i]?.global?.score ?? 1e3;
1155
1155
  const distance = Math.abs(cardElo - userGlobalElo);
1156
- const score = Math.max(0, 1 - distance / 500);
1156
+ const rawScore = Math.max(0, 1 - distance / 500);
1157
+ const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
1157
1158
  return {
1158
1159
  cardId: c.cardID,
1159
1160
  courseId: c.courseID,
1160
- score,
1161
+ score: samplingKey,
1161
1162
  provenance: [
1162
1163
  {
1163
1164
  strategy: "elo",
1164
1165
  strategyName: this.strategyName || this.name,
1165
1166
  strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
1166
1167
  action: "generated",
1167
- score,
1168
- reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), new card`
1168
+ score: samplingKey,
1169
+ reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), raw ${rawScore.toFixed(3)}, key ${samplingKey.toFixed(3)}`
1169
1170
  }
1170
1171
  ]
1171
1172
  };
@@ -2858,7 +2859,6 @@ __export(navigators_exports, {
2858
2859
  getCardOrigin: () => getCardOrigin,
2859
2860
  getRegisteredNavigator: () => getRegisteredNavigator,
2860
2861
  getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
2861
- getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
2862
2862
  hasRegisteredNavigator: () => hasRegisteredNavigator,
2863
2863
  initializeNavigatorRegistry: () => initializeNavigatorRegistry,
2864
2864
  isFilter: () => isFilter,
@@ -2867,19 +2867,16 @@ __export(navigators_exports, {
2867
2867
  pipelineDebugAPI: () => pipelineDebugAPI,
2868
2868
  registerNavigator: () => registerNavigator
2869
2869
  });
2870
- function registerNavigator(implementingClass, constructor, role) {
2871
- navigatorRegistry.set(implementingClass, { constructor, role });
2872
- logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}${role ? ` (${role})` : ""}`);
2870
+ function registerNavigator(implementingClass, constructor) {
2871
+ navigatorRegistry.set(implementingClass, constructor);
2872
+ logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
2873
2873
  }
2874
2874
  function getRegisteredNavigator(implementingClass) {
2875
- return navigatorRegistry.get(implementingClass)?.constructor;
2875
+ return navigatorRegistry.get(implementingClass);
2876
2876
  }
2877
2877
  function hasRegisteredNavigator(implementingClass) {
2878
2878
  return navigatorRegistry.has(implementingClass);
2879
2879
  }
2880
- function getRegisteredNavigatorRole(implementingClass) {
2881
- return navigatorRegistry.get(implementingClass)?.role;
2882
- }
2883
2880
  function getRegisteredNavigatorNames() {
2884
2881
  return Array.from(navigatorRegistry.keys());
2885
2882
  }
@@ -2925,12 +2922,10 @@ function getCardOrigin(card) {
2925
2922
  return "new";
2926
2923
  }
2927
2924
  function isGenerator(impl) {
2928
- if (NavigatorRoles[impl] === "generator" /* GENERATOR */) return true;
2929
- return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
2925
+ return NavigatorRoles[impl] === "generator" /* GENERATOR */;
2930
2926
  }
2931
2927
  function isFilter(impl) {
2932
- if (NavigatorRoles[impl] === "filter" /* FILTER */) return true;
2933
- return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
2928
+ return NavigatorRoles[impl] === "filter" /* FILTER */;
2934
2929
  }
2935
2930
  var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
2936
2931
  var init_navigators = __esm({