@lssm/example.learning-journey-ui-onboarding 0.0.0-canary-20251217060834 → 0.0.0-canary-20251217072406

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.
@@ -6,16 +6,16 @@ $ tsdown
6
6
  ℹ tsconfig: tsconfig.json
7
7
  ℹ Build start
8
8
  ℹ Cleaning 13 files
9
- ℹ dist/index.mjs 129.97 kB │ gzip: 44.00 kB
10
- ℹ dist/views/index.mjs  0.20 kB │ gzip: 0.15 kB
11
- ℹ dist/components/index.mjs  0.20 kB │ gzip: 0.15 kB
12
- ℹ dist/JourneyMap-Cu8t0fYp.mjs  59.60 kB │ gzip: 13.29 kB
13
- ℹ dist/views-BuZeDMLr.mjs  20.13 kB │ gzip: 3.57 kB
14
- ℹ dist/components-OUN5S2z0.mjs  1.54 kB │ gzip: 0.66 kB
15
- ℹ dist/index.d.mts  1.79 kB │ gzip: 0.71 kB
16
- ℹ dist/views/index.d.mts  0.16 kB │ gzip: 0.13 kB
17
- ℹ dist/components/index.d.mts  0.14 kB │ gzip: 0.13 kB
18
- ℹ dist/index-BRfzjb6j.d.mts  1.22 kB │ gzip: 0.46 kB
19
- ℹ dist/index-BSiowBYJ.d.mts  0.93 kB │ gzip: 0.34 kB
20
- ℹ 11 files, total: 215.89 kB
21
- ✔ Build complete in 24055ms
9
+ ℹ dist/index.mjs  3.91 kB │ gzip: 1.36 kB
10
+ ℹ dist/views/index.mjs  0.20 kB │ gzip: 0.15 kB
11
+ ℹ dist/components/index.mjs  0.20 kB │ gzip: 0.15 kB
12
+ ℹ dist/views-BS9u6UnM.mjs 20.13 kB │ gzip: 3.57 kB
13
+ ℹ dist/JourneyMap-CZ47DksM.mjs  5.22 kB │ gzip: 1.54 kB
14
+ ℹ dist/components-OUN5S2z0.mjs  1.54 kB │ gzip: 0.66 kB
15
+ ℹ dist/index.d.mts  1.79 kB │ gzip: 0.71 kB
16
+ ℹ dist/views/index.d.mts  0.16 kB │ gzip: 0.13 kB
17
+ ℹ dist/components/index.d.mts  0.14 kB │ gzip: 0.13 kB
18
+ ℹ dist/index-BRfzjb6j.d.mts  1.22 kB │ gzip: 0.46 kB
19
+ ℹ dist/index-BSiowBYJ.d.mts  0.93 kB │ gzip: 0.34 kB
20
+ ℹ 11 files, total: 35.45 kB
21
+ ✔ Build complete in 15605ms
@@ -6,17 +6,17 @@ $ tsdown
6
6
  ℹ target: esnext
7
7
  ℹ tsconfig: tsconfig.json
8
8
  ℹ Build start
