@lssm/example.learning-journey-ui-coaching 0.0.0-canary-20251217083314 → 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.
Files changed (128) hide show
  1. package/.turbo/turbo-build.log +22 -24
  2. package/dist/TipFeed-_1oKR35X.mjs +234 -0
  3. package/dist/components/index.d.mts +2 -0
  4. package/dist/components/index.mjs +4 -0
  5. package/dist/components-kh0CpIG2.mjs +1 -0
  6. package/dist/index-Cpg19PUU.d.mts +34 -0
  7. package/dist/index-DAs1Z3Qp.d.mts +47 -0
  8. package/dist/{example.d.ts → index.d.mts} +18 -1
  9. package/dist/index.mjs +1698 -0
  10. package/dist/views/index.d.mts +2 -0
  11. package/dist/views/index.mjs +4 -0
  12. package/dist/views-BTGcWRSz.mjs +421 -0
  13. package/package.json +14 -27
  14. package/tsconfig.tsbuildinfo +1 -1
  15. package/tsdown.config.js +10 -14
  16. package/.turbo/turbo-build$colon$bundle.log +0 -403
  17. package/CHANGELOG.md +0 -19
  18. package/dist/CoachingMiniApp.d.ts +0 -16
  19. package/dist/CoachingMiniApp.js +0 -64
  20. package/dist/components/EngagementMeter.d.ts +0 -17
  21. package/dist/components/EngagementMeter.js +0 -107
  22. package/dist/components/TipCard.d.ts +0 -20
  23. package/dist/components/TipCard.js +0 -75
  24. package/dist/components/TipFeed.d.ts +0 -17
  25. package/dist/components/TipFeed.js +0 -65
  26. package/dist/components/index.d.ts +0 -4
  27. package/dist/components/index.js +0 -5
  28. package/dist/docs/index.d.ts +0 -1
  29. package/dist/docs/index.js +0 -1
  30. package/dist/docs/learning-journey-ui-coaching.docblock.d.ts +0 -1
  31. package/dist/docs/learning-journey-ui-coaching.docblock.js +0 -20
  32. package/dist/example.js +0 -34
  33. package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js +0 -44
  34. package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js +0 -45
  35. package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js +0 -48
  36. package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js +0 -46
  37. package/dist/examples/learning-journey-ui-shared/dist/components/index.js +0 -4
  38. package/dist/examples/learning-journey-ui-shared/dist/docs/index.js +0 -1
  39. package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js +0 -20
  40. package/dist/examples/learning-journey-ui-shared/dist/hooks/index.js +0 -1
  41. package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js +0 -73
  42. package/dist/examples/learning-journey-ui-shared/dist/index.js +0 -8
  43. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -15
  44. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -15
  45. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/index.js +0 -28
  46. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js +0 -71
  47. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js +0 -44
  48. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -15
  49. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -15
  50. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -15
  51. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -15
  52. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -15
  53. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -79
  54. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -56
  55. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -15
  56. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -356
  57. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -36
  58. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -15
  59. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -19
  60. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -47
  61. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -78
  62. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -83
  63. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -44
  64. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -66
  65. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -39
  66. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -68
  67. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -46
  68. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -61
  69. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -154
  70. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -19
  71. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -100
  72. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -19
  73. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +0 -5
  74. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js +0 -33
  75. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +0 -55
  76. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -13
  77. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js +0 -23
  78. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js +0 -10
  79. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -10
  80. package/dist/index.d.ts +0 -12
  81. package/dist/index.js +0 -14
  82. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  83. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  84. package/dist/libs/contracts/dist/docs/index.js +0 -29
  85. package/dist/libs/contracts/dist/docs/presentations.js +0 -71
  86. package/dist/libs/contracts/dist/docs/registry.js +0 -44
  87. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  88. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  89. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  90. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  91. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  92. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  93. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  94. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  95. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  96. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  97. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  98. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  99. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  100. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  101. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  102. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  103. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  104. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  105. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
  106. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  107. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  108. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  109. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  110. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  111. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  112. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +0 -5
  113. package/dist/libs/design-system/dist/components/atoms/Button.js +0 -33
  114. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +0 -55
  115. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -13
  116. package/dist/libs/ui-kit-web/dist/ui/card.js +0 -36
  117. package/dist/libs/ui-kit-web/dist/ui/utils.js +0 -10
  118. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -10
  119. package/dist/views/Overview.d.ts +0 -15
  120. package/dist/views/Overview.js +0 -152
  121. package/dist/views/Progress.d.ts +0 -10
  122. package/dist/views/Progress.js +0 -117
  123. package/dist/views/Steps.d.ts +0 -11
  124. package/dist/views/Steps.js +0 -68
  125. package/dist/views/Timeline.d.ts +0 -10
  126. package/dist/views/Timeline.js +0 -112
  127. package/dist/views/index.d.ts +0 -5
  128. package/dist/views/index.js +0 -6
