@vue-skuilder/db 0.1.29 → 0.1.30
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-DfBbaLA-.d.cts → contentSource-B7nXusjk.d.cts} +19 -4
- package/dist/{contentSource-BmnmvH8C.d.ts → contentSource-ygoFw9oV.d.ts} +19 -4
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +14 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +13 -6
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BeRXVMs5.d.cts → dataLayerProvider-BW7HvkMt.d.cts} +1 -1
- package/dist/{dataLayerProvider-CG9GfaAY.d.ts → dataLayerProvider-BfXUVDuG.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 +12 -6
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +12 -6
- 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 +12 -6
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +12 -6
- 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 +14 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -6
- package/dist/index.mjs.map +1 -1
- package/docs/navigators-architecture.md +64 -5
- package/package.json +3 -3
- package/src/core/navigators/index.ts +43 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, W as WeightedCard } from '../../contentSource-
|
|
2
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, W as WeightedCard } from '../../contentSource-B7nXusjk.cjs';
|
|
2
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-BW7HvkMt.cjs';
|
|
3
3
|
import { S as StaticCourseManifest } from '../../types-W8n-B6HG.cjs';
|
|
4
4
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
5
5
|
import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-JXDxinpU.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, W as WeightedCard } from '../../contentSource-
|
|
2
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
1
|
+
import { U as UserDBInterface, C as CourseDBInterface, b as CoursesDBInterface, c as ClassroomDBInterface, A as AdminDBInterface, a as UserDBReader, d as CourseInfo, S as StudySessionItem, D as DataLayerResult, e as ContentNavigationStrategyData, f as ContentNavigator, W as WeightedCard } from '../../contentSource-ygoFw9oV.js';
|
|
2
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-BfXUVDuG.js';
|
|
3
3
|
import { S as StaticCourseManifest } from '../../types-CJrLM1Ew.js';
|
|
4
4
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
5
5
|
import { S as SkuilderCourseData, Q as QualifiedCardID, T as TagStub, a as Tag } from '../../types-legacy-JXDxinpU.js';
|
|
@@ -2737,6 +2737,7 @@ __export(navigators_exports, {
|
|
|
2737
2737
|
getCardOrigin: () => getCardOrigin,
|
|
2738
2738
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
2739
2739
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
2740
|
+
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
2740
2741
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
2741
2742
|
initializeNavigatorRegistry: () => initializeNavigatorRegistry,
|
|
2742
2743
|
isFilter: () => isFilter,
|
|
@@ -2745,16 +2746,19 @@ __export(navigators_exports, {
|
|
|
2745
2746
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
2746
2747
|
registerNavigator: () => registerNavigator
|
|
2747
2748
|
});
|
|
2748
|
-
function registerNavigator(implementingClass, constructor) {
|
|
2749
|
-
navigatorRegistry.set(implementingClass, constructor);
|
|
2750
|
-
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
|
|
2749
|
+
function registerNavigator(implementingClass, constructor, role) {
|
|
2750
|
+
navigatorRegistry.set(implementingClass, { constructor, role });
|
|
2751
|
+
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}${role ? ` (${role})` : ""}`);
|
|
2751
2752
|
}
|
|
2752
2753
|
function getRegisteredNavigator(implementingClass) {
|
|
2753
|
-
return navigatorRegistry.get(implementingClass);
|
|
2754
|
+
return navigatorRegistry.get(implementingClass)?.constructor;
|
|
2754
2755
|
}
|
|
2755
2756
|
function hasRegisteredNavigator(implementingClass) {
|
|
2756
2757
|
return navigatorRegistry.has(implementingClass);
|
|
2757
2758
|
}
|
|
2759
|
+
function getRegisteredNavigatorRole(implementingClass) {
|
|
2760
|
+
return navigatorRegistry.get(implementingClass)?.role;
|
|
2761
|
+
}
|
|
2758
2762
|
function getRegisteredNavigatorNames() {
|
|
2759
2763
|
return Array.from(navigatorRegistry.keys());
|
|
2760
2764
|
}
|
|
@@ -2800,10 +2804,12 @@ function getCardOrigin(card) {
|
|
|
2800
2804
|
return "new";
|
|
2801
2805
|
}
|
|
2802
2806
|
function isGenerator(impl) {
|
|
2803
|
-
|
|
2807
|
+
if (NavigatorRoles[impl] === "generator" /* GENERATOR */) return true;
|
|
2808
|
+
return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
|
|
2804
2809
|
}
|
|
2805
2810
|
function isFilter(impl) {
|
|
2806
|
-
|
|
2811
|
+
if (NavigatorRoles[impl] === "filter" /* FILTER */) return true;
|
|
2812
|
+
return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
|
|
2807
2813
|
}
|
|
2808
2814
|
var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
|
|
2809
2815
|
var init_navigators = __esm({
|