@contractspec/example.learning-journey-ui-coaching 1.57.0 → 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.
Files changed (87) hide show
  1. package/.turbo/turbo-build.log +58 -59
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +18 -0
  4. package/dist/CoachingMiniApp.d.ts +4 -14
  5. package/dist/CoachingMiniApp.d.ts.map +1 -1
  6. package/dist/CoachingMiniApp.js +1056 -59
  7. package/dist/browser/CoachingMiniApp.js +1059 -0
  8. package/dist/browser/components/EngagementMeter.js +143 -0
  9. package/dist/browser/components/TipCard.js +89 -0
  10. package/dist/browser/components/TipFeed.js +90 -0
  11. package/dist/browser/components/index.js +320 -0
  12. package/dist/browser/docs/index.js +22 -0
  13. package/dist/browser/docs/learning-journey-ui-coaching.docblock.js +22 -0
  14. package/dist/browser/example.js +32 -0
  15. package/dist/browser/index.js +1118 -0
  16. package/dist/browser/views/Overview.js +303 -0
  17. package/dist/browser/views/Progress.js +344 -0
  18. package/dist/browser/views/Steps.js +159 -0
  19. package/dist/browser/views/Timeline.js +266 -0
  20. package/dist/browser/views/index.js +980 -0
  21. package/dist/components/EngagementMeter.d.ts +6 -15
  22. package/dist/components/EngagementMeter.d.ts.map +1 -1
  23. package/dist/components/EngagementMeter.js +143 -107
  24. package/dist/components/TipCard.d.ts +8 -18
  25. package/dist/components/TipCard.d.ts.map +1 -1
  26. package/dist/components/TipCard.js +86 -72
  27. package/dist/components/TipFeed.d.ts +7 -13
  28. package/dist/components/TipFeed.d.ts.map +1 -1
  29. package/dist/components/TipFeed.js +87 -62
  30. package/dist/components/index.d.ts +4 -4
  31. package/dist/components/index.d.ts.map +1 -0
  32. package/dist/components/index.js +320 -4
  33. package/dist/docs/index.d.ts +2 -1
  34. package/dist/docs/index.d.ts.map +1 -0
  35. package/dist/docs/index.js +23 -1
  36. package/dist/docs/learning-journey-ui-coaching.docblock.d.ts +2 -1
  37. package/dist/docs/learning-journey-ui-coaching.docblock.d.ts.map +1 -0
  38. package/dist/docs/learning-journey-ui-coaching.docblock.js +21 -18
  39. package/dist/example.d.ts +2 -6
  40. package/dist/example.d.ts.map +1 -1
  41. package/dist/example.js +31 -39
  42. package/dist/index.d.ts +6 -12
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +1119 -14
  45. package/dist/node/CoachingMiniApp.js +1059 -0
  46. package/dist/node/components/EngagementMeter.js +143 -0
  47. package/dist/node/components/TipCard.js +89 -0
  48. package/dist/node/components/TipFeed.js +90 -0
  49. package/dist/node/components/index.js +320 -0
  50. package/dist/node/docs/index.js +22 -0
  51. package/dist/node/docs/learning-journey-ui-coaching.docblock.js +22 -0
  52. package/dist/node/example.js +32 -0
  53. package/dist/node/index.js +1118 -0
  54. package/dist/node/views/Overview.js +303 -0
  55. package/dist/node/views/Progress.js +344 -0
  56. package/dist/node/views/Steps.js +159 -0
  57. package/dist/node/views/Timeline.js +266 -0
  58. package/dist/node/views/index.js +980 -0
  59. package/dist/views/Overview.d.ts +4 -13
  60. package/dist/views/Overview.d.ts.map +1 -1
  61. package/dist/views/Overview.js +301 -148
  62. package/dist/views/Progress.d.ts +3 -10
  63. package/dist/views/Progress.d.ts.map +1 -1
  64. package/dist/views/Progress.js +342 -112
  65. package/dist/views/Steps.d.ts +2 -11
  66. package/dist/views/Steps.d.ts.map +1 -1
  67. package/dist/views/Steps.js +157 -66
  68. package/dist/views/Timeline.d.ts +2 -10
  69. package/dist/views/Timeline.d.ts.map +1 -1
  70. package/dist/views/Timeline.js +264 -110
  71. package/dist/views/index.d.ts +5 -5
  72. package/dist/views/index.d.ts.map +1 -0
  73. package/dist/views/index.js +980 -5
  74. package/package.json +154 -38
  75. package/tsdown.config.js +1 -2
  76. package/.turbo/turbo-build$colon$bundle.log +0 -62
  77. package/dist/CoachingMiniApp.js.map +0 -1
  78. package/dist/components/EngagementMeter.js.map +0 -1
  79. package/dist/components/TipCard.js.map +0 -1
  80. package/dist/components/TipFeed.js.map +0 -1
  81. package/dist/docs/learning-journey-ui-coaching.docblock.js.map +0 -1
  82. package/dist/example.js.map +0 -1
  83. package/dist/views/Overview.js.map +0 -1
  84. package/dist/views/Progress.js.map +0 -1
  85. package/dist/views/Steps.js.map +0 -1
  86. package/dist/views/Timeline.js.map +0 -1
  87. package/tsconfig.tsbuildinfo +0 -1
