@lssm/example.learning-journey-registry 1.41.0 → 1.42.2
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/.turbo/turbo-build$colon$bundle.log +50 -0
- package/.turbo/turbo-build.log +45 -47
- package/CHANGELOG.md +64 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/api-types.d.ts +41 -0
- package/dist/api-types.d.ts.map +1 -0
- package/dist/api.d.ts +13 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +171 -1
- package/dist/api.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -1
- package/dist/docs/learning-journey-registry.docblock.d.ts +1 -0
- package/dist/docs/learning-journey-registry.docblock.js +38 -1
- package/dist/docs/learning-journey-registry.docblock.js.map +1 -0
- package/dist/example.d.ts +33 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +35 -1
- package/dist/example.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10 -1
- package/dist/learning-journey-registry.feature.d.ts +12 -0
- package/dist/learning-journey-registry.feature.d.ts.map +1 -0
- package/dist/learning-journey-registry.feature.js +68 -1
- package/dist/learning-journey-registry.feature.js.map +1 -0
- package/dist/presentations/index.d.ts +10 -0
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +71 -1
- package/dist/presentations/index.js.map +1 -0
- package/dist/progress-store.d.ts +11 -0
- package/dist/progress-store.d.ts.map +1 -0
- package/dist/progress-store.js +31 -1
- package/dist/progress-store.js.map +1 -0
- package/dist/tracks.d.ts +40 -0
- package/dist/tracks.d.ts.map +1 -0
- package/dist/tracks.js +48 -1
- package/dist/tracks.js.map +1 -0
- package/dist/ui/LearningMiniApp.d.ts +24 -0
- package/dist/ui/LearningMiniApp.d.ts.map +1 -0
- package/dist/ui/LearningMiniApp.js +80 -1
- package/dist/ui/LearningMiniApp.js.map +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +3 -1
- package/package.json +42 -30
- package/src/learning-journey-registry.feature.ts +7 -6
- package/src/presentations/index.ts +31 -23
- package/tsconfig.tsbuildinfo +1 -1
- package/tsdown.config.js +11 -1
- package/dist/libs/contracts/src/docs/PUBLISHING.docblock.js +0 -76
- package/dist/libs/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.js +0 -350
- package/dist/libs/contracts/src/docs/index.js +0 -1
- package/dist/libs/contracts/src/docs/presentations.js +0 -1
- package/dist/libs/contracts/src/docs/registry.js +0 -1
- package/dist/libs/contracts/src/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -383
- package/dist/libs/contracts/src/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -68
- package/dist/libs/contracts/src/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -140
- package/dist/libs/contracts/src/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -86
- package/dist/libs/contracts/src/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -1
- package/dist/libs/contracts/src/docs/tech/auth/better-auth-nextjs.docblock.js +0 -58
- package/dist/libs/contracts/src/docs/tech/contracts/openapi-export.docblock.js +0 -38
- package/dist/libs/contracts/src/docs/tech/lifecycle-stage-system.docblock.js +0 -213
- package/dist/libs/contracts/src/docs/tech/llm/llm-integration.docblock.js +0 -289
- package/dist/libs/contracts/src/docs/tech/mcp-endpoints.docblock.js +0 -1
- package/dist/libs/contracts/src/docs/tech/presentation-runtime.docblock.js +0 -1
- package/dist/libs/contracts/src/docs/tech/schema/README.docblock.js +0 -262
- package/dist/libs/contracts/src/docs/tech/studio/learning-events.docblock.js +0 -1
- package/dist/libs/contracts/src/docs/tech/studio/learning-journeys.docblock.js +0 -57
- package/dist/libs/contracts/src/docs/tech/studio/platform-admin-panel.docblock.js +0 -63
- package/dist/libs/contracts/src/docs/tech/studio/project-access-teams.docblock.js +0 -36
- package/dist/libs/contracts/src/docs/tech/studio/project-routing.docblock.js +0 -1
- package/dist/libs/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.js +0 -20
- package/dist/libs/contracts/src/docs/tech/studio/team-invitations.docblock.js +0 -65
- package/dist/libs/contracts/src/docs/tech/studio/workspace-ops.docblock.js +0 -1
- package/dist/libs/contracts/src/docs/tech/studio/workspaces.docblock.js +0 -41
- package/dist/libs/contracts/src/docs/tech/telemetry-ingest.docblock.js +0 -122
- package/dist/libs/contracts/src/docs/tech/templates/runtime.docblock.js +0 -1
- package/dist/libs/contracts/src/docs/tech/vscode-extension.docblock.js +0 -68
- package/dist/libs/contracts/src/docs/tech/workflows/overview.docblock.js +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/example.d.ts
|
|
2
|
+
declare const example: {
|
|
3
|
+
readonly id: "learning-journey-registry";
|
|
4
|
+
readonly title: "Learning Journey Registry";
|
|
5
|
+
readonly summary: "Registry of learning journey tracks + presentations + UI mini-app bindings.";
|
|
6
|
+
readonly tags: readonly ["learning", "journey", "registry"];
|
|
7
|
+
readonly kind: "library";
|
|
8
|
+
readonly visibility: "public";
|
|
9
|
+
readonly docs: {
|
|
10
|
+
readonly rootDocId: "docs.examples.learning-journey-registry";
|
|
11
|
+
};
|
|
12
|
+
readonly entrypoints: {
|
|
13
|
+
readonly packageName: "@lssm/example.learning-journey-registry";
|
|
14
|
+
readonly docs: "./docs";
|
|
15
|
+
};
|
|
16
|
+
readonly surfaces: {
|
|
17
|
+
readonly templates: true;
|
|
18
|
+
readonly sandbox: {
|
|
19
|
+
readonly enabled: true;
|
|
20
|
+
readonly modes: readonly ["markdown", "specs"];
|
|
21
|
+
};
|
|
22
|
+
readonly studio: {
|
|
23
|
+
readonly enabled: true;
|
|
24
|
+
readonly installable: true;
|
|
25
|
+
};
|
|
26
|
+
readonly mcp: {
|
|
27
|
+
readonly enabled: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { example as default };
|
|
33
|
+
//# sourceMappingURL=example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";cAAM;EAAA,SAAA,EAqBI,EAAA,2BAAA"}
|
package/dist/example.js
CHANGED
|
@@ -1 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/example.ts
|
|
2
|
+
const example = {
|
|
3
|
+
id: "learning-journey-registry",
|
|
4
|
+
title: "Learning Journey Registry",
|
|
5
|
+
summary: "Registry of learning journey tracks + presentations + UI mini-app bindings.",
|
|
6
|
+
tags: [
|
|
7
|
+
"learning",
|
|
8
|
+
"journey",
|
|
9
|
+
"registry"
|
|
10
|
+
],
|
|
11
|
+
kind: "library",
|
|
12
|
+
visibility: "public",
|
|
13
|
+
docs: { rootDocId: "docs.examples.learning-journey-registry" },
|
|
14
|
+
entrypoints: {
|
|
15
|
+
packageName: "@lssm/example.learning-journey-registry",
|
|
16
|
+
docs: "./docs"
|
|
17
|
+
},
|
|
18
|
+
surfaces: {
|
|
19
|
+
templates: true,
|
|
20
|
+
sandbox: {
|
|
21
|
+
enabled: true,
|
|
22
|
+
modes: ["markdown", "specs"]
|
|
23
|
+
},
|
|
24
|
+
studio: {
|
|
25
|
+
enabled: true,
|
|
26
|
+
installable: true
|
|
27
|
+
},
|
|
28
|
+
mcp: { enabled: true }
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var example_default = example;
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { example_default as default };
|
|
35
|
+
//# sourceMappingURL=example.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["const example = {\n id: 'learning-journey-registry',\n title: 'Learning Journey Registry',\n summary:\n 'Registry of learning journey tracks + presentations + UI mini-app bindings.',\n tags: ['learning', 'journey', 'registry'],\n kind: 'library',\n visibility: 'public',\n docs: {\n rootDocId: 'docs.examples.learning-journey-registry',\n },\n entrypoints: {\n packageName: '@lssm/example.learning-journey-registry',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown', 'specs'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n} as const;\n\nexport default example;\n"],"mappings":";AAAA,MAAM,UAAU;CACd,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;EAAC;EAAY;EAAW;EAAW;CACzC,MAAM;CACN,YAAY;CACZ,MAAM,EACJ,WAAW,2CACZ;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,YAAY,QAAQ;GAAE;EACxD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getProgress, listTracks, recordEvent } from "./api.js";
|
|
2
|
+
import example from "./example.js";
|
|
3
|
+
import { OnboardingStepDto, OnboardingTrackDto, crmLearningTracks, learningJourneyTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, studioLearningTracks } from "./tracks.js";
|
|
4
|
+
import { LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, learningJourneyPresentations } from "./presentations/index.js";
|
|
5
|
+
import { LearningJourneyRegistryFeature } from "./learning-journey-registry.feature.js";
|
|
6
|
+
import { LearningMiniApp, getLearningTemplateIds, isLearningTemplate } from "./ui/LearningMiniApp.js";
|
|
7
|
+
import "./ui/index.js";
|
|
8
|
+
export { LearningJourneyRegistryFeature, LearningMiniApp, LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, OnboardingStepDto, OnboardingTrackDto, crmLearningTracks, example, getLearningTemplateIds, getProgress, isLearningTemplate, learningJourneyPresentations, learningJourneyTracks, listTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, recordEvent, studioLearningTracks };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
import{crmLearningTracks
|
|
1
|
+
import { crmLearningTracks, learningJourneyTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, studioLearningTracks } from "./tracks.js";
|
|
2
|
+
import { getProgress, listTracks, recordEvent } from "./api.js";
|
|
3
|
+
import example_default from "./example.js";
|
|
4
|
+
import "./docs/index.js";
|
|
5
|
+
import { LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, learningJourneyPresentations } from "./presentations/index.js";
|
|
6
|
+
import { LearningJourneyRegistryFeature } from "./learning-journey-registry.feature.js";
|
|
7
|
+
import { LearningMiniApp, getLearningTemplateIds, isLearningTemplate } from "./ui/LearningMiniApp.js";
|
|
8
|
+
import "./ui/index.js";
|
|
9
|
+
|
|
10
|
+
export { LearningJourneyRegistryFeature, LearningMiniApp, LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, crmLearningTracks, example_default as example, getLearningTemplateIds, getProgress, isLearningTemplate, learningJourneyPresentations, learningJourneyTracks, listTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, recordEvent, studioLearningTracks };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FeatureModuleSpec } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/learning-journey-registry.feature.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Learning Journey Registry feature module that bundles
|
|
7
|
+
* the shared presentations for learning journey tracks.
|
|
8
|
+
*/
|
|
9
|
+
declare const LearningJourneyRegistryFeature: FeatureModuleSpec;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { LearningJourneyRegistryFeature };
|
|
12
|
+
//# sourceMappingURL=learning-journey-registry.feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-journey-registry.feature.d.ts","names":[],"sources":["../src/learning-journey-registry.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAWa,gCAAgC"}
|
|
@@ -1 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/learning-journey-registry.feature.ts
|
|
2
|
+
/**
|
|
3
|
+
* Learning Journey Registry feature module that bundles
|
|
4
|
+
* the shared presentations for learning journey tracks.
|
|
5
|
+
*/
|
|
6
|
+
const LearningJourneyRegistryFeature = {
|
|
7
|
+
meta: {
|
|
8
|
+
key: "learning-journey-registry",
|
|
9
|
+
version: 1,
|
|
10
|
+
title: "Learning Journey Registry",
|
|
11
|
+
description: "Shared registry and presentations for learning journey tracks",
|
|
12
|
+
domain: "learning-journey",
|
|
13
|
+
owners: ["@learning-team"],
|
|
14
|
+
tags: [
|
|
15
|
+
"learning",
|
|
16
|
+
"journey",
|
|
17
|
+
"onboarding",
|
|
18
|
+
"registry"
|
|
19
|
+
],
|
|
20
|
+
stability: "experimental"
|
|
21
|
+
},
|
|
22
|
+
operations: [],
|
|
23
|
+
events: [],
|
|
24
|
+
presentations: [
|
|
25
|
+
{
|
|
26
|
+
key: "learning.journey.track_list",
|
|
27
|
+
version: 1
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "learning.journey.track_detail",
|
|
31
|
+
version: 1
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: "learning.journey.progress_widget",
|
|
35
|
+
version: 1
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
opToPresentation: [],
|
|
39
|
+
presentationsTargets: [
|
|
40
|
+
{
|
|
41
|
+
key: "learning.journey.track_list",
|
|
42
|
+
version: 1,
|
|
43
|
+
targets: ["react", "markdown"]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "learning.journey.track_detail",
|
|
47
|
+
version: 1,
|
|
48
|
+
targets: [
|
|
49
|
+
"react",
|
|
50
|
+
"markdown",
|
|
51
|
+
"application/json"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
key: "learning.journey.progress_widget",
|
|
56
|
+
version: 1,
|
|
57
|
+
targets: ["react"]
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
capabilities: { requires: [{
|
|
61
|
+
key: "identity",
|
|
62
|
+
version: 1
|
|
63
|
+
}] }
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { LearningJourneyRegistryFeature };
|
|
68
|
+
//# sourceMappingURL=learning-journey-registry.feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-journey-registry.feature.js","names":["LearningJourneyRegistryFeature: FeatureModuleSpec"],"sources":["../src/learning-journey-registry.feature.ts"],"sourcesContent":["/**\n * Learning Journey Registry Feature Module Specification\n *\n * Defines the feature module for the learning journey registry.\n */\nimport type { FeatureModuleSpec } from '@lssm/lib.contracts';\n\n/**\n * Learning Journey Registry feature module that bundles\n * the shared presentations for learning journey tracks.\n */\nexport const LearningJourneyRegistryFeature: FeatureModuleSpec = {\n meta: {\n key: 'learning-journey-registry',\n version: 1,\n title: 'Learning Journey Registry',\n description:\n 'Shared registry and presentations for learning journey tracks',\n domain: 'learning-journey',\n owners: ['@learning-team'],\n tags: ['learning', 'journey', 'onboarding', 'registry'],\n stability: 'experimental',\n },\n\n // No operations in the registry - it's presentation-only\n operations: [],\n\n // Events emitted by this feature\n events: [],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'learning.journey.track_list', version: 1 },\n { key: 'learning.journey.track_detail', version: 1 },\n { key: 'learning.journey.progress_widget', version: 1 },\n ],\n\n // No op to presentation links for registry\n opToPresentation: [],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n {\n key: 'learning.journey.track_list',\n version: 1,\n targets: ['react', 'markdown'],\n },\n {\n key: 'learning.journey.track_detail',\n version: 1,\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'learning.journey.progress_widget',\n version: 1,\n targets: ['react'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [{ key: 'identity', version: 1 }],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,iCAAoD;CAC/D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAW;GAAc;GAAW;EACvD,WAAW;EACZ;CAGD,YAAY,EAAE;CAGd,QAAQ,EAAE;CAGV,eAAe;EACb;GAAE,KAAK;GAA+B,SAAS;GAAG;EAClD;GAAE,KAAK;GAAiC,SAAS;GAAG;EACpD;GAAE,KAAK;GAAoC,SAAS;GAAG;EACxD;CAGD,kBAAkB,EAAE;CAGpB,sBAAsB;EACpB;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS;IAAC;IAAS;IAAY;IAAmB;GACnD;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACF;CAGD,cAAc,EACZ,UAAU,CAAC;EAAE,KAAK;EAAY,SAAS;EAAG,CAAC,EAC5C;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PresentationSpec } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/presentations/index.d.ts
|
|
4
|
+
declare const LearningTrackListPresentation: PresentationSpec;
|
|
5
|
+
declare const LearningTrackDetailPresentation: PresentationSpec;
|
|
6
|
+
declare const LearningTrackProgressWidgetPresentation: PresentationSpec;
|
|
7
|
+
declare const learningJourneyPresentations: PresentationSpec[];
|
|
8
|
+
//#endregion
|
|
9
|
+
export { LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, learningJourneyPresentations };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":[],"mappings":";;;cAmBa,+BAA+B;cAe/B,iCAAiC;AAfjC,cA8BA,uCA9B+B,EA8BU,gBAjBrD;AAEY,cA8BA,4BA9BiC,EA8BL,gBAjBxC,EAAA"}
|
|
@@ -1 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
import { StabilityEnum } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/presentations/index.ts
|
|
4
|
+
const baseMeta = {
|
|
5
|
+
domain: "learning-journey",
|
|
6
|
+
title: "Learning Journey",
|
|
7
|
+
owners: ["@learning-team"],
|
|
8
|
+
tags: [
|
|
9
|
+
"learning",
|
|
10
|
+
"journey",
|
|
11
|
+
"onboarding"
|
|
12
|
+
],
|
|
13
|
+
stability: StabilityEnum.Experimental,
|
|
14
|
+
goal: "Progress through learning tracks",
|
|
15
|
+
context: "Learning journey section"
|
|
16
|
+
};
|
|
17
|
+
const LearningTrackListPresentation = {
|
|
18
|
+
meta: {
|
|
19
|
+
key: "learning.journey.track_list",
|
|
20
|
+
version: 1,
|
|
21
|
+
description: "List of learning journeys available to the learner.",
|
|
22
|
+
...baseMeta
|
|
23
|
+
},
|
|
24
|
+
source: {
|
|
25
|
+
type: "component",
|
|
26
|
+
framework: "react",
|
|
27
|
+
componentKey: "LearningTrackList"
|
|
28
|
+
},
|
|
29
|
+
targets: ["react", "markdown"]
|
|
30
|
+
};
|
|
31
|
+
const LearningTrackDetailPresentation = {
|
|
32
|
+
meta: {
|
|
33
|
+
key: "learning.journey.track_detail",
|
|
34
|
+
version: 1,
|
|
35
|
+
description: "Track detail with steps and progress state.",
|
|
36
|
+
...baseMeta
|
|
37
|
+
},
|
|
38
|
+
source: {
|
|
39
|
+
type: "component",
|
|
40
|
+
framework: "react",
|
|
41
|
+
componentKey: "LearningTrackDetail"
|
|
42
|
+
},
|
|
43
|
+
targets: [
|
|
44
|
+
"react",
|
|
45
|
+
"markdown",
|
|
46
|
+
"application/json"
|
|
47
|
+
]
|
|
48
|
+
};
|
|
49
|
+
const LearningTrackProgressWidgetPresentation = {
|
|
50
|
+
meta: {
|
|
51
|
+
key: "learning.journey.progress_widget",
|
|
52
|
+
version: 1,
|
|
53
|
+
description: "Compact widget showing progress for active track.",
|
|
54
|
+
...baseMeta
|
|
55
|
+
},
|
|
56
|
+
source: {
|
|
57
|
+
type: "component",
|
|
58
|
+
framework: "react",
|
|
59
|
+
componentKey: "LearningTrackProgressWidget"
|
|
60
|
+
},
|
|
61
|
+
targets: ["react"]
|
|
62
|
+
};
|
|
63
|
+
const learningJourneyPresentations = [
|
|
64
|
+
LearningTrackListPresentation,
|
|
65
|
+
LearningTrackDetailPresentation,
|
|
66
|
+
LearningTrackProgressWidgetPresentation
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { LearningTrackDetailPresentation, LearningTrackListPresentation, LearningTrackProgressWidgetPresentation, learningJourneyPresentations };
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability' | 'goal' | 'context'\n>","LearningTrackListPresentation: PresentationSpec","LearningTrackDetailPresentation: PresentationSpec","LearningTrackProgressWidgetPresentation: PresentationSpec"],"sources":["../../src/presentations/index.ts"],"sourcesContent":["import type {\n PresentationSpecMeta,\n PresentationSpec,\n} from '@lssm/lib.contracts';\nimport { StabilityEnum } from '@lssm/lib.contracts';\n\nconst baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability' | 'goal' | 'context'\n> = {\n domain: 'learning-journey',\n title: 'Learning Journey',\n owners: ['@learning-team'] as string[],\n tags: ['learning', 'journey', 'onboarding'] as string[],\n stability: StabilityEnum.Experimental,\n goal: 'Progress through learning tracks',\n context: 'Learning journey section',\n};\n\nexport const LearningTrackListPresentation: PresentationSpec = {\n meta: {\n key: 'learning.journey.track_list',\n version: 1,\n description: 'List of learning journeys available to the learner.',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackList',\n },\n targets: ['react', 'markdown'],\n};\n\nexport const LearningTrackDetailPresentation: PresentationSpec = {\n meta: {\n key: 'learning.journey.track_detail',\n version: 1,\n description: 'Track detail with steps and progress state.',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackDetail',\n },\n targets: ['react', 'markdown', 'application/json'],\n};\n\nexport const LearningTrackProgressWidgetPresentation: PresentationSpec = {\n meta: {\n key: 'learning.journey.progress_widget',\n version: 1,\n description: 'Compact widget showing progress for active track.',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackProgressWidget',\n },\n targets: ['react'],\n};\n\nexport const learningJourneyPresentations = [\n LearningTrackListPresentation,\n LearningTrackDetailPresentation,\n LearningTrackProgressWidgetPresentation,\n];\n"],"mappings":";;;AAMA,MAAMA,WAGF;CACF,QAAQ;CACR,OAAO;CACP,QAAQ,CAAC,iBAAiB;CAC1B,MAAM;EAAC;EAAY;EAAW;EAAa;CAC3C,WAAW,cAAc;CACzB,MAAM;CACN,SAAS;CACV;AAED,MAAaC,gCAAkD;CAC7D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC/B;AAED,MAAaC,kCAAoD;CAC/D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CACnD;AAED,MAAaC,0CAA4D;CACvE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CACnB;AAED,MAAa,+BAA+B;CAC1C;CACA;CACA;CACD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TrackProgress } from "./api-types.js";
|
|
2
|
+
import { LearningJourneyTrackSpec } from "@lssm/module.learning-journey/track-spec";
|
|
3
|
+
|
|
4
|
+
//#region src/progress-store.d.ts
|
|
5
|
+
declare const progressStore: Map<string, Map<string, TrackProgress>>;
|
|
6
|
+
declare const getTrackResolver: (tracks: LearningJourneyTrackSpec[]) => (trackId: string) => LearningJourneyTrackSpec | undefined;
|
|
7
|
+
declare const getLearnerTracks: (learnerId: string) => Map<string, TrackProgress>;
|
|
8
|
+
declare const initProgress: (learnerId: string, track: LearningJourneyTrackSpec) => TrackProgress;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { getLearnerTracks, getTrackResolver, initProgress, progressStore };
|
|
11
|
+
//# sourceMappingURL=progress-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-store.d.ts","names":[],"sources":["../src/progress-store.ts"],"sourcesContent":[],"mappings":";;;;cAIa,eAAa,YAAA,YAAA;cAEb,2BACF,oDACU;AAJR,cAOA,gBAP6D,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,GAOxB,GAPwB,CAAA,MAAA,EAOxB,aAPwB,CAAA;AAAhD,cAeb,YAfa,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,EAiBjB,wBAjBiB,EAAA,GAkBvB,aAlBuB"}
|
package/dist/progress-store.js
CHANGED
|
@@ -1 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/progress-store.ts
|
|
2
|
+
const progressStore = /* @__PURE__ */ new Map();
|
|
3
|
+
const getTrackResolver = (tracks) => (trackId) => tracks.find((t) => t.id === trackId);
|
|
4
|
+
const getLearnerTracks = (learnerId) => {
|
|
5
|
+
const existing = progressStore.get(learnerId);
|
|
6
|
+
if (existing) return existing;
|
|
7
|
+
const map = /* @__PURE__ */ new Map();
|
|
8
|
+
progressStore.set(learnerId, map);
|
|
9
|
+
return map;
|
|
10
|
+
};
|
|
11
|
+
const initProgress = (learnerId, track) => ({
|
|
12
|
+
learnerId,
|
|
13
|
+
trackId: track.id,
|
|
14
|
+
progress: 0,
|
|
15
|
+
isCompleted: false,
|
|
16
|
+
xpEarned: 0,
|
|
17
|
+
steps: track.steps.map((step) => ({
|
|
18
|
+
id: step.id,
|
|
19
|
+
status: "PENDING",
|
|
20
|
+
xpEarned: 0,
|
|
21
|
+
occurrences: 0,
|
|
22
|
+
masteryCount: 0
|
|
23
|
+
})),
|
|
24
|
+
startedAt: void 0,
|
|
25
|
+
completedAt: void 0,
|
|
26
|
+
lastActivityAt: void 0
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { getLearnerTracks, getTrackResolver, initProgress, progressStore };
|
|
31
|
+
//# sourceMappingURL=progress-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-store.js","names":[],"sources":["../src/progress-store.ts"],"sourcesContent":["import type { LearningJourneyTrackSpec } from '@lssm/module.learning-journey/track-spec';\n\nimport type { TrackProgress } from './api-types';\n\nexport const progressStore = new Map<string, Map<string, TrackProgress>>();\n\nexport const getTrackResolver =\n (tracks: LearningJourneyTrackSpec[]) =>\n (trackId: string): LearningJourneyTrackSpec | undefined =>\n tracks.find((t) => t.id === trackId);\n\nexport const getLearnerTracks = (learnerId: string) => {\n const existing = progressStore.get(learnerId);\n if (existing) return existing;\n const map = new Map<string, TrackProgress>();\n progressStore.set(learnerId, map);\n return map;\n};\n\nexport const initProgress = (\n learnerId: string,\n track: LearningJourneyTrackSpec\n): TrackProgress => ({\n learnerId,\n trackId: track.id,\n progress: 0,\n isCompleted: false,\n xpEarned: 0,\n steps: track.steps.map((step) => ({\n id: step.id,\n status: 'PENDING',\n xpEarned: 0,\n occurrences: 0,\n masteryCount: 0,\n })),\n startedAt: undefined,\n completedAt: undefined,\n lastActivityAt: undefined,\n});\n"],"mappings":";AAIA,MAAa,gCAAgB,IAAI,KAAyC;AAE1E,MAAa,oBACV,YACA,YACC,OAAO,MAAM,MAAM,EAAE,OAAO,QAAQ;AAExC,MAAa,oBAAoB,cAAsB;CACrD,MAAM,WAAW,cAAc,IAAI,UAAU;AAC7C,KAAI,SAAU,QAAO;CACrB,MAAM,sBAAM,IAAI,KAA4B;AAC5C,eAAc,IAAI,WAAW,IAAI;AACjC,QAAO;;AAGT,MAAa,gBACX,WACA,WACmB;CACnB;CACA,SAAS,MAAM;CACf,UAAU;CACV,aAAa;CACb,UAAU;CACV,OAAO,MAAM,MAAM,KAAK,UAAU;EAChC,IAAI,KAAK;EACT,QAAQ;EACR,UAAU;EACV,aAAa;EACb,cAAc;EACf,EAAE;CACH,WAAW;CACX,aAAa;CACb,gBAAgB;CACjB"}
|
package/dist/tracks.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { crmLearningTracks } from "@lssm/example.learning-journey-crm-onboarding/track";
|
|
2
|
+
import { platformLearningTracks } from "@lssm/example.learning-journey-platform-tour/track";
|
|
3
|
+
import { studioLearningTracks } from "@lssm/example.learning-journey-studio-onboarding/track";
|
|
4
|
+
import { LearningJourneyStepSpec, LearningJourneyTrackSpec, StepAvailabilitySpec, StepCompletionConditionSpec } from "@lssm/module.learning-journey/track-spec";
|
|
5
|
+
|
|
6
|
+
//#region src/tracks.d.ts
|
|
7
|
+
interface OnboardingStepDto {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
completionEvent: string;
|
|
12
|
+
completionCondition?: StepCompletionConditionSpec;
|
|
13
|
+
xpReward?: number;
|
|
14
|
+
isRequired?: boolean;
|
|
15
|
+
canSkip?: boolean;
|
|
16
|
+
actionUrl?: string;
|
|
17
|
+
actionLabel?: string;
|
|
18
|
+
availability?: StepAvailabilitySpec;
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
interface OnboardingTrackDto {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
productId?: string;
|
|
26
|
+
targetUserSegment?: string;
|
|
27
|
+
targetRole?: string;
|
|
28
|
+
totalXp?: number;
|
|
29
|
+
streakRule?: LearningJourneyTrackSpec['streakRule'];
|
|
30
|
+
completionRewards?: LearningJourneyTrackSpec['completionRewards'];
|
|
31
|
+
steps: OnboardingStepDto[];
|
|
32
|
+
metadata?: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
declare const mapStep: (step: LearningJourneyStepSpec) => OnboardingStepDto;
|
|
35
|
+
declare const mapTrackSpecToDto: (track: LearningJourneyTrackSpec) => OnboardingTrackDto;
|
|
36
|
+
declare const learningJourneyTracks: LearningJourneyTrackSpec[];
|
|
37
|
+
declare const onboardingTrackCatalog: OnboardingTrackDto[];
|
|
38
|
+
//#endregion
|
|
39
|
+
export { OnboardingStepDto, OnboardingTrackDto, crmLearningTracks, learningJourneyTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, studioLearningTracks };
|
|
40
|
+
//# sourceMappingURL=tracks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracks.d.ts","names":[],"sources":["../src/tracks.ts"],"sourcesContent":[],"mappings":";;;;;;UAaiB,iBAAA;;EAAA,KAAA,EAAA,MAAA;EAKO,WAAA,CAAA,EAAA,MAAA;EAMP,eAAA,EAAA,MAAA;EACJ,mBAAA,CAAA,EAPW,2BAOX;EAAM,QAAA,CAAA,EAAA,MAAA;EAGF,UAAA,CAAA,EAAA,OAAA;EAQF,OAAA,CAAA,EAAA,OAAA;EACO,SAAA,CAAA,EAAA,MAAA;EACb,WAAA,CAAA,EAAA,MAAA;EACI,YAAA,CAAA,EAfI,oBAeJ;EAAM,QAAA,CAAA,EAdN,MAcM,CAAA,MAAA,EAAA,OAAA,CAAA;AAClB;AAiBY,UA7BI,kBAAA,CA8BR;EAeI,EAAA,EAAA,MAAA;EASA,IAAA,EAAA,MAAA;;;;;;eA9CE;sBACO;SACb;aACI;;cAGP,gBAAiB,4BAA0B;cAepC,2BACJ,6BACN;cAcU,uBAAuB;cASvB,wBAAwB"}
|
package/dist/tracks.js
CHANGED
|
@@ -1 +1,48 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { crmLearningTracks } from "@lssm/example.learning-journey-crm-onboarding/track";
|
|
2
|
+
import { drillTracks } from "@lssm/example.learning-journey-duo-drills/track";
|
|
3
|
+
import { ambientCoachTracks } from "@lssm/example.learning-journey-ambient-coach/track";
|
|
4
|
+
import { questTracks } from "@lssm/example.learning-journey-quest-challenges/track";
|
|
5
|
+
import { platformLearningTracks } from "@lssm/example.learning-journey-platform-tour/track";
|
|
6
|
+
import { studioLearningTracks } from "@lssm/example.learning-journey-studio-onboarding/track";
|
|
7
|
+
|
|
8
|
+
//#region src/tracks.ts
|
|
9
|
+
const mapStep = (step) => ({
|
|
10
|
+
id: step.id,
|
|
11
|
+
title: step.title,
|
|
12
|
+
description: step.description,
|
|
13
|
+
completionEvent: step.completion.eventName,
|
|
14
|
+
completionCondition: step.completion,
|
|
15
|
+
xpReward: step.xpReward,
|
|
16
|
+
isRequired: step.isRequired,
|
|
17
|
+
canSkip: step.canSkip,
|
|
18
|
+
actionUrl: step.actionUrl,
|
|
19
|
+
actionLabel: step.actionLabel,
|
|
20
|
+
availability: step.availability,
|
|
21
|
+
metadata: step.metadata
|
|
22
|
+
});
|
|
23
|
+
const mapTrackSpecToDto = (track) => ({
|
|
24
|
+
id: track.id,
|
|
25
|
+
name: track.name,
|
|
26
|
+
description: track.description,
|
|
27
|
+
productId: track.productId,
|
|
28
|
+
targetUserSegment: track.targetUserSegment,
|
|
29
|
+
targetRole: track.targetRole,
|
|
30
|
+
totalXp: track.totalXp,
|
|
31
|
+
streakRule: track.streakRule,
|
|
32
|
+
completionRewards: track.completionRewards,
|
|
33
|
+
steps: track.steps.map(mapStep),
|
|
34
|
+
metadata: track.metadata
|
|
35
|
+
});
|
|
36
|
+
const learningJourneyTracks = [
|
|
37
|
+
...studioLearningTracks,
|
|
38
|
+
...platformLearningTracks,
|
|
39
|
+
...crmLearningTracks,
|
|
40
|
+
...drillTracks,
|
|
41
|
+
...ambientCoachTracks,
|
|
42
|
+
...questTracks
|
|
43
|
+
];
|
|
44
|
+
const onboardingTrackCatalog = learningJourneyTracks.map(mapTrackSpecToDto);
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { crmLearningTracks, learningJourneyTracks, mapStep, mapTrackSpecToDto, onboardingTrackCatalog, platformLearningTracks, studioLearningTracks };
|
|
48
|
+
//# sourceMappingURL=tracks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracks.js","names":["learningJourneyTracks: LearningJourneyTrackSpec[]","onboardingTrackCatalog: OnboardingTrackDto[]"],"sources":["../src/tracks.ts"],"sourcesContent":["import type {\n LearningJourneyStepSpec,\n LearningJourneyTrackSpec,\n StepAvailabilitySpec,\n StepCompletionConditionSpec,\n} from '@lssm/module.learning-journey/track-spec';\nimport { crmLearningTracks } from '@lssm/example.learning-journey-crm-onboarding/track';\nimport { drillTracks } from '@lssm/example.learning-journey-duo-drills/track';\nimport { ambientCoachTracks } from '@lssm/example.learning-journey-ambient-coach/track';\nimport { questTracks } from '@lssm/example.learning-journey-quest-challenges/track';\nimport { platformLearningTracks } from '@lssm/example.learning-journey-platform-tour/track';\nimport { studioLearningTracks } from '@lssm/example.learning-journey-studio-onboarding/track';\n\nexport interface OnboardingStepDto {\n id: string;\n title: string;\n description?: string;\n completionEvent: string;\n completionCondition?: StepCompletionConditionSpec;\n xpReward?: number;\n isRequired?: boolean;\n canSkip?: boolean;\n actionUrl?: string;\n actionLabel?: string;\n availability?: StepAvailabilitySpec;\n metadata?: Record<string, unknown>;\n}\n\nexport interface OnboardingTrackDto {\n id: string;\n name: string;\n description?: string;\n productId?: string;\n targetUserSegment?: string;\n targetRole?: string;\n totalXp?: number;\n streakRule?: LearningJourneyTrackSpec['streakRule'];\n completionRewards?: LearningJourneyTrackSpec['completionRewards'];\n steps: OnboardingStepDto[];\n metadata?: Record<string, unknown>;\n}\n\nconst mapStep = (step: LearningJourneyStepSpec): OnboardingStepDto => ({\n id: step.id,\n title: step.title,\n description: step.description,\n completionEvent: step.completion.eventName,\n completionCondition: step.completion,\n xpReward: step.xpReward,\n isRequired: step.isRequired,\n canSkip: step.canSkip,\n actionUrl: step.actionUrl,\n actionLabel: step.actionLabel,\n availability: step.availability,\n metadata: step.metadata,\n});\n\nexport const mapTrackSpecToDto = (\n track: LearningJourneyTrackSpec\n): OnboardingTrackDto => ({\n id: track.id,\n name: track.name,\n description: track.description,\n productId: track.productId,\n targetUserSegment: track.targetUserSegment,\n targetRole: track.targetRole,\n totalXp: track.totalXp,\n streakRule: track.streakRule,\n completionRewards: track.completionRewards,\n steps: track.steps.map(mapStep),\n metadata: track.metadata,\n});\n\nexport const learningJourneyTracks: LearningJourneyTrackSpec[] = [\n ...studioLearningTracks,\n ...platformLearningTracks,\n ...crmLearningTracks,\n ...drillTracks,\n ...ambientCoachTracks,\n ...questTracks,\n];\n\nexport const onboardingTrackCatalog: OnboardingTrackDto[] =\n learningJourneyTracks.map(mapTrackSpecToDto);\n\nexport {\n studioLearningTracks,\n platformLearningTracks,\n crmLearningTracks,\n mapStep,\n};\n"],"mappings":";;;;;;;;AA0CA,MAAM,WAAW,UAAsD;CACrE,IAAI,KAAK;CACT,OAAO,KAAK;CACZ,aAAa,KAAK;CAClB,iBAAiB,KAAK,WAAW;CACjC,qBAAqB,KAAK;CAC1B,UAAU,KAAK;CACf,YAAY,KAAK;CACjB,SAAS,KAAK;CACd,WAAW,KAAK;CAChB,aAAa,KAAK;CAClB,cAAc,KAAK;CACnB,UAAU,KAAK;CAChB;AAED,MAAa,qBACX,WACwB;CACxB,IAAI,MAAM;CACV,MAAM,MAAM;CACZ,aAAa,MAAM;CACnB,WAAW,MAAM;CACjB,mBAAmB,MAAM;CACzB,YAAY,MAAM;CAClB,SAAS,MAAM;CACf,YAAY,MAAM;CAClB,mBAAmB,MAAM;CACzB,OAAO,MAAM,MAAM,IAAI,QAAQ;CAC/B,UAAU,MAAM;CACjB;AAED,MAAaA,wBAAoD;CAC/D,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ;AAED,MAAaC,yBACX,sBAAsB,IAAI,kBAAkB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { LearningView } from "@lssm/example.learning-journey-ui-shared";
|
|
3
|
+
|
|
4
|
+
//#region src/ui/LearningMiniApp.d.ts
|
|
5
|
+
/** Template IDs that map to learning journey tracks */
|
|
6
|
+
type LearningTemplateId = 'learning-journey-duo-drills' | 'learning-journey-quest-challenges' | 'learning-journey-studio-onboarding' | 'learning-journey-platform-tour' | 'learning-journey-ambient-coach' | 'learning-journey-crm-onboarding';
|
|
7
|
+
interface LearningMiniAppProps {
|
|
8
|
+
templateId: string;
|
|
9
|
+
initialView?: LearningView;
|
|
10
|
+
onViewChange?: (view: LearningView) => void;
|
|
11
|
+
}
|
|
12
|
+
/** Router component that picks the correct mini-app based on template ID */
|
|
13
|
+
declare function LearningMiniApp({
|
|
14
|
+
templateId,
|
|
15
|
+
initialView,
|
|
16
|
+
onViewChange
|
|
17
|
+
}: LearningMiniAppProps): react_jsx_runtime0.JSX.Element;
|
|
18
|
+
/** Check if a template ID is a learning journey template */
|
|
19
|
+
declare function isLearningTemplate(templateId: string): templateId is LearningTemplateId;
|
|
20
|
+
/** Get all learning template IDs */
|
|
21
|
+
declare function getLearningTemplateIds(): LearningTemplateId[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { LearningMiniApp, getLearningTemplateIds, isLearningTemplate };
|
|
24
|
+
//# sourceMappingURL=LearningMiniApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LearningMiniApp.d.ts","names":[],"sources":["../../src/ui/LearningMiniApp.tsx"],"sourcesContent":[],"mappings":";;;;;KAUK,kBAAA;UA+BK,oBAAA;EA/BL,UAAA,EAAA,MAAA;EA+BK,WAAA,CAAA,EAEM,YAFc;EAOd,YAAA,CAAA,EAAA,CAAA,IAAe,EAJP,YAIO,EAAA,GAAA,IAAA;;;AAG7B,iBAHc,eAAA,CAGd;EAAA,UAAA;EAAA,WAAA;EAAA;AAAA,CAAA,EACC,oBADD,CAAA,EACqB,kBAAA,CAAA,GAAA,CAAA,OADrB;;AACqB,iBA2DP,kBAAA,CA3DO,UAAA,EAAA,MAAA,CAAA,EAAA,UAAA,IA6DN,kBA7DM;;AA2DP,iBAOA,sBAAA,CAAA,CALC,EAKyB,kBALP,EAAA"}
|
|
@@ -1 +1,80 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { learningJourneyTracks } from "../tracks.js";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { GamifiedMiniApp } from "@lssm/example.learning-journey-ui-gamified";
|
|
6
|
+
import { OnboardingMiniApp } from "@lssm/example.learning-journey-ui-onboarding";
|
|
7
|
+
import { CoachingMiniApp } from "@lssm/example.learning-journey-ui-coaching";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/ui/LearningMiniApp.tsx
|
|
11
|
+
/** Map template IDs to track IDs */
|
|
12
|
+
const TEMPLATE_TO_TRACK = {
|
|
13
|
+
"learning-journey-duo-drills": "drills_language_basics",
|
|
14
|
+
"learning-journey-quest-challenges": "money_reset_7day",
|
|
15
|
+
"learning-journey-studio-onboarding": "studio_getting_started",
|
|
16
|
+
"learning-journey-platform-tour": "platform_tour",
|
|
17
|
+
"learning-journey-ambient-coach": "money_ambient_coach",
|
|
18
|
+
"learning-journey-crm-onboarding": "crm_first_win"
|
|
19
|
+
};
|
|
20
|
+
/** Map template IDs to mini-app type */
|
|
21
|
+
const TEMPLATE_TO_APP_TYPE = {
|
|
22
|
+
"learning-journey-duo-drills": "gamified",
|
|
23
|
+
"learning-journey-quest-challenges": "gamified",
|
|
24
|
+
"learning-journey-studio-onboarding": "onboarding",
|
|
25
|
+
"learning-journey-platform-tour": "onboarding",
|
|
26
|
+
"learning-journey-ambient-coach": "coaching",
|
|
27
|
+
"learning-journey-crm-onboarding": "coaching"
|
|
28
|
+
};
|
|
29
|
+
/** Router component that picks the correct mini-app based on template ID */
|
|
30
|
+
function LearningMiniApp({ templateId, initialView = "overview", onViewChange }) {
|
|
31
|
+
const track = useMemo(() => {
|
|
32
|
+
const trackId = TEMPLATE_TO_TRACK[templateId];
|
|
33
|
+
if (!trackId) return null;
|
|
34
|
+
return learningJourneyTracks.find((t) => t.id === trackId);
|
|
35
|
+
}, [templateId]);
|
|
36
|
+
const appType = TEMPLATE_TO_APP_TYPE[templateId];
|
|
37
|
+
if (!track) return /* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: "rounded-lg border border-amber-500/50 bg-amber-500/10 p-6 text-center",
|
|
39
|
+
children: /* @__PURE__ */ jsxs("p", {
|
|
40
|
+
className: "text-amber-500",
|
|
41
|
+
children: ["Unknown learning template: ", templateId]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
switch (appType) {
|
|
45
|
+
case "gamified": return /* @__PURE__ */ jsx(GamifiedMiniApp, {
|
|
46
|
+
track,
|
|
47
|
+
initialView,
|
|
48
|
+
onViewChange
|
|
49
|
+
});
|
|
50
|
+
case "onboarding": return /* @__PURE__ */ jsx(OnboardingMiniApp, {
|
|
51
|
+
track,
|
|
52
|
+
initialView,
|
|
53
|
+
onViewChange
|
|
54
|
+
});
|
|
55
|
+
case "coaching": return /* @__PURE__ */ jsx(CoachingMiniApp, {
|
|
56
|
+
track,
|
|
57
|
+
initialView,
|
|
58
|
+
onViewChange
|
|
59
|
+
});
|
|
60
|
+
default: return /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: "rounded-lg border border-red-500/50 bg-red-500/10 p-6 text-center",
|
|
62
|
+
children: /* @__PURE__ */ jsxs("p", {
|
|
63
|
+
className: "text-red-500",
|
|
64
|
+
children: ["Unknown app type for template: ", templateId]
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** Check if a template ID is a learning journey template */
|
|
70
|
+
function isLearningTemplate(templateId) {
|
|
71
|
+
return templateId in TEMPLATE_TO_TRACK;
|
|
72
|
+
}
|
|
73
|
+
/** Get all learning template IDs */
|
|
74
|
+
function getLearningTemplateIds() {
|
|
75
|
+
return Object.keys(TEMPLATE_TO_TRACK);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
export { LearningMiniApp, getLearningTemplateIds, isLearningTemplate };
|
|
80
|
+
//# sourceMappingURL=LearningMiniApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LearningMiniApp.js","names":["TEMPLATE_TO_TRACK: Record<LearningTemplateId, string>","TEMPLATE_TO_APP_TYPE: Record<\n LearningTemplateId,\n 'gamified' | 'onboarding' | 'coaching'\n>"],"sources":["../../src/ui/LearningMiniApp.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\nimport { GamifiedMiniApp } from '@lssm/example.learning-journey-ui-gamified';\nimport { OnboardingMiniApp } from '@lssm/example.learning-journey-ui-onboarding';\nimport { CoachingMiniApp } from '@lssm/example.learning-journey-ui-coaching';\nimport type { LearningView } from '@lssm/example.learning-journey-ui-shared';\nimport { learningJourneyTracks } from '../tracks';\n\n/** Template IDs that map to learning journey tracks */\ntype LearningTemplateId =\n | 'learning-journey-duo-drills'\n | 'learning-journey-quest-challenges'\n | 'learning-journey-studio-onboarding'\n | 'learning-journey-platform-tour'\n | 'learning-journey-ambient-coach'\n | 'learning-journey-crm-onboarding';\n\n/** Map template IDs to track IDs */\nconst TEMPLATE_TO_TRACK: Record<LearningTemplateId, string> = {\n 'learning-journey-duo-drills': 'drills_language_basics',\n 'learning-journey-quest-challenges': 'money_reset_7day',\n 'learning-journey-studio-onboarding': 'studio_getting_started',\n 'learning-journey-platform-tour': 'platform_tour',\n 'learning-journey-ambient-coach': 'money_ambient_coach',\n 'learning-journey-crm-onboarding': 'crm_first_win',\n};\n\n/** Map template IDs to mini-app type */\nconst TEMPLATE_TO_APP_TYPE: Record<\n LearningTemplateId,\n 'gamified' | 'onboarding' | 'coaching'\n> = {\n 'learning-journey-duo-drills': 'gamified',\n 'learning-journey-quest-challenges': 'gamified',\n 'learning-journey-studio-onboarding': 'onboarding',\n 'learning-journey-platform-tour': 'onboarding',\n 'learning-journey-ambient-coach': 'coaching',\n 'learning-journey-crm-onboarding': 'coaching',\n};\n\ninterface LearningMiniAppProps {\n templateId: string;\n initialView?: LearningView;\n onViewChange?: (view: LearningView) => void;\n}\n\n/** Router component that picks the correct mini-app based on template ID */\nexport function LearningMiniApp({\n templateId,\n initialView = 'overview',\n onViewChange,\n}: LearningMiniAppProps) {\n // Find the track for this template\n const track = useMemo(() => {\n const trackId = TEMPLATE_TO_TRACK[templateId as LearningTemplateId];\n if (!trackId) return null;\n return learningJourneyTracks.find((t) => t.id === trackId);\n }, [templateId]);\n\n // Determine app type\n const appType = TEMPLATE_TO_APP_TYPE[templateId as LearningTemplateId];\n\n if (!track) {\n return (\n <div className=\"rounded-lg border border-amber-500/50 bg-amber-500/10 p-6 text-center\">\n <p className=\"text-amber-500\">\n Unknown learning template: {templateId}\n </p>\n </div>\n );\n }\n\n // Render the appropriate mini-app\n switch (appType) {\n case 'gamified':\n return (\n <GamifiedMiniApp\n track={track}\n initialView={initialView}\n onViewChange={onViewChange}\n />\n );\n case 'onboarding':\n return (\n <OnboardingMiniApp\n track={track}\n initialView={initialView}\n onViewChange={onViewChange}\n />\n );\n case 'coaching':\n return (\n <CoachingMiniApp\n track={track}\n initialView={initialView}\n onViewChange={onViewChange}\n />\n );\n default:\n return (\n <div className=\"rounded-lg border border-red-500/50 bg-red-500/10 p-6 text-center\">\n <p className=\"text-red-500\">\n Unknown app type for template: {templateId}\n </p>\n </div>\n );\n }\n}\n\n/** Check if a template ID is a learning journey template */\nexport function isLearningTemplate(\n templateId: string\n): templateId is LearningTemplateId {\n return templateId in TEMPLATE_TO_TRACK;\n}\n\n/** Get all learning template IDs */\nexport function getLearningTemplateIds(): LearningTemplateId[] {\n return Object.keys(TEMPLATE_TO_TRACK) as LearningTemplateId[];\n}\n"],"mappings":";;;;;;;;;;;AAmBA,MAAMA,oBAAwD;CAC5D,+BAA+B;CAC/B,qCAAqC;CACrC,sCAAsC;CACtC,kCAAkC;CAClC,kCAAkC;CAClC,mCAAmC;CACpC;;AAGD,MAAMC,uBAGF;CACF,+BAA+B;CAC/B,qCAAqC;CACrC,sCAAsC;CACtC,kCAAkC;CAClC,kCAAkC;CAClC,mCAAmC;CACpC;;AASD,SAAgB,gBAAgB,EAC9B,YACA,cAAc,YACd,gBACuB;CAEvB,MAAM,QAAQ,cAAc;EAC1B,MAAM,UAAU,kBAAkB;AAClC,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,sBAAsB,MAAM,MAAM,EAAE,OAAO,QAAQ;IACzD,CAAC,WAAW,CAAC;CAGhB,MAAM,UAAU,qBAAqB;AAErC,KAAI,CAAC,MACH,QACE,oBAAC;EAAI,WAAU;YACb,qBAAC;GAAE,WAAU;cAAiB,+BACA;IAC1B;GACA;AAKV,SAAQ,SAAR;EACE,KAAK,WACH,QACE,oBAAC;GACQ;GACM;GACC;IACd;EAEN,KAAK,aACH,QACE,oBAAC;GACQ;GACM;GACC;IACd;EAEN,KAAK,WACH,QACE,oBAAC;GACQ;GACM;GACC;IACd;EAEN,QACE,QACE,oBAAC;GAAI,WAAU;aACb,qBAAC;IAAE,WAAU;eAAe,mCACM;KAC9B;IACA;;;;AAMd,SAAgB,mBACd,YACkC;AAClC,QAAO,cAAc;;;AAIvB,SAAgB,yBAA+C;AAC7D,QAAO,OAAO,KAAK,kBAAkB"}
|
package/dist/ui/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import{LearningMiniApp
|
|
1
|
+
import { LearningMiniApp, getLearningTemplateIds, isLearningTemplate } from "./LearningMiniApp.js";
|
|
2
|
+
|
|
3
|
+
export { LearningMiniApp, getLearningTemplateIds, isLearningTemplate };
|