@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,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/components/CodeSnippet.tsx
|
|
3
|
-
import { useState } from "react";
|
|
4
3
|
import { Button } from "@contractspec/lib.design-system";
|
|
4
|
+
import { useState } from "react";
|
|
5
5
|
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
6
6
|
"use client";
|
|
7
7
|
function CodeSnippet({
|
|
@@ -16,16 +16,16 @@ function CodeSnippet({
|
|
|
16
16
|
setTimeout(() => setCopied(false), 2000);
|
|
17
17
|
};
|
|
18
18
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
19
|
-
className: "
|
|
19
|
+
className: "overflow-hidden rounded-lg border bg-muted/50",
|
|
20
20
|
children: [
|
|
21
21
|
/* @__PURE__ */ jsxDEV("div", {
|
|
22
|
-
className: "
|
|
22
|
+
className: "flex items-center justify-between border-b bg-muted px-4 py-2",
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ jsxDEV("div", {
|
|
25
25
|
className: "flex items-center gap-2",
|
|
26
26
|
children: [
|
|
27
27
|
/* @__PURE__ */ jsxDEV("span", {
|
|
28
|
-
className: "text-muted-foreground text-xs
|
|
28
|
+
className: "font-medium text-muted-foreground text-xs uppercase",
|
|
29
29
|
children: language
|
|
30
30
|
}, undefined, false, undefined, this),
|
|
31
31
|
title && /* @__PURE__ */ jsxDEV(Fragment, {
|
|
@@ -40,7 +40,7 @@ function JourneyMap({
|
|
|
40
40
|
/* @__PURE__ */ jsxDEV("div", {
|
|
41
41
|
className: "text-center",
|
|
42
42
|
children: /* @__PURE__ */ jsxDEV("p", {
|
|
43
|
-
className: cn("max-w-[100px] truncate text-xs
|
|
43
|
+
className: cn("max-w-[100px] truncate font-medium text-xs", isCompleted && "text-green-500", isCurrent && !isCompleted && "text-violet-500", !isCompleted && !isCurrent && "text-muted-foreground"),
|
|
44
44
|
children: step.title
|
|
45
45
|
}, undefined, false, undefined, this)
|
|
46
46
|
}, undefined, false, undefined, this)
|
|
@@ -22,7 +22,7 @@ function StepChecklist({
|
|
|
22
22
|
onClick: onToggle,
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ jsxDEV("div", {
|
|
25
|
-
className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-sm
|
|
25
|
+
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"),
|
|
26
26
|
children: isCompleted ? "\u2713" : stepNumber
|
|
27
27
|
}, undefined, false, undefined, this),
|
|
28
28
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -33,13 +33,13 @@ function StepChecklist({
|
|
|
33
33
|
children: step.title
|
|
34
34
|
}, undefined, false, undefined, this),
|
|
35
35
|
!isExpanded && step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
36
|
-
className: "text-muted-foreground
|
|
36
|
+
className: "truncate text-muted-foreground text-sm",
|
|
37
37
|
children: step.description
|
|
38
38
|
}, undefined, false, undefined, this)
|
|
39
39
|
]
|
|
40
40
|
}, undefined, true, undefined, this),
|
|
41
41
|
step.xpReward && /* @__PURE__ */ jsxDEV("span", {
|
|
42
|
-
className: cn("shrink-0 rounded-full px-2 py-1 text-xs
|
|
42
|
+
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"),
|
|
43
43
|
children: [
|
|
44
44
|
"+",
|
|
45
45
|
step.xpReward,
|
|
@@ -56,14 +56,14 @@ function StepChecklist({
|
|
|
56
56
|
className: "border-t px-4 py-4",
|
|
57
57
|
children: [
|
|
58
58
|
step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
59
|
-
className: "text-muted-foreground
|
|
59
|
+
className: "mb-4 text-muted-foreground",
|
|
60
60
|
children: step.description
|
|
61
61
|
}, undefined, false, undefined, this),
|
|
62
62
|
step.instructions && /* @__PURE__ */ jsxDEV("div", {
|
|
63
|
-
className: "
|
|
63
|
+
className: "mb-4 rounded-lg bg-muted p-4",
|
|
64
64
|
children: [
|
|
65
65
|
/* @__PURE__ */ jsxDEV("p", {
|
|
66
|
-
className: "mb-2 text-sm
|
|
66
|
+
className: "mb-2 font-medium text-sm",
|
|
67
67
|
children: "Instructions:"
|
|
68
68
|
}, undefined, false, undefined, this),
|
|
69
69
|
/* @__PURE__ */ jsxDEV("p", {
|
package/dist/components/index.js
CHANGED
|
@@ -22,7 +22,7 @@ function StepChecklist({
|
|
|
22
22
|
onClick: onToggle,
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ jsxDEV("div", {
|
|
25
|
-
className: cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 text-sm
|
|
25
|
+
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"),
|
|
26
26
|
children: isCompleted ? "\u2713" : stepNumber
|
|
27
27
|
}, undefined, false, undefined, this),
|
|
28
28
|
/* @__PURE__ */ jsxDEV("div", {
|
|
@@ -33,13 +33,13 @@ function StepChecklist({
|
|
|
33
33
|
children: step.title
|
|
34
34
|
}, undefined, false, undefined, this),
|
|
35
35
|
!isExpanded && step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
36
|
-
className: "text-muted-foreground
|
|
36
|
+
className: "truncate text-muted-foreground text-sm",
|
|
37
37
|
children: step.description
|
|
38
38
|
}, undefined, false, undefined, this)
|
|
39
39
|
]
|
|
40
40
|
}, undefined, true, undefined, this),
|
|
41
41
|
step.xpReward && /* @__PURE__ */ jsxDEV("span", {
|
|
42
|
-
className: cn("shrink-0 rounded-full px-2 py-1 text-xs
|
|
42
|
+
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"),
|
|
43
43
|
children: [
|
|
44
44
|
"+",
|
|
45
45
|
step.xpReward,
|
|
@@ -56,14 +56,14 @@ function StepChecklist({
|
|
|
56
56
|
className: "border-t px-4 py-4",
|
|
57
57
|
children: [
|
|
58
58
|
step.description && /* @__PURE__ */ jsxDEV("p", {
|
|
59
|
-
className: "text-muted-foreground
|
|
59
|
+
className: "mb-4 text-muted-foreground",
|
|
60
60
|
children: step.description
|
|
61
61
|
}, undefined, false, undefined, this),
|
|
62
62
|
step.instructions && /* @__PURE__ */ jsxDEV("div", {
|
|
63
|
-
className: "
|
|
63
|
+
className: "mb-4 rounded-lg bg-muted p-4",
|
|
64
64
|
children: [
|
|
65
65
|
/* @__PURE__ */ jsxDEV("p", {
|
|
66
|
-
className: "mb-2 text-sm
|
|
66
|
+
className: "mb-2 font-medium text-sm",
|
|
67
67
|
children: "Instructions:"
|
|
68
68
|
}, undefined, false, undefined, this),
|
|
69
69
|
/* @__PURE__ */ jsxDEV("p", {
|
|
@@ -135,7 +135,7 @@ function JourneyMap({
|
|
|
135
135
|
/* @__PURE__ */ jsxDEV2("div", {
|
|
136
136
|
className: "text-center",
|
|
137
137
|
children: /* @__PURE__ */ jsxDEV2("p", {
|
|
138
|
-
className: cn2("max-w-[100px] truncate text-xs
|
|
138
|
+
className: cn2("max-w-[100px] truncate font-medium text-xs", isCompleted && "text-green-500", isCurrent && !isCompleted && "text-violet-500", !isCompleted && !isCurrent && "text-muted-foreground"),
|
|
139
139
|
children: step.title
|
|
140
140
|
}, undefined, false, undefined, this)
|
|
141
141
|
}, undefined, false, undefined, this)
|
|
@@ -152,8 +152,8 @@ function JourneyMap({
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/components/CodeSnippet.tsx
|
|
155
|
-
import { useState } from "react";
|
|
156
155
|
import { Button as Button2 } from "@contractspec/lib.design-system";
|
|
156
|
+
import { useState } from "react";
|
|
157
157
|
import { jsxDEV as jsxDEV3, Fragment } from "react/jsx-dev-runtime";
|
|
158
158
|
"use client";
|
|
159
159
|
function CodeSnippet({
|
|
@@ -168,16 +168,16 @@ function CodeSnippet({
|
|
|
168
168
|
setTimeout(() => setCopied(false), 2000);
|
|
169
169
|
};
|
|
170
170
|
return /* @__PURE__ */ jsxDEV3("div", {
|
|
171
|
-
className: "
|
|
171
|
+
className: "overflow-hidden rounded-lg border bg-muted/50",
|
|
172
172
|
children: [
|
|
173
173
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
174
|
-
className: "
|
|
174
|
+
className: "flex items-center justify-between border-b bg-muted px-4 py-2",
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ jsxDEV3("div", {
|
|
177
177
|
className: "flex items-center gap-2",
|
|
178
178
|
children: [
|
|
179
179
|
/* @__PURE__ */ jsxDEV3("span", {
|
|
180
|
-
className: "text-muted-foreground text-xs
|
|
180
|
+
className: "font-medium text-muted-foreground text-xs uppercase",
|
|
181
181
|
children: language
|
|
182
182
|
}, undefined, false, undefined, this),
|
|
183
183
|
title && /* @__PURE__ */ jsxDEV3(Fragment, {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { Overview, Steps, Progress, Timeline } from './views';
|
|
3
|
-
export { StepChecklist, CodeSnippet, JourneyMap } from './components';
|
|
4
|
-
export * from './learning-journey-ui-onboarding.feature';
|
|
1
|
+
export { CodeSnippet, JourneyMap, StepChecklist } from './components';
|
|
5
2
|
export { default as example } from './example';
|
|
3
|
+
export * from './learning-journey-ui-onboarding.feature';
|
|
4
|
+
export { OnboardingMiniApp } from './OnboardingMiniApp';
|
|
5
|
+
export { Overview, Progress, Steps, Timeline } from './views';
|
|
6
6
|
import './docs';
|