@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.mjs
CHANGED
|
@@ -1359,19 +1359,20 @@ var init_elo = __esm({
|
|
|
1359
1359
|
const scored = newCards.map((c, i) => {
|
|
1360
1360
|
const cardElo = cardEloData[i]?.global?.score ?? 1e3;
|
|
1361
1361
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1362
|
-
const
|
|
1362
|
+
const rawScore = Math.max(0, 1 - distance / 500);
|
|
1363
|
+
const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
|
|
1363
1364
|
return {
|
|
1364
1365
|
cardId: c.cardID,
|
|
1365
1366
|
courseId: c.courseID,
|
|
1366
|
-
score,
|
|
1367
|
+
score: samplingKey,
|
|
1367
1368
|
provenance: [
|
|
1368
1369
|
{
|
|
1369
1370
|
strategy: "elo",
|
|
1370
1371
|
strategyName: this.strategyName || this.name,
|
|
1371
1372
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1372
1373
|
action: "generated",
|
|
1373
|
-
score,
|
|
1374
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1374
|
+
score: samplingKey,
|
|
1375
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), raw ${rawScore.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1375
1376
|
}
|
|
1376
1377
|
]
|
|
1377
1378
|
};
|
|
@@ -3310,7 +3311,6 @@ __export(navigators_exports, {
|
|
|
3310
3311
|
getCardOrigin: () => getCardOrigin,
|
|
3311
3312
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
3312
3313
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
3313
|
-
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
3314
3314
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
3315
3315
|
initializeNavigatorRegistry: () => initializeNavigatorRegistry,
|
|
3316
3316
|
isFilter: () => isFilter,
|
|
@@ -3319,19 +3319,16 @@ __export(navigators_exports, {
|
|
|
3319
3319
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
3320
3320
|
registerNavigator: () => registerNavigator
|
|
3321
3321
|
});
|
|
3322
|
-
function registerNavigator(implementingClass, constructor
|
|
3323
|
-
navigatorRegistry.set(implementingClass,
|
|
3324
|
-
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}
|
|
3322
|
+
function registerNavigator(implementingClass, constructor) {
|
|
3323
|
+
navigatorRegistry.set(implementingClass, constructor);
|
|
3324
|
+
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
|
|
3325
3325
|
}
|
|
3326
3326
|
function getRegisteredNavigator(implementingClass) {
|
|
3327
|
-
return navigatorRegistry.get(implementingClass)
|
|
3327
|
+
return navigatorRegistry.get(implementingClass);
|
|
3328
3328
|
}
|
|
3329
3329
|
function hasRegisteredNavigator(implementingClass) {
|
|
3330
3330
|
return navigatorRegistry.has(implementingClass);
|
|
3331
3331
|
}
|
|
3332
|
-
function getRegisteredNavigatorRole(implementingClass) {
|
|
3333
|
-
return navigatorRegistry.get(implementingClass)?.role;
|
|
3334
|
-
}
|
|
3335
3332
|
function getRegisteredNavigatorNames() {
|
|
3336
3333
|
return Array.from(navigatorRegistry.keys());
|
|
3337
3334
|
}
|
|
@@ -3377,12 +3374,10 @@ function getCardOrigin(card) {
|
|
|
3377
3374
|
return "new";
|
|
3378
3375
|
}
|
|
3379
3376
|
function isGenerator(impl) {
|
|
3380
|
-
|
|
3381
|
-
return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
|
|
3377
|
+
return NavigatorRoles[impl] === "generator" /* GENERATOR */;
|
|
3382
3378
|
}
|
|
3383
3379
|
function isFilter(impl) {
|
|
3384
|
-
|
|
3385
|
-
return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
|
|
3380
|
+
return NavigatorRoles[impl] === "filter" /* FILTER */;
|
|
3386
3381
|
}
|
|
3387
3382
|
var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
|
|
3388
3383
|
var init_navigators = __esm({
|
|
@@ -11569,7 +11564,6 @@ export {
|
|
|
11569
11564
|
getDefaultLearnableWeight,
|
|
11570
11565
|
getRegisteredNavigator,
|
|
11571
11566
|
getRegisteredNavigatorNames,
|
|
11572
|
-
getRegisteredNavigatorRole,
|
|
11573
11567
|
getStudySource,
|
|
11574
11568
|
hasRegisteredNavigator,
|
|
11575
11569
|
importParsedCards,
|