9
- ℹ dist/index.mjs 129.97 kB │ gzip: 44.00 kB
10
- ℹ dist/views/index.mjs  0.20 kB │ gzip: 0.15 kB
11
- ℹ dist/components/index.mjs  0.20 kB │ gzip: 0.15 kB
12
- ℹ dist/JourneyMap-Cu8t0fYp.mjs  59.60 kB │ gzip: 13.29 kB
13
- ℹ dist/views-BuZeDMLr.mjs  20.13 kB │ gzip: 3.57 kB
14
- ℹ dist/components-OUN5S2z0.mjs  1.54 kB │ gzip: 0.66 kB
15
- ℹ dist/index.d.mts  1.79 kB │ gzip: 0.71 kB
16
- ℹ dist/views/index.d.mts  0.16 kB │ gzip: 0.13 kB
17
- ℹ dist/components/index.d.mts  0.14 kB │ gzip: 0.13 kB
18
- ℹ dist/index-BsbXKz4M.d.mts  1.22 kB │ gzip: 0.46 kB
19
- ℹ dist/index-CWZmrQYz.d.mts  0.93 kB │ gzip: 0.34 kB
20
- ℹ 11 files, total: 215.89 kB
21
- ✔ Build complete in 20659ms
9
+ ℹ dist/index.mjs  3.91 kB │ gzip: 1.36 kB
10
+ ℹ dist/views/index.mjs  0.20 kB │ gzip: 0.15 kB
11
+ ℹ dist/components/index.mjs  0.20 kB │ gzip: 0.15 kB
12
+ ℹ dist/views-BS9u6UnM.mjs 20.13 kB │ gzip: 3.57 kB
13
+ ℹ dist/JourneyMap-CZ47DksM.mjs  5.22 kB │ gzip: 1.54 kB
14
+ ℹ dist/components-OUN5S2z0.mjs  1.54 kB │ gzip: 0.66 kB
15
+ ℹ dist/index.d.mts  1.79 kB │ gzip: 0.71 kB
16
+ ℹ dist/views/index.d.mts  0.16 kB │ gzip: 0.13 kB
17
+ ℹ dist/components/index.d.mts  0.14 kB │ gzip: 0.13 kB
18
+ ℹ dist/index-BsbXKz4M.d.mts  1.22 kB │ gzip: 0.46 kB
19
+ ℹ dist/index-CWZmrQYz.d.mts  0.93 kB │ gzip: 0.34 kB
20
+ ℹ 11 files, total: 35.45 kB
21
+ ✔ Build complete in 17251ms
22
22
  $ tsc --noEmit
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lssm/example.learning-journey-ui-onboarding
2
2
 
3
- ## 0.0.0-canary-20251217060834
3
+ ## 0.0.0-canary-20251217072406
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -9,9 +9,12 @@
9
9
  ### Patch Changes
10
10
 
11
11
  - Updated dependencies [66a5dfd]
