@contractspec/example.learning-journey-ui-gamified 1.56.1 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +59 -58
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +40 -0
- package/dist/GamifiedMiniApp.d.ts +4 -14
- package/dist/GamifiedMiniApp.d.ts.map +1 -1
- package/dist/GamifiedMiniApp.js +995 -59
- package/dist/browser/GamifiedMiniApp.js +998 -0
- package/dist/browser/components/DayCalendar.js +42 -0
- package/dist/browser/components/FlashCard.js +102 -0
- package/dist/browser/components/MasteryRing.js +75 -0
- package/dist/browser/components/index.js +217 -0
- package/dist/browser/docs/index.js +22 -0
- package/dist/browser/docs/learning-journey-ui-gamified.docblock.js +22 -0
- package/dist/browser/example.js +32 -0
- package/dist/browser/index.js +1057 -0
- package/dist/browser/views/Overview.js +236 -0
- package/dist/browser/views/Progress.js +294 -0
- package/dist/browser/views/Steps.js +157 -0
- package/dist/browser/views/Timeline.js +235 -0
- package/dist/browser/views/index.js +919 -0
- package/dist/components/DayCalendar.d.ts +5 -13
- package/dist/components/DayCalendar.d.ts.map +1 -1
- package/dist/components/DayCalendar.js +41 -31
- package/dist/components/FlashCard.d.ts +7 -16
- package/dist/components/FlashCard.d.ts.map +1 -1
- package/dist/components/FlashCard.js +99 -76
- package/dist/components/MasteryRing.d.ts +6 -15
- package/dist/components/MasteryRing.d.ts.map +1 -1
- package/dist/components/MasteryRing.js +72 -78
- package/dist/components/index.d.ts +4 -4
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +217 -4
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +23 -1
- package/dist/docs/learning-journey-ui-gamified.docblock.d.ts +2 -1
- package/dist/docs/learning-journey-ui-gamified.docblock.d.ts.map +1 -0
- package/dist/docs/learning-journey-ui-gamified.docblock.js +21 -18
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +30 -39
- package/dist/index.d.ts +6 -12
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1058 -14
- package/dist/node/GamifiedMiniApp.js +998 -0
- package/dist/node/components/DayCalendar.js +42 -0
- package/dist/node/components/FlashCard.js +102 -0
- package/dist/node/components/MasteryRing.js +75 -0
- package/dist/node/components/index.js +217 -0
- package/dist/node/docs/index.js +22 -0
- package/dist/node/docs/learning-journey-ui-gamified.docblock.js +22 -0
- package/dist/node/example.js +32 -0
- package/dist/node/index.js +1057 -0
- package/dist/node/views/Overview.js +236 -0
- package/dist/node/views/Progress.js +294 -0
- package/dist/node/views/Steps.js +157 -0
- package/dist/node/views/Timeline.js +235 -0
- package/dist/node/views/index.js +919 -0
- package/dist/views/Overview.d.ts +4 -12
- package/dist/views/Overview.d.ts.map +1 -1
- package/dist/views/Overview.js +234 -158
- package/dist/views/Progress.d.ts +2 -10
- package/dist/views/Progress.d.ts.map +1 -1
- package/dist/views/Progress.js +292 -140
- package/dist/views/Steps.d.ts +2 -11
- package/dist/views/Steps.d.ts.map +1 -1
- package/dist/views/Steps.js +155 -53
- package/dist/views/Timeline.d.ts +2 -10
- package/dist/views/Timeline.d.ts.map +1 -1
- package/dist/views/Timeline.js +233 -130
- package/dist/views/index.d.ts +5 -5
- package/dist/views/index.d.ts.map +1 -0
- package/dist/views/index.js +919 -5
- package/package.json +155 -39
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -57
- package/dist/GamifiedMiniApp.js.map +0 -1
- package/dist/components/DayCalendar.js.map +0 -1
- package/dist/components/FlashCard.js.map +0 -1
- package/dist/components/MasteryRing.js.map +0 -1
- package/dist/docs/learning-journey-ui-gamified.docblock.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/views/Overview.js.map +0 -1
- package/dist/views/Progress.js.map +0 -1
- package/dist/views/Steps.js.map +0 -1
- package/dist/views/Timeline.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/dist/views/Progress.js
CHANGED
|
@@ -1,143 +1,295 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/components/MasteryRing.tsx
|
|
3
|
+
import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
|
|
4
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
5
|
+
"use client";
|
|
6
|
+
var sizeStyles = {
|
|
7
|
+
sm: { container: "h-16 w-16", text: "text-xs", ring: 48, stroke: 4 },
|
|
8
|
+
md: { container: "h-24 w-24", text: "text-sm", ring: 72, stroke: 6 },
|
|
9
|
+
lg: { container: "h-32 w-32", text: "text-base", ring: 96, stroke: 8 }
|
|
10
|
+
};
|
|
11
|
+
var colorStyles = {
|
|
12
|
+
green: "stroke-green-500",
|
|
13
|
+
blue: "stroke-blue-500",
|
|
14
|
+
violet: "stroke-violet-500",
|
|
15
|
+
orange: "stroke-orange-500"
|
|
16
|
+
};
|
|
17
|
+
function MasteryRing({
|
|
18
|
+
label,
|
|
19
|
+
percentage,
|
|
20
|
+
size = "md",
|
|
21
|
+
color = "violet"
|
|
22
|
+
}) {
|
|
23
|
+
const styles = sizeStyles[size];
|
|
24
|
+
const radius = (styles.ring - styles.stroke) / 2;
|
|
25
|
+
const circumference = 2 * Math.PI * radius;
|
|
26
|
+
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
27
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
28
|
+
className: cn("relative flex flex-col items-center gap-1", styles.container),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsxDEV("svg", {
|
|
31
|
+
className: "absolute -rotate-90",
|
|
32
|
+
width: styles.ring,
|
|
33
|
+
height: styles.ring,
|
|
34
|
+
viewBox: `0 0 ${styles.ring} ${styles.ring}`,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsxDEV("circle", {
|
|
37
|
+
cx: styles.ring / 2,
|
|
38
|
+
cy: styles.ring / 2,
|
|
39
|
+
r: radius,
|
|
40
|
+
fill: "none",
|
|
41
|
+
strokeWidth: styles.stroke,
|
|
42
|
+
className: "stroke-muted"
|
|
43
|
+
}, undefined, false, undefined, this),
|
|
44
|
+
/* @__PURE__ */ jsxDEV("circle", {
|
|
45
|
+
cx: styles.ring / 2,
|
|
46
|
+
cy: styles.ring / 2,
|
|
47
|
+
r: radius,
|
|
48
|
+
fill: "none",
|
|
49
|
+
strokeWidth: styles.stroke,
|
|
50
|
+
strokeLinecap: "round",
|
|
51
|
+
strokeDasharray: circumference,
|
|
52
|
+
strokeDashoffset,
|
|
53
|
+
className: cn("transition-all duration-500", colorStyles[color])
|
|
54
|
+
}, undefined, false, undefined, this)
|
|
55
|
+
]
|
|
56
|
+
}, undefined, true, undefined, this),
|
|
57
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
58
|
+
className: "flex h-full flex-col items-center justify-center",
|
|
59
|
+
children: /* @__PURE__ */ jsxDEV("span", {
|
|
60
|
+
className: cn("font-bold", styles.text),
|
|
61
|
+
children: [
|
|
62
|
+
Math.round(percentage),
|
|
63
|
+
"%"
|
|
64
|
+
]
|
|
65
|
+
}, undefined, true, undefined, this)
|
|
66
|
+
}, undefined, false, undefined, this),
|
|
67
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
68
|
+
className: cn("text-muted-foreground mt-1 truncate", styles.text),
|
|
69
|
+
children: label
|
|
70
|
+
}, undefined, false, undefined, this)
|
|
71
|
+
]
|
|
72
|
+
}, undefined, true, undefined, this);
|
|
73
|
+
}
|
|
7
74
|
|
|
8
|
-
|
|
75
|
+
// src/views/Progress.tsx
|
|
76
|
+
import {
|
|
77
|
+
Card,
|
|
78
|
+
CardContent,
|
|
79
|
+
CardHeader,
|
|
80
|
+
CardTitle
|
|
81
|
+
} from "@contractspec/lib.ui-kit-web/ui/card";
|
|
82
|
+
import {
|
|
83
|
+
XpBar,
|
|
84
|
+
BadgeDisplay
|
|
85
|
+
} from "@contractspec/example.learning-journey-ui-shared";
|
|
86
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
87
|
+
"use client";
|
|
9
88
|
function Progress({ track, progress }) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
89
|
+
const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0) + (track.completionRewards?.xpBonus ?? 0);
|
|
90
|
+
const completedSteps = progress.completedStepIds.length;
|
|
91
|
+
const totalSteps = track.steps.length;
|
|
92
|
+
const percentComplete = totalSteps > 0 ? completedSteps / totalSteps * 100 : 0;
|
|
93
|
+
const surfaces = new Map;
|
|
94
|
+
track.steps.forEach((step) => {
|
|
95
|
+
const surface = step.metadata?.surface ?? "general";
|
|
96
|
+
const current = surfaces.get(surface) ?? { total: 0, completed: 0 };
|
|
97
|
+
surfaces.set(surface, {
|
|
98
|
+
total: current.total + 1,
|
|
99
|
+
completed: current.completed + (progress.completedStepIds.includes(step.id) ? 1 : 0)
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
const surfaceColors = [
|
|
103
|
+
"green",
|
|
104
|
+
"blue",
|
|
105
|
+
"violet",
|
|
106
|
+
"orange"
|
|
107
|
+
];
|
|
108
|
+
return /* @__PURE__ */ jsxDEV2("div", {
|
|
109
|
+
className: "space-y-6",
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ jsxDEV2(Card, {
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
114
|
+
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
115
|
+
className: "flex items-center gap-2",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
118
|
+
children: "\u26A1"
|
|
119
|
+
}, undefined, false, undefined, this),
|
|
120
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
121
|
+
children: "Experience Points"
|
|
122
|
+
}, undefined, false, undefined, this)
|
|
123
|
+
]
|
|
124
|
+
}, undefined, true, undefined, this)
|
|
125
|
+
}, undefined, false, undefined, this),
|
|
126
|
+
/* @__PURE__ */ jsxDEV2(CardContent, {
|
|
127
|
+
className: "space-y-4",
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
130
|
+
className: "flex items-baseline gap-2",
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
133
|
+
className: "text-4xl font-bold text-violet-500",
|
|
134
|
+
children: progress.xpEarned.toLocaleString()
|
|
135
|
+
}, undefined, false, undefined, this),
|
|
136
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
137
|
+
className: "text-muted-foreground",
|
|
138
|
+
children: [
|
|
139
|
+
"/ ",
|
|
140
|
+
totalXp.toLocaleString(),
|
|
141
|
+
" XP"
|
|
142
|
+
]
|
|
143
|
+
}, undefined, true, undefined, this)
|
|
144
|
+
]
|
|
145
|
+
}, undefined, true, undefined, this),
|
|
146
|
+
/* @__PURE__ */ jsxDEV2(XpBar, {
|
|
147
|
+
current: progress.xpEarned,
|
|
148
|
+
max: totalXp,
|
|
149
|
+
showLabel: false,
|
|
150
|
+
size: "lg"
|
|
151
|
+
}, undefined, false, undefined, this),
|
|
152
|
+
track.completionRewards?.xpBonus && percentComplete < 100 && /* @__PURE__ */ jsxDEV2("p", {
|
|
153
|
+
className: "text-muted-foreground text-sm",
|
|
154
|
+
children: [
|
|
155
|
+
"\uD83C\uDF81 Complete all steps for a",
|
|
156
|
+
" ",
|
|
157
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
158
|
+
className: "font-semibold text-green-500",
|
|
159
|
+
children: [
|
|
160
|
+
"+",
|
|
161
|
+
track.completionRewards.xpBonus,
|
|
162
|
+
" XP"
|
|
163
|
+
]
|
|
164
|
+
}, undefined, true, undefined, this),
|
|
165
|
+
" ",
|
|
166
|
+
"bonus!"
|
|
167
|
+
]
|
|
168
|
+
}, undefined, true, undefined, this)
|
|
169
|
+
]
|
|
170
|
+
}, undefined, true, undefined, this)
|
|
171
|
+
]
|
|
172
|
+
}, undefined, true, undefined, this),
|
|
173
|
+
/* @__PURE__ */ jsxDEV2(Card, {
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
176
|
+
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
177
|
+
className: "flex items-center gap-2",
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
180
|
+
children: "\uD83C\uDFAF"
|
|
181
|
+
}, undefined, false, undefined, this),
|
|
182
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
183
|
+
children: "Skill Mastery"
|
|
184
|
+
}, undefined, false, undefined, this)
|
|
185
|
+
]
|
|
186
|
+
}, undefined, true, undefined, this)
|
|
187
|
+
}, undefined, false, undefined, this),
|
|
188
|
+
/* @__PURE__ */ jsxDEV2(CardContent, {
|
|
189
|
+
children: /* @__PURE__ */ jsxDEV2("div", {
|
|
190
|
+
className: "flex flex-wrap justify-center gap-6",
|
|
191
|
+
children: [
|
|
192
|
+
Array.from(surfaces.entries()).map(([surface, data], index) => /* @__PURE__ */ jsxDEV2(MasteryRing, {
|
|
193
|
+
label: surface.charAt(0).toUpperCase() + surface.slice(1),
|
|
194
|
+
percentage: data.completed / data.total * 100,
|
|
195
|
+
color: surfaceColors[index % surfaceColors.length],
|
|
196
|
+
size: "lg"
|
|
197
|
+
}, surface, false, undefined, this)),
|
|
198
|
+
/* @__PURE__ */ jsxDEV2(MasteryRing, {
|
|
199
|
+
label: "Overall",
|
|
200
|
+
percentage: percentComplete,
|
|
201
|
+
color: "violet",
|
|
202
|
+
size: "lg"
|
|
203
|
+
}, undefined, false, undefined, this)
|
|
204
|
+
]
|
|
205
|
+
}, undefined, true, undefined, this)
|
|
206
|
+
}, undefined, false, undefined, this)
|
|
207
|
+
]
|
|
208
|
+
}, undefined, true, undefined, this),
|
|
209
|
+
/* @__PURE__ */ jsxDEV2(Card, {
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
212
|
+
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
213
|
+
className: "flex items-center gap-2",
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
216
|
+
children: "\uD83C\uDFC5"
|
|
217
|
+
}, undefined, false, undefined, this),
|
|
218
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
219
|
+
children: "Badges Earned"
|
|
220
|
+
}, undefined, false, undefined, this)
|
|
221
|
+
]
|
|
222
|
+
}, undefined, true, undefined, this)
|
|
223
|
+
}, undefined, false, undefined, this),
|
|
224
|
+
/* @__PURE__ */ jsxDEV2(CardContent, {
|
|
225
|
+
children: [
|
|
226
|
+
/* @__PURE__ */ jsxDEV2(BadgeDisplay, {
|
|
227
|
+
badges: progress.badges,
|
|
228
|
+
size: "lg",
|
|
229
|
+
maxVisible: 10
|
|
230
|
+
}, undefined, false, undefined, this),
|
|
231
|
+
progress.badges.length === 0 && /* @__PURE__ */ jsxDEV2("p", {
|
|
232
|
+
className: "text-muted-foreground text-sm",
|
|
233
|
+
children: "Complete the track to earn your first badge!"
|
|
234
|
+
}, undefined, false, undefined, this)
|
|
235
|
+
]
|
|
236
|
+
}, undefined, true, undefined, this)
|
|
237
|
+
]
|
|
238
|
+
}, undefined, true, undefined, this),
|
|
239
|
+
/* @__PURE__ */ jsxDEV2(Card, {
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ jsxDEV2(CardHeader, {
|
|
242
|
+
children: /* @__PURE__ */ jsxDEV2(CardTitle, {
|
|
243
|
+
className: "flex items-center gap-2",
|
|
244
|
+
children: [
|
|
245
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
246
|
+
children: "\uD83D\uDCCA"
|
|
247
|
+
}, undefined, false, undefined, this),
|
|
248
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
249
|
+
children: "Step Breakdown"
|
|
250
|
+
}, undefined, false, undefined, this)
|
|
251
|
+
]
|
|
252
|
+
}, undefined, true, undefined, this)
|
|
253
|
+
}, undefined, false, undefined, this),
|
|
254
|
+
/* @__PURE__ */ jsxDEV2(CardContent, {
|
|
255
|
+
children: /* @__PURE__ */ jsxDEV2("div", {
|
|
256
|
+
className: "space-y-2",
|
|
257
|
+
children: track.steps.map((step) => {
|
|
258
|
+
const isCompleted = progress.completedStepIds.includes(step.id);
|
|
259
|
+
return /* @__PURE__ */ jsxDEV2("div", {
|
|
260
|
+
className: "flex items-center justify-between rounded-lg border p-3",
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ jsxDEV2("div", {
|
|
263
|
+
className: "flex items-center gap-3",
|
|
264
|
+
children: [
|
|
265
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
266
|
+
className: isCompleted ? "text-green-500" : "text-muted-foreground",
|
|
267
|
+
children: isCompleted ? "\u2713" : "\u25CB"
|
|
268
|
+
}, undefined, false, undefined, this),
|
|
269
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
270
|
+
className: isCompleted ? "text-foreground" : "text-muted-foreground",
|
|
271
|
+
children: step.title
|
|
272
|
+
}, undefined, false, undefined, this)
|
|
273
|
+
]
|
|
274
|
+
}, undefined, true, undefined, this),
|
|
275
|
+
step.xpReward && /* @__PURE__ */ jsxDEV2("span", {
|
|
276
|
+
className: `text-sm font-medium ${isCompleted ? "text-green-500" : "text-muted-foreground"}`,
|
|
277
|
+
children: [
|
|
278
|
+
isCompleted ? "+" : "",
|
|
279
|
+
step.xpReward,
|
|
280
|
+
" XP"
|
|
281
|
+
]
|
|
282
|
+
}, undefined, true, undefined, this)
|
|
283
|
+
]
|
|
284
|
+
}, step.id, true, undefined, this);
|
|
285
|
+
})
|
|
286
|
+
}, undefined, false, undefined, this)
|
|
287
|
+
}, undefined, false, undefined, this)
|
|
288
|
+
]
|
|
289
|
+
}, undefined, true, undefined, this)
|
|
290
|
+
]
|
|
291
|
+
}, undefined, true, undefined, this);
|
|
139
292
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
//# sourceMappingURL=Progress.js.map
|
|
293
|
+
export {
|
|
294
|
+
Progress
|
|
295
|
+
};
|
package/dist/views/Steps.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import { LearningViewProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/views/Steps.d.ts
|
|
5
|
-
declare function Steps({
|
|
6
|
-
track,
|
|
7
|
-
progress,
|
|
8
|
-
onStepComplete
|
|
9
|
-
}: LearningViewProps): react_jsx_runtime4.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { Steps };
|
|
1
|
+
import type { LearningViewProps } from '@contractspec/example.learning-journey-ui-shared';
|
|
2
|
+
export declare function Steps({ track, progress, onStepComplete }: LearningViewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
3
|
//# sourceMappingURL=Steps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.d.ts","
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../src/views/Steps.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,iBAAiB,2CA4C3E"}
|