@@ -1,66 +1,91 @@
1
- 'use client';
2
-
1
+ // @bun
2
+ // src/components/TipFeed.tsx
3
3
  import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
-
6
- //#region src/components/TipFeed.tsx
7
- const TIP_ICONS = {
8
- cash_buffer_too_high: "💰",
9
- no_savings_goal: "🎯",
10
- irregular_savings: "📅",
11
- noise_late_evening: "🔇",
12
- guest_frequency_high: "👥",
13
- shared_space_conflicts: "🏠",
14
- default: "💡"
4
+ import { jsxDEV } from "react/jsx-dev-runtime";
5
+ "use client";
6
+ var TIP_ICONS = {
7
+ cash_buffer_too_high: "\uD83D\uDCB0",
8
+ no_savings_goal: "\uD83C\uDFAF",
9
+ irregular_savings: "\uD83D\uDCC5",
10
+ noise_late_evening: "\uD83D\uDD07",
11
+ guest_frequency_high: "\uD83D\uDC65",
12
+ shared_space_conflicts: "\uD83C\uDFE0",
13
+ default: "\uD83D\uDCA1"
15
14
  };
16
15
  function TipFeed({ items }) {
17
- if (items.length === 0) return /* @__PURE__ */ jsx("div", {
18
- className: "text-muted-foreground py-8 text-center",
19
- children: "No tips yet. Start engaging with coaching tips!"
20
- });
21
- return /* @__PURE__ */ jsxs("div", {
22
- className: "relative",
23
- children: [/* @__PURE__ */ jsx("div", { className: "bg-border absolute top-0 left-4 h-full w-0.5" }), /* @__PURE__ */ jsx("div", {
24
- className: "space-y-4",
25
- children: items.map((item) => {
26
- const icon = TIP_ICONS[item.step.metadata?.tipId ?? "default"] ?? TIP_ICONS.default;
27
- return /* @__PURE__ */ jsxs("div", {
28
- className: "relative flex gap-4 pl-2",
29
- children: [/* @__PURE__ */ jsx("div", {
30
- className: cn("relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm", item.isCompleted ? "bg-green-500 text-white" : "bg-muted text-muted-foreground"),
31
- children: item.isCompleted ? "✓" : icon
32
- }), /* @__PURE__ */ jsxs("div", {
33
- className: "bg-card flex-1 rounded-lg border p-3",
34
- children: [/* @__PURE__ */ jsxs("div", {
35
- className: "flex items-start justify-between gap-2",
36
- children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
37
- className: "font-medium",
38
- children: item.step.title
39
- }), /* @__PURE__ */ jsx("p", {
40
- className: "text-muted-foreground mt-0.5 text-sm",
41
- children: item.step.description
42
- })] }), item.step.xpReward && /* @__PURE__ */ jsxs("span", {
43
- className: cn("shrink-0 text-xs font-medium", item.isCompleted ? "text-green-500" : "text-muted-foreground"),
44
- children: [
45
- "+",
46
- item.step.xpReward,
47
- " XP"
48
- ]
49
- })]
50
- }), /* @__PURE__ */ jsx("div", {
51
- className: "text-muted-foreground mt-2 flex items-center gap-2 text-xs",
52
- children: item.isCompleted ? /* @__PURE__ */ jsxs("span", {
53
- className: "text-green-500",
54
- children: [" Completed", item.completedAt && ` • ${item.completedAt}`]
55
- }) : /* @__PURE__ */ jsx("span", { children: "Pending action" })
56
- })]
57
- })]
58
- }, item.step.id);
59
- })
60
- })]
61
- });
16
+ if (items.length === 0) {
17
+ return /* @__PURE__ */ jsxDEV("div", {
18
+ className: "text-muted-foreground py-8 text-center",
19
+ children: "No tips yet. Start engaging with coaching tips!"
20
+ }, undefined, false, undefined, this);
21
+ }
22
+ return /* @__PURE__ */ jsxDEV("div", {
23
+ className: "relative",
24
+ children: [
25
+ /* @__PURE__ */ jsxDEV("div", {
26
+ className: "bg-border absolute top-0 left-4 h-full w-0.5"
27
+ }, undefined, false, undefined, this),
28
+ /* @__PURE__ */ jsxDEV("div", {
29
+ className: "space-y-4",
30
+ children: items.map((item) => {
31
+ const tipId = item.step.metadata?.tipId ?? "default";
32
+ const icon = TIP_ICONS[tipId] ?? TIP_ICONS.default;
33
+ return /* @__PURE__ */ jsxDEV("div", {
34
+ className: "relative flex gap-4 pl-2",
35
+ children: [
36
+ /* @__PURE__ */ jsxDEV("div", {
37
+ className: cn("relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm", item.isCompleted ? "bg-green-500 text-white" : "bg-muted text-muted-foreground"),
38
+ children: item.isCompleted ? "\u2713" : icon
39
+ }, undefined, false, undefined, this),
40
+ /* @__PURE__ */ jsxDEV("div", {
41
+ className: "bg-card flex-1 rounded-lg border p-3",
42
+ children: [
43
+ /* @__PURE__ */ jsxDEV("div", {
44
+ className: "flex items-start justify-between gap-2",
45
+ children: [
46
+ /* @__PURE__ */ jsxDEV("div", {
47
+ children: [
48
+ /* @__PURE__ */ jsxDEV("p", {
49
+ className: "font-medium",
50
+ children: item.step.title
51
+ }, undefined, false, undefined, this),
52
+ /* @__PURE__ */ jsxDEV("p", {
53
+ className: "text-muted-foreground mt-0.5 text-sm",
54
+ children: item.step.description
55
+ }, undefined, false, undefined, this)
56
+ ]
57
+ }, undefined, true, undefined, this),
58
+ item.step.xpReward && /* @__PURE__ */ jsxDEV("span", {
59
+ className: cn("shrink-0 text-xs font-medium", item.isCompleted ? "text-green-500" : "text-muted-foreground"),
60
+ children: [
61
+ "+",
62
+ item.step.xpReward,
63
+ " XP"
64
+ ]
65
+ }, undefined, true, undefined, this)
66
+ ]
67
+ }, undefined, true, undefined, this),
68
+ /* @__PURE__ */ jsxDEV("div", {
69
+ className: "text-muted-foreground mt-2 flex items-center gap-2 text-xs",
70
+ children: item.isCompleted ? /* @__PURE__ */ jsxDEV("span", {
71
+ className: "text-green-500",
72
+ children: [
73
+ "\u2713 Completed",
74
+ item.completedAt && ` \u2022 ${item.completedAt}`
75
+ ]
76
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV("span", {
77
+ children: "Pending action"
78
+ }, undefined, false, undefined, this)
79
+ }, undefined, false, undefined, this)
80
+ ]
81
+ }, undefined, true, undefined, this)
82
+ ]
83
+ }, item.step.id, true, undefined, this);
84
+ })
85
+ }, undefined, false, undefined, this)
86
+ ]
87
+ }, undefined, true, undefined, this);
62
88
  }
63
-
64
- //#endregion
65
- export { TipFeed };
66
- //# sourceMappingURL=TipFeed.js.map
89
+ export {
90
+ TipFeed
91
+ };
@@ -1,4 +1,4 @@
1
- import { EngagementMeter } from "./EngagementMeter.js";
2
- import { TipCard } from "./TipCard.js";
3
- import { TipFeed } from "./TipFeed.js";
4
- export { EngagementMeter, TipCard, TipFeed };
1
+ export { TipCard } from './TipCard';
2
+ export { EngagementMeter } from './EngagementMeter';
3
+ export { TipFeed } from './TipFeed';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1,5 +1,321 @@
1
- import { TipCard } from "./TipCard.js";
2
- import { EngagementMeter } from "./EngagementMeter.js";
3
- import { TipFeed } from "./TipFeed.js";
1
+ // @bun
2
+ // src/components/TipCard.tsx
3
+ import { Button } from "@contractspec/lib.design-system";
4
+ import { Card, CardContent } from "@contractspec/lib.ui-kit-web/ui/card";
5
+ import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
6
+ import { jsxDEV } from "react/jsx-dev-runtime";
7
+ "use client";
8
+ var TIP_ICONS = {
9
+ cash_buffer_too_high: "\uD83D\uDCB0",
10
+ no_savings_goal: "\uD83C\uDFAF",
11
+ irregular_savings: "\uD83D\uDCC5",
12
+ noise_late_evening: "\uD83D\uDD07",
13
+ guest_frequency_high: "\uD83D\uDC65",
14
+ shared_space_conflicts: "\uD83C\uDFE0",
15
+ default: "\uD83D\uDCA1"
16
+ };
17
+ function TipCard({
18
+ step,
19
+ isCompleted,
20
+ isCurrent,
21
+ onComplete,
22
+ onDismiss
23
+ }) {
24
+ const tipId = step.metadata?.tipId ?? "default";
25
+ const icon = TIP_ICONS[tipId] ?? TIP_ICONS.default;
26
+ return /* @__PURE__ */ jsxDEV(Card, {
27
+ className: cn("transition-all", isCompleted && "opacity-60", isCurrent && "ring-2 ring-amber-500"),
28
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
29
+ className: "p-4",
30
+ children: /* @__PURE__ */ jsxDEV("div", {
31
+ className: "flex gap-4",
32
+ children: [
33
+ /* @__PURE__ */ jsxDEV("div", {
34
+ className: cn("flex h-12 w-12 shrink-0 items-center justify-center rounded-xl text-2xl", isCompleted ? "bg-green-500/10" : isCurrent ? "bg-amber-500/10" : "bg-muted"),
35
+ children: isCompleted ? "\u2713" : icon
36
+ }, undefined, false, undefined, this),
37
+ /* @__PURE__ */ jsxDEV("div", {
38
+ className: "min-w-0 flex-1",
39
+ children: [
40
+ /* @__PURE__ */ jsxDEV("div", {
41
+ className: "flex items-start justify-between gap-2",
42
+ children: [
43
+ /* @__PURE__ */ jsxDEV("h4", {
44
+ className: "font-semibold",
45
+ children: step.title
46
+ }, undefined, false, undefined, this),
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"),
49
+ children: [
50
+ "+",
51
+ step.xpReward,
52
+ " XP"
53
+ ]
54
+ }, undefined, true, undefined, this)
55
+ ]
56
+ }, undefined, true, undefined, this),
57
+ /* @__PURE__ */ jsxDEV("p", {
58
+ className: "text-muted-foreground mt-1 text-sm",
59
+ children: step.description
60
+ }, undefined, false, undefined, this),
61
+ !isCompleted && /* @__PURE__ */ jsxDEV("div", {
62
+ className: "mt-3 flex flex-wrap gap-2",
63
+ children: [
64
+ /* @__PURE__ */ jsxDEV(Button, {
65
+ size: "sm",
66
+ onClick: onComplete,
67
+ children: "Take Action"
68
+ }, undefined, false, undefined, this),
69
+ /* @__PURE__ */ jsxDEV(Button, {
70
+ variant: "outline",
71
+ size: "sm",
72
+ onClick: onDismiss,
73
+ children: "Dismiss"
74
+ }, undefined, false, undefined, this)
75
+ ]
76
+ }, undefined, true, undefined, this),
77
+ isCompleted && /* @__PURE__ */ jsxDEV("p", {
78
+ className: "mt-2 text-sm text-green-500",
79
+ children: "\u2713 Tip acknowledged"
80
+ }, undefined, false, undefined, this)
81
+ ]
82
+ }, undefined, true, undefined, this)
83
+ ]
84
+ }, undefined, true, undefined, this)
85
+ }, undefined, false, undefined, this)
86
+ }, undefined, false, undefined, this);
87
+ }
4
88
 
