@lssm/example.learning-journey-ui-coaching 0.0.0-canary-20251217073102 → 0.0.0-canary-20251217083314

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 (126) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +395 -14
  2. package/CHANGELOG.md +9 -9
  3. package/dist/CoachingMiniApp.d.ts +16 -0
  4. package/dist/CoachingMiniApp.js +64 -0
  5. package/dist/components/EngagementMeter.d.ts +17 -0
  6. package/dist/components/EngagementMeter.js +107 -0
  7. package/dist/components/TipCard.d.ts +20 -0
  8. package/dist/components/TipCard.js +75 -0
  9. package/dist/components/TipFeed.d.ts +17 -0
  10. package/dist/components/TipFeed.js +65 -0
  11. package/dist/components/index.d.ts +4 -0
  12. package/dist/components/index.js +5 -0
  13. package/dist/docs/index.d.ts +1 -0
  14. package/dist/docs/index.js +1 -0
  15. package/dist/docs/learning-journey-ui-coaching.docblock.d.ts +1 -0
  16. package/dist/docs/learning-journey-ui-coaching.docblock.js +20 -0
  17. package/dist/{index.d.mts → example.d.ts} +1 -18
  18. package/dist/example.js +34 -0
  19. package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js +44 -0
  20. package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js +45 -0
  21. package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js +48 -0
  22. package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js +46 -0
  23. package/dist/examples/learning-journey-ui-shared/dist/components/index.js +4 -0
  24. package/dist/examples/learning-journey-ui-shared/dist/docs/index.js +1 -0
  25. package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js +20 -0
  26. package/dist/examples/learning-journey-ui-shared/dist/hooks/index.js +1 -0
  27. package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js +73 -0
  28. package/dist/examples/learning-journey-ui-shared/dist/index.js +8 -0
  29. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +15 -0
  30. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +15 -0
  31. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/index.js +28 -0
  32. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js +71 -0
  33. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js +44 -0
  34. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +15 -0
  35. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +15 -0
  36. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +15 -0
  37. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +15 -0
  38. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +15 -0
  39. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +79 -0
  40. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +56 -0
  41. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +15 -0
  42. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +356 -0
  43. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +36 -0
  44. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +15 -0
  45. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +19 -0
  46. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +47 -0
  47. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +78 -0
  48. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +83 -0
  49. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +44 -0
  50. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +66 -0
  51. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +39 -0
  52. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +68 -0
  53. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +46 -0
  54. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +61 -0
  55. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +154 -0
  56. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +19 -0
  57. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +100 -0
  58. package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +19 -0
  59. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +5 -0
  60. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js +33 -0
  61. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +55 -0
  62. package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
  63. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js +23 -0
  64. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js +10 -0
  65. package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +10 -0
  66. package/dist/index.d.ts +12 -0
  67. package/dist/index.js +14 -0
  68. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -0
  69. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
  70. package/dist/libs/contracts/dist/docs/index.js +29 -0
  71. package/dist/libs/contracts/dist/docs/presentations.js +71 -0
  72. package/dist/libs/contracts/dist/docs/registry.js +44 -0
  73. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -0
  74. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -0
  75. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -0
  76. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -0
  77. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -0
  78. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
  79. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
  80. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
  81. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
  82. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
  83. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
  84. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
  85. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
  86. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
  87. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
  88. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
  89. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
  90. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
  91. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
  92. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
  93. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
  94. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
  95. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
  96. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
  97. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
  98. package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +5 -0
  99. package/dist/libs/design-system/dist/components/atoms/Button.js +33 -0
  100. package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +55 -0
  101. package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
  102. package/dist/libs/ui-kit-web/dist/ui/card.js +36 -0
  103. package/dist/libs/ui-kit-web/dist/ui/utils.js +10 -0
  104. package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +10 -0
  105. package/dist/views/Overview.d.ts +15 -0
  106. package/dist/views/Overview.js +152 -0
  107. package/dist/views/Progress.d.ts +10 -0
  108. package/dist/views/Progress.js +117 -0
  109. package/dist/views/Steps.d.ts +11 -0
  110. package/dist/views/Steps.js +68 -0
  111. package/dist/views/Timeline.d.ts +10 -0
  112. package/dist/views/Timeline.js +112 -0
  113. package/dist/views/index.d.ts +5 -0
  114. package/dist/views/index.js +6 -0
  115. package/package.json +25 -16
  116. package/tsdown.config.js +14 -10
  117. package/dist/TipFeed-_1oKR35X.mjs +0 -234
  118. package/dist/components/index.d.mts +0 -2
  119. package/dist/components/index.mjs +0 -4
  120. package/dist/components-kh0CpIG2.mjs +0 -1
  121. package/dist/index-B6uj2reL.d.mts +0 -34
  122. package/dist/index-DJtCFWjr.d.mts +0 -47
  123. package/dist/index.mjs +0 -110
  124. package/dist/views/index.d.mts +0 -2
  125. package/dist/views/index.mjs +0 -4
  126. package/dist/views-BTGcWRSz.mjs +0 -421
