@lssm/example.learning-journey-registry 0.0.0-canary-20251217080011 → 1.41.0
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.log +53 -55
- package/dist/api.js +1 -170
- package/dist/docs/index.js +1 -1
- package/dist/docs/learning-journey-registry.docblock.js +1 -38
- package/dist/example.js +1 -34
- package/dist/index.js +1 -13
- package/dist/learning-journey-registry.feature.js +1 -66
- package/dist/libs/contracts/src/docs/PUBLISHING.docblock.js +76 -0
- package/dist/libs/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.js +350 -0
- package/dist/libs/contracts/src/docs/index.js +1 -0
- package/dist/libs/contracts/src/docs/presentations.js +1 -0
- package/dist/libs/contracts/src/docs/registry.js +1 -0
- package/dist/libs/contracts/src/docs/tech/PHASE_1_QUICKSTART.docblock.js +383 -0
- package/dist/libs/contracts/src/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +68 -0
- package/dist/libs/contracts/src/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +140 -0
- package/dist/libs/contracts/src/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +86 -0
- package/dist/libs/contracts/src/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +1 -0
- package/dist/libs/contracts/{dist → src}/docs/tech/auth/better-auth-nextjs.docblock.js +2 -24
- package/dist/libs/contracts/{dist → src}/docs/tech/contracts/openapi-export.docblock.js +2 -21
- package/dist/libs/contracts/src/docs/tech/lifecycle-stage-system.docblock.js +213 -0
- package/dist/libs/contracts/{dist → src}/docs/tech/llm/llm-integration.docblock.js +5 -73
- package/dist/libs/contracts/src/docs/tech/mcp-endpoints.docblock.js +1 -0
- package/dist/libs/contracts/src/docs/tech/presentation-runtime.docblock.js +1 -0
- package/dist/libs/contracts/src/docs/tech/schema/README.docblock.js +262 -0
- package/dist/libs/contracts/src/docs/tech/studio/learning-events.docblock.js +1 -0
- package/dist/libs/contracts/{dist → src}/docs/tech/studio/learning-journeys.docblock.js +2 -24
- package/dist/libs/contracts/{dist → src}/docs/tech/studio/platform-admin-panel.docblock.js +2 -23
- package/dist/libs/contracts/src/docs/tech/studio/project-access-teams.docblock.js +36 -0
- package/dist/libs/contracts/src/docs/tech/studio/project-routing.docblock.js +1 -0
- package/dist/libs/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.js +20 -0
- package/dist/libs/contracts/{dist → src}/docs/tech/studio/team-invitations.docblock.js +36 -40
- package/dist/libs/contracts/src/docs/tech/studio/workspace-ops.docblock.js +1 -0
- package/dist/libs/contracts/{dist → src}/docs/tech/studio/workspaces.docblock.js +2 -23
- package/dist/libs/contracts/{dist → src}/docs/tech/telemetry-ingest.docblock.js +3 -36
- package/dist/libs/contracts/src/docs/tech/templates/runtime.docblock.js +1 -0
- package/dist/libs/contracts/{dist → src}/docs/tech/vscode-extension.docblock.js +3 -36
- package/dist/libs/contracts/src/docs/tech/workflows/overview.docblock.js +1 -0
- package/dist/presentations/index.js +1 -64
- package/dist/progress-store.js +1 -30
- package/dist/tracks.js +1 -47
- package/dist/ui/LearningMiniApp.js +1 -82
- package/dist/ui/index.js +1 -3
- package/package.json +26 -30
- package/tsconfig.tsbuildinfo +1 -1
- package/.turbo/turbo-build$colon$bundle.log +0 -410
- package/CHANGELOG.md +0 -24
- package/dist/api-types.d.ts +0 -40
- package/dist/api.d.ts +0 -12
- package/dist/docs/index.d.ts +0 -1
- package/dist/docs/learning-journey-registry.docblock.d.ts +0 -1
- package/dist/example.d.ts +0 -32
- package/dist/examples/learning-journey-ambient-coach/src/track.js +0 -41
- package/dist/examples/learning-journey-crm-onboarding/dist/track.js +0 -98
- package/dist/examples/learning-journey-duo-drills/src/track.js +0 -65
- package/dist/examples/learning-journey-platform-tour/dist/track.js +0 -105
- package/dist/examples/learning-journey-quest-challenges/src/track.js +0 -35
- package/dist/examples/learning-journey-studio-onboarding/dist/track.js +0 -90
- package/dist/examples/learning-journey-ui-coaching/src/CoachingMiniApp.js +0 -64
- package/dist/examples/learning-journey-ui-coaching/src/components/EngagementMeter.js +0 -107
- package/dist/examples/learning-journey-ui-coaching/src/components/TipCard.js +0 -75
- package/dist/examples/learning-journey-ui-coaching/src/components/TipFeed.js +0 -65
- package/dist/examples/learning-journey-ui-coaching/src/components/index.js +0 -3
- package/dist/examples/learning-journey-ui-coaching/src/docs/index.js +0 -1
- package/dist/examples/learning-journey-ui-coaching/src/docs/learning-journey-ui-coaching.docblock.js +0 -20
- package/dist/examples/learning-journey-ui-coaching/src/index.js +0 -11
- package/dist/examples/learning-journey-ui-coaching/src/views/Overview.js +0 -152
- package/dist/examples/learning-journey-ui-coaching/src/views/Progress.js +0 -117
- package/dist/examples/learning-journey-ui-coaching/src/views/Steps.js +0 -68
- package/dist/examples/learning-journey-ui-coaching/src/views/Timeline.js +0 -112
- package/dist/examples/learning-journey-ui-coaching/src/views/index.js +0 -4
- package/dist/examples/learning-journey-ui-gamified/src/GamifiedMiniApp.js +0 -64
- package/dist/examples/learning-journey-ui-gamified/src/components/DayCalendar.js +0 -32
- package/dist/examples/learning-journey-ui-gamified/src/components/FlashCard.js +0 -79
- package/dist/examples/learning-journey-ui-gamified/src/components/MasteryRing.js +0 -81
- package/dist/examples/learning-journey-ui-gamified/src/components/index.js +0 -3
- package/dist/examples/learning-journey-ui-gamified/src/docs/index.js +0 -1
- package/dist/examples/learning-journey-ui-gamified/src/docs/learning-journey-ui-gamified.docblock.js +0 -20
- package/dist/examples/learning-journey-ui-gamified/src/index.js +0 -11
- package/dist/examples/learning-journey-ui-gamified/src/views/Overview.js +0 -163
- package/dist/examples/learning-journey-ui-gamified/src/views/Progress.js +0 -144
- package/dist/examples/learning-journey-ui-gamified/src/views/Steps.js +0 -55
- package/dist/examples/learning-journey-ui-gamified/src/views/Timeline.js +0 -132
- package/dist/examples/learning-journey-ui-gamified/src/views/index.js +0 -4
- package/dist/examples/learning-journey-ui-onboarding/src/OnboardingMiniApp.js +0 -64
- package/dist/examples/learning-journey-ui-onboarding/src/components/CodeSnippet.js +0 -4
- package/dist/examples/learning-journey-ui-onboarding/src/components/JourneyMap.js +0 -48
- package/dist/examples/learning-journey-ui-onboarding/src/components/StepChecklist.js +0 -79
- package/dist/examples/learning-journey-ui-onboarding/src/components/index.js +0 -3
- package/dist/examples/learning-journey-ui-onboarding/src/docs/index.js +0 -1
- package/dist/examples/learning-journey-ui-onboarding/src/docs/learning-journey-ui-onboarding.docblock.js +0 -20
- package/dist/examples/learning-journey-ui-onboarding/src/index.js +0 -10
- package/dist/examples/learning-journey-ui-onboarding/src/views/Overview.js +0 -180
- package/dist/examples/learning-journey-ui-onboarding/src/views/Progress.js +0 -162
- package/dist/examples/learning-journey-ui-onboarding/src/views/Steps.js +0 -91
- package/dist/examples/learning-journey-ui-onboarding/src/views/Timeline.js +0 -97
- package/dist/examples/learning-journey-ui-onboarding/src/views/index.js +0 -4
- package/dist/examples/learning-journey-ui-shared/src/components/BadgeDisplay.js +0 -44
- package/dist/examples/learning-journey-ui-shared/src/components/StreakCounter.js +0 -45
- package/dist/examples/learning-journey-ui-shared/src/components/ViewTabs.js +0 -48
- package/dist/examples/learning-journey-ui-shared/src/components/XpBar.js +0 -46
- package/dist/examples/learning-journey-ui-shared/src/components/index.js +0 -4
- package/dist/examples/learning-journey-ui-shared/src/docs/index.js +0 -1
- package/dist/examples/learning-journey-ui-shared/src/docs/learning-journey-ui-shared.docblock.js +0 -20
- package/dist/examples/learning-journey-ui-shared/src/hooks/index.js +0 -1
- package/dist/examples/learning-journey-ui-shared/src/hooks/useLearningProgress.js +0 -73
- package/dist/examples/learning-journey-ui-shared/src/index.js +0 -8
- package/dist/index.d.ts +0 -8
- package/dist/learning-journey-registry.feature.d.ts +0 -11
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/index.js +0 -29
- package/dist/libs/contracts/dist/docs/presentations.js +0 -71
- package/dist/libs/contracts/dist/docs/registry.js +0 -44
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
- package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +0 -5
- package/dist/libs/design-system/dist/components/atoms/Button.js +0 -33
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +0 -55
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -13
- package/dist/libs/ui-kit-core/dist/utils.js +0 -10
- package/dist/libs/ui-kit-web/dist/ui/card.js +0 -36
- package/dist/libs/ui-kit-web/dist/ui/progress.js +0 -23
- package/dist/libs/ui-kit-web/dist/ui/utils.js +0 -10
- package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -10
- package/dist/presentations/index.d.ts +0 -9
- package/dist/progress-store.d.ts +0 -10
- package/dist/tracks.d.ts +0 -39
- package/dist/ui/LearningMiniApp.d.ts +0 -22
- package/dist/ui/index.d.ts +0 -2
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Card, CardContent } from "../../../../libs/ui-kit-web/dist/ui/card.js";
|
|
4
|
-
import { cn } from "../../../../libs/ui-kit-web/dist/ui/utils.js";
|
|
5
|
-
import { Button$1 } from "../../../../libs/design-system/dist/components/atoms/Button.js";
|
|
6
|
-
import { useState } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
//#region ../learning-journey-ui-gamified/src/components/FlashCard.tsx
|
|
10
|
-
function FlashCard({ step, isCompleted, isCurrent, onComplete }) {
|
|
11
|
-
const [isFlipped, setIsFlipped] = useState(false);
|
|
12
|
-
return /* @__PURE__ */ jsx(Card, {
|
|
13
|
-
className: cn("relative cursor-pointer overflow-hidden transition-all duration-300", isCurrent && "ring-primary ring-2", isCompleted && "opacity-60"),
|
|
14
|
-
onClick: () => !isCompleted && setIsFlipped(!isFlipped),
|
|
15
|
-
children: /* @__PURE__ */ jsxs(CardContent, {
|
|
16
|
-
className: "p-6",
|
|
17
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
18
|
-
className: cn("space-y-4 transition-opacity duration-200", isFlipped ? "opacity-0" : "opacity-100"),
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ jsxs("div", {
|
|
21
|
-
className: "flex items-start justify-between",
|
|
22
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className: "flex-1",
|
|
24
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
25
|
-
className: "text-lg font-semibold",
|
|
26
|
-
children: step.title
|
|
27
|
-
}), step.description && /* @__PURE__ */ jsx("p", {
|
|
28
|
-
className: "text-muted-foreground mt-1 text-sm",
|
|
29
|
-
children: step.description
|
|
30
|
-
})]
|
|
31
|
-
}), step.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
32
|
-
className: "rounded-full bg-green-500/10 px-2 py-1 text-xs font-semibold text-green-500",
|
|
33
|
-
children: [
|
|
34
|
-
"+",
|
|
35
|
-
step.xpReward,
|
|
36
|
-
" XP"
|
|
37
|
-
]
|
|
38
|
-
})]
|
|
39
|
-
}),
|
|
40
|
-
isCompleted && /* @__PURE__ */ jsxs("div", {
|
|
41
|
-
className: "flex items-center gap-2 text-green-500",
|
|
42
|
-
children: [/* @__PURE__ */ jsx("span", { children: "✓" }), /* @__PURE__ */ jsx("span", {
|
|
43
|
-
className: "text-sm font-medium",
|
|
44
|
-
children: "Completed"
|
|
45
|
-
})]
|
|
46
|
-
}),
|
|
47
|
-
isCurrent && !isCompleted && /* @__PURE__ */ jsx("p", {
|
|
48
|
-
className: "text-muted-foreground text-xs",
|
|
49
|
-
children: "Tap to reveal action"
|
|
50
|
-
})
|
|
51
|
-
]
|
|
52
|
-
}), isFlipped && !isCompleted && /* @__PURE__ */ jsxs("div", {
|
|
53
|
-
className: "absolute inset-0 flex flex-col items-center justify-center gap-4 bg-gradient-to-br from-violet-500/10 to-violet-600/10 p-6",
|
|
54
|
-
children: [/* @__PURE__ */ jsx("p", {
|
|
55
|
-
className: "text-center text-sm",
|
|
56
|
-
children: step.instructions ?? "Complete this step to earn XP"
|
|
57
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
58
|
-
className: "flex gap-2",
|
|
59
|
-
children: [/* @__PURE__ */ jsx(Button$1, {
|
|
60
|
-
variant: "outline",
|
|
61
|
-
size: "sm",
|
|
62
|
-
onClick: () => setIsFlipped(false),
|
|
63
|
-
children: "Back"
|
|
64
|
-
}), /* @__PURE__ */ jsx(Button$1, {
|
|
65
|
-
size: "sm",
|
|
66
|
-
onClick: (e) => {
|
|
67
|
-
e.stopPropagation();
|
|
68
|
-
onComplete?.();
|
|
69
|
-
},
|
|
70
|
-
children: "Mark Complete"
|
|
71
|
-
})]
|
|
72
|
-
})]
|
|
73
|
-
})]
|
|
74
|
-
})
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
//#endregion
|
|
79
|
-
export { FlashCard };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../../../libs/ui-kit-web/dist/ui/utils.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region ../learning-journey-ui-gamified/src/components/MasteryRing.tsx
|
|
7
|
-
const sizeStyles = {
|
|
8
|
-
sm: {
|
|
9
|
-
container: "h-16 w-16",
|
|
10
|
-
text: "text-xs",
|
|
11
|
-
ring: 48,
|
|
12
|
-
stroke: 4
|
|
13
|
-
},
|
|
14
|
-
md: {
|
|
15
|
-
container: "h-24 w-24",
|
|
16
|
-
text: "text-sm",
|
|
17
|
-
ring: 72,
|
|
18
|
-
stroke: 6
|
|
19
|
-
},
|
|
20
|
-
lg: {
|
|
21
|
-
container: "h-32 w-32",
|
|
22
|
-
text: "text-base",
|
|
23
|
-
ring: 96,
|
|
24
|
-
stroke: 8
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const colorStyles = {
|
|
28
|
-
green: "stroke-green-500",
|
|
29
|
-
blue: "stroke-blue-500",
|
|
30
|
-
violet: "stroke-violet-500",
|
|
31
|
-
orange: "stroke-orange-500"
|
|
32
|
-
};
|
|
33
|
-
function MasteryRing({ label, percentage, size = "md", color = "violet" }) {
|
|
34
|
-
const styles = sizeStyles[size];
|
|
35
|
-
const radius = (styles.ring - styles.stroke) / 2;
|
|
36
|
-
const circumference = 2 * Math.PI * radius;
|
|
37
|
-
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
38
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
39
|
-
className: cn("relative flex flex-col items-center gap-1", styles.container),
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsxs("svg", {
|
|
42
|
-
className: "absolute -rotate-90",
|
|
43
|
-
width: styles.ring,
|
|
44
|
-
height: styles.ring,
|
|
45
|
-
viewBox: `0 0 ${styles.ring} ${styles.ring}`,
|
|
46
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
47
|
-
cx: styles.ring / 2,
|
|
48
|
-
cy: styles.ring / 2,
|
|
49
|
-
r: radius,
|
|
50
|
-
fill: "none",
|
|
51
|
-
strokeWidth: styles.stroke,
|
|
52
|
-
className: "stroke-muted"
|
|
53
|
-
}), /* @__PURE__ */ jsx("circle", {
|
|
54
|
-
cx: styles.ring / 2,
|
|
55
|
-
cy: styles.ring / 2,
|
|
56
|
-
r: radius,
|
|
57
|
-
fill: "none",
|
|
58
|
-
strokeWidth: styles.stroke,
|
|
59
|
-
strokeLinecap: "round",
|
|
60
|
-
strokeDasharray: circumference,
|
|
61
|
-
strokeDashoffset,
|
|
62
|
-
className: cn("transition-all duration-500", colorStyles[color])
|
|
63
|
-
})]
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ jsx("div", {
|
|
66
|
-
className: "flex h-full flex-col items-center justify-center",
|
|
67
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
68
|
-
className: cn("font-bold", styles.text),
|
|
69
|
-
children: [Math.round(percentage), "%"]
|
|
70
|
-
})
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ jsx("span", {
|
|
73
|
-
className: cn("text-muted-foreground mt-1 truncate", styles.text),
|
|
74
|
-
children: label
|
|
75
|
-
})
|
|
76
|
-
]
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//#endregion
|
|
81
|
-
export { MasteryRing };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./learning-journey-ui-gamified.docblock.js";
|
package/dist/examples/learning-journey-ui-gamified/src/docs/learning-journey-ui-gamified.docblock.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { registerDocBlocks } from "../../../../libs/contracts/dist/docs/registry.js";
|
|
2
|
-
import "../../../../libs/contracts/dist/docs/index.js";
|
|
3
|
-
|
|
4
|
-
//#region ../learning-journey-ui-gamified/src/docs/learning-journey-ui-gamified.docblock.ts
|
|
5
|
-
registerDocBlocks([{
|
|
6
|
-
id: "docs.examples.learning-journey-ui-gamified",
|
|
7
|
-
title: "Learning Journey UI — Gamified",
|
|
8
|
-
summary: "UI mini-app components for gamified learning: flashcards, mastery, streak/calendar.",
|
|
9
|
-
kind: "reference",
|
|
10
|
-
visibility: "public",
|
|
11
|
-
route: "/docs/examples/learning-journey-ui-gamified",
|
|
12
|
-
tags: [
|
|
13
|
-
"learning",
|
|
14
|
-
"ui",
|
|
15
|
-
"gamified"
|
|
16
|
-
],
|
|
17
|
-
body: `## Includes\n- Gamified mini-app shell\n- Views: overview, steps, progress, timeline\n- Components: flash card, mastery ring, day calendar\n\n## Notes\n- Compose with design system components.\n- Respect prefers-reduced-motion; keep tap targets large.`
|
|
18
|
-
}]);
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Overview } from "./views/Overview.js";
|
|
2
|
-
import { FlashCard } from "./components/FlashCard.js";
|
|
3
|
-
import { Steps } from "./views/Steps.js";
|
|
4
|
-
import { MasteryRing } from "./components/MasteryRing.js";
|
|
5
|
-
import { Progress } from "./views/Progress.js";
|
|
6
|
-
import { DayCalendar } from "./components/DayCalendar.js";
|
|
7
|
-
import { Timeline } from "./views/Timeline.js";
|
|
8
|
-
import { GamifiedMiniApp } from "./GamifiedMiniApp.js";
|
|
9
|
-
import "./views/index.js";
|
|
10
|
-
import "./components/index.js";
|
|
11
|
-
import "./docs/index.js";
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Card, CardContent, CardHeader, CardTitle } from "../../../../libs/ui-kit-web/dist/ui/card.js";
|
|
4
|
-
import { XpBar } from "../../../learning-journey-ui-shared/src/components/XpBar.js";
|
|
5
|
-
import { StreakCounter } from "../../../learning-journey-ui-shared/src/components/StreakCounter.js";
|
|
6
|
-
import { BadgeDisplay } from "../../../learning-journey-ui-shared/src/components/BadgeDisplay.js";
|
|
7
|
-
import { Button$1 } from "../../../../libs/design-system/dist/components/atoms/Button.js";
|
|
8
|
-
import "../../../learning-journey-ui-shared/src/index.js";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
//#region ../learning-journey-ui-gamified/src/views/Overview.tsx
|
|
12
|
-
function Overview({ track, progress, onStart }) {
|
|
13
|
-
const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
|
|
14
|
-
const completedSteps = progress.completedStepIds.length;
|
|
15
|
-
const totalSteps = track.steps.length;
|
|
16
|
-
const isComplete = completedSteps === totalSteps;
|
|
17
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
18
|
-
className: "space-y-6",
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ jsx(Card, {
|
|
21
|
-
className: "overflow-hidden bg-gradient-to-br from-violet-500/10 via-purple-500/10 to-fuchsia-500/10",
|
|
22
|
-
children: /* @__PURE__ */ jsx(CardContent, {
|
|
23
|
-
className: "p-6",
|
|
24
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
25
|
-
className: "flex flex-col items-center gap-4 text-center md:flex-row md:text-left",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ jsx("div", {
|
|
28
|
-
className: "flex h-20 w-20 items-center justify-center rounded-2xl bg-gradient-to-br from-violet-500 to-purple-600 text-4xl shadow-lg",
|
|
29
|
-
children: isComplete ? "🏆" : "🎯"
|
|
30
|
-
}),
|
|
31
|
-
/* @__PURE__ */ jsxs("div", {
|
|
32
|
-
className: "flex-1",
|
|
33
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
34
|
-
className: "text-2xl font-bold",
|
|
35
|
-
children: track.name
|
|
36
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
37
|
-
className: "text-muted-foreground mt-1",
|
|
38
|
-
children: track.description
|
|
39
|
-
})]
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ jsx("div", {
|
|
42
|
-
className: "flex items-center gap-3",
|
|
43
|
-
children: /* @__PURE__ */ jsx(StreakCounter, {
|
|
44
|
-
days: progress.streakDays,
|
|
45
|
-
size: "lg"
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
]
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ jsxs("div", {
|
|
53
|
-
className: "grid gap-4 md:grid-cols-3",
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
56
|
-
className: "pb-2",
|
|
57
|
-
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
58
|
-
className: "text-muted-foreground text-sm font-medium",
|
|
59
|
-
children: "XP Progress"
|
|
60
|
-
})
|
|
61
|
-
}), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
|
|
62
|
-
className: "text-3xl font-bold text-violet-500",
|
|
63
|
-
children: progress.xpEarned.toLocaleString()
|
|
64
|
-
}), /* @__PURE__ */ jsx(XpBar, {
|
|
65
|
-
current: progress.xpEarned,
|
|
66
|
-
max: totalXp,
|
|
67
|
-
showLabel: false,
|
|
68
|
-
size: "sm"
|
|
69
|
-
})] })] }),
|
|
70
|
-
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
71
|
-
className: "pb-2",
|
|
72
|
-
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
73
|
-
className: "text-muted-foreground text-sm font-medium",
|
|
74
|
-
children: "Steps Completed"
|
|
75
|
-
})
|
|
76
|
-
}), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsxs("div", {
|
|
77
|
-
className: "text-3xl font-bold",
|
|
78
|
-
children: [
|
|
79
|
-
completedSteps,
|
|
80
|
-
" ",
|
|
81
|
-
/* @__PURE__ */ jsxs("span", {
|
|
82
|
-
className: "text-muted-foreground text-lg",
|
|
83
|
-
children: ["/ ", totalSteps]
|
|
84
|
-
})
|
|
85
|
-
]
|
|
86
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
87
|
-
className: "bg-muted mt-2 h-2 w-full overflow-hidden rounded-full",
|
|
88
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
89
|
-
className: "h-full bg-green-500 transition-all duration-500",
|
|
90
|
-
style: { width: `${completedSteps / totalSteps * 100}%` }
|
|
91
|
-
})
|
|
92
|
-
})] })] }),
|
|
93
|
-
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
|
|
94
|
-
className: "pb-2",
|
|
95
|
-
children: /* @__PURE__ */ jsx(CardTitle, {
|
|
96
|
-
className: "text-muted-foreground text-sm font-medium",
|
|
97
|
-
children: "Badges Earned"
|
|
98
|
-
})
|
|
99
|
-
}), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(BadgeDisplay, {
|
|
100
|
-
badges: progress.badges,
|
|
101
|
-
size: "lg"
|
|
102
|
-
}) })] })
|
|
103
|
-
]
|
|
104
|
-
}),
|
|
105
|
-
!isComplete && /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
106
|
-
className: "flex items-center gap-2",
|
|
107
|
-
children: [/* @__PURE__ */ jsx("span", { children: "🎯" }), /* @__PURE__ */ jsx("span", { children: "Next Challenge" })]
|
|
108
|
-
}) }), /* @__PURE__ */ jsx(CardContent, { children: (() => {
|
|
109
|
-
const nextStep = track.steps.find((s) => !progress.completedStepIds.includes(s.id));
|
|
110
|
-
if (!nextStep) return null;
|
|
111
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
112
|
-
className: "flex items-center justify-between gap-4",
|
|
113
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
114
|
-
className: "font-semibold",
|
|
115
|
-
children: nextStep.title
|
|
116
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
117
|
-
className: "text-muted-foreground text-sm",
|
|
118
|
-
children: nextStep.description
|
|
119
|
-
})] }), /* @__PURE__ */ jsxs("div", {
|
|
120
|
-
className: "flex items-center gap-3",
|
|
121
|
-
children: [nextStep.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
122
|
-
className: "rounded-full bg-green-500/10 px-3 py-1 text-sm font-semibold text-green-500",
|
|
123
|
-
children: [
|
|
124
|
-
"+",
|
|
125
|
-
nextStep.xpReward,
|
|
126
|
-
" XP"
|
|
127
|
-
]
|
|
128
|
-
}), /* @__PURE__ */ jsx(Button$1, {
|
|
129
|
-
onClick: onStart,
|
|
130
|
-
children: "Start"
|
|
131
|
-
})]
|
|
132
|
-
})]
|
|
133
|
-
});
|
|
134
|
-
})() })] }),
|
|
135
|
-
isComplete && /* @__PURE__ */ jsx(Card, {
|
|
136
|
-
className: "border-green-500/50 bg-green-500/5",
|
|
137
|
-
children: /* @__PURE__ */ jsxs(CardContent, {
|
|
138
|
-
className: "flex items-center gap-4 p-6",
|
|
139
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
140
|
-
className: "text-4xl",
|
|
141
|
-
children: "🎉"
|
|
142
|
-
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
143
|
-
className: "text-lg font-semibold text-green-500",
|
|
144
|
-
children: "Track Complete!"
|
|
145
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
146
|
-
className: "text-muted-foreground",
|
|
147
|
-
children: [
|
|
148
|
-
"You've mastered all ",
|
|
149
|
-
totalSteps,
|
|
150
|
-
" challenges and earned",
|
|
151
|
-
" ",
|
|
152
|
-
progress.xpEarned,
|
|
153
|
-
" XP."
|
|
154
|
-
]
|
|
155
|
-
})] })]
|
|
156
|
-
})
|
|
157
|
-
})
|
|
158
|
-
]
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
//#endregion
|
|
163
|
-
export { Overview };
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Card, CardContent, CardHeader, CardTitle } from "../../../../libs/ui-kit-web/dist/ui/card.js";
|
|
4
|
-
import { XpBar } from "../../../learning-journey-ui-shared/src/components/XpBar.js";
|
|
5
|
-
import { BadgeDisplay } from "../../../learning-journey-ui-shared/src/components/BadgeDisplay.js";
|
|
6
|
-
import "../../../learning-journey-ui-shared/src/index.js";
|
|
7
|
-
import { MasteryRing } from "../components/MasteryRing.js";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
//#region ../learning-journey-ui-gamified/src/views/Progress.tsx
|
|
11
|
-
function Progress({ track, progress }) {
|
|
12
|
-
const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
|
|
13
|
-
const completedSteps = progress.completedStepIds.length;
|
|
14
|
-
const totalSteps = track.steps.length;
|
|
15
|
-
const percentComplete = totalSteps > 0 ? completedSteps / totalSteps * 100 : 0;
|
|
16
|
-
const surfaces = /* @__PURE__ */ new Map();
|
|
17
|
-
track.steps.forEach((step) => {
|
|
18
|
-
const surface = step.metadata?.surface ?? "general";
|
|
19
|
-
const current = surfaces.get(surface) ?? {
|
|
20
|
-
total: 0,
|
|
21
|
-
completed: 0
|
|
22
|
-
};
|
|
23
|
-
surfaces.set(surface, {
|
|
24
|
-
total: current.total + 1,
|
|
25
|
-
completed: current.completed + (progress.completedStepIds.includes(step.id) ? 1 : 0)
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
const surfaceColors = [
|
|
29
|
-
"green",
|
|
30
|
-
"blue",
|
|
31
|
-
"violet",
|
|
32
|
-
"orange"
|
|
33
|
-
];
|
|
34
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
35
|
-
className: "space-y-6",
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
38
|
-
className: "flex items-center gap-2",
|
|
39
|
-
children: [/* @__PURE__ */ jsx("span", { children: "⚡" }), /* @__PURE__ */ jsx("span", { children: "Experience Points" })]
|
|
40
|
-
}) }), /* @__PURE__ */ jsxs(CardContent, {
|
|
41
|
-
className: "space-y-4",
|
|
42
|
-
children: [
|
|
43
|
-
/* @__PURE__ */ jsxs("div", {
|
|
44
|
-
className: "flex items-baseline gap-2",
|
|
45
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
46
|
-
className: "text-4xl font-bold text-violet-500",
|
|
47
|
-
children: progress.xpEarned.toLocaleString()
|
|
48
|
-
}), /* @__PURE__ */ jsxs("span", {
|
|
49
|
-
className: "text-muted-foreground",
|
|
50
|
-
children: [
|
|
51
|
-
"/ ",
|
|
52
|
-
totalXp.toLocaleString(),
|
|
53
|
-
" XP"
|
|
54
|
-
]
|
|
55
|
-
})]
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ jsx(XpBar, {
|
|
58
|
-
current: progress.xpEarned,
|
|
59
|
-
max: totalXp,
|
|
60
|
-
showLabel: false,
|
|
61
|
-
size: "lg"
|
|
62
|
-
}),
|
|
63
|
-
track.completionRewards?.xpBonus && percentComplete < 100 && /* @__PURE__ */ jsxs("p", {
|
|
64
|
-
className: "text-muted-foreground text-sm",
|
|
65
|
-
children: [
|
|
66
|
-
"🎁 Complete all steps for a",
|
|
67
|
-
" ",
|
|
68
|
-
/* @__PURE__ */ jsxs("span", {
|
|
69
|
-
className: "font-semibold text-green-500",
|
|
70
|
-
children: [
|
|
71
|
-
"+",
|
|
72
|
-
track.completionRewards.xpBonus,
|
|
73
|
-
" XP"
|
|
74
|
-
]
|
|
75
|
-
}),
|
|
76
|
-
" ",
|
|
77
|
-
"bonus!"
|
|
78
|
-
]
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
})] }),
|
|
82
|
-
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
83
|
-
className: "flex items-center gap-2",
|
|
84
|
-
children: [/* @__PURE__ */ jsx("span", { children: "🎯" }), /* @__PURE__ */ jsx("span", { children: "Skill Mastery" })]
|
|
85
|
-
}) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
86
|
-
className: "flex flex-wrap justify-center gap-6",
|
|
87
|
-
children: [Array.from(surfaces.entries()).map(([surface, data], index) => /* @__PURE__ */ jsx(MasteryRing, {
|
|
88
|
-
label: surface.charAt(0).toUpperCase() + surface.slice(1),
|
|
89
|
-
percentage: data.completed / data.total * 100,
|
|
90
|
-
color: surfaceColors[index % surfaceColors.length],
|
|
91
|
-
size: "lg"
|
|
92
|
-
}, surface)), /* @__PURE__ */ jsx(MasteryRing, {
|
|
93
|
-
label: "Overall",
|
|
94
|
-
percentage: percentComplete,
|
|
95
|
-
color: "violet",
|
|
96
|
-
size: "lg"
|
|
97
|
-
})]
|
|
98
|
-
}) })] }),
|
|
99
|
-
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
100
|
-
className: "flex items-center gap-2",
|
|
101
|
-
children: [/* @__PURE__ */ jsx("span", { children: "🏅" }), /* @__PURE__ */ jsx("span", { children: "Badges Earned" })]
|
|
102
|
-
}) }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(BadgeDisplay, {
|
|
103
|
-
badges: progress.badges,
|
|
104
|
-
size: "lg",
|
|
105
|
-
maxVisible: 10
|
|
106
|
-
}), progress.badges.length === 0 && /* @__PURE__ */ jsx("p", {
|
|
107
|
-
className: "text-muted-foreground text-sm",
|
|
108
|
-
children: "Complete the track to earn your first badge!"
|
|
109
|
-
})] })] }),
|
|
110
|
-
/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
|
|
111
|
-
className: "flex items-center gap-2",
|
|
112
|
-
children: [/* @__PURE__ */ jsx("span", { children: "📊" }), /* @__PURE__ */ jsx("span", { children: "Step Breakdown" })]
|
|
113
|
-
}) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
|
|
114
|
-
className: "space-y-2",
|
|
115
|
-
children: track.steps.map((step) => {
|
|
116
|
-
const isCompleted = progress.completedStepIds.includes(step.id);
|
|
117
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
118
|
-
className: "flex items-center justify-between rounded-lg border p-3",
|
|
119
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
120
|
-
className: "flex items-center gap-3",
|
|
121
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
122
|
-
className: isCompleted ? "text-green-500" : "text-muted-foreground",
|
|
123
|
-
children: isCompleted ? "✓" : "○"
|
|
124
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
125
|
-
className: isCompleted ? "text-foreground" : "text-muted-foreground",
|
|
126
|
-
children: step.title
|
|
127
|
-
})]
|
|
128
|
-
}), step.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
129
|
-
className: `text-sm font-medium ${isCompleted ? "text-green-500" : "text-muted-foreground"}`,
|
|
130
|
-
children: [
|
|
131
|
-
isCompleted ? "+" : "",
|
|
132
|
-
step.xpReward,
|
|
133
|
-
" XP"
|
|
134
|
-
]
|
|
135
|
-
})]
|
|
136
|
-
}, step.id);
|
|
137
|
-
})
|
|
138
|
-
}) })] })
|
|
139
|
-
]
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
//#endregion
|
|
144
|
-
export { Progress };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { FlashCard } from "../components/FlashCard.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region ../learning-journey-ui-gamified/src/views/Steps.tsx
|
|
7
|
-
function Steps({ track, progress, onStepComplete }) {
|
|
8
|
-
const currentStepIndex = track.steps.findIndex((s) => !progress.completedStepIds.includes(s.id));
|
|
9
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
-
className: "space-y-6",
|
|
11
|
-
children: [
|
|
12
|
-
/* @__PURE__ */ jsxs("div", {
|
|
13
|
-
className: "text-center",
|
|
14
|
-
children: [/* @__PURE__ */ jsx("h2", {
|
|
15
|
-
className: "text-xl font-bold",
|
|
16
|
-
children: "Complete Your Challenges"
|
|
17
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
18
|
-
className: "text-muted-foreground",
|
|
19
|
-
children: "Tap each card to reveal the action, then mark as complete"
|
|
20
|
-
})]
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ jsx("div", {
|
|
23
|
-
className: "grid gap-4 md:grid-cols-2",
|
|
24
|
-
children: track.steps.map((step, index) => {
|
|
25
|
-
return /* @__PURE__ */ jsx(FlashCard, {
|
|
26
|
-
step,
|
|
27
|
-
isCompleted: progress.completedStepIds.includes(step.id),
|
|
28
|
-
isCurrent: index === currentStepIndex,
|
|
29
|
-
onComplete: () => onStepComplete?.(step.id)
|
|
30
|
-
}, step.id);
|
|
31
|
-
})
|
|
32
|
-
}),
|
|
33
|
-
/* @__PURE__ */ jsxs("div", {
|
|
34
|
-
className: "text-muted-foreground text-center text-sm",
|
|
35
|
-
children: [
|
|
36
|
-
progress.completedStepIds.length,
|
|
37
|
-
" of ",
|
|
38
|
-
track.steps.length,
|
|
39
|
-
" completed",
|
|
40
|
-
track.completionRewards?.xpBonus && /* @__PURE__ */ jsxs("span", {
|
|
41
|
-
className: "ml-2 text-green-500",
|
|
42
|
-
children: [
|
|
43
|
-
"(+",
|
|
44
|
-
track.completionRewards.xpBonus,
|
|
45
|
-
" XP bonus on completion)"
|
|
46
|
-
]
|
|
47
|
-
})
|
|
48
|
-
]
|
|
49
|
-
})
|
|
50
|
-
]
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
//#endregion
|
|
55
|
-
export { Steps };
|