@lssm/example.learning-journey-registry 0.0.0-canary-20251217062139 → 0.0.0-canary-20251217072406

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.
Files changed (110) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +409 -410
  2. package/.turbo/turbo-build.log +410 -55
  3. package/CHANGELOG.md +14 -12
  4. package/dist/api.js +170 -1
  5. package/dist/docs/index.js +1 -1
  6. package/dist/docs/learning-journey-registry.docblock.js +38 -1
  7. package/dist/example.js +34 -1
  8. package/dist/examples/learning-journey-ambient-coach/src/track.js +41 -1
  9. package/dist/examples/learning-journey-crm-onboarding/dist/track.js +98 -1
  10. package/dist/examples/learning-journey-duo-drills/src/track.js +65 -1
  11. package/dist/examples/learning-journey-platform-tour/dist/track.js +105 -1
  12. package/dist/examples/learning-journey-quest-challenges/src/track.js +35 -1
  13. package/dist/examples/learning-journey-studio-onboarding/dist/track.js +90 -1
  14. package/dist/examples/learning-journey-ui-coaching/src/CoachingMiniApp.js +64 -1
  15. package/dist/examples/learning-journey-ui-coaching/src/components/EngagementMeter.js +107 -1
  16. package/dist/examples/learning-journey-ui-coaching/src/components/TipCard.js +75 -1
  17. package/dist/examples/learning-journey-ui-coaching/src/components/TipFeed.js +65 -1
  18. package/dist/examples/learning-journey-ui-coaching/src/components/index.js +3 -1
  19. package/dist/examples/learning-journey-ui-coaching/src/docs/index.js +1 -1
  20. package/dist/examples/learning-journey-ui-coaching/src/docs/learning-journey-ui-coaching.docblock.js +19 -7
  21. package/dist/examples/learning-journey-ui-coaching/src/index.js +11 -1
  22. package/dist/examples/learning-journey-ui-coaching/src/views/Overview.js +152 -1
  23. package/dist/examples/learning-journey-ui-coaching/src/views/Progress.js +117 -1
  24. package/dist/examples/learning-journey-ui-coaching/src/views/Steps.js +68 -1
  25. package/dist/examples/learning-journey-ui-coaching/src/views/Timeline.js +112 -1
  26. package/dist/examples/learning-journey-ui-coaching/src/views/index.js +4 -1
  27. package/dist/examples/learning-journey-ui-gamified/src/GamifiedMiniApp.js +64 -1
  28. package/dist/examples/learning-journey-ui-gamified/src/components/DayCalendar.js +32 -1
  29. package/dist/examples/learning-journey-ui-gamified/src/components/FlashCard.js +79 -1
  30. package/dist/examples/learning-journey-ui-gamified/src/components/MasteryRing.js +81 -1
  31. package/dist/examples/learning-journey-ui-gamified/src/components/index.js +3 -1
  32. package/dist/examples/learning-journey-ui-gamified/src/docs/index.js +1 -1
  33. package/dist/examples/learning-journey-ui-gamified/src/docs/learning-journey-ui-gamified.docblock.js +19 -7
  34. package/dist/examples/learning-journey-ui-gamified/src/index.js +11 -1
  35. package/dist/examples/learning-journey-ui-gamified/src/views/Overview.js +163 -1
  36. package/dist/examples/learning-journey-ui-gamified/src/views/Progress.js +144 -1
  37. package/dist/examples/learning-journey-ui-gamified/src/views/Steps.js +55 -1
  38. package/dist/examples/learning-journey-ui-gamified/src/views/Timeline.js +132 -1
  39. package/dist/examples/learning-journey-ui-gamified/src/views/index.js +4 -1
  40. package/dist/examples/learning-journey-ui-onboarding/src/OnboardingMiniApp.js +64 -1
  41. package/dist/examples/learning-journey-ui-onboarding/src/components/CodeSnippet.js +4 -1
  42. package/dist/examples/learning-journey-ui-onboarding/src/components/JourneyMap.js +48 -1
  43. package/dist/examples/learning-journey-ui-onboarding/src/components/StepChecklist.js +79 -1
  44. package/dist/examples/learning-journey-ui-onboarding/src/components/index.js +3 -1
  45. package/dist/examples/learning-journey-ui-onboarding/src/docs/index.js +1 -1
  46. package/dist/examples/learning-journey-ui-onboarding/src/docs/learning-journey-ui-onboarding.docblock.js +19 -7
  47. package/dist/examples/learning-journey-ui-onboarding/src/index.js +10 -1
  48. package/dist/examples/learning-journey-ui-onboarding/src/views/Overview.js +180 -1
  49. package/dist/examples/learning-journey-ui-onboarding/src/views/Progress.js +162 -1
  50. package/dist/examples/learning-journey-ui-onboarding/src/views/Steps.js +91 -1
  51. package/dist/examples/learning-journey-ui-onboarding/src/views/Timeline.js +97 -1
  52. package/dist/examples/learning-journey-ui-onboarding/src/views/index.js +4 -1
  53. package/dist/examples/learning-journey-ui-shared/src/components/BadgeDisplay.js +44 -1
  54. package/dist/examples/learning-journey-ui-shared/src/components/StreakCounter.js +45 -1
  55. package/dist/examples/learning-journey-ui-shared/src/components/ViewTabs.js +48 -1
  56. package/dist/examples/learning-journey-ui-shared/src/components/XpBar.js +46 -1
  57. package/dist/examples/learning-journey-ui-shared/src/components/index.js +4 -1
  58. package/dist/examples/learning-journey-ui-shared/src/docs/index.js +1 -1
  59. package/dist/examples/learning-journey-ui-shared/src/docs/learning-journey-ui-shared.docblock.js +19 -6
  60. package/dist/examples/learning-journey-ui-shared/src/hooks/index.js +1 -1
  61. package/dist/examples/learning-journey-ui-shared/src/hooks/useLearningProgress.js +73 -1
  62. package/dist/examples/learning-journey-ui-shared/src/index.js +8 -1
  63. package/dist/index.js +13 -1
  64. package/dist/learning-journey-registry.feature.js +66 -1
  65. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  66. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  67. package/dist/libs/contracts/dist/docs/index.js +29 -1
  68. package/dist/libs/contracts/dist/docs/presentations.js +71 -1
  69. package/dist/libs/contracts/dist/docs/registry.js +44 -1
  70. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  71. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  72. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  73. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  74. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  75. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  76. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  77. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  78. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  79. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  80. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  81. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  82. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  83. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  84. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  85. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  86. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  87. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  88. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  89. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  90. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  91. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  92. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  93. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  94. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  95. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +5 -1
  96. package/dist/libs/design-system/dist/components/atoms/Button.js +33 -1
  97. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +55 -1
  98. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -1
  99. package/dist/libs/ui-kit-core/dist/utils.js +10 -1
  100. package/dist/libs/ui-kit-web/dist/ui/card.js +36 -1
  101. package/dist/libs/ui-kit-web/dist/ui/progress.js +23 -1
  102. package/dist/libs/ui-kit-web/dist/ui/utils.js +10 -1
  103. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +10 -1
  104. package/dist/presentations/index.js +64 -1
  105. package/dist/progress-store.js +30 -1
  106. package/dist/tracks.js +47 -1
  107. package/dist/ui/LearningMiniApp.js +82 -1
  108. package/dist/ui/index.js +3 -1
  109. package/package.json +16 -14
  110. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1,117 @@
