@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
|
@@ -1008,19 +1008,20 @@ var init_elo = __esm({
|
|
|
1008
1008
|
const scored = newCards.map((c, i) => {
|
|
1009
1009
|
const cardElo = cardEloData[i]?.global?.score ?? 1e3;
|
|
1010
1010
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1011
|
-
const
|
|
1011
|
+
const rawScore = Math.max(0, 1 - distance / 500);
|
|
1012
|
+
const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
|
|
1012
1013
|
return {
|
|
1013
1014
|
cardId: c.cardID,
|
|
1014
1015
|
courseId: c.courseID,
|
|
1015
|
-
score,
|
|
1016
|
+
score: samplingKey,
|
|
1016
1017
|
provenance: [
|
|
1017
1018
|
{
|
|
1018
1019
|
strategy: "elo",
|
|
1019
1020
|
strategyName: this.strategyName || this.name,
|
|
1020
1021
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1021
1022
|
action: "generated",
|
|
1022
|
-
score,
|
|
1023
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1023
|
+
score: samplingKey,
|
|
1024
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), raw ${rawScore.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1024
1025
|
}
|
|
1025
1026
|
]
|
|
1026
1027
|
};
|
|
@@ -2713,7 +2714,6 @@ __export(navigators_exports, {
|
|
|
2713
2714
|
getCardOrigin: () => getCardOrigin,
|
|
2714
2715
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
2715
2716
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
2716
|
-
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
2717
2717
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
2718
2718
|
initializeNavigatorRegistry: () => initializeNavigatorRegistry,
|
|
2719
2719
|
isFilter: () => isFilter,
|
|
@@ -2722,19 +2722,16 @@ __export(navigators_exports, {
|
|
|
2722
2722
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
2723
2723
|
registerNavigator: () => registerNavigator
|
|
2724
2724
|
});
|
|
2725
|
-
function registerNavigator(implementingClass, constructor
|
|
2726
|
-
navigatorRegistry.set(implementingClass,
|
|
2727
|
-
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}
|
|
2725
|
+
function registerNavigator(implementingClass, constructor) {
|
|
2726
|
+
navigatorRegistry.set(implementingClass, constructor);
|
|
2727
|
+
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
|
|
2728
2728
|
}
|
|
2729
2729
|
function getRegisteredNavigator(implementingClass) {
|
|
2730
|
-
return navigatorRegistry.get(implementingClass)
|
|
2730
|
+
return navigatorRegistry.get(implementingClass);
|
|
2731
2731
|
}
|
|
2732
2732
|
function hasRegisteredNavigator(implementingClass) {
|
|
2733
2733
|
return navigatorRegistry.has(implementingClass);
|
|
2734
2734
|
}
|
|
2735
|
-
function getRegisteredNavigatorRole(implementingClass) {
|
|
2736
|
-
return navigatorRegistry.get(implementingClass)?.role;
|
|
2737
|
-
}
|
|
2738
2735
|
function getRegisteredNavigatorNames() {
|
|
2739
2736
|
return Array.from(navigatorRegistry.keys());
|
|
2740
2737
|
}
|
|
@@ -2780,12 +2777,10 @@ function getCardOrigin(card) {
|
|
|
2780
2777
|
return "new";
|
|
2781
2778
|
}
|
|
2782
2779
|
function isGenerator(impl) {
|
|
2783
|
-
|
|
2784
|
-
return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
|
|
2780
|
+
return NavigatorRoles[impl] === "generator" /* GENERATOR */;
|
|
2785
2781
|
}
|
|
2786
2782
|
function isFilter(impl) {
|
|
2787
|
-
|
|
2788
|
-
return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
|
|
2783
|
+
return NavigatorRoles[impl] === "filter" /* FILTER */;
|
|
2789
2784
|
}
|
|
2790
2785
|
var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
|
|
2791
2786
|
var init_navigators = __esm({
|