@contractspec/example.learning-journey-ui-coaching 3.7.6 → 3.7.7

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 (56) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/AGENTS.md +50 -25
  3. package/README.md +63 -20
  4. package/dist/CoachingMiniApp.js +178 -178
  5. package/dist/browser/CoachingMiniApp.js +178 -178
  6. package/dist/browser/components/EngagementMeter.js +2 -2
  7. package/dist/browser/components/TipCard.js +3 -3
  8. package/dist/browser/components/TipFeed.js +6 -6
  9. package/dist/browser/components/index.js +11 -11
  10. package/dist/browser/index.js +179 -178
  11. package/dist/browser/views/Overview.js +16 -16
  12. package/dist/browser/views/Progress.js +10 -10
  13. package/dist/browser/views/Steps.js +6 -6
  14. package/dist/browser/views/Timeline.js +9 -9
  15. package/dist/browser/views/index.js +174 -174
  16. package/dist/components/EngagementMeter.js +2 -2
  17. package/dist/components/TipCard.js +3 -3
  18. package/dist/components/TipFeed.js +6 -6
  19. package/dist/components/index.d.ts +1 -1
  20. package/dist/components/index.js +11 -11
  21. package/dist/index.d.ts +3 -3
  22. package/dist/index.js +179 -178
  23. package/dist/node/CoachingMiniApp.js +178 -178
  24. package/dist/node/components/EngagementMeter.js +2 -2
  25. package/dist/node/components/TipCard.js +3 -3
  26. package/dist/node/components/TipFeed.js +6 -6
  27. package/dist/node/components/index.js +11 -11
  28. package/dist/node/index.js +179 -178
  29. package/dist/node/views/Overview.js +16 -16
  30. package/dist/node/views/Progress.js +10 -10
  31. package/dist/node/views/Steps.js +6 -6
  32. package/dist/node/views/Timeline.js +9 -9
  33. package/dist/node/views/index.js +174 -174
  34. package/dist/views/Overview.js +16 -16
  35. package/dist/views/Progress.js +10 -10
  36. package/dist/views/Steps.js +6 -6
  37. package/dist/views/Timeline.js +9 -9
  38. package/dist/views/index.d.ts +1 -1
  39. package/dist/views/index.js +174 -174
  40. package/package.json +10 -10
  41. package/src/CoachingMiniApp.tsx +70 -70
  42. package/src/components/EngagementMeter.tsx +82 -82
  43. package/src/components/TipCard.tsx +81 -81
  44. package/src/components/TipFeed.tsx +80 -80
  45. package/src/components/index.ts +1 -1
  46. package/src/docs/learning-journey-ui-coaching.docblock.ts +10 -10
  47. package/src/example.ts +25 -25
  48. package/src/index.ts +4 -6
  49. package/src/learning-journey-ui-coaching.feature.ts +12 -12
  50. package/src/views/Overview.tsx +136 -136
  51. package/src/views/Progress.tsx +146 -146
  52. package/src/views/Steps.tsx +57 -57
  53. package/src/views/Timeline.tsx +101 -101
  54. package/src/views/index.ts +1 -1
  55. package/tsconfig.json +7 -8
  56. package/tsdown.config.js +7 -13
@@ -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 font-semibold", isCompleted ? "bg-green-500/10 text-green-500" : "bg-amber-500/10 text-amber-500"),
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 mt-1 text-sm",
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-sm text-green-500",
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 font-bold",
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 mt-1",
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 font-medium",
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: "text-3xl font-bold text-amber-500",
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 font-medium",
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: "text-3xl font-bold text-green-500",
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 font-medium",
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: "text-3xl font-bold text-orange-500",
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: "text-lg font-semibold text-green-500",
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", {
@@ -300,78 +300,8 @@ function Overview({
300
300
  }, undefined, true, undefined, this);
301
301
  }
302
302
 