5
- export { EngagementMeter, TipCard, TipFeed };
89
+ // src/components/EngagementMeter.tsx
90
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
91
+ "use client";
92
+ function EngagementMeter({
93
+ acknowledged,
94
+ actioned,
95
+ pending,
96
+ streak = 0
97
+ }) {
98
+ const total = acknowledged + actioned + pending;
99
+ const actionedPercent = total > 0 ? actioned / total * 100 : 0;
100
+ const acknowledgedPercent = total > 0 ? acknowledged / total * 100 : 0;
101
+ return /* @__PURE__ */ jsxDEV2("div", {
102
+ className: "space-y-4",
103
+ children: [
104
+ /* @__PURE__ */ jsxDEV2("div", {
105
+ className: "flex items-center justify-center",
106
+ children: /* @__PURE__ */ jsxDEV2("div", {
107
+ className: "relative h-32 w-32",
108
+ children: [
109
+ /* @__PURE__ */ jsxDEV2("svg", {
110
+ className: "h-full w-full -rotate-90",
111
+ viewBox: "0 0 100 100",
112
+ children: [
113
+ /* @__PURE__ */ jsxDEV2("circle", {
114
+ cx: "50",
115
+ cy: "50",
116
+ r: "40",
117
+ fill: "none",
118
+ strokeWidth: "12",
119
+ className: "stroke-muted"
120
+ }, undefined, false, undefined, this),
121
+ /* @__PURE__ */ jsxDEV2("circle", {
122
+ cx: "50",
123
+ cy: "50",
124
+ r: "40",
125
+ fill: "none",
126
+ strokeWidth: "12",
127
+ strokeLinecap: "round",
128
+ strokeDasharray: `${actionedPercent * 2.51} 251`,
129
+ className: "stroke-green-500 transition-all duration-500"
130
+ }, undefined, false, undefined, this),
131
+ /* @__PURE__ */ jsxDEV2("circle", {
132
+ cx: "50",
133
+ cy: "50",
134
+ r: "40",
135
+ fill: "none",
136
+ strokeWidth: "12",
137
+ strokeLinecap: "round",
138
+ strokeDasharray: `${acknowledgedPercent * 2.51} 251`,
139
+ strokeDashoffset: `${-actionedPercent * 2.51}`,
140
+ className: "stroke-amber-500 transition-all duration-500"
141
+ }, undefined, false, undefined, this)
142
+ ]
143
+ }, undefined, true, undefined, this),
144
+ /* @__PURE__ */ jsxDEV2("div", {
145
+ className: "absolute inset-0 flex flex-col items-center justify-center",
146
+ children: [
147
+ /* @__PURE__ */ jsxDEV2("span", {
148
+ className: "text-2xl font-bold",
149
+ children: total
150
+ }, undefined, false, undefined, this),
151
+ /* @__PURE__ */ jsxDEV2("span", {
152
+ className: "text-muted-foreground text-xs",
153
+ children: "tips"
154
+ }, undefined, false, undefined, this)
155
+ ]
156
+ }, undefined, true, undefined, this)
157
+ ]
158
+ }, undefined, true, undefined, this)
159
+ }, undefined, false, undefined, this),
160
+ /* @__PURE__ */ jsxDEV2("div", {
161
+ className: "flex justify-center gap-4 text-sm",
162
+ children: [
163
+ /* @__PURE__ */ jsxDEV2("div", {
164
+ className: "flex items-center gap-1.5",
165
+ children: [
166
+ /* @__PURE__ */ jsxDEV2("div", {
167
+ className: "h-3 w-3 rounded-full bg-green-500"
168
+ }, undefined, false, undefined, this),
169
+ /* @__PURE__ */ jsxDEV2("span", {
170
+ children: [
171
+ "Actioned (",
172
+ actioned,
173
+ ")"
174
+ ]
175
+ }, undefined, true, undefined, this)
176
+ ]
177
+ }, undefined, true, undefined, this),
178
+ /* @__PURE__ */ jsxDEV2("div", {
179
+ className: "flex items-center gap-1.5",
180
+ children: [
181
+ /* @__PURE__ */ jsxDEV2("div", {
182
+ className: "h-3 w-3 rounded-full bg-amber-500"
183
+ }, undefined, false, undefined, this),
184
+ /* @__PURE__ */ jsxDEV2("span", {
185
+ children: [
186
+ "Acknowledged (",
187
+ acknowledged,
188
+ ")"
189
+ ]
190
+ }, undefined, true, undefined, this)
191
+ ]
192
+ }, undefined, true, undefined, this),
193
+ /* @__PURE__ */ jsxDEV2("div", {
194
+ className: "flex items-center gap-1.5",
195
+ children: [
196
+ /* @__PURE__ */ jsxDEV2("div", {
197
+ className: "bg-muted h-3 w-3 rounded-full"
198
+ }, undefined, false, undefined, this),
199
+ /* @__PURE__ */ jsxDEV2("span", {
200
+ children: [
201
+ "Pending (",
202
+ pending,
203
+ ")"
204
+ ]
205
+ }, undefined, true, undefined, this)
206
+ ]
207
+ }, undefined, true, undefined, this)
208
+ ]
209
+ }, undefined, true, undefined, this),
210
+ streak > 0 && /* @__PURE__ */ jsxDEV2("div", {
211
+ className: "flex items-center justify-center gap-2 rounded-lg bg-orange-500/10 px-4 py-2",
212
+ children: [
213
+ /* @__PURE__ */ jsxDEV2("span", {
214
+ className: "text-xl",
215
+ children: "\uD83D\uDD25"
216
+ }, undefined, false, undefined, this),
217
+ /* @__PURE__ */ jsxDEV2("span", {
218
+ className: "font-semibold text-orange-500",
219
+ children: [
220
+ streak,
221
+ " day engagement streak!"
222
+ ]
223
+ }, undefined, true, undefined, this)
224
+ ]
225
+ }, undefined, true, undefined, this)
226
+ ]
227
+ }, undefined, true, undefined, this);
228
+ }
229
+
230
+ // src/components/TipFeed.tsx
231
+ import { cn as cn2 } from "@contractspec/lib.ui-kit-web/ui/utils";
232
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
233
+ "use client";
234
+ var TIP_ICONS2 = {
235
+ cash_buffer_too_high: "\uD83D\uDCB0",
236
+ no_savings_goal: "\uD83C\uDFAF",
237
+ irregular_savings: "\uD83D\uDCC5",
238
+ noise_late_evening: "\uD83D\uDD07",
239
+ guest_frequency_high: "\uD83D\uDC65",
240
+ shared_space_conflicts: "\uD83C\uDFE0",
241
+ default: "\uD83D\uDCA1"
242
+ };
243
+ function TipFeed({ items }) {
244
+ if (items.length === 0) {
245
+ return /* @__PURE__ */ jsxDEV3("div", {
246
+ className: "text-muted-foreground py-8 text-center",
247
+ children: "No tips yet. Start engaging with coaching tips!"
248
+ }, undefined, false, undefined, this);
249
+ }
250
+ return /* @__PURE__ */ jsxDEV3("div", {
251
+ className: "relative",
252
+ children: [
253
+ /* @__PURE__ */ jsxDEV3("div", {
254
+ className: "bg-border absolute top-0 left-4 h-full w-0.5"
255
+ }, undefined, false, undefined, this),
256
+ /* @__PURE__ */ jsxDEV3("div", {
257
+ className: "space-y-4",
258
+ children: items.map((item) => {
259
+ const tipId = item.step.metadata?.tipId ?? "default";
260
+ const icon = TIP_ICONS2[tipId] ?? TIP_ICONS2.default;
261
+ return /* @__PURE__ */ jsxDEV3("div", {
262
+ className: "relative flex gap-4 pl-2",
263
+ children: [
264
+ /* @__PURE__ */ jsxDEV3("div", {
265
+ className: cn2("relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm", item.isCompleted ? "bg-green-500 text-white" : "bg-muted text-muted-foreground"),
266
+ children: item.isCompleted ? "\u2713" : icon
267
+ }, undefined, false, undefined, this),
268
+ /* @__PURE__ */ jsxDEV3("div", {
269
+ className: "bg-card flex-1 rounded-lg border p-3",
270
+ children: [
271
+ /* @__PURE__ */ jsxDEV3("div", {
272
+ className: "flex items-start justify-between gap-2",
273
+ children: [
274
+ /* @__PURE__ */ jsxDEV3("div", {
275
+ children: [
276
+ /* @__PURE__ */ jsxDEV3("p", {
277
+ className: "font-medium",
278
+ children: item.step.title
279
+ }, undefined, false, undefined, this),
280
+ /* @__PURE__ */ jsxDEV3("p", {
281
+ className: "text-muted-foreground mt-0.5 text-sm",
282
+ children: item.step.description
283
+ }, undefined, false, undefined, this)
284
+ ]
285
+ }, undefined, true, undefined, this),
286
+ item.step.xpReward && /* @__PURE__ */ jsxDEV3("span", {
287
+ className: cn2("shrink-0 text-xs font-medium", item.isCompleted ? "text-green-500" : "text-muted-foreground"),
288
+ children: [
289
+ "+",
290
+ item.step.xpReward,
291
+ " XP"
292
+ ]
293
+ }, undefined, true, undefined, this)
294
+ ]
295
+ }, undefined, true, undefined, this),
296
+ /* @__PURE__ */ jsxDEV3("div", {
297
+ className: "text-muted-foreground mt-2 flex items-center gap-2 text-xs",
298
+ children: item.isCompleted ? /* @__PURE__ */ jsxDEV3("span", {
299
+ className: "text-green-500",
300
+ children: [
301
+ "\u2713 Completed",
302
+ item.completedAt && ` \u2022 ${item.completedAt}`
303
+ ]
304
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV3("span", {
305
+ children: "Pending action"
306
+ }, undefined, false, undefined, this)
307
+ }, undefined, false, undefined, this)
308
+ ]
309
+ }, undefined, true, undefined, this)
310
+ ]
311
+ }, item.step.id, true, undefined, this);
312
+ })
313
+ }, undefined, false, undefined, this)
314
+ ]
315
+ }, undefined, true, undefined, this);
316
+ }
317
+ export {
318
+ TipFeed,
319
+ TipCard,
320
+ EngagementMeter
321
+ };
@@ -1 +1,2 @@
1
- export { };
1
+ import './learning-journey-ui-coaching.docblock';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,yCAAyC,CAAC"}
@@ -1 +1,23 @@
1
- import "./learning-journey-ui-coaching.docblock.js";
1
+ // @bun
2
+ // src/docs/learning-journey-ui-coaching.docblock.ts
3
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
4
+ var blocks = [
5
+ {
6
+ id: "docs.examples.learning-journey-ui-coaching",
7
+ title: "Learning Journey UI \u2014 Coaching",
8
+ summary: "UI mini-app components for coaching: tips, engagement, progress.",
9
+ kind: "reference",
10
+ visibility: "public",
11
+ route: "/docs/examples/learning-journey-ui-coaching",
12
+ tags: ["learning", "ui", "coaching"],
13
+ body: `## Includes
14
+ - Coaching mini-app shell
15
+ - Views: overview, steps, progress, timeline
16
+ - Components: tip card, engagement meter, tip feed
17
+
18
+ ## Notes
19
+ - Compose using design system components.
20
+ - Keep accessibility and mobile-friendly tap targets.`
21
+ }
22
+ ];
23
+ registerDocBlocks(blocks);
@@ -1 +1,2 @@
1
- export { };
1
+ export {};
2
+ //# sourceMappingURL=learning-journey-ui-coaching.docblock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-journey-ui-coaching.docblock.d.ts","sourceRoot":"","sources":["../../src/docs/learning-journey-ui-coaching.docblock.ts"],"names":[],"mappings":""}
@@ -1,20 +1,23 @@
1
+ // @bun
2
+ // src/docs/learning-journey-ui-coaching.docblock.ts
1
3
  import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
4
+ var blocks = [
5
+ {
6
+ id: "docs.examples.learning-journey-ui-coaching",
7
+ title: "Learning Journey UI \u2014 Coaching",
8
+ summary: "UI mini-app components for coaching: tips, engagement, progress.",
9
+ kind: "reference",
10
+ visibility: "public",
11
+ route: "/docs/examples/learning-journey-ui-coaching",
12
+ tags: ["learning", "ui", "coaching"],
13
+ body: `## Includes
14
+ - Coaching mini-app shell
15
+ - Views: overview, steps, progress, timeline
16
+ - Components: tip card, engagement meter, tip feed
2
17
 
3
- //#region src/docs/learning-journey-ui-coaching.docblock.ts
4
- registerDocBlocks([{
5
- id: "docs.examples.learning-journey-ui-coaching",
6
- title: "Learning Journey UI — Coaching",
7
- summary: "UI mini-app components for coaching: tips, engagement, progress.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/examples/learning-journey-ui-coaching",
11
- tags: [
12
- "learning",
13
- "ui",
14
- "coaching"
15
- ],
16
- 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.`
17
- }]);
18
-
19
- //#endregion
20
- //# sourceMappingURL=learning-journey-ui-coaching.docblock.js.map
18
+ ## Notes
19
+ - Compose using design system components.
20
+ - Keep accessibility and mobile-friendly tap targets.`
21
+ }
22
+ ];
23
+ registerDocBlocks(blocks);
package/dist/example.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
-
3
- //#region src/example.d.ts
4
- declare const example: _contractspec_lib_contracts0.ExampleSpec;
5
- //#endregion
6
- export { example as default };
1
+ declare const example: import("@contractspec/lib.contracts").ExampleSpec;
2
+ export default example;
7
3
  //# sourceMappingURL=example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"mappings":";;;cAEM,OAAA,EA0BJ,4BAAA,CA1BW,WAAA"}
1
+ {"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,mDA0BX,CAAC;AAEH,eAAe,OAAO,CAAC"}