package/dist/index.mjs DELETED
@@ -1,110 +0,0 @@
1
- import { n as EngagementMeter, r as TipCard, t as TipFeed } from "./TipFeed-_1oKR35X.mjs";
2
- import { i as Overview, n as ProgressView, r as Steps, t as Timeline } from "./views-BTGcWRSz.mjs";
3
- import "./components-kh0CpIG2.mjs";
4
- import { useCallback, useState } from "react";
5
- import { Card, CardContent } from "@lssm/lib.ui-kit-web/ui/card";
6
- import { ViewTabs, useLearningProgress } from "@lssm/example.learning-journey-ui-shared";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- import { registerDocBlocks } from "@lssm/lib.contracts/docs";
9
-
10
- //#region src/CoachingMiniApp.tsx
11
- function CoachingMiniApp({ track, progress: externalProgress, onStepComplete: externalOnStepComplete, onViewChange, initialView = "overview" }) {
12
- const [currentView, setCurrentView] = useState(initialView);
13
- const { progress: internalProgress, completeStep: internalCompleteStep } = useLearningProgress(track);
14
- const progress = externalProgress ?? internalProgress;
15
- const handleViewChange = useCallback((view) => {
16
- setCurrentView(view);
17
- onViewChange?.(view);
18
- }, [onViewChange]);
19
- const handleStepComplete = useCallback((stepId) => {
20
- if (externalOnStepComplete) externalOnStepComplete(stepId);
21
- else internalCompleteStep(stepId);
22
- }, [externalOnStepComplete, internalCompleteStep]);
23
- const handleStartFromOverview = useCallback(() => {
24
- setCurrentView("steps");
25
- onViewChange?.("steps");
26
- }, [onViewChange]);
27
- const renderView = () => {
28
- const viewProps = {
29
- track,
30
- progress,
31
- onStepComplete: handleStepComplete
32
- };
33
- switch (currentView) {
34
- case "overview": return /* @__PURE__ */ jsx(Overview, {
35
- ...viewProps,
36
- onStart: handleStartFromOverview
37
- });
38
- case "steps": return /* @__PURE__ */ jsx(Steps, { ...viewProps });
39
- case "progress": return /* @__PURE__ */ jsx(ProgressView, { ...viewProps });
40
- case "timeline": return /* @__PURE__ */ jsx(Timeline, { ...viewProps });
41
- default: return /* @__PURE__ */ jsx(Overview, {
42
- ...viewProps,
43
- onStart: handleStartFromOverview
44
- });
45
- }
46
- };
47
- return /* @__PURE__ */ jsxs("div", {
48
- className: "space-y-6",
49
- children: [/* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, {
50
- className: "p-4",
51
- children: /* @__PURE__ */ jsx(ViewTabs, {
52
- currentView,
53
- onViewChange: handleViewChange
54
- })
55
- }) }), renderView()]
56
- });
57
- }
58
-
59
- //#endregion
60
- //#region src/example.ts
61
- const example = {
62
- id: "learning-journey-ui-coaching",
63
- title: "Learning Journey UI — Coaching",
64
- summary: "UI mini-app for coaching patterns: tips, engagement meter, progress.",
65
- tags: [
66
- "learning",
67
- "ui",
68
- "coaching"
69
- ],
70
- kind: "ui",
71
- visibility: "public",
72
- docs: { rootDocId: "docs.examples.learning-journey-ui-coaching" },
73
- entrypoints: {
74
- packageName: "@lssm/example.learning-journey-ui-coaching",
75
- docs: "./docs"
76
- },
77
- surfaces: {
78
- templates: true,
79
- sandbox: {
80
- enabled: true,
81
- modes: ["playground", "markdown"]
82
- },
83
- studio: {
84
- enabled: true,
85
- installable: true
86
- },
87
- mcp: { enabled: true }
88
- }
89
- };
90
- var example_default = example;
91
-
92
- //#endregion
93
- //#region src/docs/learning-journey-ui-coaching.docblock.ts
94
- registerDocBlocks([{
95
- id: "docs.examples.learning-journey-ui-coaching",
96
- title: "Learning Journey UI — Coaching",
97
- summary: "UI mini-app components for coaching: tips, engagement, progress.",
98
- kind: "reference",
99
- visibility: "public",
100
- route: "/docs/examples/learning-journey-ui-coaching",
101
- tags: [
102
- "learning",
103
- "ui",
104
- "coaching"
105
- ],
106
- body: `## Includes\n- Coaching mini-app shell\n- Views: overview, steps, progress, timeline\n- Components: tip card, engagement meter, tip feed\n\n## Notes\n- Compose using design system components.\n- Keep accessibility and mobile-friendly tap targets.`
107
- }]);
108
-
109
- //#endregion
110
- export { CoachingMiniApp, EngagementMeter, Overview, ProgressView as Progress, Steps, Timeline, TipCard, TipFeed, example_default as example };
@@ -1,2 +0,0 @@
1
- import { i as Overview, n as ProgressView, r as Steps, t as Timeline } from "../index-B6uj2reL.mjs";
2
- export { Overview, ProgressView as Progress, Steps, Timeline };
@@ -1,4 +0,0 @@
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 };
@@ -1,421 +0,0 @@
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 };