@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.
- package/dist/{contentSource-ygoFw9oV.d.ts → contentSource-BmnmvH8C.d.ts} +4 -19
- package/dist/{contentSource-B7nXusjk.d.cts → contentSource-DfBbaLA-.d.cts} +4 -19
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +11 -18
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +11 -17
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BW7HvkMt.d.cts → dataLayerProvider-BeRXVMs5.d.cts} +1 -1
- package/dist/{dataLayerProvider-BfXUVDuG.d.ts → dataLayerProvider-CG9GfaAY.d.ts} +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +11 -16
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +11 -16
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +11 -16
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +11 -16
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -17
- package/dist/index.mjs.map +1 -1
- package/docs/navigators-architecture.md +5 -64
- package/package.json +3 -3
- package/src/core/navigators/generators/elo.ts +17 -6
- package/src/core/navigators/index.ts +10 -43
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UserDBInterface, s as CourseRegistrationDoc, S as StudySessionItem, W as WeightedCard, h as StudyContentSource, C as CourseDBInterface } from './contentSource-
|
|
2
|
-
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, b as CoursesDBInterface,
|
|
3
|
-
import { D as DataLayerProvider } from './dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, s as CourseRegistrationDoc, S as StudySessionItem, W as WeightedCard, h as StudyContentSource, C as CourseDBInterface } from './contentSource-DfBbaLA-.cjs';
|
|
2
|
+
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, b as CoursesDBInterface, a7 as DocumentUpdater, a1 as LearnableWeight, N as NavigatorConstructor, Z as NavigatorRole, _ as NavigatorRoles, Y as Navigators, a2 as OrchestrationContext, j as ScheduledCard, H as SessionTrackingData, V as StrategyContribution, i as StudentClassroomDBInterface, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, L as UserOutcomeRecord, B as UsrCrsDataInterface, a3 as computeDeviation, a5 as computeEffectiveWeight, a4 as computeSpread, a6 as createOrchestrationContext, X as getCardOrigin, O as getRegisteredNavigator, Q as getRegisteredNavigatorNames, r as getStudySource, P as hasRegisteredNavigator, R as initializeNavigatorRegistry, a0 as isFilter, $ as isGenerator, p as isReview, a8 as newInterval, M as registerNavigator } from './contentSource-DfBbaLA-.cjs';
|
|
3
|
+
import { D as DataLayerProvider } from './dataLayerProvider-BeRXVMs5.cjs';
|
|
4
4
|
import { C as CardHistory, c as CardRecord } from './types-legacy-JXDxinpU.cjs';
|
|
5
5
|
export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, D as DocType, b as DocTypePrefixes, F as Field, G as GuestUsername, Q as QualifiedCardID, h as QuestionData, i as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-JXDxinpU.cjs';
|
|
6
6
|
import { Loggable } from './core/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UserDBInterface, s as CourseRegistrationDoc, S as StudySessionItem, W as WeightedCard, h as StudyContentSource, C as CourseDBInterface } from './contentSource-
|
|
2
|
-
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, b as CoursesDBInterface,
|
|
3
|
-
import { D as DataLayerProvider } from './dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, s as CourseRegistrationDoc, S as StudySessionItem, W as WeightedCard, h as StudyContentSource, C as CourseDBInterface } from './contentSource-BmnmvH8C.js';
|
|
2
|
+
export { J as ActivityRecord, A as AdminDBInterface, v as AssignedCard, g as AssignedContent, u as AssignedCourse, t as AssignedTag, c as ClassroomDBInterface, F as ClassroomRegistration, E as ClassroomRegistrationDesignation, G as ClassroomRegistrationDoc, e as ContentNavigationStrategyData, f as ContentNavigator, q as ContentSourceID, d as CourseInfo, K as CourseRegistration, b as CoursesDBInterface, a7 as DocumentUpdater, a1 as LearnableWeight, N as NavigatorConstructor, Z as NavigatorRole, _ as NavigatorRoles, Y as Navigators, a2 as OrchestrationContext, j as ScheduledCard, H as SessionTrackingData, V as StrategyContribution, i as StudentClassroomDBInterface, k as StudySessionFailedItem, l as StudySessionFailedNewItem, m as StudySessionFailedReviewItem, n as StudySessionNewItem, o as StudySessionReviewItem, T as TeacherClassroomDBInterface, I as UserConfig, z as UserCourseSetting, y as UserCourseSettings, x as UserDBAuthenticator, a as UserDBReader, w as UserDBWriter, L as UserOutcomeRecord, B as UsrCrsDataInterface, a3 as computeDeviation, a5 as computeEffectiveWeight, a4 as computeSpread, a6 as createOrchestrationContext, X as getCardOrigin, O as getRegisteredNavigator, Q as getRegisteredNavigatorNames, r as getStudySource, P as hasRegisteredNavigator, R as initializeNavigatorRegistry, a0 as isFilter, $ as isGenerator, p as isReview, a8 as newInterval, M as registerNavigator } from './contentSource-BmnmvH8C.js';
|
|
3
|
+
import { D as DataLayerProvider } from './dataLayerProvider-CG9GfaAY.js';
|
|
4
4
|
import { C as CardHistory, c as CardRecord } from './types-legacy-JXDxinpU.js';
|
|
5
5
|
export { d as CardData, e as CourseListData, g as DataShapeData, f as DisplayableData, D as DocType, b as DocTypePrefixes, F as Field, G as GuestUsername, Q as QualifiedCardID, h as QuestionData, i as QuestionRecord, S as SkuilderCourseData, a as Tag, T as TagStub, l as log } from './types-legacy-JXDxinpU.js';
|
|
6
6
|
import { Loggable } from './core/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1382,19 +1382,20 @@ var init_elo = __esm({
|
|
|
1382
1382
|
const scored = newCards.map((c, i) => {
|
|
1383
1383
|
const cardElo = cardEloData[i]?.global?.score ?? 1e3;
|
|
1384
1384
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1385
|
-
const
|
|
1385
|
+
const rawScore = Math.max(0, 1 - distance / 500);
|
|
1386
|
+
const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
|
|
1386
1387
|
return {
|
|
1387
1388
|
cardId: c.cardID,
|
|
1388
1389
|
courseId: c.courseID,
|
|
1389
|
-
score,
|
|
1390
|
+
score: samplingKey,
|
|
1390
1391
|
provenance: [
|
|
1391
1392
|
{
|
|
1392
1393
|
strategy: "elo",
|
|
1393
1394
|
strategyName: this.strategyName || this.name,
|
|
1394
1395
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1395
1396
|
action: "generated",
|
|
1396
|
-
score,
|
|
1397
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1397
|
+
score: samplingKey,
|
|
1398
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), raw ${rawScore.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1398
1399
|
}
|
|
1399
1400
|
]
|
|
1400
1401
|
};
|
|
@@ -3333,7 +3334,6 @@ __export(navigators_exports, {
|
|
|
3333
3334
|
getCardOrigin: () => getCardOrigin,
|
|
3334
3335
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
3335
3336
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
3336
|
-
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
3337
3337
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
3338
3338
|
initializeNavigatorRegistry: () => initializeNavigatorRegistry,
|
|
3339
3339
|
isFilter: () => isFilter,
|
|
@@ -3342,19 +3342,16 @@ __export(navigators_exports, {
|
|
|
3342
3342
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
3343
3343
|
registerNavigator: () => registerNavigator
|
|
3344
3344
|
});
|
|
3345
|
-
function registerNavigator(implementingClass, constructor
|
|
3346
|
-
navigatorRegistry.set(implementingClass,
|
|
3347
|
-
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}
|
|
3345
|
+
function registerNavigator(implementingClass, constructor) {
|
|
3346
|
+
navigatorRegistry.set(implementingClass, constructor);
|
|
3347
|
+
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
|
|
3348
3348
|
}
|
|
3349
3349
|
function getRegisteredNavigator(implementingClass) {
|
|
3350
|
-
return navigatorRegistry.get(implementingClass)
|
|
3350
|
+
return navigatorRegistry.get(implementingClass);
|
|
3351
3351
|
}
|
|
3352
3352
|
function hasRegisteredNavigator(implementingClass) {
|
|
3353
3353
|
return navigatorRegistry.has(implementingClass);
|
|
3354
3354
|
}
|
|
3355
|
-
function getRegisteredNavigatorRole(implementingClass) {
|
|
3356
|
-
return navigatorRegistry.get(implementingClass)?.role;
|
|
3357
|
-
}
|
|
3358
3355
|
function getRegisteredNavigatorNames() {
|
|
3359
3356
|
return Array.from(navigatorRegistry.keys());
|
|
3360
3357
|
}
|
|
@@ -3400,12 +3397,10 @@ function getCardOrigin(card) {
|
|
|
3400
3397
|
return "new";
|
|
3401
3398
|
}
|
|
3402
3399
|
function isGenerator(impl) {
|
|
3403
|
-
|
|
3404
|
-
return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
|
|
3400
|
+
return NavigatorRoles[impl] === "generator" /* GENERATOR */;
|
|
3405
3401
|
}
|
|
3406
3402
|
function isFilter(impl) {
|
|
3407
|
-
|
|
3408
|
-
return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
|
|
3403
|
+
return NavigatorRoles[impl] === "filter" /* FILTER */;
|
|
3409
3404
|
}
|
|
3410
3405
|
var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
|
|
3411
3406
|
var init_navigators = __esm({
|
|
@@ -8004,7 +7999,6 @@ __export(index_exports, {
|
|
|
8004
7999
|
getDefaultLearnableWeight: () => getDefaultLearnableWeight,
|
|
8005
8000
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
8006
8001
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
8007
|
-
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
8008
8002
|
getStudySource: () => getStudySource,
|
|
8009
8003
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
8010
8004
|
importParsedCards: () => importParsedCards,
|
|
@@ -11672,7 +11666,6 @@ init_factory();
|
|
|
11672
11666
|
getDefaultLearnableWeight,
|
|
11673
11667
|
getRegisteredNavigator,
|
|
11674
11668
|
getRegisteredNavigatorNames,
|
|
11675
|
-
getRegisteredNavigatorRole,
|
|
11676
11669
|
getStudySource,
|
|
11677
11670
|
hasRegisteredNavigator,
|
|
11678
11671
|
importParsedCards,
|