@contractspec/example.learning-journey-ui-coaching 3.7.6 → 3.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/AGENTS.md +50 -25
- package/CHANGELOG.md +32 -0
- package/README.md +63 -20
- package/dist/CoachingMiniApp.js +178 -178
- package/dist/browser/CoachingMiniApp.js +178 -178
- package/dist/browser/components/EngagementMeter.js +2 -2
- package/dist/browser/components/TipCard.js +3 -3
- package/dist/browser/components/TipFeed.js +6 -6
- package/dist/browser/components/index.js +11 -11
- package/dist/browser/index.js +179 -178
- package/dist/browser/views/Overview.js +16 -16
- package/dist/browser/views/Progress.js +10 -10
- package/dist/browser/views/Steps.js +6 -6
- package/dist/browser/views/Timeline.js +9 -9
- package/dist/browser/views/index.js +174 -174
- package/dist/components/EngagementMeter.js +2 -2
- package/dist/components/TipCard.js +3 -3
- package/dist/components/TipFeed.js +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +11 -11
- package/dist/index.d.ts +3 -3
- package/dist/index.js +179 -178
- package/dist/node/CoachingMiniApp.js +178 -178
- package/dist/node/components/EngagementMeter.js +2 -2
- package/dist/node/components/TipCard.js +3 -3
- package/dist/node/components/TipFeed.js +6 -6
- package/dist/node/components/index.js +11 -11
- package/dist/node/index.js +179 -178
- package/dist/node/views/Overview.js +16 -16
- package/dist/node/views/Progress.js +10 -10
- package/dist/node/views/Steps.js +6 -6
- package/dist/node/views/Timeline.js +9 -9
- package/dist/node/views/index.js +174 -174
- package/dist/views/Overview.js +16 -16
- package/dist/views/Progress.js +10 -10
- package/dist/views/Steps.js +6 -6
- package/dist/views/Timeline.js +9 -9
- package/dist/views/index.d.ts +1 -1
- package/dist/views/index.js +174 -174
- package/package.json +12 -12
- package/src/CoachingMiniApp.tsx +70 -70
- package/src/components/EngagementMeter.tsx +82 -82
- package/src/components/TipCard.tsx +81 -81
- package/src/components/TipFeed.tsx +80 -80
- package/src/components/index.ts +1 -1
- package/src/docs/learning-journey-ui-coaching.docblock.ts +10 -10
- package/src/example.ts +25 -25
- package/src/index.ts +4 -6
- package/src/learning-journey-ui-coaching.feature.ts +12 -12
- package/src/views/Overview.tsx +136 -136
- package/src/views/Progress.tsx +146 -146
- package/src/views/Steps.tsx +57 -57
- package/src/views/Timeline.tsx +101 -101
- package/src/views/index.ts +1 -1
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -13
package/dist/views/Overview.js
CHANGED
|
@@ -45,7 +45,7 @@ function TipCard({
|
|
|
45
45
|
children: step.title
|
|
46
46
|
}, undefined, false, undefined, this),
|
|
47
47
|
step.xpReward && /* @__PURE__ */ jsxDEV("span", {
|
|
48
|
-
className: cn("shrink-0 rounded-full px-2 py-0.5 text-xs
|
|
48
|
+
className: cn("shrink-0 rounded-full px-2 py-0.5 font-semibold text-xs", isCompleted ? "bg-green-500/10 text-green-500" : "bg-amber-500/10 text-amber-500"),
|
|
49
49
|
children: [
|
|
50
50
|
"+",
|
|
51
51
|
step.xpReward,
|
|
@@ -55,7 +55,7 @@ function TipCard({
|
|
|
55
55
|
]
|
|
56
56
|
}, undefined, true, undefined, this),
|
|
57
57
|
/* @__PURE__ */ jsxDEV("p", {
|
|
58
|
-
className: "text-muted-foreground
|
|
58
|
+
className: "mt-1 text-muted-foreground text-sm",
|
|
59
59
|
children: step.description
|
|
60
60
|
}, undefined, false, undefined, this),
|
|
61
61
|
!isCompleted && /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -75,7 +75,7 @@ function TipCard({
|
|
|
75
75
|
]
|
|
76
76
|
}, undefined, true, undefined, this),
|
|
77
77
|
isCompleted && /* @__PURE__ */ jsxDEV("p", {
|
|
78
|
-
className: "mt-2 text-
|
|
78
|
+
className: "mt-2 text-green-500 text-sm",
|
|
79
79
|
children: "\u2713 Tip acknowledged"
|
|
80
80
|
}, undefined, false, undefined, this)
|
|
81
81
|
]
|
|
@@ -87,6 +87,10 @@ function TipCard({
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// src/views/Overview.tsx
|
|
90
|
+
import {
|
|
91
|
+
StreakCounter,
|
|
92
|
+
XpBar
|
|
93
|
+
} from "@contractspec/example.learning-journey-ui-shared";
|
|
90
94
|
import { Button as Button2 } from "@contractspec/lib.design-system";
|
|
91
95
|
import {
|
|
92
96
|
Card as Card2,
|
|
@@ -94,10 +98,6 @@ import {
|
|
|
94
98
|
CardHeader,
|
|
95
99
|
CardTitle
|
|
96
100
|
} from "@contractspec/lib.ui-kit-web/ui/card";
|
|
97
|
-
import {
|
|
98
|
-
XpBar,
|
|
99
|
-
StreakCounter
|
|
100
|
-
} from "@contractspec/example.learning-journey-ui-shared";
|
|
101
101
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
102
102
|
"use client";
|
|
103
103
|
function Overview({
|
|
@@ -129,11 +129,11 @@ function Overview({
|
|
|
129
129
|
className: "flex-1",
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ jsxDEV2("h1", {
|
|
132
|
-
className: "text-2xl
|
|
132
|
+
className: "font-bold text-2xl",
|
|
133
133
|
children: track.name
|
|
134
134
|
}, undefined, false, undefined, this),
|
|
135
135
|
/* @__PURE__ */ jsxDEV2("p", {
|
|
136
|
-
className: "text-muted-foreground
|
|
136
|
+
className: "mt-1 text-muted-foreground",
|
|
137
137
|
children: track.description
|
|
138
138
|
}, undefined, false, undefined, this)
|
|
139
139
|
]
|
|
@@ -157,14 +157,14 @@ function Overview({
|
|
|
157
157
|
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
158
158
|
className: "pb-2",
|
|
159
159
|
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
160
|
-
className: "text-muted-foreground text-sm
|
|
160
|
+
className: "font-medium text-muted-foreground text-sm",
|
|
161
161
|
children: "Active Tips"
|
|
162
162
|
}, undefined, false, undefined, this)
|
|
163
163
|
}, undefined, false, undefined, this),
|
|
164
164
|
/* @__PURE__ */ jsxDEV2(CardContent2, {
|
|
165
165
|
children: [
|
|
166
166
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
167
|
-
className: "
|
|
167
|
+
className: "font-bold text-3xl text-amber-500",
|
|
168
168
|
children: pendingSteps
|
|
169
169
|
}, undefined, false, undefined, this),
|
|
170
170
|
/* @__PURE__ */ jsxDEV2("p", {
|
|
@@ -180,14 +180,14 @@ function Overview({
|
|
|
180
180
|
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
181
181
|
className: "pb-2",
|
|
182
182
|
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
183
|
-
className: "text-muted-foreground text-sm
|
|
183
|
+
className: "font-medium text-muted-foreground text-sm",
|
|
184
184
|
children: "Tips Actioned"
|
|
185
185
|
}, undefined, false, undefined, this)
|
|
186
186
|
}, undefined, false, undefined, this),
|
|
187
187
|
/* @__PURE__ */ jsxDEV2(CardContent2, {
|
|
188
188
|
children: [
|
|
189
189
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
190
|
-
className: "
|
|
190
|
+
className: "font-bold text-3xl text-green-500",
|
|
191
191
|
children: completedSteps
|
|
192
192
|
}, undefined, false, undefined, this),
|
|
193
193
|
/* @__PURE__ */ jsxDEV2("p", {
|
|
@@ -207,14 +207,14 @@ function Overview({
|
|
|
207
207
|
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
208
208
|
className: "pb-2",
|
|
209
209
|
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
210
|
-
className: "text-muted-foreground text-sm
|
|
210
|
+
className: "font-medium text-muted-foreground text-sm",
|
|
211
211
|
children: "XP Earned"
|
|
212
212
|
}, undefined, false, undefined, this)
|
|
213
213
|
}, undefined, false, undefined, this),
|
|
214
214
|
/* @__PURE__ */ jsxDEV2(CardContent2, {
|
|
215
215
|
children: [
|
|
216
216
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
217
|
-
className: "
|
|
217
|
+
className: "font-bold text-3xl text-orange-500",
|
|
218
218
|
children: progress.xpEarned
|
|
219
219
|
}, undefined, false, undefined, this),
|
|
220
220
|
/* @__PURE__ */ jsxDEV2(XpBar, {
|
|
@@ -280,7 +280,7 @@ function Overview({
|
|
|
280
280
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
281
281
|
children: [
|
|
282
282
|
/* @__PURE__ */ jsxDEV2("h3", {
|
|
283
|
-
className: "
|
|
283
|
+
className: "font-semibold text-green-500 text-lg",
|
|
284
284
|
children: "All Tips Actioned!"
|
|
285
285
|
}, undefined, false, undefined, this),
|
|
286
286
|
/* @__PURE__ */ jsxDEV2("p", {
|
package/dist/views/Progress.js
CHANGED
|
@@ -58,7 +58,7 @@ function EngagementMeter({
|
|
|
58
58
|
className: "absolute inset-0 flex flex-col items-center justify-center",
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ jsxDEV("span", {
|
|
61
|
-
className: "text-2xl
|
|
61
|
+
className: "font-bold text-2xl",
|
|
62
62
|
children: total
|
|
63
63
|
}, undefined, false, undefined, this),
|
|
64
64
|
/* @__PURE__ */ jsxDEV("span", {
|
|
@@ -107,7 +107,7 @@ function EngagementMeter({
|
|
|
107
107
|
className: "flex items-center gap-1.5",
|
|
108
108
|
children: [
|
|
109
109
|
/* @__PURE__ */ jsxDEV("div", {
|
|
110
|
-
className: "
|
|
110
|
+
className: "h-3 w-3 rounded-full bg-muted"
|
|
111
111
|
}, undefined, false, undefined, this),
|
|
112
112
|
/* @__PURE__ */ jsxDEV("span", {
|
|
113
113
|
children: [
|
|
@@ -141,17 +141,17 @@ function EngagementMeter({
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
// src/views/Progress.tsx
|
|
144
|
+
import {
|
|
145
|
+
BadgeDisplay,
|
|
146
|
+
StreakCounter,
|
|
147
|
+
XpBar
|
|
148
|
+
} from "@contractspec/example.learning-journey-ui-shared";
|
|
144
149
|
import {
|
|
145
150
|
Card,
|
|
146
151
|
CardContent,
|
|
147
152
|
CardHeader,
|
|
148
153
|
CardTitle
|
|
149
154
|
} from "@contractspec/lib.ui-kit-web/ui/card";
|
|
150
|
-
import {
|
|
151
|
-
XpBar,
|
|
152
|
-
BadgeDisplay,
|
|
153
|
-
StreakCounter
|
|
154
|
-
} from "@contractspec/example.learning-journey-ui-shared";
|
|
155
155
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
156
156
|
"use client";
|
|
157
157
|
function ProgressView({ track, progress }) {
|
|
@@ -197,7 +197,7 @@ function ProgressView({ track, progress }) {
|
|
|
197
197
|
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
198
198
|
className: "pb-2",
|
|
199
199
|
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
200
|
-
className: "text-muted-foreground text-sm
|
|
200
|
+
className: "font-medium text-muted-foreground text-sm",
|
|
201
201
|
children: "XP Earned"
|
|
202
202
|
}, undefined, false, undefined, this)
|
|
203
203
|
}, undefined, false, undefined, this),
|
|
@@ -208,7 +208,7 @@ function ProgressView({ track, progress }) {
|
|
|
208
208
|
className: "flex items-baseline gap-2",
|
|
209
209
|
children: [
|
|
210
210
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
211
|
-
className: "
|
|
211
|
+
className: "font-bold text-3xl text-orange-500",
|
|
212
212
|
children: progress.xpEarned
|
|
213
213
|
}, undefined, false, undefined, this),
|
|
214
214
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
@@ -236,7 +236,7 @@ function ProgressView({ track, progress }) {
|
|
|
236
236
|
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
237
237
|
className: "pb-2",
|
|
238
238
|
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
239
|
-
className: "text-muted-foreground text-sm
|
|
239
|
+
className: "font-medium text-muted-foreground text-sm",
|
|
240
240
|
children: "Engagement Streak"
|
|
241
241
|
}, undefined, false, undefined, this)
|
|
242
242
|
}, undefined, false, undefined, this),
|
package/dist/views/Steps.js
CHANGED
|
@@ -45,7 +45,7 @@ function TipCard({
|
|
|
45
45
|
children: step.title
|
|
46
46
|
}, undefined, false, undefined, this),
|
|
47
47
|
step.xpReward && /* @__PURE__ */ jsxDEV("span", {
|
|
48
|
-
className: cn("shrink-0 rounded-full px-2 py-0.5 text-xs
|
|
48
|
+
className: cn("shrink-0 rounded-full px-2 py-0.5 font-semibold text-xs", isCompleted ? "bg-green-500/10 text-green-500" : "bg-amber-500/10 text-amber-500"),
|
|
49
49
|
children: [
|
|
50
50
|
"+",
|
|
51
51
|
step.xpReward,
|
|
@@ -55,7 +55,7 @@ function TipCard({
|
|
|
55
55
|
]
|
|
56
56
|
}, undefined, true, undefined, this),
|
|
57
57
|
/* @__PURE__ */ jsxDEV("p", {
|
|
58
|
-
className: "text-muted-foreground
|
|
58
|
+
className: "mt-1 text-muted-foreground text-sm",
|
|
59
59
|
children: step.description
|
|
60
60
|
}, undefined, false, undefined, this),
|
|
61
61
|
!isCompleted && /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -75,7 +75,7 @@ function TipCard({
|
|
|
75
75
|
]
|
|
76
76
|
}, undefined, true, undefined, this),
|
|
77
77
|
isCompleted && /* @__PURE__ */ jsxDEV("p", {
|
|
78
|
-
className: "mt-2 text-
|
|
78
|
+
className: "mt-2 text-green-500 text-sm",
|
|
79
79
|
children: "\u2713 Tip acknowledged"
|
|
80
80
|
}, undefined, false, undefined, this)
|
|
81
81
|
]
|
|
@@ -107,7 +107,7 @@ function Steps({ track, progress, onStepComplete }) {
|
|
|
107
107
|
className: "text-center",
|
|
108
108
|
children: [
|
|
109
109
|
/* @__PURE__ */ jsxDEV2("h2", {
|
|
110
|
-
className: "text-xl
|
|
110
|
+
className: "font-bold text-xl",
|
|
111
111
|
children: "Coaching Tips"
|
|
112
112
|
}, undefined, false, undefined, this),
|
|
113
113
|
/* @__PURE__ */ jsxDEV2("p", {
|
|
@@ -115,7 +115,7 @@ function Steps({ track, progress, onStepComplete }) {
|
|
|
115
115
|
children: "Review and take action on personalized tips"
|
|
116
116
|
}, undefined, false, undefined, this),
|
|
117
117
|
/* @__PURE__ */ jsxDEV2("p", {
|
|
118
|
-
className: "text-muted-foreground
|
|
118
|
+
className: "mt-2 text-muted-foreground text-sm",
|
|
119
119
|
children: [
|
|
120
120
|
completedSteps,
|
|
121
121
|
" of ",
|
|
@@ -140,7 +140,7 @@ function Steps({ track, progress, onStepComplete }) {
|
|
|
140
140
|
})
|
|
141
141
|
}, undefined, false, undefined, this),
|
|
142
142
|
completedSteps === totalSteps && /* @__PURE__ */ jsxDEV2("div", {
|
|
143
|
-
className: "text-muted-foreground
|
|
143
|
+
className: "text-center text-muted-foreground",
|
|
144
144
|
children: [
|
|
145
145
|
/* @__PURE__ */ jsxDEV2("span", {
|
|
146
146
|
className: "text-2xl",
|
package/dist/views/Timeline.js
CHANGED
|
@@ -15,7 +15,7 @@ var TIP_ICONS = {
|
|
|
15
15
|
function TipFeed({ items }) {
|
|
16
16
|
if (items.length === 0) {
|
|
17
17
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
18
|
-
className: "
|
|
18
|
+
className: "py-8 text-center text-muted-foreground",
|
|
19
19
|
children: "No tips yet. Start engaging with coaching tips!"
|
|
20
20
|
}, undefined, false, undefined, this);
|
|
21
21
|
}
|
|
@@ -23,7 +23,7 @@ function TipFeed({ items }) {
|
|
|
23
23
|
className: "relative",
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ jsxDEV("div", {
|
|
26
|
-
className: "
|
|
26
|
+
className: "absolute top-0 left-4 h-full w-0.5 bg-border"
|
|
27
27
|
}, undefined, false, undefined, this),
|
|
28
28
|
/* @__PURE__ */ jsxDEV("div", {
|
|
29
29
|
className: "space-y-4",
|
|
@@ -38,7 +38,7 @@ function TipFeed({ items }) {
|
|
|
38
38
|
children: item.isCompleted ? "\u2713" : icon
|
|
39
39
|
}, undefined, false, undefined, this),
|
|
40
40
|
/* @__PURE__ */ jsxDEV("div", {
|
|
41
|
-
className: "
|
|
41
|
+
className: "flex-1 rounded-lg border bg-card p-3",
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ jsxDEV("div", {
|
|
44
44
|
className: "flex items-start justify-between gap-2",
|
|
@@ -50,13 +50,13 @@ function TipFeed({ items }) {
|
|
|
50
50
|
children: item.step.title
|
|
51
51
|
}, undefined, false, undefined, this),
|
|
52
52
|
/* @__PURE__ */ jsxDEV("p", {
|
|
53
|
-
className: "
|
|
53
|
+
className: "mt-0.5 text-muted-foreground text-sm",
|
|
54
54
|
children: item.step.description
|
|
55
55
|
}, undefined, false, undefined, this)
|
|
56
56
|
]
|
|
57
57
|
}, undefined, true, undefined, this),
|
|
58
58
|
item.step.xpReward && /* @__PURE__ */ jsxDEV("span", {
|
|
59
|
-
className: cn("shrink-0 text-xs
|
|
59
|
+
className: cn("shrink-0 font-medium text-xs", item.isCompleted ? "text-green-500" : "text-muted-foreground"),
|
|
60
60
|
children: [
|
|
61
61
|
"+",
|
|
62
62
|
item.step.xpReward,
|
|
@@ -66,7 +66,7 @@ function TipFeed({ items }) {
|
|
|
66
66
|
]
|
|
67
67
|
}, undefined, true, undefined, this),
|
|
68
68
|
/* @__PURE__ */ jsxDEV("div", {
|
|
69
|
-
className: "
|
|
69
|
+
className: "mt-2 flex items-center gap-2 text-muted-foreground text-xs",
|
|
70
70
|
children: item.isCompleted ? /* @__PURE__ */ jsxDEV("span", {
|
|
71
71
|
className: "text-green-500",
|
|
72
72
|
children: [
|
|
@@ -117,7 +117,7 @@ function Timeline({ track, progress }) {
|
|
|
117
117
|
className: "text-center",
|
|
118
118
|
children: [
|
|
119
119
|
/* @__PURE__ */ jsxDEV2("h2", {
|
|
120
|
-
className: "text-xl
|
|
120
|
+
className: "font-bold text-xl",
|
|
121
121
|
children: "Activity Timeline"
|
|
122
122
|
}, undefined, false, undefined, this),
|
|
123
123
|
/* @__PURE__ */ jsxDEV2("p", {
|
|
@@ -134,7 +134,7 @@ function Timeline({ track, progress }) {
|
|
|
134
134
|
className: "p-4 text-center",
|
|
135
135
|
children: [
|
|
136
136
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
137
|
-
className: "
|
|
137
|
+
className: "font-bold text-2xl text-green-500",
|
|
138
138
|
children: completedCount
|
|
139
139
|
}, undefined, false, undefined, this),
|
|
140
140
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
@@ -149,7 +149,7 @@ function Timeline({ track, progress }) {
|
|
|
149
149
|
className: "p-4 text-center",
|
|
150
150
|
children: [
|
|
151
151
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
152
|
-
className: "
|
|
152
|
+
className: "font-bold text-2xl text-amber-500",
|
|
153
153
|
children: pendingCount
|
|
154
154
|
}, undefined, false, undefined, this),
|
|
155
155
|
/* @__PURE__ */ jsxDEV2("div", {
|