12
- - @lssm/example.learning-journey-platform-tour@0.0.0-canary-20251217060834
13
- - @lssm/example.learning-journey-studio-onboarding@0.0.0-canary-20251217060834
14
- - @lssm/example.learning-journey-ui-shared@0.0.0-canary-20251217060834
15
- - @lssm/lib.design-system@0.0.0-canary-20251217060834
16
- - @lssm/lib.ui-kit-web@0.0.0-canary-20251217060834
17
- - @lssm/module.learning-journey@0.0.0-canary-20251217060834
12
+ - @lssm/example.learning-journey-platform-tour@0.0.0-canary-20251217072406
13
+ - @lssm/example.learning-journey-studio-onboarding@0.0.0-canary-20251217072406
14
+ - @lssm/example.learning-journey-ui-shared@0.0.0-canary-20251217072406
15
+ - @lssm/lib.contracts@0.0.0-canary-20251217072406
16
+ - @lssm/lib.design-system@0.0.0-canary-20251217072406
17
+ - @lssm/lib.schema@0.0.0-canary-20251217072406
18
+ - @lssm/lib.ui-kit-core@0.0.0-canary-20251217072406
19
+ - @lssm/lib.ui-kit-web@0.0.0-canary-20251217072406
20
+ - @lssm/module.learning-journey@0.0.0-canary-20251217072406
@@ -0,0 +1,120 @@
1
+ import { Button } from "@lssm/lib.design-system";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "@lssm/lib.ui-kit-core";
4
+ import { cn as cn$1 } from "@lssm/lib.ui-kit-web/ui/utils";
5
+
6
+ //#region src/components/StepChecklist.tsx
7
+ function StepChecklist({ step, stepNumber, isCompleted, isCurrent, isExpanded, onToggle, onComplete }) {
8
+ return /* @__PURE__ */ jsxs("div", {
9
+ className: cn("rounded-xl border transition-all", isCompleted && "border-green-500/50 bg-green-500/5", isCurrent && !isCompleted && "border-violet-500 bg-violet-500/5", !isCompleted && !isCurrent && "border-border"),
10
+ children: [/* @__PURE__ */ jsxs("button", {
11
+ type: "button",
12
+ className: "flex w-full items-center gap-4 p-4 text-left",
13
+ onClick: onToggle,
14
+ children: [
15
+ /* @__PURE__ */ jsx("div", {
16
+ className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors", isCompleted && "border-green-500 bg-green-500 text-white", isCurrent && !isCompleted && "border-violet-500 text-violet-500", !isCompleted && !isCurrent && "border-muted-foreground text-muted-foreground"),
17
+ children: isCompleted ? "✓" : stepNumber
18
+ }),
19
+ /* @__PURE__ */ jsxs("div", {
20
+ className: "min-w-0 flex-1",
21
+ children: [/* @__PURE__ */ jsx("h4", {
22
+ className: cn("font-semibold", isCompleted && "text-green-500", isCurrent && !isCompleted && "text-foreground", !isCompleted && !isCurrent && "text-muted-foreground"),
23
+ children: step.title
24
+ }), !isExpanded && step.description && /* @__PURE__ */ jsx("p", {
25
+ className: "text-muted-foreground truncate text-sm",
26
+ children: step.description
27
+ })]
28
+ }),
29
+ step.xpReward && /* @__PURE__ */ jsxs("span", {
30
+ className: cn("shrink-0 rounded-full px-2 py-1 text-xs font-semibold", isCompleted ? "bg-green-500/10 text-green-500" : "bg-muted text-muted-foreground"),
31
+ children: [
32
+ "+",
33
+ step.xpReward,
34
+ " XP"
35
+ ]
36
+ }),
37
+ /* @__PURE__ */ jsx("span", {
38
+ className: cn("shrink-0 transition-transform", isExpanded && "rotate-180"),
39
+ children: "▼"
40
+ })
41
+ ]
42
+ }), isExpanded && /* @__PURE__ */ jsxs("div", {
43
+ className: "border-t px-4 py-4",
44
+ children: [
45
+ step.description && /* @__PURE__ */ jsx("p", {
46
+ className: "text-muted-foreground mb-4",
47
+ children: step.description
48
+ }),
49
+ step.instructions && /* @__PURE__ */ jsxs("div", {
50
+ className: "bg-muted mb-4 rounded-lg p-4",
51
+ children: [/* @__PURE__ */ jsx("p", {
52
+ className: "mb-2 text-sm font-medium",
53
+ children: "Instructions:"
54
+ }), /* @__PURE__ */ jsx("p", {
55
+ className: "text-muted-foreground text-sm",
56
+ children: step.instructions
57
+ })]
58
+ }),
59
+ /* @__PURE__ */ jsxs("div", {
60
+ className: "flex flex-wrap gap-2",
61
+ children: [step.actionUrl && /* @__PURE__ */ jsx(Button, {
62
+ variant: "outline",
63
+ size: "sm",
64
+ onClick: () => window.open(step.actionUrl, "_blank"),
65
+ children: step.actionLabel ?? "Try it"
66
+ }), !isCompleted && /* @__PURE__ */ jsx(Button, {
67
+ size: "sm",
68
+ onClick: onComplete,
69
+ children: "Mark as Complete"
70
+ })]
71
+ })
72
+ ]
73
+ })]
74
+ });
75
+ }
76
+
77
+ //#endregion
78
+ //#region src/components/JourneyMap.tsx
79
+ const SURFACE_ICONS = {
80
+ templates: "📋",
81
+ "spec-editor": "✏️",
82
+ regenerator: "🔄",
83
+ playground: "🎮",
84
+ evolution: "🤖",
85
+ dashboard: "📊",
86
+ settings: "⚙️",
87
+ default: "📍"
88
+ };
89
+ function JourneyMap({ steps, completedStepIds, currentStepId }) {
90
+ return /* @__PURE__ */ jsx("div", {
91
+ className: "relative overflow-x-auto pb-4",
92
+ children: /* @__PURE__ */ jsx("div", {
93
+ className: "flex min-w-max items-center gap-2",
94
+ children: steps.map((step, index) => {
95
+ const isCompleted = completedStepIds.includes(step.id);
96
+ const isCurrent = step.id === currentStepId;
97
+ const icon = SURFACE_ICONS[step.metadata?.surface ?? "default"] ?? SURFACE_ICONS.default;
98
+ return /* @__PURE__ */ jsxs("div", {
99
+ className: "flex items-center",
100
+ children: [/* @__PURE__ */ jsxs("div", {
101
+ className: "flex flex-col items-center gap-2",
102
+ children: [/* @__PURE__ */ jsx("div", {
103
+ className: cn$1("flex h-14 w-14 items-center justify-center rounded-2xl border-2 text-2xl transition-all", isCompleted && "border-green-500 bg-green-500/10", isCurrent && !isCompleted && "border-violet-500 bg-violet-500/10 ring-4 ring-violet-500/20", !isCompleted && !isCurrent && "border-muted bg-muted/50"),
104
+ children: isCompleted ? "✓" : icon
105
+ }), /* @__PURE__ */ jsx("div", {
106
+ className: "text-center",
107
+ children: /* @__PURE__ */ jsx("p", {
108
+ className: cn$1("max-w-[100px] truncate text-xs font-medium", isCompleted && "text-green-500", isCurrent && !isCompleted && "text-violet-500", !isCompleted && !isCurrent && "text-muted-foreground"),
109
+ children: step.title
110
+ })
111
+ })]
112
+ }), index < steps.length - 1 && /* @__PURE__ */ jsx("div", { className: cn$1("mx-2 h-1 w-8 rounded-full transition-colors", completedStepIds.includes(steps[index + 1]?.id ?? "") ? "bg-green-500" : isCompleted ? "bg-green-500/50" : "bg-muted") })]
113
+ }, step.id);
114
+ })
115
+ })
116
+ });
117
+ }
118
+
119
+ //#endregion
120
+ export { StepChecklist as n, JourneyMap as t };
@@ -1,4 +1,4 @@
1
- import { n as StepChecklist, t as JourneyMap } from "../JourneyMap-Cu8t0fYp.mjs";
1
+ import { n as StepChecklist, t as JourneyMap } from "../JourneyMap-CZ47DksM.mjs";
2
2
  import { t as CodeSnippet } from "../components-OUN5S2z0.mjs";
3
3
 
4
4
  export { CodeSnippet, JourneyMap, StepChecklist };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as CodeSnippet, r as StepChecklist, t as JourneyMap } from "./index-BRfzjb6j.mjs";
2
2
  import { i as Overview, n as ProgressView, r as Steps, t as Timeline } from "./index-BSiowBYJ.mjs";
3
3
  import { LearningMiniAppProps } from "@lssm/example.learning-journey-ui-shared";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/OnboardingMiniApp.d.ts
7
7
  type OnboardingMiniAppProps = Omit<LearningMiniAppProps, 'progress'> & {
@@ -13,7 +13,7 @@ declare function OnboardingMiniApp({
13
13
  onStepComplete: externalOnStepComplete,
14
14
  onViewChange,
15
15
  initialView
16
- }: OnboardingMiniAppProps): react_jsx_runtime0.JSX.Element;
16
+ }: OnboardingMiniAppProps): react_jsx_runtime3.JSX.Element;
17
17
  //#endregion
18
18
  //#region src/example.d.ts
19
19
  declare const example: {