1
- "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{XpBar as i}from"../../../learning-journey-ui-shared/src/components/XpBar.js";import{StreakCounter as a}from"../../../learning-journey-ui-shared/src/components/StreakCounter.js";import{BadgeDisplay as o}from"../../../learning-journey-ui-shared/src/components/BadgeDisplay.js";import"../../../learning-journey-ui-shared/src/index.js";import{EngagementMeter as s}from"../components/EngagementMeter.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({track:u,progress:d}){let f=u.totalXp??u.steps.reduce((e,t)=>e+(t.xpReward??0),0),p=d.completedStepIds.length,m=u.steps.length-p,h=Math.floor(p*.7),g=p-h;return l(`div`,{className:`space-y-6`,children:[l(e,{children:[c(n,{children:l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`📊`}),c(`span`,{children:`Engagement Overview`})]})}),c(t,{children:c(s,{actioned:h,acknowledged:g,pending:m,streak:d.streakDays})})]}),l(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`XP Earned`})}),l(t,{className:`space-y-3`,children:[l(`div`,{className:`flex items-baseline gap-2`,children:[c(`span`,{className:`text-3xl font-bold text-orange-500`,children:d.xpEarned}),l(`span`,{className:`text-muted-foreground`,children:[`/ `,f,` XP`]})]}),c(i,{current:d.xpEarned,max:f,showLabel:!1,size:`lg`})]})]}),l(e,{children:[c(n,{className:`pb-2`,children:c(r,{className:`text-muted-foreground text-sm font-medium`,children:`Engagement Streak`})}),c(t,{children:l(`div`,{className:`flex items-center gap-4`,children:[c(a,{days:d.streakDays,size:`lg`}),c(`div`,{className:`text-muted-foreground text-sm`,children:d.streakDays>0?`Keep going!`:`Start your streak today!`})]})})]})]}),l(e,{children:[c(n,{children:l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`🏅`}),c(`span`,{children:`Achievements`})]})}),l(t,{children:[c(o,{badges:d.badges,size:`lg`,maxVisible:10}),d.badges.length===0&&c(`p`,{className:`text-muted-foreground text-sm`,children:`Action tips to unlock achievements!`})]})]}),l(e,{children:[c(n,{children:l(r,{className:`flex items-center gap-2`,children:[c(`span`,{children:`💡`}),c(`span`,{children:`Tip Status`})]})}),c(t,{children:c(`div`,{className:`space-y-3`,children:u.steps.map(e=>{let t=d.completedStepIds.includes(e.id);return l(`div`,{className:`flex items-center justify-between rounded-lg border p-3`,children:[l(`div`,{className:`flex items-center gap-3`,children:[c(`span`,{className:t?`text-green-500`:`text-amber-500`,children:t?`✓`:`○`}),c(`span`,{className:t?`text-muted-foreground`:`text-foreground`,children:e.title})]}),c(`span`,{className:`text-sm ${t?`text-green-500`:`text-muted-foreground`}`,children:t?`Actioned`:`Pending`})]},e.id)})})})]})]})}export{u as ProgressView};
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 "../../../learning-journey-ui-shared/src/index.js";
8
+ import { EngagementMeter } from "../components/EngagementMeter.js";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+
11
+ //#region ../learning-journey-ui-coaching/src/views/Progress.tsx
12
+ function ProgressView({ track, progress }) {
13
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
14
+ const completedSteps = progress.completedStepIds.length;
15
+ const pendingSteps = track.steps.length - completedSteps;
16
+ const actioned = Math.floor(completedSteps * .7);
17
+ const acknowledged = completedSteps - actioned;
18
+ return /* @__PURE__ */ jsxs("div", {
19
+ className: "space-y-6",
20
+ children: [
21
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
22
+ className: "flex items-center gap-2",
23
+ children: [/* @__PURE__ */ jsx("span", { children: "📊" }), /* @__PURE__ */ jsx("span", { children: "Engagement Overview" })]
24
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(EngagementMeter, {
25
+ actioned,
26
+ acknowledged,
27
+ pending: pendingSteps,
28
+ streak: progress.streakDays
29
+ }) })] }),
30
+ /* @__PURE__ */ jsxs("div", {
31
+ className: "grid gap-4 md:grid-cols-2",
32
+ children: [/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
33
+ className: "pb-2",
34
+ children: /* @__PURE__ */ jsx(CardTitle, {
35
+ className: "text-muted-foreground text-sm font-medium",
36
+ children: "XP Earned"
37
+ })
38
+ }), /* @__PURE__ */ jsxs(CardContent, {
39
+ className: "space-y-3",
40
+ children: [/* @__PURE__ */ jsxs("div", {
41
+ className: "flex items-baseline gap-2",
42
+ children: [/* @__PURE__ */ jsx("span", {
43
+ className: "text-3xl font-bold text-orange-500",
44
+ children: progress.xpEarned
45
+ }), /* @__PURE__ */ jsxs("span", {
46
+ className: "text-muted-foreground",
47
+ children: [
48
+ "/ ",
49
+ totalXp,
50
+ " XP"
51
+ ]
52
+ })]
53
+ }), /* @__PURE__ */ jsx(XpBar, {
54
+ current: progress.xpEarned,
55
+ max: totalXp,
56
+ showLabel: false,
57
+ size: "lg"
58
+ })]
59
+ })] }), /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
60
+ className: "pb-2",
61
+ children: /* @__PURE__ */ jsx(CardTitle, {
62
+ className: "text-muted-foreground text-sm font-medium",
63
+ children: "Engagement Streak"
64
+ })
65
+ }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
66
+ className: "flex items-center gap-4",
67
+ children: [/* @__PURE__ */ jsx(StreakCounter, {
68
+ days: progress.streakDays,
69
+ size: "lg"
70
+ }), /* @__PURE__ */ jsx("div", {
71
+ className: "text-muted-foreground text-sm",
72
+ children: progress.streakDays > 0 ? "Keep going!" : "Start your streak today!"
73
+ })]
74
+ }) })] })]
75
+ }),
76
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
77
+ className: "flex items-center gap-2",
78
+ children: [/* @__PURE__ */ jsx("span", { children: "🏅" }), /* @__PURE__ */ jsx("span", { children: "Achievements" })]
79
+ }) }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(BadgeDisplay, {
80
+ badges: progress.badges,
81
+ size: "lg",
82
+ maxVisible: 10
83
+ }), progress.badges.length === 0 && /* @__PURE__ */ jsx("p", {
84
+ className: "text-muted-foreground text-sm",
85
+ children: "Action tips to unlock achievements!"
86
+ })] })] }),
87
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
88
+ className: "flex items-center gap-2",
89
+ children: [/* @__PURE__ */ jsx("span", { children: "💡" }), /* @__PURE__ */ jsx("span", { children: "Tip Status" })]
90
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
91
+ className: "space-y-3",
92
+ children: track.steps.map((step) => {
93
+ const isCompleted = progress.completedStepIds.includes(step.id);
94
+ return /* @__PURE__ */ jsxs("div", {
95
+ className: "flex items-center justify-between rounded-lg border p-3",
96
+ children: [/* @__PURE__ */ jsxs("div", {
97
+ className: "flex items-center gap-3",
98
+ children: [/* @__PURE__ */ jsx("span", {
99
+ className: isCompleted ? "text-green-500" : "text-amber-500",
100
+ children: isCompleted ? "✓" : "○"
101
+ }), /* @__PURE__ */ jsx("span", {
102
+ className: isCompleted ? "text-muted-foreground" : "text-foreground",
103
+ children: step.title
104
+ })]
105
+ }), /* @__PURE__ */ jsx("span", {
106
+ className: `text-sm ${isCompleted ? "text-green-500" : "text-muted-foreground"}`,
107
+ children: isCompleted ? "Actioned" : "Pending"
108
+ })]
109
+ }, step.id);
110
+ })
111
+ }) })] })
112
+ ]
113
+ });
114
+ }
115
+
116
+ //#endregion
117
+ export { ProgressView };
@@ -1 +1,68 @@
1
- "use client";import{TipCard as e}from"../components/TipCard.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({track:r,progress:i,onStepComplete:a}){let o=i.completedStepIds.length,s=r.steps.length,c=[...r.steps].sort((e,t)=>{let n=i.completedStepIds.includes(e.id);return n===i.completedStepIds.includes(t.id)?0:n?1:-1}),l=r.steps.find(e=>!i.completedStepIds.includes(e.id))?.id;return n(`div`,{className:`space-y-6`,children:[n(`div`,{className:`text-center`,children:[t(`h2`,{className:`text-xl font-bold`,children:`Coaching Tips`}),t(`p`,{className:`text-muted-foreground`,children:`Review and take action on personalized tips`}),n(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:[o,` of `,s,` tips actioned`]})]}),t(`div`,{className:`space-y-3`,children:c.map(n=>t(e,{step:n,isCompleted:i.completedStepIds.includes(n.id),isCurrent:n.id===l,onComplete:()=>a?.(n.id),onDismiss:()=>a?.(n.id)},n.id))}),o===s&&n(`div`,{className:`text-muted-foreground text-center`,children:[t(`span`,{className:`text-2xl`,children:`✨`}),t(`p`,{className:`mt-2`,children:`All tips have been addressed!`})]})]})}export{r as Steps};
1
+ 'use client';
2
+
3
+ import { TipCard } from "../components/TipCard.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region ../learning-journey-ui-coaching/src/views/Steps.tsx
7
+ function Steps({ track, progress, onStepComplete }) {
8
+ const completedSteps = progress.completedStepIds.length;
9
+ const totalSteps = track.steps.length;
10
+ const sortedSteps = [...track.steps].sort((a, b) => {
11
+ const aCompleted = progress.completedStepIds.includes(a.id);
12
+ if (aCompleted === progress.completedStepIds.includes(b.id)) return 0;
13
+ return aCompleted ? 1 : -1;
14
+ });
15
+ const currentStepId = track.steps.find((s) => !progress.completedStepIds.includes(s.id))?.id;
16
+ return /* @__PURE__ */ jsxs("div", {
17
+ className: "space-y-6",
18
+ children: [
19
+ /* @__PURE__ */ jsxs("div", {
20
+ className: "text-center",
21
+ children: [
22
+ /* @__PURE__ */ jsx("h2", {
23
+ className: "text-xl font-bold",
24
+ children: "Coaching Tips"
25
+ }),
26
+ /* @__PURE__ */ jsx("p", {
27
+ className: "text-muted-foreground",
28
+ children: "Review and take action on personalized tips"
29
+ }),
30
+ /* @__PURE__ */ jsxs("p", {
31
+ className: "text-muted-foreground mt-2 text-sm",
32
+ children: [
33
+ completedSteps,
34
+ " of ",
35
+ totalSteps,
36
+ " tips actioned"
37
+ ]
38
+ })
39
+ ]
40
+ }),
41
+ /* @__PURE__ */ jsx("div", {
42
+ className: "space-y-3",
43
+ children: sortedSteps.map((step) => {
44
+ return /* @__PURE__ */ jsx(TipCard, {
45
+ step,
46
+ isCompleted: progress.completedStepIds.includes(step.id),
47
+ isCurrent: step.id === currentStepId,
48
+ onComplete: () => onStepComplete?.(step.id),
49
+ onDismiss: () => onStepComplete?.(step.id)
50
+ }, step.id);
51
+ })
52
+ }),
53
+ completedSteps === totalSteps && /* @__PURE__ */ jsxs("div", {
54
+ className: "text-muted-foreground text-center",
55
+ children: [/* @__PURE__ */ jsx("span", {
56
+ className: "text-2xl",
57
+ children: "✨"
58
+ }), /* @__PURE__ */ jsx("p", {
59
+ className: "mt-2",
60
+ children: "All tips have been addressed!"
61
+ })]
62
+ })
63
+ ]
64
+ });
65
+ }
66
+
67
+ //#endregion
68
+ export { Steps };
@@ -1 +1,112 @@
1
- "use client";import{Card as e,CardContent as t,CardHeader as n,CardTitle as r}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{TipFeed as i}from"../components/TipFeed.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({track:s,progress:c}){let l=s.steps.map(e=>({step:e,isCompleted:c.completedStepIds.includes(e.id),completedAt:c.completedStepIds.includes(e.id)?`Recently`:void 0})).sort((e,t)=>e.isCompleted&&!t.isCompleted?-1:!e.isCompleted&&t.isCompleted?1:0),u=l.filter(e=>e.isCompleted).length,d=l.length-u;return o(`div`,{className:`space-y-6`,children:[o(`div`,{className:`text-center`,children:[a(`h2`,{className:`text-xl font-bold`,children:`Activity Timeline`}),a(`p`,{className:`text-muted-foreground`,children:`Your coaching journey and tip history`})]}),o(`div`,{className:`grid grid-cols-2 gap-4`,children:[a(e,{children:o(t,{className:`p-4 text-center`,children:[a(`div`,{className:`text-2xl font-bold text-green-500`,children:u}),a(`div`,{className:`text-muted-foreground text-sm`,children:`Tips Actioned`})]})}),a(e,{children:o(t,{className:`p-4 text-center`,children:[a(`div`,{className:`text-2xl font-bold text-amber-500`,children:d}),a(`div`,{className:`text-muted-foreground text-sm`,children:`Tips Pending`})]})})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`📝`}),a(`span`,{children:`Coaching Feed`})]})}),a(t,{children:a(i,{items:l})})]}),o(e,{children:[a(n,{children:o(r,{className:`flex items-center gap-2`,children:[a(`span`,{children:`📈`}),a(`span`,{children:`Journey Stats`})]})}),a(t,{children:o(`div`,{className:`space-y-4`,children:[o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`Total Tips`}),a(`span`,{className:`font-semibold`,children:s.steps.length})]}),o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`Completed`}),a(`span`,{className:`font-semibold text-green-500`,children:u})]}),o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`XP Earned`}),a(`span`,{className:`font-semibold text-orange-500`,children:c.xpEarned})]}),o(`div`,{className:`flex items-center justify-between`,children:[a(`span`,{className:`text-muted-foreground`,children:`Current Streak`}),a(`span`,{className:`font-semibold`,children:c.streakDays>0?`🔥 ${c.streakDays} days`:`Start today!`})]})]})})]})]})}export{s as Timeline};
1
+ 'use client';
2
+
3
+ import { Card, CardContent, CardHeader, CardTitle } from "../../../../libs/ui-kit-web/dist/ui/card.js";
4
+ import { TipFeed } from "../components/TipFeed.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ //#region ../learning-journey-ui-coaching/src/views/Timeline.tsx
8
+ function Timeline({ track, progress }) {
9
+ const feedItems = track.steps.map((step) => ({
10
+ step,
11
+ isCompleted: progress.completedStepIds.includes(step.id),
12
+ completedAt: progress.completedStepIds.includes(step.id) ? "Recently" : void 0
13
+ })).sort((a, b) => {
14
+ if (a.isCompleted && !b.isCompleted) return -1;
15
+ if (!a.isCompleted && b.isCompleted) return 1;
16
+ return 0;
17
+ });
18
+ const completedCount = feedItems.filter((f) => f.isCompleted).length;
19
+ const pendingCount = feedItems.length - completedCount;
20
+ return /* @__PURE__ */ jsxs("div", {
21
+ className: "space-y-6",
22
+ children: [
23
+ /* @__PURE__ */ jsxs("div", {
24
+ className: "text-center",
25
+ children: [/* @__PURE__ */ jsx("h2", {
26
+ className: "text-xl font-bold",
27
+ children: "Activity Timeline"
28
+ }), /* @__PURE__ */ jsx("p", {
29
+ className: "text-muted-foreground",
30
+ children: "Your coaching journey and tip history"
31
+ })]
32
+ }),
33
+ /* @__PURE__ */ jsxs("div", {
34
+ className: "grid grid-cols-2 gap-4",
35
+ children: [/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
36
+ className: "p-4 text-center",
37
+ children: [/* @__PURE__ */ jsx("div", {
38
+ className: "text-2xl font-bold text-green-500",
39
+ children: completedCount
40
+ }), /* @__PURE__ */ jsx("div", {
41
+ className: "text-muted-foreground text-sm",
42
+ children: "Tips Actioned"
43
+ })]
44
+ }) }), /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
45
+ className: "p-4 text-center",
46
+ children: [/* @__PURE__ */ jsx("div", {
47
+ className: "text-2xl font-bold text-amber-500",
48
+ children: pendingCount
49
+ }), /* @__PURE__ */ jsx("div", {
50
+ className: "text-muted-foreground text-sm",
51
+ children: "Tips Pending"
52
+ })]
53
+ }) })]
54
+ }),
55
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
56
+ className: "flex items-center gap-2",
57
+ children: [/* @__PURE__ */ jsx("span", { children: "📝" }), /* @__PURE__ */ jsx("span", { children: "Coaching Feed" })]
58
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(TipFeed, { items: feedItems }) })] }),
59
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
60
+ className: "flex items-center gap-2",
61
+ children: [/* @__PURE__ */ jsx("span", { children: "📈" }), /* @__PURE__ */ jsx("span", { children: "Journey Stats" })]
62
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
63
+ className: "space-y-4",
64
+ children: [
65
+ /* @__PURE__ */ jsxs("div", {
66
+ className: "flex items-center justify-between",
67
+ children: [/* @__PURE__ */ jsx("span", {
68
+ className: "text-muted-foreground",
69
+ children: "Total Tips"
70
+ }), /* @__PURE__ */ jsx("span", {
71
+ className: "font-semibold",
72
+ children: track.steps.length
73
+ })]
74
+ }),
75
+ /* @__PURE__ */ jsxs("div", {
76
+ className: "flex items-center justify-between",
77
+ children: [/* @__PURE__ */ jsx("span", {
78
+ className: "text-muted-foreground",
79
+ children: "Completed"
80
+ }), /* @__PURE__ */ jsx("span", {
81
+ className: "font-semibold text-green-500",
82
+ children: completedCount
83
+ })]
84
+ }),
85
+ /* @__PURE__ */ jsxs("div", {
86
+ className: "flex items-center justify-between",
87
+ children: [/* @__PURE__ */ jsx("span", {
88
+ className: "text-muted-foreground",
89
+ children: "XP Earned"
90
+ }), /* @__PURE__ */ jsx("span", {
91
+ className: "font-semibold text-orange-500",
92
+ children: progress.xpEarned
93
+ })]
94
+ }),
95
+ /* @__PURE__ */ jsxs("div", {
96
+ className: "flex items-center justify-between",
97
+ children: [/* @__PURE__ */ jsx("span", {
98
+ className: "text-muted-foreground",
99
+ children: "Current Streak"
100
+ }), /* @__PURE__ */ jsx("span", {
101
+ className: "font-semibold",
102
+ children: progress.streakDays > 0 ? `🔥 ${progress.streakDays} days` : "Start today!"
103
+ })]
104
+ })
105
+ ]
106
+ }) })] })
107
+ ]
108
+ });
109
+ }
110
+
111
+ //#endregion
112
+ export { Timeline };
@@ -1 +1,4 @@
1
- import{Overview as e}from"./Overview.js";import{Steps as t}from"./Steps.js";import{ProgressView as n}from"./Progress.js";import{Timeline as r}from"./Timeline.js";
1
+ import { Overview } from "./Overview.js";
2
+ import { Steps } from "./Steps.js";
3
+ import { ProgressView } from "./Progress.js";
4
+ import { Timeline } from "./Timeline.js";
@@ -1 +1,64 @@
1
- "use client";import{Card as e,CardContent as t}from"../../../libs/ui-kit-web/dist/ui/card.js";import{useLearningProgress as n}from"../../learning-journey-ui-shared/src/hooks/useLearningProgress.js";import{ViewTabs as r}from"../../learning-journey-ui-shared/src/components/ViewTabs.js";import"../../learning-journey-ui-shared/src/index.js";import{Overview as i}from"./views/Overview.js";import{Steps as a}from"./views/Steps.js";import{Progress as o}from"./views/Progress.js";import{Timeline as s}from"./views/Timeline.js";import{useCallback as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f({track:f,progress:p,onStepComplete:m,onViewChange:h,initialView:g=`overview`}){let[_,v]=l(g),{progress:y,completeStep:b}=n(f),x=p??y,S=c(e=>{v(e),h?.(e)},[h]),C=c(e=>{m?m(e):b(e)},[m,b]),w=c(()=>{v(`steps`),h?.(`steps`)},[h]);return d(`div`,{className:`space-y-6`,children:[u(e,{children:u(t,{className:`p-4`,children:u(r,{currentView:_,onViewChange:S})})}),(()=>{let e={track:f,progress:x,onStepComplete:C};switch(_){case`overview`:return u(i,{...e,onStart:w});case`steps`:return u(a,{...e});case`progress`:return u(o,{...e});case`timeline`:return u(s,{...e});default:return u(i,{...e,onStart:w})}})()]})}export{f as GamifiedMiniApp};
1
+ 'use client';
2
+
3
+ import { Card, CardContent } from "../../../libs/ui-kit-web/dist/ui/card.js";
4
+ import { useLearningProgress } from "../../learning-journey-ui-shared/src/hooks/useLearningProgress.js";
5
+ import { ViewTabs } from "../../learning-journey-ui-shared/src/components/ViewTabs.js";
6
+ import "../../learning-journey-ui-shared/src/index.js";
7
+ import { Overview } from "./views/Overview.js";
8
+ import { Steps } from "./views/Steps.js";
9
+ import { Progress } from "./views/Progress.js";
10
+ import { Timeline } from "./views/Timeline.js";
11
+ import { useCallback, useState } from "react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+
14
+ //#region ../learning-journey-ui-gamified/src/GamifiedMiniApp.tsx
15
+ function GamifiedMiniApp({ track, progress: externalProgress, onStepComplete: externalOnStepComplete, onViewChange, initialView = "overview" }) {
16
+ const [currentView, setCurrentView] = useState(initialView);
17
+ const { progress: internalProgress, completeStep: internalCompleteStep } = useLearningProgress(track);
18
+ const progress = externalProgress ?? internalProgress;
19
+ const handleViewChange = useCallback((view) => {
20
+ setCurrentView(view);
21
+ onViewChange?.(view);
22
+ }, [onViewChange]);
23
+ const handleStepComplete = useCallback((stepId) => {
24
+ if (externalOnStepComplete) externalOnStepComplete(stepId);
25
+ else internalCompleteStep(stepId);
26
+ }, [externalOnStepComplete, internalCompleteStep]);
27
+ const handleStartFromOverview = useCallback(() => {
28
+ setCurrentView("steps");
29
+ onViewChange?.("steps");
30
+ }, [onViewChange]);
31
+ const renderView = () => {
32
+ const viewProps = {
33
+ track,
34
+ progress,
35
+ onStepComplete: handleStepComplete
36
+ };
37
+ switch (currentView) {
38
+ case "overview": return /* @__PURE__ */ jsx(Overview, {
39
+ ...viewProps,
40
+ onStart: handleStartFromOverview
41
+ });
42
+ case "steps": return /* @__PURE__ */ jsx(Steps, { ...viewProps });
43
+ case "progress": return /* @__PURE__ */ jsx(Progress, { ...viewProps });
44
+ case "timeline": return /* @__PURE__ */ jsx(Timeline, { ...viewProps });
45
+ default: return /* @__PURE__ */ jsx(Overview, {
46
+ ...viewProps,
47
+ onStart: handleStartFromOverview
48
+ });
49
+ }
50
+ };
51
+ return /* @__PURE__ */ jsxs("div", {
52
+ className: "space-y-6",
53
+ children: [/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, {
54
+ className: "p-4",
55
+ children: /* @__PURE__ */ jsx(ViewTabs, {
56
+ currentView,
57
+ onViewChange: handleViewChange
58
+ })
59
+ }) }), renderView()]
60
+ });
61
+ }
62
+
63
+ //#endregion
64
+ export { GamifiedMiniApp };
@@ -1 +1,32 @@
1
- "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";function i({totalDays:i,currentDay:a,completedDays:o}){return n(`div`,{className:`grid grid-cols-7 gap-2`,children:Array.from({length:i},(e,t)=>t+1).map(i=>{let s=o.includes(i),c=i===a,l=i>a;return n(`div`,{className:e(`flex h-12 w-12 flex-col items-center justify-center rounded-lg border text-sm font-medium transition-all`,s&&`border-green-500 bg-green-500/10 text-green-500`,c&&!s&&`border-violet-500 bg-violet-500/10 text-violet-500 ring-2 ring-violet-500/50`,l&&`border-muted bg-muted/50 text-muted-foreground`,!s&&!c&&!l&&`border-border bg-card`),children:s?n(`span`,{className:`text-lg`,children:`✓`}):l?n(`span`,{className:`text-lg`,children:`🔒`}):r(t,{children:[n(`span`,{className:`text-muted-foreground text-xs`,children:`Day`}),n(`span`,{children:i})]})},i)})})}export{i as DayCalendar};
1
+ 'use client';
2
+
3
+ import { cn } from "../../../../libs/ui-kit-web/dist/ui/utils.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region ../learning-journey-ui-gamified/src/components/DayCalendar.tsx
7
+ function DayCalendar({ totalDays, currentDay, completedDays }) {
8
+ return /* @__PURE__ */ jsx("div", {
9
+ className: "grid grid-cols-7 gap-2",
10
+ children: Array.from({ length: totalDays }, (_, i) => i + 1).map((day) => {
11
+ const isCompleted = completedDays.includes(day);
12
+ const isCurrent = day === currentDay;
13
+ const isLocked = day > currentDay;
14
+ return /* @__PURE__ */ jsx("div", {
15
+ className: cn("flex h-12 w-12 flex-col items-center justify-center rounded-lg border text-sm font-medium transition-all", isCompleted && "border-green-500 bg-green-500/10 text-green-500", isCurrent && !isCompleted && "border-violet-500 bg-violet-500/10 text-violet-500 ring-2 ring-violet-500/50", isLocked && "border-muted bg-muted/50 text-muted-foreground", !isCompleted && !isCurrent && !isLocked && "border-border bg-card"),
16
+ children: isCompleted ? /* @__PURE__ */ jsx("span", {
17
+ className: "text-lg",
18
+ children: "✓"
19
+ }) : isLocked ? /* @__PURE__ */ jsx("span", {
20
+ className: "text-lg",
21
+ children: "🔒"
22
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
23
+ className: "text-muted-foreground text-xs",
24
+ children: "Day"
25
+ }), /* @__PURE__ */ jsx("span", { children: day })] })
26
+ }, day);
27
+ })
28
+ });
29
+ }
30
+
31
+ //#endregion
32
+ export { DayCalendar };
@@ -1 +1,79 @@
1
- "use client";import{Card as e,CardContent as t}from"../../../../libs/ui-kit-web/dist/ui/card.js";import{cn as n}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{Button$1 as r}from"../../../../libs/design-system/dist/components/atoms/Button.js";import{useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({step:s,isCompleted:c,isCurrent:l,onComplete:u}){let[d,f]=i(!1);return a(e,{className:n(`relative cursor-pointer overflow-hidden transition-all duration-300`,l&&`ring-primary ring-2`,c&&`opacity-60`),onClick:()=>!c&&f(!d),children:o(t,{className:`p-6`,children:[o(`div`,{className:n(`space-y-4 transition-opacity duration-200`,d?`opacity-0`:`opacity-100`),children:[o(`div`,{className:`flex items-start justify-between`,children:[o(`div`,{className:`flex-1`,children:[a(`h3`,{className:`text-lg font-semibold`,children:s.title}),s.description&&a(`p`,{className:`text-muted-foreground mt-1 text-sm`,children:s.description})]}),s.xpReward&&o(`span`,{className:`rounded-full bg-green-500/10 px-2 py-1 text-xs font-semibold text-green-500`,children:[`+`,s.xpReward,` XP`]})]}),c&&o(`div`,{className:`flex items-center gap-2 text-green-500`,children:[a(`span`,{children:`✓`}),a(`span`,{className:`text-sm font-medium`,children:`Completed`})]}),l&&!c&&a(`p`,{className:`text-muted-foreground text-xs`,children:`Tap to reveal action`})]}),d&&!c&&o(`div`,{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`,children:[a(`p`,{className:`text-center text-sm`,children:s.instructions??`Complete this step to earn XP`}),o(`div`,{className:`flex gap-2`,children:[a(r,{variant:`outline`,size:`sm`,onClick:()=>f(!1),children:`Back`}),a(r,{size:`sm`,onClick:e=>{e.stopPropagation(),u?.()},children:`Mark Complete`})]})]})]})})}export{s as FlashCard};
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 +1,81 @@
1
- "use client";import{cn as e}from"../../../../libs/ui-kit-web/dist/ui/utils.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";const r={sm:{container:`h-16 w-16`,text:`text-xs`,ring:48,stroke:4},md:{container:`h-24 w-24`,text:`text-sm`,ring:72,stroke:6},lg:{container:`h-32 w-32`,text:`text-base`,ring:96,stroke:8}},i={green:`stroke-green-500`,blue:`stroke-blue-500`,violet:`stroke-violet-500`,orange:`stroke-orange-500`};function a({label:a,percentage:o,size:s=`md`,color:c=`violet`}){let l=r[s],u=(l.ring-l.stroke)/2,d=2*Math.PI*u,f=d-o/100*d;return n(`div`,{className:e(`relative flex flex-col items-center gap-1`,l.container),children:[n(`svg`,{className:`absolute -rotate-90`,width:l.ring,height:l.ring,viewBox:`0 0 ${l.ring} ${l.ring}`,children:[t(`circle`,{cx:l.ring/2,cy:l.ring/2,r:u,fill:`none`,strokeWidth:l.stroke,className:`stroke-muted`}),t(`circle`,{cx:l.ring/2,cy:l.ring/2,r:u,fill:`none`,strokeWidth:l.stroke,strokeLinecap:`round`,strokeDasharray:d,strokeDashoffset:f,className:e(`transition-all duration-500`,i[c])})]}),t(`div`,{className:`flex h-full flex-col items-center justify-center`,children:n(`span`,{className:e(`font-bold`,l.text),children:[Math.round(o),`%`]})}),t(`span`,{className:e(`text-muted-foreground mt-1 truncate`,l.text),children:a})]})}export{a as MasteryRing};
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 +1,3 @@
1
- import{FlashCard as e}from"./FlashCard.js";import{MasteryRing as t}from"./MasteryRing.js";import{DayCalendar as n}from"./DayCalendar.js";
1
+ import { FlashCard } from "./FlashCard.js";
2
+ import { MasteryRing } from "./MasteryRing.js";
3
+ import { DayCalendar } from "./DayCalendar.js";
@@ -1 +1 @@
1
- import"./learning-journey-ui-gamified.docblock.js";
1
+ import "./learning-journey-ui-gamified.docblock.js";
@@ -1,8 +1,20 @@
1
- import{a as e}from"../../../../libs/contracts/dist/docs/registry.js";import"../../../../libs/contracts/dist/docs/index.js";e([{id:`docs.examples.learning-journey-ui-gamified`,title:`Learning Journey UI — Gamified`,summary:`UI mini-app components for gamified learning: flashcards, mastery, streak/calendar.`,kind:`reference`,visibility:`public`,route:`/docs/examples/learning-journey-ui-gamified`,tags:[`learning`,`ui`,`gamified`],body:`## Includes
2
- - Gamified mini-app shell
3
- - Views: overview, steps, progress, timeline
4
- - Components: flash card, mastery ring, day calendar
1
+ import { registerDocBlocks } from "../../../../libs/contracts/dist/docs/registry.js";
2
+ import "../../../../libs/contracts/dist/docs/index.js";
5
3
 
6
- ## Notes
7
- - Compose with design system components.
8
- - Respect prefers-reduced-motion; keep tap targets large.`}]);
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 +1,11 @@
1
- import{Overview as e}from"./views/Overview.js";import{FlashCard as t}from"./components/FlashCard.js";import{Steps as n}from"./views/Steps.js";import{MasteryRing as r}from"./components/MasteryRing.js";import{Progress as i}from"./views/Progress.js";import{DayCalendar as a}from"./components/DayCalendar.js";import{Timeline as o}from"./views/Timeline.js";import{GamifiedMiniApp as s}from"./GamifiedMiniApp.js";import"./views/index.js";import"./components/index.js";import"./docs/index.js";
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";