@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/core/index.mjs
CHANGED
|
@@ -1206,19 +1206,20 @@ var init_elo = __esm({
|
|
|
1206
1206
|
const scored = newCards.map((c, i) => {
|
|
1207
1207
|
const cardElo = cardEloData[i]?.global?.score ?? 1e3;
|
|
1208
1208
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1209
|
-
const
|
|
1209
|
+
const rawScore = Math.max(0, 1 - distance / 500);
|
|
1210
|
+
const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
|
|
1210
1211
|
return {
|
|
1211
1212
|
cardId: c.cardID,
|
|
1212
1213
|
courseId: c.courseID,
|
|
1213
|
-
score,
|
|
1214
|
+
score: samplingKey,
|
|
1214
1215
|
provenance: [
|
|
1215
1216
|
{
|
|
1216
1217
|
strategy: "elo",
|
|
1217
1218
|
strategyName: this.strategyName || this.name,
|
|
1218
1219
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1219
1220
|
action: "generated",
|
|
1220
|
-
score,
|
|
1221
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1221
|
+
score: samplingKey,
|
|
1222
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), raw ${rawScore.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1222
1223
|
}
|
|
1223
1224
|
]
|
|
1224
1225
|
};
|
|
@@ -3157,7 +3158,6 @@ __export(navigators_exports, {
|
|
|
3157
3158
|
getCardOrigin: () => getCardOrigin,
|
|
3158
3159
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
3159
3160
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
3160
|
-
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
3161
3161
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
3162
3162
|
initializeNavigatorRegistry: () => initializeNavigatorRegistry,
|
|
3163
3163
|
isFilter: () => isFilter,
|
|
@@ -3166,19 +3166,16 @@ __export(navigators_exports, {
|
|
|
3166
3166
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
3167
3167
|
registerNavigator: () => registerNavigator
|
|
3168
3168
|
});
|
|
3169
|
-
function registerNavigator(implementingClass, constructor
|
|
3170
|
-
navigatorRegistry.set(implementingClass,
|
|
3171
|
-
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}
|
|
3169
|
+
function registerNavigator(implementingClass, constructor) {
|
|
3170
|
+
navigatorRegistry.set(implementingClass, constructor);
|
|
3171
|
+
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
|
|
3172
3172
|
}
|
|
3173
3173
|
function getRegisteredNavigator(implementingClass) {
|
|
3174
|
-
return navigatorRegistry.get(implementingClass)
|
|
3174
|
+
return navigatorRegistry.get(implementingClass);
|
|
3175
3175
|
}
|
|
3176
3176
|
function hasRegisteredNavigator(implementingClass) {
|
|
3177
3177
|
return navigatorRegistry.has(implementingClass);
|
|
3178
3178
|
}
|
|
3179
|
-
function getRegisteredNavigatorRole(implementingClass) {
|
|
3180
|
-
return navigatorRegistry.get(implementingClass)?.role;
|
|
3181
|
-
}
|
|
3182
3179
|
function getRegisteredNavigatorNames() {
|
|
3183
3180
|
return Array.from(navigatorRegistry.keys());
|
|
3184
3181
|
}
|
|
@@ -3224,12 +3221,10 @@ function getCardOrigin(card) {
|
|
|
3224
3221
|
return "new";
|
|
3225
3222
|
}
|
|
3226
3223
|
function isGenerator(impl) {
|
|
3227
|
-
|
|
3228
|
-
return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
|
|
3224
|
+
return NavigatorRoles[impl] === "generator" /* GENERATOR */;
|
|
3229
3225
|
}
|
|
3230
3226
|
function isFilter(impl) {
|
|
3231
|
-
|
|
3232
|
-
return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
|
|
3227
|
+
return NavigatorRoles[impl] === "filter" /* FILTER */;
|
|
3233
3228
|
}
|
|
3234
3229
|
var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
|
|
3235
3230
|
var init_navigators = __esm({
|
|
@@ -6158,7 +6153,6 @@ export {
|
|
|
6158
6153
|
getDefaultLearnableWeight,
|
|
6159
6154
|
getRegisteredNavigator,
|
|
6160
6155
|
getRegisteredNavigatorNames,
|
|
6161
|
-
getRegisteredNavigatorRole,
|
|
6162
6156
|
getStudySource,
|
|
6163
6157
|
hasRegisteredNavigator,
|
|
6164
6158
|
importParsedCards,
|