@contractspec/example.learning-journey-ui-onboarding 3.7.6 → 3.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/AGENTS.md +50 -24
- package/CHANGELOG.md +34 -0
- package/README.md +66 -26
- package/dist/OnboardingMiniApp.js +280 -280
- package/dist/browser/OnboardingMiniApp.js +280 -280
- package/dist/browser/components/CodeSnippet.js +4 -4
- package/dist/browser/components/JourneyMap.js +1 -1
- package/dist/browser/components/StepChecklist.js +6 -6
- package/dist/browser/components/index.js +11 -11
- package/dist/browser/index.js +285 -284
- package/dist/browser/views/Overview.js +14 -14
- package/dist/browser/views/Progress.js +9 -9
- package/dist/browser/views/Steps.js +8 -8
- package/dist/browser/views/Timeline.js +6 -6
- package/dist/browser/views/index.js +276 -276
- package/dist/components/CodeSnippet.js +4 -4
- package/dist/components/JourneyMap.js +1 -1
- package/dist/components/StepChecklist.js +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +11 -11
- package/dist/index.d.ts +4 -4
- package/dist/index.js +285 -284
- package/dist/node/OnboardingMiniApp.js +280 -280
- package/dist/node/components/CodeSnippet.js +4 -4
- package/dist/node/components/JourneyMap.js +1 -1
- package/dist/node/components/StepChecklist.js +6 -6
- package/dist/node/components/index.js +11 -11
- package/dist/node/index.js +285 -284
- package/dist/node/views/Overview.js +14 -14
- package/dist/node/views/Progress.js +9 -9
- package/dist/node/views/Steps.js +8 -8
- package/dist/node/views/Timeline.js +6 -6
- package/dist/node/views/index.js +276 -276
- package/dist/views/Overview.js +14 -14
- package/dist/views/Progress.js +9 -9
- package/dist/views/Steps.js +8 -8
- package/dist/views/Timeline.js +6 -6
- package/dist/views/index.d.ts +1 -1
- package/dist/views/index.js +276 -276
- package/package.json +13 -13
- package/src/OnboardingMiniApp.tsx +70 -70
- package/src/components/CodeSnippet.tsx +43 -43
- package/src/components/JourneyMap.tsx +70 -70
- package/src/components/StepChecklist.tsx +118 -118
- package/src/components/index.ts +1 -1
- package/src/docs/learning-journey-ui-onboarding.docblock.ts +11 -11
- package/src/example.ts +25 -25
- package/src/index.ts +5 -6
- package/src/learning-journey-ui-onboarding.feature.ts +12 -12
- package/src/views/Overview.tsx +182 -182
- package/src/views/Progress.tsx +167 -167
- package/src/views/Steps.tsx +79 -79
- package/src/views/Timeline.tsx +126 -126
- package/src/views/index.ts +1 -1
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/CodeSnippet.tsx
|
|
2
|
-
import { useState } from "react";
|
|
3
2
|
import { Button } from "@contractspec/lib.design-system";
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
5
5
|
"use client";
|
|
6
6
|
function CodeSnippet({
|
|
@@ -15,16 +15,16 @@ function CodeSnippet({
|
|
|
15
15
|
setTimeout(() => setCopied(false), 2000);
|
|
16
16
|
};
|
|
17
17
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
18
|
-
className: "
|
|
18
|
+
className: "overflow-hidden rounded-lg border bg-muted/50",
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ jsxDEV("div", {
|
|
21
|
-
className: "
|
|
21
|
+
className: "flex items-center justify-between border-b bg-muted px-4 py-2",
|
|
22
22
|
children: [
|
|
23
23
|
/* @__PURE__ */ jsxDEV("div", {
|
|
24
24
|
className: "flex items-center gap-2",
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ jsxDEV("span", {
|
|
27
|
-
className: "text-muted-foreground text-xs
|
|
27
|
+
className: "font-medium text-muted-foreground text-xs uppercase",
|
|
28
28
|
children: language
|
|
29
29
|
}, undefined, false, undefined, this),
|
|
30
30
|
title && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
@@ -39,7 +39,7 @@ function JourneyMap({
|
|
|
39
39
|
/* @__PURE__ */ jsxDEV("div", {
|
|
40
40
|
className: "text-center",
|
|
41
41
|
children: /* @__PURE__ */ jsxDEV("p", {
|
|
42
|
-
className: cn("max-w-[100px] truncate text-xs
|
|
42
|
+
className: cn("max-w-[100px] truncate font-medium text-xs", isCompleted && "text-green-500", isCurrent && !isCompleted && "text-violet-500", !isCompleted && !isCurrent && "text-muted-foreground"),
|
|
43
43
|
children: step.title
|
|
44
44
|
}, undefined, false, undefined, this)
|
|
45
45
|
}, undefined, false, undefined, this)
|
|
@@ -21,7 +21,7 @@ function StepChecklist({
|
|
|
21
21
|
onClick: onToggle,
|
|
22
22
|
children: [
|
|
23
23
|
/* @__PURE__ */ jsxDEV("div", {
|
|
24
|
-
className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-sm
|
|
24
|
+
className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 font-semibold text-sm 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"),
|
|
25
25
|
children: isCompleted ? "✓" : stepNumber
|
|
26
26
|
}, undefined, false, undefined, this),
|
|
27
27
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -32,13 +32,13 @@ function StepChecklist({
|
|
|
32
32
|
children: step.title
|
|
33
33
|
}, undefined, false, undefined, this),
|
|
34
34
|
!isExpanded && step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
35
|
-
className: "text-muted-foreground
|
|
35
|
+
className: "truncate text-muted-foreground text-sm",
|
|
36
36
|
children: step.description
|
|
37
37
|
}, undefined, false, undefined, this)
|
|
38
38
|
]
|
|
39
39
|
}, undefined, true, undefined, this),
|
|
40
40
|
step.xpReward && /* @__PURE__ */ jsxDEV("span", {
|
|
41
|
-
className: cn("shrink-0 rounded-full px-2 py-1 text-xs
|
|
41
|
+
className: cn("shrink-0 rounded-full px-2 py-1 font-semibold text-xs", isCompleted ? "bg-green-500/10 text-green-500" : "bg-muted text-muted-foreground"),
|
|
42
42
|
children: [
|
|
43
43
|
"+",
|
|
44
44
|
step.xpReward,
|
|
@@ -55,14 +55,14 @@ function StepChecklist({
|
|
|
55
55
|
className: "border-t px-4 py-4",
|
|
56
56
|
children: [
|
|
57
57
|
step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
58
|
-
className: "text-muted-foreground
|
|
58
|
+
className: "mb-4 text-muted-foreground",
|
|
59
59
|
children: step.description
|
|
60
60
|
}, undefined, false, undefined, this),
|
|
61
61
|
step.instructions && /* @__PURE__ */ jsxDEV("div", {
|
|
62
|
-
className: "
|
|
62
|
+
className: "mb-4 rounded-lg bg-muted p-4",
|
|
63
63
|
children: [
|
|
64
64
|
/* @__PURE__ */ jsxDEV("p", {
|
|
65
|
-
className: "mb-2 text-sm
|
|
65
|
+
className: "mb-2 font-medium text-sm",
|
|
66
66
|
children: "Instructions:"
|
|
67
67
|
}, undefined, false, undefined, this),
|
|
68
68
|
/* @__PURE__ */ jsxDEV("p", {
|
|
@@ -21,7 +21,7 @@ function StepChecklist({
|
|
|
21
21
|
onClick: onToggle,
|
|
22
22
|
children: [
|
|
23
23
|
/* @__PURE__ */ jsxDEV("div", {
|
|
24
|
-
className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-sm
|
|
24
|
+
className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 font-semibold text-sm 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"),
|
|
25
25
|
children: isCompleted ? "✓" : stepNumber
|
|
26
26
|
}, undefined, false, undefined, this),
|
|
27
27
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -32,13 +32,13 @@ function StepChecklist({
|
|
|
32
32
|
children: step.title
|
|
33
33
|
}, undefined, false, undefined, this),
|
|
34
34
|
!isExpanded && step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
35
|
-
className: "text-muted-foreground
|
|
35
|
+
className: "truncate text-muted-foreground text-sm",
|
|
36
36
|
children: step.description
|
|
37
37
|
}, undefined, false, undefined, this)
|
|
38
38
|
]
|
|
39
39
|
}, undefined, true, undefined, this),
|
|
40
40
|
step.xpReward && /* @__PURE__ */ jsxDEV("span", {
|
|
41
|
-
className: cn("shrink-0 rounded-full px-2 py-1 text-xs
|
|
41
|
+
className: cn("shrink-0 rounded-full px-2 py-1 font-semibold text-xs", isCompleted ? "bg-green-500/10 text-green-500" : "bg-muted text-muted-foreground"),
|
|
42
42
|
children: [
|
|
43
43
|
"+",
|
|
44
44
|
step.xpReward,
|
|
@@ -55,14 +55,14 @@ function StepChecklist({
|
|
|
55
55
|
className: "border-t px-4 py-4",
|
|
56
56
|
children: [
|
|
57
57
|
step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
58
|
-
className: "text-muted-foreground
|
|
58
|
+
className: "mb-4 text-muted-foreground",
|
|
59
59
|
children: step.description
|
|
60
60
|
}, undefined, false, undefined, this),
|
|
61
61
|
step.instructions && /* @__PURE__ */ jsxDEV("div", {
|
|
62
|
-
className: "
|
|
62
|
+
className: "mb-4 rounded-lg bg-muted p-4",
|
|
63
63
|
children: [
|
|
64
64
|
/* @__PURE__ */ jsxDEV("p", {
|
|
65
|
-
className: "mb-2 text-sm
|
|
65
|
+
className: "mb-2 font-medium text-sm",
|
|
66
66
|
children: "Instructions:"
|
|
67
67
|
}, undefined, false, undefined, this),
|
|
68
68
|
/* @__PURE__ */ jsxDEV("p", {
|
|
@@ -134,7 +134,7 @@ function JourneyMap({
|
|
|
134
134
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
135
135
|
className: "text-center",
|
|
136
136
|
children: /* @__PURE__ */ jsxDEV2("p", {
|
|
137
|
-
className: cn2("max-w-[100px] truncate text-xs
|
|
137
|
+
className: cn2("max-w-[100px] truncate font-medium text-xs", isCompleted && "text-green-500", isCurrent && !isCompleted && "text-violet-500", !isCompleted && !isCurrent && "text-muted-foreground"),
|
|
138
138
|
children: step.title
|
|
139
139
|
}, undefined, false, undefined, this)
|
|
140
140
|
}, undefined, false, undefined, this)
|
|
@@ -151,8 +151,8 @@ function JourneyMap({
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
// src/components/CodeSnippet.tsx
|
|
154
|
-
import { useState } from "react";
|
|
155
154
|
import { Button as Button2 } from "@contractspec/lib.design-system";
|
|
155
|
+
import { useState } from "react";
|
|
156
156
|
import { jsxDEV as jsxDEV3, Fragment } from "react/jsx-dev-runtime";
|
|
157
157
|
"use client";
|
|
158
158
|
function CodeSnippet({
|
|
@@ -167,16 +167,16 @@ function CodeSnippet({
|
|
|
167
167
|
setTimeout(() => setCopied(false), 2000);
|
|
168
168
|
};
|
|
169
169
|
return /* @__PURE__ */ jsxDEV3("div", {
|
|
170
|
-
className: "
|
|
170
|
+
className: "overflow-hidden rounded-lg border bg-muted/50",
|
|
171
171
|
children: [
|
|
172
172
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
173
|
-
className: "
|
|
173
|
+
className: "flex items-center justify-between border-b bg-muted px-4 py-2",
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
176
176
|
className: "flex items-center gap-2",
|
|
177
177
|
children: [
|
|
178
178
|
/* @__PURE__ */ jsxDEV3("span", {
|
|
179
|
-
className: "text-muted-foreground text-xs
|
|
179
|
+
className: "font-medium text-muted-foreground text-xs uppercase",
|
|
180
180
|
children: language
|
|
181
181
|
}, undefined, false, undefined, this),
|
|
182
182
|
title && /* @__PURE__ */ jsxDEV3(Fragment, {
|