@@ -0,0 +1,2 @@
1
+ import { i as Overview, n as ProgressView, r as Steps, t as Timeline } from "../index-Cpg19PUU.mjs";
2
+ export { Overview, ProgressView as Progress, Steps, Timeline };
@@ -0,0 +1,4 @@
1
+ import "../TipFeed-_1oKR35X.mjs";
2
+ import { i as Overview, n as ProgressView, r as Steps, t as Timeline } from "../views-BTGcWRSz.mjs";
3
+
4
+ export { Overview, ProgressView as Progress, Steps, Timeline };
@@ -0,0 +1,421 @@
1
+ import { n as EngagementMeter, r as TipCard, t as TipFeed } from "./TipFeed-_1oKR35X.mjs";
2
+ import { Card, CardContent, CardHeader, CardTitle } from "@lssm/lib.ui-kit-web/ui/card";
3
+ import { BadgeDisplay, StreakCounter, XpBar } from "@lssm/example.learning-journey-ui-shared";
4
+ import { Button } from "@lssm/lib.design-system";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ //#region src/views/Overview.tsx
8
+ function Overview({ track, progress, onStepComplete, onStart }) {
9
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
10
+ const completedSteps = progress.completedStepIds.length;
11
+ const totalSteps = track.steps.length;
12
+ const pendingSteps = totalSteps - completedSteps;
13
+ const activeTips = track.steps.filter((s) => !progress.completedStepIds.includes(s.id)).slice(0, 3);
14
+ return /* @__PURE__ */ jsxs("div", {
15
+ className: "space-y-6",
16
+ children: [
17
+ /* @__PURE__ */ jsx(Card, {
18
+ className: "overflow-hidden bg-gradient-to-br from-amber-500/10 via-orange-500/10 to-red-500/10",
19
+ children: /* @__PURE__ */ jsx(CardContent, {
20
+ className: "p-6",
21
+ children: /* @__PURE__ */ jsxs("div", {
22
+ className: "flex flex-col items-center gap-4 text-center md:flex-row md:text-left",
23
+ children: [
24
+ /* @__PURE__ */ jsx("div", {
25
+ className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-amber-500 to-orange-600 text-3xl shadow-lg",
26
+ children: "💡"
27
+ }),
28
+ /* @__PURE__ */ jsxs("div", {
29
+ className: "flex-1",
30
+ children: [/* @__PURE__ */ jsx("h1", {
31
+ className: "text-2xl font-bold",
32
+ children: track.name
33
+ }), /* @__PURE__ */ jsx("p", {
34
+ className: "text-muted-foreground mt-1",
35
+ children: track.description
36
+ })]
37
+ }),
38
+ /* @__PURE__ */ jsx("div", {
39
+ className: "flex items-center gap-4",
40
+ children: /* @__PURE__ */ jsx(StreakCounter, {
41
+ days: progress.streakDays,
42
+ size: "lg"
43
+ })
44
+ })
45
+ ]
46
+ })
47
+ })
48
+ }),
49
+ /* @__PURE__ */ jsxs("div", {
50
+ className: "grid gap-4 md:grid-cols-3",
51
+ children: [
52
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
53
+ className: "pb-2",
54
+ children: /* @__PURE__ */ jsx(CardTitle, {
55
+ className: "text-muted-foreground text-sm font-medium",
56
+ children: "Active Tips"
57
+ })
58
+ }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
59
+ className: "text-3xl font-bold text-amber-500",
60
+ children: pendingSteps
61
+ }), /* @__PURE__ */ jsx("p", {
62
+ className: "text-muted-foreground text-sm",
63
+ children: "tips for you today"
64
+ })] })] }),
65
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
66
+ className: "pb-2",
67
+ children: /* @__PURE__ */ jsx(CardTitle, {
68
+ className: "text-muted-foreground text-sm font-medium",
69
+ children: "Tips Actioned"
70
+ })
71
+ }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
72
+ className: "text-3xl font-bold text-green-500",
73
+ children: completedSteps
74
+ }), /* @__PURE__ */ jsxs("p", {
75
+ className: "text-muted-foreground text-sm",
76
+ children: [
77
+ "out of ",
78
+ totalSteps,
79
+ " total"
80
+ ]
81
+ })] })] }),
82
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
83
+ className: "pb-2",
84
+ children: /* @__PURE__ */ jsx(CardTitle, {
85
+ className: "text-muted-foreground text-sm font-medium",
86
+ children: "XP Earned"
87
+ })
88
+ }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx("div", {
89
+ className: "text-3xl font-bold text-orange-500",
90
+ children: progress.xpEarned
91
+ }), /* @__PURE__ */ jsx(XpBar, {
92
+ current: progress.xpEarned,
93
+ max: totalXp,
94
+ showLabel: false,
95
+ size: "sm"
96
+ })] })] })
97
+ ]
98
+ }),
99
+ activeTips.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, {
100
+ className: "flex flex-row items-center justify-between",
101
+ children: [/* @__PURE__ */ jsxs(CardTitle, {
102
+ className: "flex items-center gap-2",
103
+ children: [/* @__PURE__ */ jsx("span", { children: "💡" }), /* @__PURE__ */ jsx("span", { children: "Tips for You" })]
104
+ }), activeTips.length < pendingSteps && /* @__PURE__ */ jsxs(Button, {
105
+ variant: "outline",
106
+ size: "sm",
107
+ onClick: onStart,
108
+ children: [
109
+ "View All (",
110
+ pendingSteps,
111
+ ")"
112
+ ]
113
+ })]
114
+ }), /* @__PURE__ */ jsx(CardContent, {
115
+ className: "space-y-3",
116
+ children: activeTips.map((step) => /* @__PURE__ */ jsx(TipCard, {
117
+ step,
118
+ isCompleted: false,
119
+ isCurrent: step.id === activeTips[0]?.id,
120
+ onComplete: () => onStepComplete?.(step.id)
121
+ }, step.id))
122
+ })] }),
123
+ pendingSteps === 0 && /* @__PURE__ */ jsx(Card, {
124
+ className: "border-green-500/50 bg-green-500/5",
125
+ children: /* @__PURE__ */ jsxs(CardContent, {
126
+ className: "flex items-center gap-4 p-6",
127
+ children: [/* @__PURE__ */ jsx("div", {
128
+ className: "text-4xl",
129
+ children: "🎉"
130
+ }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
131
+ className: "text-lg font-semibold text-green-500",
132
+ children: "All Tips Actioned!"
133
+ }), /* @__PURE__ */ jsxs("p", {
134
+ className: "text-muted-foreground",
135
+ children: [
136
+ "Great job! You've addressed all ",
137
+ totalSteps,
138
+ " coaching tips."
139
+ ]
140
+ })] })]
141
+ })
142
+ })
143
+ ]
144
+ });
145
+ }
146
+
147
+ //#endregion
148
+ //#region src/views/Steps.tsx
149
+ function Steps({ track, progress, onStepComplete }) {
150
+ const completedSteps = progress.completedStepIds.length;
151
+ const totalSteps = track.steps.length;
152
+ const sortedSteps = [...track.steps].sort((a, b) => {
153
+ const aCompleted = progress.completedStepIds.includes(a.id);
154
+ if (aCompleted === progress.completedStepIds.includes(b.id)) return 0;
155
+ return aCompleted ? 1 : -1;
156
+ });
157
+ const currentStepId = track.steps.find((s) => !progress.completedStepIds.includes(s.id))?.id;
158
+ return /* @__PURE__ */ jsxs("div", {
159
+ className: "space-y-6",
160
+ children: [
161
+ /* @__PURE__ */ jsxs("div", {
162
+ className: "text-center",
163
+ children: [
164
+ /* @__PURE__ */ jsx("h2", {
165
+ className: "text-xl font-bold",
166
+ children: "Coaching Tips"
167
+ }),
168
+ /* @__PURE__ */ jsx("p", {
169
+ className: "text-muted-foreground",
170
+ children: "Review and take action on personalized tips"
171
+ }),
172
+ /* @__PURE__ */ jsxs("p", {
173
+ className: "text-muted-foreground mt-2 text-sm",
174
+ children: [
175
+ completedSteps,
176
+ " of ",
177
+ totalSteps,
178
+ " tips actioned"
179
+ ]
180
+ })
181
+ ]
182
+ }),
183
+ /* @__PURE__ */ jsx("div", {
184
+ className: "space-y-3",
185
+ children: sortedSteps.map((step) => {
186
+ return /* @__PURE__ */ jsx(TipCard, {
187
+ step,
188
+ isCompleted: progress.completedStepIds.includes(step.id),
189
+ isCurrent: step.id === currentStepId,
190
+ onComplete: () => onStepComplete?.(step.id),
191
+ onDismiss: () => onStepComplete?.(step.id)
192
+ }, step.id);
193
+ })
194
+ }),
195
+ completedSteps === totalSteps && /* @__PURE__ */ jsxs("div", {
196
+ className: "text-muted-foreground text-center",
197
+ children: [/* @__PURE__ */ jsx("span", {
198
+ className: "text-2xl",
199
+ children: "✨"
200
+ }), /* @__PURE__ */ jsx("p", {
201
+ className: "mt-2",
202
+ children: "All tips have been addressed!"
203
+ })]
204
+ })
205
+ ]
206
+ });
207
+ }
208
+
209
+ //#endregion
210
+ //#region src/views/Progress.tsx
211
+ function ProgressView({ track, progress }) {
212
+ const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
213
+ const completedSteps = progress.completedStepIds.length;
214
+ const pendingSteps = track.steps.length - completedSteps;
215
+ const actioned = Math.floor(completedSteps * .7);
216
+ const acknowledged = completedSteps - actioned;
217
+ return /* @__PURE__ */ jsxs("div", {
218
+ className: "space-y-6",
219
+ children: [
220
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
221
+ className: "flex items-center gap-2",
222
+ children: [/* @__PURE__ */ jsx("span", { children: "📊" }), /* @__PURE__ */ jsx("span", { children: "Engagement Overview" })]
223
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(EngagementMeter, {
224
+ actioned,
225
+ acknowledged,
226
+ pending: pendingSteps,
227
+ streak: progress.streakDays
228
+ }) })] }),
229
+ /* @__PURE__ */ jsxs("div", {
230
+ className: "grid gap-4 md:grid-cols-2",
231
+ children: [/* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
232
+ className: "pb-2",
233
+ children: /* @__PURE__ */ jsx(CardTitle, {
234
+ className: "text-muted-foreground text-sm font-medium",
235
+ children: "XP Earned"
236
+ })
237
+ }), /* @__PURE__ */ jsxs(CardContent, {
238
+ className: "space-y-3",
239
+ children: [/* @__PURE__ */ jsxs("div", {
240
+ className: "flex items-baseline gap-2",
241
+ children: [/* @__PURE__ */ jsx("span", {
242
+ className: "text-3xl font-bold text-orange-500",
243
+ children: progress.xpEarned
244
+ }), /* @__PURE__ */ jsxs("span", {
245
+ className: "text-muted-foreground",
246
+ children: [
247
+ "/ ",
248
+ totalXp,
249
+ " XP"
250
+ ]
251
+ })]
252
+ }), /* @__PURE__ */ jsx(XpBar, {
253
+ current: progress.xpEarned,
254
+ max: totalXp,
255
+ showLabel: false,
256
+ size: "lg"
257
+ })]
258
+ })] }), /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, {
259
+ className: "pb-2",
260
+ children: /* @__PURE__ */ jsx(CardTitle, {
261
+ className: "text-muted-foreground text-sm font-medium",
262
+ children: "Engagement Streak"
263
+ })
264
+ }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
265
+ className: "flex items-center gap-4",
266
+ children: [/* @__PURE__ */ jsx(StreakCounter, {
267
+ days: progress.streakDays,
268
+ size: "lg"
269
+ }), /* @__PURE__ */ jsx("div", {
270
+ className: "text-muted-foreground text-sm",
271
+ children: progress.streakDays > 0 ? "Keep going!" : "Start your streak today!"
272
+ })]
273
+ }) })] })]
274
+ }),
275
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
276
+ className: "flex items-center gap-2",
277
+ children: [/* @__PURE__ */ jsx("span", { children: "🏅" }), /* @__PURE__ */ jsx("span", { children: "Achievements" })]
278
+ }) }), /* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(BadgeDisplay, {
279
+ badges: progress.badges,
280
+ size: "lg",
281
+ maxVisible: 10
282
+ }), progress.badges.length === 0 && /* @__PURE__ */ jsx("p", {
283
+ className: "text-muted-foreground text-sm",
284
+ children: "Action tips to unlock achievements!"
285
+ })] })] }),
286
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
287
+ className: "flex items-center gap-2",
288
+ children: [/* @__PURE__ */ jsx("span", { children: "💡" }), /* @__PURE__ */ jsx("span", { children: "Tip Status" })]
289
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
290
+ className: "space-y-3",
291
+ children: track.steps.map((step) => {
292
+ const isCompleted = progress.completedStepIds.includes(step.id);
293
+ return /* @__PURE__ */ jsxs("div", {
294
+ className: "flex items-center justify-between rounded-lg border p-3",
295
+ children: [/* @__PURE__ */ jsxs("div", {
296
+ className: "flex items-center gap-3",
297
+ children: [/* @__PURE__ */ jsx("span", {
298
+ className: isCompleted ? "text-green-500" : "text-amber-500",
299
+ children: isCompleted ? "✓" : "○"
300
+ }), /* @__PURE__ */ jsx("span", {
301
+ className: isCompleted ? "text-muted-foreground" : "text-foreground",
302
+ children: step.title
303
+ })]
304
+ }), /* @__PURE__ */ jsx("span", {
305
+ className: `text-sm ${isCompleted ? "text-green-500" : "text-muted-foreground"}`,
306
+ children: isCompleted ? "Actioned" : "Pending"
307
+ })]
308
+ }, step.id);
309
+ })
310
+ }) })] })
311
+ ]
312
+ });
313
+ }
314
+
315
+ //#endregion
316
+ //#region src/views/Timeline.tsx
317
+ function Timeline({ track, progress }) {
318
+ const feedItems = track.steps.map((step) => ({
319
+ step,
320
+ isCompleted: progress.completedStepIds.includes(step.id),
321
+ completedAt: progress.completedStepIds.includes(step.id) ? "Recently" : void 0
322
+ })).sort((a, b) => {
323
+ if (a.isCompleted && !b.isCompleted) return -1;
324
+ if (!a.isCompleted && b.isCompleted) return 1;
325
+ return 0;
326
+ });
327
+ const completedCount = feedItems.filter((f) => f.isCompleted).length;
328
+ const pendingCount = feedItems.length - completedCount;
329
+ return /* @__PURE__ */ jsxs("div", {
330
+ className: "space-y-6",
331
+ children: [
332
+ /* @__PURE__ */ jsxs("div", {
333
+ className: "text-center",
334
+ children: [/* @__PURE__ */ jsx("h2", {
335
+ className: "text-xl font-bold",
336
+ children: "Activity Timeline"
337
+ }), /* @__PURE__ */ jsx("p", {
338
+ className: "text-muted-foreground",
339
+ children: "Your coaching journey and tip history"
340
+ })]
341
+ }),
342
+ /* @__PURE__ */ jsxs("div", {
343
+ className: "grid grid-cols-2 gap-4",
344
+ children: [/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
345
+ className: "p-4 text-center",
346
+ children: [/* @__PURE__ */ jsx("div", {
347
+ className: "text-2xl font-bold text-green-500",
348
+ children: completedCount
349
+ }), /* @__PURE__ */ jsx("div", {
350
+ className: "text-muted-foreground text-sm",
351
+ children: "Tips Actioned"
352
+ })]
353
+ }) }), /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
354
+ className: "p-4 text-center",
355
+ children: [/* @__PURE__ */ jsx("div", {
356
+ className: "text-2xl font-bold text-amber-500",
357
+ children: pendingCount
358
+ }), /* @__PURE__ */ jsx("div", {
359
+ className: "text-muted-foreground text-sm",
360
+ children: "Tips Pending"
361
+ })]
362
+ }) })]
363
+ }),
364
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
365
+ className: "flex items-center gap-2",
366
+ children: [/* @__PURE__ */ jsx("span", { children: "📝" }), /* @__PURE__ */ jsx("span", { children: "Coaching Feed" })]
367
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(TipFeed, { items: feedItems }) })] }),
368
+ /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, {
369
+ className: "flex items-center gap-2",
370
+ children: [/* @__PURE__ */ jsx("span", { children: "📈" }), /* @__PURE__ */ jsx("span", { children: "Journey Stats" })]
371
+ }) }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
372
+ className: "space-y-4",
373
+ children: [
374
+ /* @__PURE__ */ jsxs("div", {
375
+ className: "flex items-center justify-between",
376
+ children: [/* @__PURE__ */ jsx("span", {
377
+ className: "text-muted-foreground",
378
+ children: "Total Tips"
379
+ }), /* @__PURE__ */ jsx("span", {
380
+ className: "font-semibold",
381
+ children: track.steps.length
382
+ })]
383
+ }),
384
+ /* @__PURE__ */ jsxs("div", {
385
+ className: "flex items-center justify-between",
386
+ children: [/* @__PURE__ */ jsx("span", {
387
+ className: "text-muted-foreground",
388
+ children: "Completed"
389
+ }), /* @__PURE__ */ jsx("span", {
390
+ className: "font-semibold text-green-500",
391
+ children: completedCount
392
+ })]
393
+ }),
394
+ /* @__PURE__ */ jsxs("div", {
395
+ className: "flex items-center justify-between",
396
+ children: [/* @__PURE__ */ jsx("span", {
397
+ className: "text-muted-foreground",
398
+ children: "XP Earned"
399
+ }), /* @__PURE__ */ jsx("span", {
400
+ className: "font-semibold text-orange-500",
401
+ children: progress.xpEarned
402
+ })]
403
+ }),
404
+ /* @__PURE__ */ jsxs("div", {
405
+ className: "flex items-center justify-between",
406
+ children: [/* @__PURE__ */ jsx("span", {
407
+ className: "text-muted-foreground",
408
+ children: "Current Streak"
409
+ }), /* @__PURE__ */ jsx("span", {
410
+ className: "font-semibold",
411
+ children: progress.streakDays > 0 ? `🔥 ${progress.streakDays} days` : "Start today!"
412
+ })]
413
+ })
414
+ ]
415
+ }) })] })
416
+ ]
417
+ });
418
+ }
419
+
420
+ //#endregion
421
+ export { Overview as i, ProgressView as n, Steps as r, Timeline as t };
package/package.json CHANGED
@@ -1,30 +1,19 @@
1
1
  {
2
2
  "name": "@lssm/example.learning-journey-ui-coaching",
3
- "version": "0.0.0-canary-20251217083314",
3
+ "version": "1.41.0",
4
4
  "description": "Contextual coaching UI with tip cards and engagement tracking.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
- ".": "./dist/index.js",
10
- "./CoachingMiniApp": "./dist/CoachingMiniApp.js",
11
- "./components": "./dist/components/index.js",
12
- "./components/EngagementMeter": "./dist/components/EngagementMeter.js",
13
- "./components/TipCard": "./dist/components/TipCard.js",
14
- "./components/TipFeed": "./dist/components/TipFeed.js",
15
- "./docs": "./dist/docs/index.js",
16
- "./docs/learning-journey-ui-coaching.docblock": "./dist/docs/learning-journey-ui-coaching.docblock.js",
17
- "./example": "./dist/example.js",
18
- "./views": "./dist/views/index.js",
19
- "./views/Overview": "./dist/views/Overview.js",
20
- "./views/Progress": "./dist/views/Progress.js",
21
- "./views/Steps": "./dist/views/Steps.js",
22
- "./views/Timeline": "./dist/views/Timeline.js",
9
+ ".": "./src/index.ts",
10
+ "./example": "./src/example.ts",
11
+ "./docs": "./src/docs/index.ts",
12
+ "./views": "./src/views/index.ts",
13
+ "./components": "./src/components/index.ts",
23
14
  "./*": "./*"
24
15
  },
