@lssm/example.learning-journey-ui-coaching 0.0.0-canary-20251217073102 → 0.0.0-canary-20251217083314
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$bundle.log +395 -14
- package/CHANGELOG.md +9 -9
- package/dist/CoachingMiniApp.d.ts +16 -0
- package/dist/CoachingMiniApp.js +64 -0
- package/dist/components/EngagementMeter.d.ts +17 -0
- package/dist/components/EngagementMeter.js +107 -0
- package/dist/components/TipCard.d.ts +20 -0
- package/dist/components/TipCard.js +75 -0
- package/dist/components/TipFeed.d.ts +17 -0
- package/dist/components/TipFeed.js +65 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +5 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/learning-journey-ui-coaching.docblock.d.ts +1 -0
- package/dist/docs/learning-journey-ui-coaching.docblock.js +20 -0
- package/dist/{index.d.mts → example.d.ts} +1 -18
- package/dist/example.js +34 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/BadgeDisplay.js +44 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/StreakCounter.js +45 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/ViewTabs.js +48 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/XpBar.js +46 -0
- package/dist/examples/learning-journey-ui-shared/dist/components/index.js +4 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/index.js +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js +20 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/index.js +1 -0
- package/dist/examples/learning-journey-ui-shared/dist/hooks/useLearningProgress.js +73 -0
- package/dist/examples/learning-journey-ui-shared/dist/index.js +8 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/index.js +28 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/presentations.js +71 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/registry.js +44 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +79 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +56 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +356 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +36 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +15 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +19 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +47 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +78 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +83 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +44 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +66 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +39 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +68 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +46 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +61 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +154 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +19 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +100 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +19 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +5 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/components/atoms/Button.js +33 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +55 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/progress.js +23 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui/utils.js +10 -0
- package/dist/examples/learning-journey-ui-shared/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +10 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +14 -0
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/index.js +29 -0
- package/dist/libs/contracts/dist/docs/presentations.js +71 -0
- package/dist/libs/contracts/dist/docs/registry.js +44 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
- package/dist/libs/design-system/dist/_virtual/rolldown_runtime.js +5 -0
- package/dist/libs/design-system/dist/components/atoms/Button.js +33 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui/button.js +55 -0
- package/dist/libs/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
- package/dist/libs/ui-kit-web/dist/ui/card.js +36 -0
- package/dist/libs/ui-kit-web/dist/ui/utils.js +10 -0
- package/dist/libs/ui-kit-web/dist/ui-kit-core/dist/utils.js +10 -0
- package/dist/views/Overview.d.ts +15 -0
- package/dist/views/Overview.js +152 -0
- package/dist/views/Progress.d.ts +10 -0
- package/dist/views/Progress.js +117 -0
- package/dist/views/Steps.d.ts +11 -0
- package/dist/views/Steps.js +68 -0
- package/dist/views/Timeline.d.ts +10 -0
- package/dist/views/Timeline.js +112 -0
- package/dist/views/index.d.ts +5 -0
- package/dist/views/index.js +6 -0
- package/package.json +25 -16
- package/tsdown.config.js +14 -10
- package/dist/TipFeed-_1oKR35X.mjs +0 -234
- package/dist/components/index.d.mts +0 -2
- package/dist/components/index.mjs +0 -4
- package/dist/components-kh0CpIG2.mjs +0 -1
- package/dist/index-B6uj2reL.d.mts +0 -34
- package/dist/index-DJtCFWjr.d.mts +0 -47
- package/dist/index.mjs +0 -110
- package/dist/views/index.d.mts +0 -2
- package/dist/views/index.mjs +0 -4
- package/dist/views-BTGcWRSz.mjs +0 -421
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/EngagementMeter.tsx
|
|
6
|
+
function EngagementMeter({ acknowledged, actioned, pending, streak = 0 }) {
|
|
7
|
+
const total = acknowledged + actioned + pending;
|
|
8
|
+
const actionedPercent = total > 0 ? actioned / total * 100 : 0;
|
|
9
|
+
const acknowledgedPercent = total > 0 ? acknowledged / total * 100 : 0;
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className: "space-y-4",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: "flex items-center justify-center",
|
|
15
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: "relative h-32 w-32",
|
|
17
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
18
|
+
className: "h-full w-full -rotate-90",
|
|
19
|
+
viewBox: "0 0 100 100",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx("circle", {
|
|
22
|
+
cx: "50",
|
|
23
|
+
cy: "50",
|
|
24
|
+
r: "40",
|
|
25
|
+
fill: "none",
|
|
26
|
+
strokeWidth: "12",
|
|
27
|
+
className: "stroke-muted"
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsx("circle", {
|
|
30
|
+
cx: "50",
|
|
31
|
+
cy: "50",
|
|
32
|
+
r: "40",
|
|
33
|
+
fill: "none",
|
|
34
|
+
strokeWidth: "12",
|
|
35
|
+
strokeLinecap: "round",
|
|
36
|
+
strokeDasharray: `${actionedPercent * 2.51} 251`,
|
|
37
|
+
className: "stroke-green-500 transition-all duration-500"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx("circle", {
|
|
40
|
+
cx: "50",
|
|
41
|
+
cy: "50",
|
|
42
|
+
r: "40",
|
|
43
|
+
fill: "none",
|
|
44
|
+
strokeWidth: "12",
|
|
45
|
+
strokeLinecap: "round",
|
|
46
|
+
strokeDasharray: `${acknowledgedPercent * 2.51} 251`,
|
|
47
|
+
strokeDashoffset: `${-actionedPercent * 2.51}`,
|
|
48
|
+
className: "stroke-amber-500 transition-all duration-500"
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
52
|
+
className: "absolute inset-0 flex flex-col items-center justify-center",
|
|
53
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "text-2xl font-bold",
|
|
55
|
+
children: total
|
|
56
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
57
|
+
className: "text-muted-foreground text-xs",
|
|
58
|
+
children: "tips"
|
|
59
|
+
})]
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: "flex justify-center gap-4 text-sm",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsxs("div", {
|
|
67
|
+
className: "flex items-center gap-1.5",
|
|
68
|
+
children: [/* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-green-500" }), /* @__PURE__ */ jsxs("span", { children: [
|
|
69
|
+
"Actioned (",
|
|
70
|
+
actioned,
|
|
71
|
+
")"
|
|
72
|
+
] })]
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ jsxs("div", {
|
|
75
|
+
className: "flex items-center gap-1.5",
|
|
76
|
+
children: [/* @__PURE__ */ jsx("div", { className: "h-3 w-3 rounded-full bg-amber-500" }), /* @__PURE__ */ jsxs("span", { children: [
|
|
77
|
+
"Acknowledged (",
|
|
78
|
+
acknowledged,
|
|
79
|
+
")"
|
|
80
|
+
] })]
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: "flex items-center gap-1.5",
|
|
84
|
+
children: [/* @__PURE__ */ jsx("div", { className: "bg-muted h-3 w-3 rounded-full" }), /* @__PURE__ */ jsxs("span", { children: [
|
|
85
|
+
"Pending (",
|
|
86
|
+
pending,
|
|
87
|
+
")"
|
|
88
|
+
] })]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
}),
|
|
92
|
+
streak > 0 && /* @__PURE__ */ jsxs("div", {
|
|
93
|
+
className: "flex items-center justify-center gap-2 rounded-lg bg-orange-500/10 px-4 py-2",
|
|
94
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
95
|
+
className: "text-xl",
|
|
96
|
+
children: "🔥"
|
|
97
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
98
|
+
className: "font-semibold text-orange-500",
|
|
99
|
+
children: [streak, " day engagement streak!"]
|
|
100
|
+
})]
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
export { EngagementMeter };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { LearningJourneyStepSpec } from "@lssm/module.learning-journey/track-spec";
|
|
3
|
+
|
|
4
|
+
//#region src/components/TipCard.d.ts
|
|
5
|
+
interface TipCardProps {
|
|
6
|
+
step: LearningJourneyStepSpec;
|
|
7
|
+
isCompleted: boolean;
|
|
8
|
+
isCurrent: boolean;
|
|
9
|
+
onComplete?: () => void;
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function TipCard({
|
|
13
|
+
step,
|
|
14
|
+
isCompleted,
|
|
15
|
+
isCurrent,
|
|
16
|
+
onComplete,
|
|
17
|
+
onDismiss
|
|
18
|
+
}: TipCardProps): react_jsx_runtime0.JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TipCard };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Card, CardContent } from "../libs/ui-kit-web/dist/ui/card.js";
|
|
4
|
+
import { Button$1 } from "../libs/design-system/dist/components/atoms/Button.js";
|
|
5
|
+
import { cn } from "../libs/ui-kit-web/dist/ui/utils.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/TipCard.tsx
|
|
9
|
+
const TIP_ICONS = {
|
|
10
|
+
cash_buffer_too_high: "💰",
|
|
11
|
+
no_savings_goal: "🎯",
|
|
12
|
+
irregular_savings: "📅",
|
|
13
|
+
noise_late_evening: "🔇",
|
|
14
|
+
guest_frequency_high: "👥",
|
|
15
|
+
shared_space_conflicts: "🏠",
|
|
16
|
+
default: "💡"
|
|
17
|
+
};
|
|
18
|
+
function TipCard({ step, isCompleted, isCurrent, onComplete, onDismiss }) {
|
|
19
|
+
const icon = TIP_ICONS[step.metadata?.tipId ?? "default"] ?? TIP_ICONS.default;
|
|
20
|
+
return /* @__PURE__ */ jsx(Card, {
|
|
21
|
+
className: cn("transition-all", isCompleted && "opacity-60", isCurrent && "ring-2 ring-amber-500"),
|
|
22
|
+
children: /* @__PURE__ */ jsx(CardContent, {
|
|
23
|
+
className: "p-4",
|
|
24
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "flex gap-4",
|
|
26
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
27
|
+
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"),
|
|
28
|
+
children: isCompleted ? "✓" : icon
|
|
29
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "min-w-0 flex-1",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: "flex items-start justify-between gap-2",
|
|
34
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
35
|
+
className: "font-semibold",
|
|
36
|
+
children: step.title
|
|
37
|
+
}), step.xpReward && /* @__PURE__ */ jsxs("span", {
|
|
38
|
+
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"),
|
|
39
|
+
children: [
|
|
40
|
+
"+",
|
|
41
|
+
step.xpReward,
|
|
42
|
+
" XP"
|
|
43
|
+
]
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx("p", {
|
|
47
|
+
className: "text-muted-foreground mt-1 text-sm",
|
|
48
|
+
children: step.description
|
|
49
|
+
}),
|
|
50
|
+
!isCompleted && /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: "mt-3 flex flex-wrap gap-2",
|
|
52
|
+
children: [/* @__PURE__ */ jsx(Button$1, {
|
|
53
|
+
size: "sm",
|
|
54
|
+
onClick: onComplete,
|
|
55
|
+
children: "Take Action"
|
|
56
|
+
}), /* @__PURE__ */ jsx(Button$1, {
|
|
57
|
+
variant: "outline",
|
|
58
|
+
size: "sm",
|
|
59
|
+
onClick: onDismiss,
|
|
60
|
+
children: "Dismiss"
|
|
61
|
+
})]
|
|
62
|
+
}),
|
|
63
|
+
isCompleted && /* @__PURE__ */ jsx("p", {
|
|
64
|
+
className: "mt-2 text-sm text-green-500",
|
|
65
|
+
children: "✓ Tip acknowledged"
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
})]
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { TipCard };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
|
+
import { LearningJourneyStepSpec } from "@lssm/module.learning-journey/track-spec";
|
|
3
|
+
|
|
4
|
+
//#region src/components/TipFeed.d.ts
|
|
5
|
+
interface TipFeedItem {
|
|
6
|
+
step: LearningJourneyStepSpec;
|
|
7
|
+
isCompleted: boolean;
|
|
8
|
+
completedAt?: string;
|
|
9
|
+
}
|
|
10
|
+
interface TipFeedProps {
|
|
11
|
+
items: TipFeedItem[];
|
|
12
|
+
}
|
|
13
|
+
declare function TipFeed({
|
|
14
|
+
items
|
|
15
|
+
}: TipFeedProps): react_jsx_runtime6.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { TipFeed };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../libs/ui-kit-web/dist/ui/utils.js";
|
|
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: "💡"
|
|
15
|
+
};
|
|
16
|
+
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, index) => {
|
|
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
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { TipFeed };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./learning-journey-ui-coaching.docblock.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { registerDocBlocks } from "../libs/contracts/dist/docs/registry.js";
|
|
2
|
+
import "../libs/contracts/dist/docs/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/docs/learning-journey-ui-coaching.docblock.ts
|
|
5
|
+
registerDocBlocks([{
|
|
6
|
+
id: "docs.examples.learning-journey-ui-coaching",
|
|
7
|
+
title: "Learning Journey UI — 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: [
|
|
13
|
+
"learning",
|
|
14
|
+
"ui",
|
|
15
|
+
"coaching"
|
|
16
|
+
],
|
|
17
|
+
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.`
|
|
18
|
+
}]);
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
import { n as EngagementMeter, r as TipCard, t as TipFeed } from "./index-DJtCFWjr.mjs";
|
|
2
|
-
import { i as Overview, n as ProgressView, r as Steps, t as Timeline } from "./index-B6uj2reL.mjs";
|
|
3
|
-
import { LearningMiniAppProps } from "@lssm/example.learning-journey-ui-shared";
|
|
4
|
-
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/CoachingMiniApp.d.ts
|
|
7
|
-
type CoachingMiniAppProps = Omit<LearningMiniAppProps, 'progress'> & {
|
|
8
|
-
progress?: LearningMiniAppProps['progress'];
|
|
9
|
-
};
|
|
10
|
-
declare function CoachingMiniApp({
|
|
11
|
-
track,
|
|
12
|
-
progress: externalProgress,
|
|
13
|
-
onStepComplete: externalOnStepComplete,
|
|
14
|
-
onViewChange,
|
|
15
|
-
initialView
|
|
16
|
-
}: CoachingMiniAppProps): react_jsx_runtime5.JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
1
|
//#region src/example.d.ts
|
|
19
2
|
declare const example: {
|
|
20
3
|
readonly id: "learning-journey-ui-coaching";
|
|
@@ -46,4 +29,4 @@ declare const example: {
|
|
|
46
29
|
};
|
|
47
30
|
};
|
|
48
31
|
//#endregion
|
|
49
|
-
export {
|
|
32
|
+
export { example as default };
|
package/dist/example.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/example.ts
|
|
2
|
+
const example = {
|
|
3
|
+
id: "learning-journey-ui-coaching",
|
|
4
|
+
title: "Learning Journey UI — Coaching",
|
|
5
|
+
summary: "UI mini-app for coaching patterns: tips, engagement meter, progress.",
|
|
6
|
+
tags: [
|
|
7
|
+
"learning",
|
|
8
|
+
"ui",
|
|
9
|
+
"coaching"
|
|
10
|
+
],
|
|
11
|
+
kind: "ui",
|
|
12
|
+
visibility: "public",
|
|
13
|
+
docs: { rootDocId: "docs.examples.learning-journey-ui-coaching" },
|
|
14
|
+
entrypoints: {
|
|
15
|
+
packageName: "@lssm/example.learning-journey-ui-coaching",
|
|
16
|
+
docs: "./docs"
|
|
17
|
+
},
|
|
18
|
+
surfaces: {
|
|
19
|
+
templates: true,
|
|
20
|
+
sandbox: {
|
|
21
|
+
enabled: true,
|
|
22
|
+
modes: ["playground", "markdown"]
|
|
23
|
+
},
|
|
24
|
+
studio: {
|
|
25
|
+
enabled: true,
|
|
26
|
+
installable: true
|
|
27
|
+
},
|
|
28
|
+
mcp: { enabled: true }
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var example_default = example;
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { example_default as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../libs/ui-kit-web/dist/ui/utils.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region ../learning-journey-ui-shared/dist/components/BadgeDisplay.js
|
|
7
|
+
const BADGE_ICONS = {
|
|
8
|
+
studio_first_30m: "🎯",
|
|
9
|
+
platform_tour: "🗺️",
|
|
10
|
+
crm_first_win: "🏆",
|
|
11
|
+
drill_master: "🧠",
|
|
12
|
+
coach_listener: "👂",
|
|
13
|
+
quest_complete: "⭐",
|
|
14
|
+
streak_7: "🔥",
|
|
15
|
+
streak_30: "💎",
|
|
16
|
+
default: "🏅"
|
|
17
|
+
};
|
|
18
|
+
const sizeStyles = {
|
|
19
|
+
sm: "h-6 w-6 text-sm",
|
|
20
|
+
md: "h-8 w-8 text-base",
|
|
21
|
+
lg: "h-10 w-10 text-lg"
|
|
22
|
+
};
|
|
23
|
+
function BadgeDisplay({ badges, maxVisible = 5, size = "md" }) {
|
|
24
|
+
const visibleBadges = badges.slice(0, maxVisible);
|
|
25
|
+
const hiddenCount = badges.length - maxVisible;
|
|
26
|
+
if (badges.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: "text-muted-foreground text-sm",
|
|
28
|
+
children: "No badges earned yet"
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
className: "flex items-center gap-1",
|
|
32
|
+
children: [visibleBadges.map((badge) => /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: cn("flex items-center justify-center rounded-full bg-gradient-to-br from-amber-400/20 to-amber-600/20", sizeStyles[size]),
|
|
34
|
+
title: badge.replace(/_/g, " "),
|
|
35
|
+
children: BADGE_ICONS[badge] ?? BADGE_ICONS.default
|
|
36
|
+
}, badge)), hiddenCount > 0 && /* @__PURE__ */ jsxs("div", {
|
|
37
|
+
className: cn("text-muted-foreground bg-muted flex items-center justify-center rounded-full", sizeStyles[size], "text-xs font-medium"),
|
|
38
|
+
children: ["+", hiddenCount]
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { BadgeDisplay };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../libs/ui-kit-web/dist/ui/utils.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region ../learning-journey-ui-shared/dist/components/StreakCounter.js
|
|
7
|
+
const sizeStyles = {
|
|
8
|
+
sm: {
|
|
9
|
+
container: "gap-1 px-2 py-1",
|
|
10
|
+
icon: "text-base",
|
|
11
|
+
text: "text-xs"
|
|
12
|
+
},
|
|
13
|
+
md: {
|
|
14
|
+
container: "gap-1.5 px-3 py-1.5",
|
|
15
|
+
icon: "text-lg",
|
|
16
|
+
text: "text-sm"
|
|
17
|
+
},
|
|
18
|
+
lg: {
|
|
19
|
+
container: "gap-2 px-4 py-2",
|
|
20
|
+
icon: "text-xl",
|
|
21
|
+
text: "text-base"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function StreakCounter({ days, isActive = true, size = "md" }) {
|
|
25
|
+
const styles = sizeStyles[size];
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: cn("inline-flex items-center rounded-full font-semibold", styles.container, isActive ? "bg-orange-500/10 text-orange-500" : "bg-muted text-muted-foreground"),
|
|
28
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
29
|
+
className: styles.icon,
|
|
30
|
+
role: "img",
|
|
31
|
+
"aria-label": "streak",
|
|
32
|
+
children: "🔥"
|
|
33
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
34
|
+
className: styles.text,
|
|
35
|
+
children: [
|
|
36
|
+
days,
|
|
37
|
+
" ",
|
|
38
|
+
days === 1 ? "day" : "days"
|
|
39
|
+
]
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { StreakCounter };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Button$1 } from "../libs/design-system/dist/components/atoms/Button.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region ../learning-journey-ui-shared/dist/components/ViewTabs.js
|
|
7
|
+
const VIEW_LABELS = {
|
|
8
|
+
overview: {
|
|
9
|
+
label: "Overview",
|
|
10
|
+
icon: "📊"
|
|
11
|
+
},
|
|
12
|
+
steps: {
|
|
13
|
+
label: "Steps",
|
|
14
|
+
icon: "📝"
|
|
15
|
+
},
|
|
16
|
+
progress: {
|
|
17
|
+
label: "Progress",
|
|
18
|
+
icon: "📈"
|
|
19
|
+
},
|
|
20
|
+
timeline: {
|
|
21
|
+
label: "Timeline",
|
|
22
|
+
icon: "📅"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const DEFAULT_VIEWS = [
|
|
26
|
+
"overview",
|
|
27
|
+
"steps",
|
|
28
|
+
"progress",
|
|
29
|
+
"timeline"
|
|
30
|
+
];
|
|
31
|
+
function ViewTabs({ currentView, onViewChange, availableViews = DEFAULT_VIEWS }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: "flex flex-wrap gap-2",
|
|
34
|
+
children: availableViews.map((view) => {
|
|
35
|
+
const { label, icon } = VIEW_LABELS[view];
|
|
36
|
+
return /* @__PURE__ */ jsxs(Button$1, {
|
|
37
|
+
variant: currentView === view ? "default" : "outline",
|
|
38
|
+
size: "sm",
|
|
39
|
+
onClick: () => onViewChange(view),
|
|
40
|
+
className: "gap-1.5",
|
|
41
|
+
children: [/* @__PURE__ */ jsx("span", { children: icon }), /* @__PURE__ */ jsx("span", { children: label })]
|
|
42
|
+
}, view);
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { ViewTabs };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Progress } from "../libs/ui-kit-web/dist/ui/progress.js";
|
|
4
|
+
import { cn } from "../libs/ui-kit-web/dist/ui/utils.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region ../learning-journey-ui-shared/dist/components/XpBar.js
|
|
8
|
+
const sizeStyles = {
|
|
9
|
+
sm: "h-2",
|
|
10
|
+
md: "h-3",
|
|
11
|
+
lg: "h-4"
|
|
12
|
+
};
|
|
13
|
+
const labelSizeStyles = {
|
|
14
|
+
sm: "text-xs",
|
|
15
|
+
md: "text-sm",
|
|
16
|
+
lg: "text-base"
|
|
17
|
+
};
|
|
18
|
+
function XpBar({ current, max, level, showLabel = true, size = "md" }) {
|
|
19
|
+
const percentage = max > 0 ? Math.min(current / max * 100, 100) : 0;
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: "w-full space-y-1",
|
|
22
|
+
children: [showLabel && /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: cn("flex items-center justify-between", labelSizeStyles[size]),
|
|
24
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
25
|
+
className: "text-muted-foreground font-medium",
|
|
26
|
+
children: [level !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
27
|
+
className: "text-primary mr-1",
|
|
28
|
+
children: ["Lvl ", level]
|
|
29
|
+
}), "XP"]
|
|
30
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
31
|
+
className: "font-semibold",
|
|
32
|
+
children: [
|
|
33
|
+
current.toLocaleString(),
|
|
34
|
+
" / ",
|
|
35
|
+
max.toLocaleString()
|
|
36
|
+
]
|
|
37
|
+
})]
|
|
38
|
+
}), /* @__PURE__ */ jsx(Progress, {
|
|
39
|
+
value: percentage,
|
|
40
|
+
className: cn("bg-muted", sizeStyles[size])
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { XpBar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./learning-journey-ui-shared.docblock.js";
|
package/dist/examples/learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { registerDocBlocks } from "../libs/contracts/dist/docs/registry.js";
|
|
2
|
+
import "../libs/contracts/dist/docs/index.js";
|
|
3
|
+
|
|
4
|
+
//#region ../learning-journey-ui-shared/dist/docs/learning-journey-ui-shared.docblock.js
|
|
5
|
+
registerDocBlocks([{
|
|
6
|
+
id: "docs.examples.learning-journey-ui-shared",
|
|
7
|
+
title: "Learning Journey UI — Shared",
|
|
8
|
+
summary: "Shared UI components and hooks for learning journey mini-apps.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/examples/learning-journey-ui-shared",
|
|
12
|
+
tags: [
|
|
13
|
+
"learning",
|
|
14
|
+
"ui",
|
|
15
|
+
"shared"
|
|
16
|
+
],
|
|
17
|
+
body: `## Includes\n- Hooks: useLearningProgress\n- Components: XpBar, StreakCounter, BadgeDisplay, ViewTabs\n\n## Notes\n- Keep components accessible (labels, focus, contrast).\n- Prefer design-system tokens and components.`
|
|
18
|
+
}]);
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { useLearningProgress } from "./useLearningProgress.js";
|