303
- // src/views/Steps.tsx
304
- import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
305
- "use client";
306
- function Steps({ track, progress, onStepComplete }) {
307
- const completedSteps = progress.completedStepIds.length;
308
- const totalSteps = track.steps.length;
309
- const sortedSteps = [...track.steps].sort((a, b) => {
310
- const aCompleted = progress.completedStepIds.includes(a.id);
311
- const bCompleted = progress.completedStepIds.includes(b.id);
312
- if (aCompleted === bCompleted)
313
- return 0;
314
- return aCompleted ? 1 : -1;
315
- });
316
- const currentStepId = track.steps.find((s) => !progress.completedStepIds.includes(s.id))?.id;
317
- return /* @__PURE__ */ jsxDEV3("div", {
318
- className: "space-y-6",
319
- children: [
320
- /* @__PURE__ */ jsxDEV3("div", {
321
- className: "text-center",
322
- children: [
323
- /* @__PURE__ */ jsxDEV3("h2", {
324
- className: "text-xl font-bold",
325
- children: "Coaching Tips"
326
- }, undefined, false, undefined, this),
327
- /* @__PURE__ */ jsxDEV3("p", {
328
- className: "text-muted-foreground",
329
- children: "Review and take action on personalized tips"
330
- }, undefined, false, undefined, this),
331
- /* @__PURE__ */ jsxDEV3("p", {
332
- className: "text-muted-foreground mt-2 text-sm",
333
- children: [
334
- completedSteps,
335
- " of ",
336
- totalSteps,
337
- " tips actioned"
338
- ]
339
- }, undefined, true, undefined, this)
340
- ]
341
- }, undefined, true, undefined, this),
342
- /* @__PURE__ */ jsxDEV3("div", {
343
- className: "space-y-3",
344
- children: sortedSteps.map((step) => {
345
- const isCompleted = progress.completedStepIds.includes(step.id);
346
- const isCurrent = step.id === currentStepId;
347
- return /* @__PURE__ */ jsxDEV3(TipCard, {
348
- step,
349
- isCompleted,
350
- isCurrent,
351
- onComplete: () => onStepComplete?.(step.id),
352
- onDismiss: () => onStepComplete?.(step.id)
353
- }, step.id, false, undefined, this);
354
- })
355
- }, undefined, false, undefined, this),
356
- completedSteps === totalSteps && /* @__PURE__ */ jsxDEV3("div", {
357
- className: "text-muted-foreground text-center",
358
- children: [
359
- /* @__PURE__ */ jsxDEV3("span", {
360
- className: "text-2xl",
361
- children: "\u2728"
362
- }, undefined, false, undefined, this),
363
- /* @__PURE__ */ jsxDEV3("p", {
364
- className: "mt-2",
365
- children: "All tips have been addressed!"
366
- }, undefined, false, undefined, this)
367
- ]
368
- }, undefined, true, undefined, this)
369
- ]
370
- }, undefined, true, undefined, this);
371
- }
372
-
373
303
  // src/components/EngagementMeter.tsx
374
- import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
304
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
375
305
  "use client";