25
16
  "scripts": {
26
- "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
27
- "publish:pkg:canary": "bun publish:pkg --tag canary",
28
17
  "build": "bun build:bundle && bun build:types",
29
18
  "build:bundle": "tsdown",
30
19
  "build:types": "tsc --noEmit",
@@ -36,19 +25,17 @@
36
25
  "test": "bun test"
37
26
  },
38
27
  "dependencies": {
39
- "@lssm/lib.schema": "0.0.0-canary-20251217083314",
40
- "@lssm/lib.contracts": "0.0.0-canary-20251217083314",
41
- "@lssm/example.learning-journey-ui-shared": "0.0.0-canary-20251217083314",
42
- "@lssm/example.learning-journey-ambient-coach": "0.0.0-canary-20251217083314",
43
- "@lssm/example.learning-journey-crm-onboarding": "0.0.0-canary-20251217083314",
44
- "@lssm/module.learning-journey": "0.0.0-canary-20251217083314",
45
- "@lssm/lib.design-system": "0.0.0-canary-20251217083314",
46
- "@lssm/lib.ui-kit-web": "0.0.0-canary-20251217083314",
28
+ "@lssm/example.learning-journey-ui-shared": "workspace:*",
29
+ "@lssm/example.learning-journey-ambient-coach": "workspace:*",
30
+ "@lssm/example.learning-journey-crm-onboarding": "workspace:*",
31
+ "@lssm/module.learning-journey": "workspace:*",
32
+ "@lssm/lib.design-system": "workspace:*",
33
+ "@lssm/lib.ui-kit-web": "workspace:*",
47
34
  "react": "^19.2.3"
48
35
  },
49
36
  "devDependencies": {
50
- "@lssm/tool.tsdown": "0.0.0-canary-20251217083314",
51
- "@lssm/tool.typescript": "0.0.0-canary-20251217083314",
37
+ "@lssm/tool.tsdown": "workspace:*",
38
+ "@lssm/tool.typescript": "workspace:*",
52
39
  "@types/react": "^19.1.6",
53
40
  "tsdown": "^0.17.4",
54
41
  "typescript": "^5.9.3"