376
306
  function EngagementMeter({
377
307
  acknowledged,
@@ -382,19 +312,19 @@ function EngagementMeter({
382
312
  const total = acknowledged + actioned + pending;
383
313
  const actionedPercent = total > 0 ? actioned / total * 100 : 0;
384
314
  const acknowledgedPercent = total > 0 ? acknowledged / total * 100 : 0;
385
- return /* @__PURE__ */ jsxDEV4("div", {
315
+ return /* @__PURE__ */ jsxDEV3("div", {
386
316
  className: "space-y-4",
387
317
  children: [
388
- /* @__PURE__ */ jsxDEV4("div", {
318
+ /* @__PURE__ */ jsxDEV3("div", {
389
319
  className: "flex items-center justify-center",
390
- children: /* @__PURE__ */ jsxDEV4("div", {
320
+ children: /* @__PURE__ */ jsxDEV3("div", {
391
321
  className: "relative h-32 w-32",
392
322
  children: [
393
- /* @__PURE__ */ jsxDEV4("svg", {
323
+ /* @__PURE__ */ jsxDEV3("svg", {
394
324
  className: "h-full w-full -rotate-90",
395
325
  viewBox: "0 0 100 100",
396
326
  children: [
397
- /* @__PURE__ */ jsxDEV4("circle", {
327
+ /* @__PURE__ */ jsxDEV3("circle", {
398
328
  cx: "50",
399
329
  cy: "50",
400
330
  r: "40",
@@ -402,7 +332,7 @@ function EngagementMeter({
402
332
  strokeWidth: "12",
403
333
  className: "stroke-muted"
404
334
  }, undefined, false, undefined, this),
405
- /* @__PURE__ */ jsxDEV4("circle", {
335
+ /* @__PURE__ */ jsxDEV3("circle", {
406
336
  cx: "50",
407
337
  cy: "50",
408
338
  r: "40",
@@ -412,7 +342,7 @@ function EngagementMeter({
412
342
  strokeDasharray: `${actionedPercent * 2.51} 251`,
413
343
  className: "stroke-green-500 transition-all duration-500"
414
344
  }, undefined, false, undefined, this),
415
- /* @__PURE__ */ jsxDEV4("circle", {
345
+ /* @__PURE__ */ jsxDEV3("circle", {
416
346
  cx: "50",
417
347
  cy: "50",
418
348
  r: "40",
@@ -425,14 +355,14 @@ function EngagementMeter({
425
355
  }, undefined, false, undefined, this)
426
356
  ]
427
357
  }, undefined, true, undefined, this),
428
- /* @__PURE__ */ jsxDEV4("div", {
358
+ /* @__PURE__ */ jsxDEV3("div", {
429
359
  className: "absolute inset-0 flex flex-col items-center justify-center",
430
360
  children: [
431
- /* @__PURE__ */ jsxDEV4("span", {
432
- className: "text-2xl font-bold",
361
+ /* @__PURE__ */ jsxDEV3("span", {
362
+ className: "font-bold text-2xl",
433
363
  children: total
434
364
  }, undefined, false, undefined, this),
435
- /* @__PURE__ */ jsxDEV4("span", {
365
+ /* @__PURE__ */ jsxDEV3("span", {
436
366
  className: "text-muted-foreground text-xs",
437
367
  children: "tips"
438
368
  }, undefined, false, undefined, this)
@@ -441,16 +371,16 @@ function EngagementMeter({
441
371
  ]
442
372
  }, undefined, true, undefined, this)
443
373
  }, undefined, false, undefined, this),
444
- /* @__PURE__ */ jsxDEV4("div", {
374
+ /* @__PURE__ */ jsxDEV3("div", {
445
375
  className: "flex justify-center gap-4 text-sm",
446
376
  children: [
447
- /* @__PURE__ */ jsxDEV4("div", {
377
+ /* @__PURE__ */ jsxDEV3("div", {
448
378
  className: "flex items-center gap-1.5",
449
379
  children: [
450
- /* @__PURE__ */ jsxDEV4("div", {
380
+ /* @__PURE__ */ jsxDEV3("div", {
451
381
  className: "h-3 w-3 rounded-full bg-green-500"
452
382
  }, undefined, false, undefined, this),
453
- /* @__PURE__ */ jsxDEV4("span", {
383
+ /* @__PURE__ */ jsxDEV3("span", {
454
384
  children: [
455
385
  "Actioned (",
456
386
  actioned,
@@ -459,13 +389,13 @@ function EngagementMeter({
459
389
  }, undefined, true, undefined, this)
460
390
  ]
461
391
  }, undefined, true, undefined, this),
462
- /* @__PURE__ */ jsxDEV4("div", {
392
+ /* @__PURE__ */ jsxDEV3("div", {
463
393
  className: "flex items-center gap-1.5",
464
394
  children: [
465
- /* @__PURE__ */ jsxDEV4("div", {
395
+ /* @__PURE__ */ jsxDEV3("div", {
466
396
  className: "h-3 w-3 rounded-full bg-amber-500"
467
397
  }, undefined, false, undefined, this),
468
- /* @__PURE__ */ jsxDEV4("span", {
398
+ /* @__PURE__ */ jsxDEV3("span", {
469
399
  children: [
470
400
  "Acknowledged (",
471
401
  acknowledged,
@@ -474,13 +404,13 @@ function EngagementMeter({
474
404
  }, undefined, true, undefined, this)
475
405
  ]
476
406
  }, undefined, true, undefined, this),
477
- /* @__PURE__ */ jsxDEV4("div", {
407
+ /* @__PURE__ */ jsxDEV3("div", {
478
408
  className: "flex items-center gap-1.5",
479
409
  children: [
480
- /* @__PURE__ */ jsxDEV4("div", {
481
- className: "bg-muted h-3 w-3 rounded-full"
410
+ /* @__PURE__ */ jsxDEV3("div", {
411
+ className: "h-3 w-3 rounded-full bg-muted"
482
412
  }, undefined, false, undefined, this),
483
- /* @__PURE__ */ jsxDEV4("span", {
413
+ /* @__PURE__ */ jsxDEV3("span", {
484
414
  children: [
485
415
  "Pending (",
486
416
  pending,
@@ -491,14 +421,14 @@ function EngagementMeter({
491
421
  }, undefined, true, undefined, this)
492
422
  ]
493
423
  }, undefined, true, undefined, this),
494
- streak > 0 && /* @__PURE__ */ jsxDEV4("div", {
424
+ streak > 0 && /* @__PURE__ */ jsxDEV3("div", {
495
425
  className: "flex items-center justify-center gap-2 rounded-lg bg-orange-500/10 px-4 py-2",
496
426
  children: [
497
- /* @__PURE__ */ jsxDEV4("span", {
427
+ /* @__PURE__ */ jsxDEV3("span", {
498
428
  className: "text-xl",
499
429
  children: "\uD83D\uDD25"
500
430
  }, undefined, false, undefined, this),
501
- /* @__PURE__ */ jsxDEV4("span", {
431
+ /* @__PURE__ */ jsxDEV3("span", {
502
432
  className: "font-semibold text-orange-500",
503
433
  children: [
504
434
  streak,
@@ -512,18 +442,18 @@ function EngagementMeter({
512
442
  }
513
443
 
514
444
  // src/views/Progress.tsx
445
+ import {
446
+ BadgeDisplay,
447
+ StreakCounter as StreakCounter2,
448
+ XpBar as XpBar2
449
+ } from "@contractspec/example.learning-journey-ui-shared";
515
450
  import {
516
451
  Card as Card3,
517
452
  CardContent as CardContent3,
518
453
  CardHeader as CardHeader2,
519
454
  CardTitle as CardTitle2
520
455
  } from "@contractspec/lib.ui-kit-web/ui/card";
521
- import {
522
- XpBar as XpBar2,
523
- BadgeDisplay,
524
- StreakCounter as StreakCounter2
525
- } from "@contractspec/example.learning-journey-ui-shared";
526
- import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
456
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
527
457
  "use client";
528
458
  function ProgressView({ track, progress }) {
529
459
  const totalXp = track.totalXp ?? track.steps.reduce((sum, s) => sum + (s.xpReward ?? 0), 0);
@@ -532,26 +462,26 @@ function ProgressView({ track, progress }) {
532
462
  const pendingSteps = totalSteps - completedSteps;
533
463
  const actioned = Math.floor(completedSteps * 0.7);
534
464
  const acknowledged = completedSteps - actioned;
535
- return /* @__PURE__ */ jsxDEV5("div", {
465
+ return /* @__PURE__ */ jsxDEV4("div", {
536
466
  className: "space-y-6",
537
467
  children: [
538
- /* @__PURE__ */ jsxDEV5(Card3, {
468
+ /* @__PURE__ */ jsxDEV4(Card3, {
539
469
  children: [
540
- /* @__PURE__ */ jsxDEV5(CardHeader2, {
541
- children: /* @__PURE__ */ jsxDEV5(CardTitle2, {
470
+ /* @__PURE__ */ jsxDEV4(CardHeader2, {
471
+ children: /* @__PURE__ */ jsxDEV4(CardTitle2, {
542
472
  className: "flex items-center gap-2",
543
473
  children: [
544
- /* @__PURE__ */ jsxDEV5("span", {
474
+ /* @__PURE__ */ jsxDEV4("span", {
545
475
  children: "\uD83D\uDCCA"
546
476
  }, undefined, false, undefined, this),
547
- /* @__PURE__ */ jsxDEV5("span", {
477
+ /* @__PURE__ */ jsxDEV4("span", {
548
478
  children: "Engagement Overview"
549
479
  }, undefined, false, undefined, this)
550
480
  ]
551
481
  }, undefined, true, undefined, this)
552
482
  }, undefined, false, undefined, this),
553
- /* @__PURE__ */ jsxDEV5(CardContent3, {
554
- children: /* @__PURE__ */ jsxDEV5(EngagementMeter, {
483
+ /* @__PURE__ */ jsxDEV4(CardContent3, {
484
+ children: /* @__PURE__ */ jsxDEV4(EngagementMeter, {
555
485
  actioned,
556
486
  acknowledged,
557
487
  pending: pendingSteps,
@@ -560,29 +490,29 @@ function ProgressView({ track, progress }) {
560
490
  }, undefined, false, undefined, this)
561
491
  ]
562
492
  }, undefined, true, undefined, this),
563
- /* @__PURE__ */ jsxDEV5("div", {
493
+ /* @__PURE__ */ jsxDEV4("div", {
564
494
  className: "grid gap-4 md:grid-cols-2",
565
495
  children: [
566
- /* @__PURE__ */ jsxDEV5(Card3, {
496
+ /* @__PURE__ */ jsxDEV4(Card3, {
567
497
  children: [
568
- /* @__PURE__ */ jsxDEV5(CardHeader2, {
498
+ /* @__PURE__ */ jsxDEV4(CardHeader2, {
569
499
  className: "pb-2",
570
- children: /* @__PURE__ */ jsxDEV5(CardTitle2, {
571
- className: "text-muted-foreground text-sm font-medium",
500
+ children: /* @__PURE__ */ jsxDEV4(CardTitle2, {
501
+ className: "font-medium text-muted-foreground text-sm",
572
502
  children: "XP Earned"
573
503
  }, undefined, false, undefined, this)
574
504
  }, undefined, false, undefined, this),
575
- /* @__PURE__ */ jsxDEV5(CardContent3, {
505
+ /* @__PURE__ */ jsxDEV4(CardContent3, {
576
506
  className: "space-y-3",
577
507
  children: [
578
- /* @__PURE__ */ jsxDEV5("div", {
508
+ /* @__PURE__ */ jsxDEV4("div", {
579
509
  className: "flex items-baseline gap-2",
580
510
  children: [
581
- /* @__PURE__ */ jsxDEV5("span", {
582
- className: "text-3xl font-bold text-orange-500",
511
+ /* @__PURE__ */ jsxDEV4("span", {
512
+ className: "font-bold text-3xl text-orange-500",
583
513
  children: progress.xpEarned
584
514
  }, undefined, false, undefined, this),
585
- /* @__PURE__ */ jsxDEV5("span", {
515
+ /* @__PURE__ */ jsxDEV4("span", {
586
516
  className: "text-muted-foreground",
587
517
  children: [
588
518
  "/ ",
@@ -592,7 +522,7 @@ function ProgressView({ track, progress }) {
592
522
  }, undefined, true, undefined, this)
593
523
  ]
594
524
  }, undefined, true, undefined, this),
595
- /* @__PURE__ */ jsxDEV5(XpBar2, {
525
+ /* @__PURE__ */ jsxDEV4(XpBar2, {
596
526
  current: progress.xpEarned,
597
527
  max: totalXp,
598
528
  showLabel: false,
@@ -602,24 +532,24 @@ function ProgressView({ track, progress }) {
602
532
  }, undefined, true, undefined, this)
603
533
  ]
604
534
  }, undefined, true, undefined, this),
605
- /* @__PURE__ */ jsxDEV5(Card3, {
535
+ /* @__PURE__ */ jsxDEV4(Card3, {
606
536
  children: [
607
- /* @__PURE__ */ jsxDEV5(CardHeader2, {
537
+ /* @__PURE__ */ jsxDEV4(CardHeader2, {
608
538
  className: "pb-2",
609
- children: /* @__PURE__ */ jsxDEV5(CardTitle2, {
610
- className: "text-muted-foreground text-sm font-medium",
539
+ children: /* @__PURE__ */ jsxDEV4(CardTitle2, {
540
+ className: "font-medium text-muted-foreground text-sm",
611
541
  children: "Engagement Streak"
612
542
  }, undefined, false, undefined, this)
613
543
  }, undefined, false, undefined, this),
614
- /* @__PURE__ */ jsxDEV5(CardContent3, {
615
- children: /* @__PURE__ */ jsxDEV5("div", {
544
+ /* @__PURE__ */ jsxDEV4(CardContent3, {
545
+ children: /* @__PURE__ */ jsxDEV4("div", {
616
546
  className: "flex items-center gap-4",
617
547
  children: [
618
- /* @__PURE__ */ jsxDEV5(StreakCounter2, {
548
+ /* @__PURE__ */ jsxDEV4(StreakCounter2, {
619
549
  days: progress.streakDays,
620
550
  size: "lg"
621
551
  }, undefined, false, undefined, this),
622
- /* @__PURE__ */ jsxDEV5("div", {
552
+ /* @__PURE__ */ jsxDEV4("div", {
623
553
  className: "text-muted-foreground text-sm",
624
554
  children: progress.streakDays > 0 ? "Keep going!" : "Start your streak today!"
625
555
  }, undefined, false, undefined, this)
@@ -630,29 +560,29 @@ function ProgressView({ track, progress }) {
630
560
  }, undefined, true, undefined, this)
631
561
  ]
632
562
  }, undefined, true, undefined, this),
633
- /* @__PURE__ */ jsxDEV5(Card3, {
563
+ /* @__PURE__ */ jsxDEV4(Card3, {
634
564
  children: [
635
- /* @__PURE__ */ jsxDEV5(CardHeader2, {
636
- children: /* @__PURE__ */ jsxDEV5(CardTitle2, {
565
+ /* @__PURE__ */ jsxDEV4(CardHeader2, {
566
+ children: /* @__PURE__ */ jsxDEV4(CardTitle2, {
637
567
  className: "flex items-center gap-2",
638
568
  children: [
639
- /* @__PURE__ */ jsxDEV5("span", {
569
+ /* @__PURE__ */ jsxDEV4("span", {
640
570
  children: "\uD83C\uDFC5"
641
571
  }, undefined, false, undefined, this),
642
- /* @__PURE__ */ jsxDEV5("span", {
572
+ /* @__PURE__ */ jsxDEV4("span", {
643
573
  children: "Achievements"
644
574
  }, undefined, false, undefined, this)
645
575
  ]
646
576
  }, undefined, true, undefined, this)
647
577
  }, undefined, false, undefined, this),
648
- /* @__PURE__ */ jsxDEV5(CardContent3, {
578
+ /* @__PURE__ */ jsxDEV4(CardContent3, {
649
579
  children: [
650
- /* @__PURE__ */ jsxDEV5(BadgeDisplay, {
580
+ /* @__PURE__ */ jsxDEV4(BadgeDisplay, {
651
581
  badges: progress.badges,
652
582
  size: "lg",
653
583
  maxVisible: 10
654
584
  }, undefined, false, undefined, this),
655
- progress.badges.length === 0 && /* @__PURE__ */ jsxDEV5("p", {
585
+ progress.badges.length === 0 && /* @__PURE__ */ jsxDEV4("p", {
656
586
  className: "text-muted-foreground text-sm",
657
587
  children: "Action tips to unlock achievements!"
658
588
  }, undefined, false, undefined, this)
@@ -660,43 +590,43 @@ function ProgressView({ track, progress }) {
660
590
  }, undefined, true, undefined, this)
661
591
  ]
662
592
  }, undefined, true, undefined, this),
663
- /* @__PURE__ */ jsxDEV5(Card3, {
593
+ /* @__PURE__ */ jsxDEV4(Card3, {
664
594
  children: [
665
- /* @__PURE__ */ jsxDEV5(CardHeader2, {
666
- children: /* @__PURE__ */ jsxDEV5(CardTitle2, {
595
+ /* @__PURE__ */ jsxDEV4(CardHeader2, {
596
+ children: /* @__PURE__ */ jsxDEV4(CardTitle2, {
667
597
  className: "flex items-center gap-2",
668
598
  children: [
669
- /* @__PURE__ */ jsxDEV5("span", {
599
+ /* @__PURE__ */ jsxDEV4("span", {
670
600
  children: "\uD83D\uDCA1"
671
601
  }, undefined, false, undefined, this),
672
- /* @__PURE__ */ jsxDEV5("span", {
602
+ /* @__PURE__ */ jsxDEV4("span", {
673
603
  children: "Tip Status"
674
604
  }, undefined, false, undefined, this)
675
605
  ]
676
606
  }, undefined, true, undefined, this)
677
607
  }, undefined, false, undefined, this),
678
- /* @__PURE__ */ jsxDEV5(CardContent3, {
679
- children: /* @__PURE__ */ jsxDEV5("div", {
608
+ /* @__PURE__ */ jsxDEV4(CardContent3, {
609
+ children: /* @__PURE__ */ jsxDEV4("div", {
680
610
  className: "space-y-3",
681
611
  children: track.steps.map((step) => {
682
612
  const isCompleted = progress.completedStepIds.includes(step.id);
683
- return /* @__PURE__ */ jsxDEV5("div", {
613
+ return /* @__PURE__ */ jsxDEV4("div", {
684
614
  className: "flex items-center justify-between rounded-lg border p-3",
685
615
  children: [
686
- /* @__PURE__ */ jsxDEV5("div", {
616
+ /* @__PURE__ */ jsxDEV4("div", {
687
617
  className: "flex items-center gap-3",
688
618
  children: [
689
- /* @__PURE__ */ jsxDEV5("span", {
619
+ /* @__PURE__ */ jsxDEV4("span", {
690
620
  className: isCompleted ? "text-green-500" : "text-amber-500",
691
621
  children: isCompleted ? "\u2713" : "\u25CB"
692
622
  }, undefined, false, undefined, this),
693
- /* @__PURE__ */ jsxDEV5("span", {
623
+ /* @__PURE__ */ jsxDEV4("span", {
694
624
  className: isCompleted ? "text-muted-foreground" : "text-foreground",
695
625
  children: step.title
696
626
  }, undefined, false, undefined, this)
697
627
  ]
698
628
  }, undefined, true, undefined, this),
699
- /* @__PURE__ */ jsxDEV5("span", {
629
+ /* @__PURE__ */ jsxDEV4("span", {
700
630
  className: `text-sm ${isCompleted ? "text-green-500" : "text-muted-foreground"}`,
701
631
  children: isCompleted ? "Actioned" : "Pending"
702
632
  }, undefined, false, undefined, this)
@@ -710,6 +640,76 @@ function ProgressView({ track, progress }) {
710
640
  ]
711
641
  }, undefined, true, undefined, this);
712
642
  }
643
+ // src/views/Steps.tsx
644
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
645
+ "use client";
646
+ function Steps({ track, progress, onStepComplete }) {
647
+ const completedSteps = progress.completedStepIds.length;
648
+ const totalSteps = track.steps.length;
649
+ const sortedSteps = [...track.steps].sort((a, b) => {
650
+ const aCompleted = progress.completedStepIds.includes(a.id);
651
+ const bCompleted = progress.completedStepIds.includes(b.id);
652
+ if (aCompleted === bCompleted)
653
+ return 0;
654
+ return aCompleted ? 1 : -1;
655
+ });
656
+ const currentStepId = track.steps.find((s) => !progress.completedStepIds.includes(s.id))?.id;
657
+ return /* @__PURE__ */ jsxDEV5("div", {
658
+ className: "space-y-6",
659
+ children: [
660
+ /* @__PURE__ */ jsxDEV5("div", {
661
+ className: "text-center",
662
+ children: [
663
+ /* @__PURE__ */ jsxDEV5("h2", {
664
+ className: "font-bold text-xl",
665
+ children: "Coaching Tips"
666
+ }, undefined, false, undefined, this),
667
+ /* @__PURE__ */ jsxDEV5("p", {
668
+ className: "text-muted-foreground",
669
+ children: "Review and take action on personalized tips"
670
+ }, undefined, false, undefined, this),
671
+ /* @__PURE__ */ jsxDEV5("p", {
672
+ className: "mt-2 text-muted-foreground text-sm",
673
+ children: [
674
+ completedSteps,
675
+ " of ",
676
+ totalSteps,
677
+ " tips actioned"
678
+ ]
679
+ }, undefined, true, undefined, this)
680
+ ]
681
+ }, undefined, true, undefined, this),
682
+ /* @__PURE__ */ jsxDEV5("div", {
683
+ className: "space-y-3",
684
+ children: sortedSteps.map((step) => {
685
+ const isCompleted = progress.completedStepIds.includes(step.id);
686
+ const isCurrent = step.id === currentStepId;
687
+ return /* @__PURE__ */ jsxDEV5(TipCard, {
688
+ step,
689
+ isCompleted,
690
+ isCurrent,
691
+ onComplete: () => onStepComplete?.(step.id),
692
+ onDismiss: () => onStepComplete?.(step.id)
693
+ }, step.id, false, undefined, this);
694
+ })
695
+ }, undefined, false, undefined, this),
696
+ completedSteps === totalSteps && /* @__PURE__ */ jsxDEV5("div", {
697
+ className: "text-center text-muted-foreground",
698
+ children: [
699
+ /* @__PURE__ */ jsxDEV5("span", {
700
+ className: "text-2xl",
701
+ children: "\u2728"
702
+ }, undefined, false, undefined, this),
703
+ /* @__PURE__ */ jsxDEV5("p", {
704
+ className: "mt-2",
705
+ children: "All tips have been addressed!"
706
+ }, undefined, false, undefined, this)
707
+ ]
708
+ }, undefined, true, undefined, this)
709
+ ]
710
+ }, undefined, true, undefined, this);
711
+ }
712
+
713
713
  // src/components/TipFeed.tsx
714
714
  import { cn as cn2 } from "@contractspec/lib.ui-kit-web/ui/utils";
715
715
  import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
@@ -726,7 +726,7 @@ var TIP_ICONS2 = {
726
726
  function TipFeed({ items }) {
727
727
  if (items.length === 0) {
728
728
  return /* @__PURE__ */ jsxDEV6("div", {
729
- className: "text-muted-foreground py-8 text-center",
729
+ className: "py-8 text-center text-muted-foreground",
730
730
  children: "No tips yet. Start engaging with coaching tips!"
731
731
  }, undefined, false, undefined, this);
732
732
  }
@@ -734,7 +734,7 @@ function TipFeed({ items }) {
734
734
  className: "relative",
735
735
  children: [
736
736
  /* @__PURE__ */ jsxDEV6("div", {
737
- className: "bg-border absolute top-0 left-4 h-full w-0.5"
737
+ className: "absolute top-0 left-4 h-full w-0.5 bg-border"
738
738
  }, undefined, false, undefined, this),
739
739
  /* @__PURE__ */ jsxDEV6("div", {
740
740
  className: "space-y-4",
@@ -749,7 +749,7 @@ function TipFeed({ items }) {
749
749
  children: item.isCompleted ? "\u2713" : icon
750
750
  }, undefined, false, undefined, this),
751
751
  /* @__PURE__ */ jsxDEV6("div", {
752
- className: "bg-card flex-1 rounded-lg border p-3",
752
+ className: "flex-1 rounded-lg border bg-card p-3",
753
753
  children: [
754
754
  /* @__PURE__ */ jsxDEV6("div", {
755
755
  className: "flex items-start justify-between gap-2",
@@ -761,13 +761,13 @@ function TipFeed({ items }) {
761
761
  children: item.step.title
762
762
  }, undefined, false, undefined, this),
763
763
  /* @__PURE__ */ jsxDEV6("p", {
764
- className: "text-muted-foreground mt-0.5 text-sm",
764
+ className: "mt-0.5 text-muted-foreground text-sm",
765
765
  children: item.step.description
766
766
  }, undefined, false, undefined, this)
767
767
  ]
768
768
  }, undefined, true, undefined, this),
769
769
  item.step.xpReward && /* @__PURE__ */ jsxDEV6("span", {
770
- className: cn2("shrink-0 text-xs font-medium", item.isCompleted ? "text-green-500" : "text-muted-foreground"),
770
+ className: cn2("shrink-0 font-medium text-xs", item.isCompleted ? "text-green-500" : "text-muted-foreground"),
771
771
  children: [
772
772
  "+",
773
773
  item.step.xpReward,
@@ -777,7 +777,7 @@ function TipFeed({ items }) {
777
777
  ]
778
778
  }, undefined, true, undefined, this),
779
779
  /* @__PURE__ */ jsxDEV6("div", {
780
- className: "text-muted-foreground mt-2 flex items-center gap-2 text-xs",
780
+ className: "mt-2 flex items-center gap-2 text-muted-foreground text-xs",
781
781
  children: item.isCompleted ? /* @__PURE__ */ jsxDEV6("span", {
782
782
  className: "text-green-500",
783
783
  children: [
@@ -828,7 +828,7 @@ function Timeline({ track, progress }) {
828
828
  className: "text-center",
829
829
  children: [
830
830
  /* @__PURE__ */ jsxDEV7("h2", {
831
- className: "text-xl font-bold",
831
+ className: "font-bold text-xl",
832
832
  children: "Activity Timeline"
833
833
  }, undefined, false, undefined, this),
834
834
  /* @__PURE__ */ jsxDEV7("p", {
@@ -845,7 +845,7 @@ function Timeline({ track, progress }) {
845
845
  className: "p-4 text-center",
846
846
  children: [
847
847
  /* @__PURE__ */ jsxDEV7("div", {
848
- className: "text-2xl font-bold text-green-500",
848
+ className: "font-bold text-2xl text-green-500",
849
849
  children: completedCount
850
850
  }, undefined, false, undefined, this),
851
851
  /* @__PURE__ */ jsxDEV7("div", {
@@ -860,7 +860,7 @@ function Timeline({ track, progress }) {
860
860
  className: "p-4 text-center",
861
861
  children: [
862
862
  /* @__PURE__ */ jsxDEV7("div", {
863
- className: "text-2xl font-bold text-amber-500",
863
+ className: "font-bold text-2xl text-amber-500",
864
864
  children: pendingCount
865
865
  }, undefined, false, undefined, this),
866
866
  /* @__PURE__ */ jsxDEV7("div", {
@@ -975,12 +975,12 @@ function Timeline({ track, progress }) {
975
975
  }
976
976
 
977
977
  // src/CoachingMiniApp.tsx
978
- import { useState, useCallback } from "react";
979
- import { Card as Card5, CardContent as CardContent5 } from "@contractspec/lib.ui-kit-web/ui/card";
980
978
  import {
981
- ViewTabs,
982
- useLearningProgress
979
+ useLearningProgress,
980
+ ViewTabs
983
981
  } from "@contractspec/example.learning-journey-ui-shared";
982
+ import { Card as Card5, CardContent as CardContent5 } from "@contractspec/lib.ui-kit-web/ui/card";
983
+ import { useCallback, useState } from "react";
984
984
  import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
985
985
  "use client";
986
986
  function CoachingMiniApp({