nextworks 0.2.0-alpha.2 → 0.2.0-alpha.21
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/README.md +280 -228
- package/dist/cli_manifests/blocks_manifest.json +193 -194
- package/dist/commands/blocks.d.ts +3 -0
- package/dist/commands/blocks.d.ts.map +1 -1
- package/dist/commands/blocks.js +128 -19
- package/dist/commands/blocks.js.map +1 -1
- package/dist/commands/doctor.d.ts +136 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +696 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/remove-blocks.d.ts +4 -1
- package/dist/commands/remove-blocks.d.ts.map +1 -1
- package/dist/commands/remove-blocks.js +24 -6
- package/dist/commands/remove-blocks.js.map +1 -1
- package/dist/index.js +125 -4
- package/dist/index.js.map +1 -1
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +104 -194
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +115 -75
- package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -251
- package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
- package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -36
- package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
- package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
- package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
- package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
- package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
- package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
- package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
- package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
- package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
- package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
- package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
- package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
- package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
- package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
- package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +130 -85
- package/dist/kits/blocks/app/templates/gallery/page.tsx +357 -303
- package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -74
- package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -55
- package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -178
- package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -93
- package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
- package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -93
- package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -84
- package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
- package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -89
- package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -162
- package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
- package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
- package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
- package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
- package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -89
- package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
- package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
- package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
- package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -38
- package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -176
- package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
- package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
- package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -91
- package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -105
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -127
- package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -159
- package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
- package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -97
- package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
- package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
- package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
- package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -183
- package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
- package/dist/kits/blocks/components/sections/About.tsx +291 -291
- package/dist/kits/blocks/components/sections/CTA.tsx +257 -258
- package/dist/kits/blocks/components/sections/CommandShowcase.tsx +517 -0
- package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
- package/dist/kits/blocks/components/sections/FAQ.tsx +214 -225
- package/dist/kits/blocks/components/sections/FeaturedProjectShowcase.tsx +687 -0
- package/dist/kits/blocks/components/sections/Features.tsx +268 -270
- package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
- package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
- package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
- package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +246 -0
- package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
- package/dist/kits/blocks/components/sections/HeroWithVideo.tsx +495 -0
- package/dist/kits/blocks/components/sections/Navbar.tsx +352 -353
- package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -550
- package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
- package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
- package/dist/kits/blocks/components/sections/ProjectDeepDive.tsx +805 -0
- package/dist/kits/blocks/components/sections/SelectedWorkRail.tsx +485 -0
- package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
- package/dist/kits/blocks/components/sections/Team.tsx +309 -309
- package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
- package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
- package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +128 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +519 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +140 -0
- package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +130 -0
- package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +430 -0
- package/dist/kits/blocks/components/sections/product-demo/TaskListPanel.tsx +302 -0
- package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +744 -0
- package/dist/kits/blocks/components/sections/product-demo/types.ts +262 -0
- package/dist/kits/blocks/components/theme-provider.tsx +1 -34
- package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
- package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
- package/dist/kits/blocks/components/ui/button.tsx +122 -122
- package/dist/kits/blocks/components/ui/card.tsx +95 -95
- package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
- package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
- package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
- package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
- package/dist/kits/blocks/components/ui/input.tsx +27 -27
- package/dist/kits/blocks/components/ui/label.tsx +29 -29
- package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
- package/dist/kits/blocks/components/ui/select.tsx +25 -25
- package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
- package/dist/kits/blocks/components/ui/table.tsx +98 -98
- package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
- package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
- package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -247
- package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
- package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
- package/dist/kits/blocks/lib/themes.ts +400 -400
- package/dist/kits/blocks/lib/utils.ts +6 -9
- package/dist/kits/blocks/package-deps.json +40 -28
- package/dist/kits/blocks/tsconfig.json +11 -0
- package/dist/kits/blocks/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/file-operations.d.ts +3 -1
- package/dist/utils/file-operations.d.ts.map +1 -1
- package/dist/utils/file-operations.js +84 -12
- package/dist/utils/file-operations.js.map +1 -1
- package/dist/utils/installation-tracker.d.ts +2 -2
- package/dist/utils/installation-tracker.d.ts.map +1 -1
- package/dist/utils/installation-tracker.js +11 -11
- package/dist/utils/installation-tracker.js.map +1 -1
- package/dist/utils/package-manager.d.ts +6 -0
- package/dist/utils/package-manager.d.ts.map +1 -0
- package/dist/utils/package-manager.js +58 -0
- package/dist/utils/package-manager.js.map +1 -0
- package/dist/utils/yarn-pnp.d.ts +6 -0
- package/dist/utils/yarn-pnp.d.ts.map +1 -0
- package/dist/utils/yarn-pnp.js +39 -0
- package/dist/utils/yarn-pnp.js.map +1 -0
- package/package.json +5 -2
- package/dist/kits/blocks/notes/THEME_GUIDE.md +0 -29
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
import type { ProductDemoTaskListState } from "./types";
|
|
5
|
+
|
|
6
|
+
export interface TaskListPanelProps {
|
|
7
|
+
state: ProductDemoTaskListState;
|
|
8
|
+
onSelect?: (taskId: string) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function TaskListPanel({ state, onSelect }: TaskListPanelProps) {
|
|
12
|
+
const scrollViewportRef = React.useRef<HTMLDivElement | null>(null);
|
|
13
|
+
const scrollbarTrackRef = React.useRef<HTMLDivElement | null>(null);
|
|
14
|
+
const dragStateRef = React.useRef<{
|
|
15
|
+
pointerId: number;
|
|
16
|
+
startY: number;
|
|
17
|
+
startScrollTop: number;
|
|
18
|
+
scrollRatio: number;
|
|
19
|
+
pointerOffsetY: number;
|
|
20
|
+
} | null>(null);
|
|
21
|
+
const [scrollMetrics, setScrollMetrics] = React.useState({
|
|
22
|
+
scrollTop: 0,
|
|
23
|
+
scrollHeight: 1,
|
|
24
|
+
clientHeight: 1,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
const viewport = scrollViewportRef.current;
|
|
29
|
+
|
|
30
|
+
if (!viewport) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const updateScrollMetrics = () => {
|
|
35
|
+
setScrollMetrics({
|
|
36
|
+
scrollTop: viewport.scrollTop,
|
|
37
|
+
scrollHeight: viewport.scrollHeight,
|
|
38
|
+
clientHeight: viewport.clientHeight,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
updateScrollMetrics();
|
|
43
|
+
|
|
44
|
+
viewport.addEventListener("scroll", updateScrollMetrics, {
|
|
45
|
+
passive: true,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
49
|
+
updateScrollMetrics();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
resizeObserver.observe(viewport);
|
|
53
|
+
|
|
54
|
+
if (viewport.firstElementChild instanceof HTMLElement) {
|
|
55
|
+
resizeObserver.observe(viewport.firstElementChild);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
window.addEventListener("resize", updateScrollMetrics);
|
|
59
|
+
|
|
60
|
+
return () => {
|
|
61
|
+
viewport.removeEventListener("scroll", updateScrollMetrics);
|
|
62
|
+
resizeObserver.disconnect();
|
|
63
|
+
window.removeEventListener("resize", updateScrollMetrics);
|
|
64
|
+
};
|
|
65
|
+
}, [state.items.length, state.activeItemId]);
|
|
66
|
+
|
|
67
|
+
const hasOverflow =
|
|
68
|
+
scrollMetrics.scrollHeight > scrollMetrics.clientHeight + 1;
|
|
69
|
+
const thumbHeight = hasOverflow
|
|
70
|
+
? Math.max(
|
|
71
|
+
36,
|
|
72
|
+
(scrollMetrics.clientHeight / scrollMetrics.scrollHeight) *
|
|
73
|
+
scrollMetrics.clientHeight,
|
|
74
|
+
)
|
|
75
|
+
: 0;
|
|
76
|
+
const maxThumbOffset = Math.max(scrollMetrics.clientHeight - thumbHeight, 0);
|
|
77
|
+
const maxScrollTop = Math.max(
|
|
78
|
+
scrollMetrics.scrollHeight - scrollMetrics.clientHeight,
|
|
79
|
+
1,
|
|
80
|
+
);
|
|
81
|
+
const thumbOffset = hasOverflow
|
|
82
|
+
? (scrollMetrics.scrollTop / maxScrollTop) * maxThumbOffset
|
|
83
|
+
: 0;
|
|
84
|
+
|
|
85
|
+
const updateScrollTopFromPointer = React.useCallback(
|
|
86
|
+
(clientY: number) => {
|
|
87
|
+
const viewport = scrollViewportRef.current;
|
|
88
|
+
const track = scrollbarTrackRef.current;
|
|
89
|
+
|
|
90
|
+
if (!viewport || !track || !hasOverflow) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const trackRect = track.getBoundingClientRect();
|
|
95
|
+
const nextThumbTop = Math.min(
|
|
96
|
+
Math.max(
|
|
97
|
+
clientY - trackRect.top - dragStateRef.current!.pointerOffsetY,
|
|
98
|
+
0,
|
|
99
|
+
),
|
|
100
|
+
maxThumbOffset,
|
|
101
|
+
);
|
|
102
|
+
const nextScrollTop =
|
|
103
|
+
maxThumbOffset > 0 ? (nextThumbTop / maxThumbOffset) * maxScrollTop : 0;
|
|
104
|
+
|
|
105
|
+
viewport.scrollTop = nextScrollTop;
|
|
106
|
+
},
|
|
107
|
+
[hasOverflow, maxScrollTop, maxThumbOffset],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
const handleScrollbarPointerDown = React.useCallback(
|
|
111
|
+
(event: React.PointerEvent<HTMLDivElement>) => {
|
|
112
|
+
const viewport = scrollViewportRef.current;
|
|
113
|
+
const track = scrollbarTrackRef.current;
|
|
114
|
+
|
|
115
|
+
if (!viewport || !track || !hasOverflow) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const trackRect = track.getBoundingClientRect();
|
|
120
|
+
const targetElement = event.target as HTMLElement | null;
|
|
121
|
+
const clickedThumb = targetElement?.dataset.scrollbarThumb === "true";
|
|
122
|
+
const pointerOffsetY = clickedThumb
|
|
123
|
+
? event.clientY - trackRect.top - thumbOffset
|
|
124
|
+
: thumbHeight / 2;
|
|
125
|
+
|
|
126
|
+
dragStateRef.current = {
|
|
127
|
+
pointerId: event.pointerId,
|
|
128
|
+
startY: event.clientY,
|
|
129
|
+
startScrollTop: viewport.scrollTop,
|
|
130
|
+
scrollRatio: maxThumbOffset > 0 ? maxScrollTop / maxThumbOffset : 0,
|
|
131
|
+
pointerOffsetY,
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
if (!clickedThumb) {
|
|
135
|
+
updateScrollTopFromPointer(event.clientY);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
(event.currentTarget as HTMLDivElement).setPointerCapture(
|
|
139
|
+
event.pointerId,
|
|
140
|
+
);
|
|
141
|
+
event.preventDefault();
|
|
142
|
+
},
|
|
143
|
+
[
|
|
144
|
+
hasOverflow,
|
|
145
|
+
maxScrollTop,
|
|
146
|
+
maxThumbOffset,
|
|
147
|
+
thumbHeight,
|
|
148
|
+
thumbOffset,
|
|
149
|
+
updateScrollTopFromPointer,
|
|
150
|
+
],
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
const handleScrollbarPointerMove = React.useCallback(
|
|
154
|
+
(event: React.PointerEvent<HTMLDivElement>) => {
|
|
155
|
+
const dragState = dragStateRef.current;
|
|
156
|
+
|
|
157
|
+
if (!dragState || dragState.pointerId !== event.pointerId) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const viewport = scrollViewportRef.current;
|
|
162
|
+
const track = scrollbarTrackRef.current;
|
|
163
|
+
|
|
164
|
+
if (!viewport || !track || !hasOverflow) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const deltaY = event.clientY - dragState.startY;
|
|
169
|
+
const nextScrollTop = Math.min(
|
|
170
|
+
Math.max(dragState.startScrollTop + deltaY * dragState.scrollRatio, 0),
|
|
171
|
+
maxScrollTop,
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
viewport.scrollTop = nextScrollTop;
|
|
175
|
+
event.preventDefault();
|
|
176
|
+
},
|
|
177
|
+
[hasOverflow, maxScrollTop],
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
const handleScrollbarPointerUp = React.useCallback(
|
|
181
|
+
(event: React.PointerEvent<HTMLDivElement>) => {
|
|
182
|
+
const dragState = dragStateRef.current;
|
|
183
|
+
|
|
184
|
+
if (dragState?.pointerId === event.pointerId) {
|
|
185
|
+
dragStateRef.current = null;
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
[],
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<div className="flex h-full min-h-0 flex-col bg-[var(--demo-panel-muted-bg)] text-[var(--demo-fg)]">
|
|
193
|
+
<div className="border-b border-[var(--demo-border)] px-3 py-2.5">
|
|
194
|
+
<div className="text-[10px] uppercase tracking-[0.18em] text-[var(--demo-subtle-fg)]">
|
|
195
|
+
Task navigator
|
|
196
|
+
</div>
|
|
197
|
+
<div className="mt-1 text-[11px] text-[var(--demo-muted-fg)]">
|
|
198
|
+
Choose a task to inspect and run.
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div className="relative min-h-0 flex-1">
|
|
203
|
+
<div
|
|
204
|
+
ref={scrollViewportRef}
|
|
205
|
+
className="h-full overflow-y-auto pr-5 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
206
|
+
>
|
|
207
|
+
<div className="space-y-0">
|
|
208
|
+
{state.items.map((item, index) => {
|
|
209
|
+
const isActive = item.id === state.activeItemId;
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
<button
|
|
213
|
+
key={item.id}
|
|
214
|
+
type="button"
|
|
215
|
+
onClick={() => onSelect?.(item.id)}
|
|
216
|
+
className={cn(
|
|
217
|
+
"relative isolate w-full overflow-hidden rounded-none border-x-0 border-y border-b-0 px-3 py-3 text-left transition-colors duration-200 first:border-t-0",
|
|
218
|
+
"border-[var(--demo-border)] bg-[var(--demo-panel-bg)] hover:border-[var(--demo-border-strong)] hover:bg-[var(--demo-shell-strong-bg)]",
|
|
219
|
+
isActive &&
|
|
220
|
+
"border-[var(--demo-border-strong)] bg-[var(--demo-shell-strong-bg)]",
|
|
221
|
+
)}
|
|
222
|
+
>
|
|
223
|
+
{isActive ? (
|
|
224
|
+
<span
|
|
225
|
+
aria-hidden="true"
|
|
226
|
+
className="pointer-events-none absolute inset-y-0 left-0 w-px bg-[var(--demo-accent)]"
|
|
227
|
+
/>
|
|
228
|
+
) : null}
|
|
229
|
+
|
|
230
|
+
<div className="relative z-10 flex items-start gap-3">
|
|
231
|
+
<span
|
|
232
|
+
className={cn(
|
|
233
|
+
"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border text-[10px] font-semibold",
|
|
234
|
+
isActive
|
|
235
|
+
? "border-[var(--demo-border-strong)] bg-[var(--demo-shell-strong-bg)] text-[var(--demo-fg)]"
|
|
236
|
+
: "border-[var(--demo-border)] bg-[var(--demo-panel-subtle-bg)] text-[var(--demo-muted-fg)]",
|
|
237
|
+
)}
|
|
238
|
+
>
|
|
239
|
+
{index + 1}
|
|
240
|
+
</span>
|
|
241
|
+
|
|
242
|
+
<div className="min-w-0 flex-1">
|
|
243
|
+
<div className="flex items-start justify-between gap-3">
|
|
244
|
+
<div className="min-w-0">
|
|
245
|
+
<div className="text-sm font-semibold text-[var(--demo-fg)]">
|
|
246
|
+
{item.title}
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
<div
|
|
250
|
+
className={cn(
|
|
251
|
+
"flex h-5 w-[4.5rem] shrink-0 items-center justify-end text-[9px] uppercase tracking-[0.14em]",
|
|
252
|
+
isActive
|
|
253
|
+
? "text-[var(--demo-muted-fg)]"
|
|
254
|
+
: "text-[var(--demo-subtle-fg)]",
|
|
255
|
+
)}
|
|
256
|
+
>
|
|
257
|
+
{isActive ? "Open" : "Queued"}
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
{item.description && (
|
|
261
|
+
<p className="mt-1.5 max-w-[22ch] text-xs leading-relaxed text-[var(--demo-muted-fg)]">
|
|
262
|
+
{item.description}
|
|
263
|
+
</p>
|
|
264
|
+
)}
|
|
265
|
+
{item.meta && (
|
|
266
|
+
<div className="mt-2.5 flex items-center gap-2 text-[11px] text-[var(--demo-muted-fg)]">
|
|
267
|
+
<span className="h-1 w-1 rounded-full bg-[var(--demo-border-strong)]" />
|
|
268
|
+
<span>{item.meta}</span>
|
|
269
|
+
</div>
|
|
270
|
+
)}
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
</button>
|
|
274
|
+
);
|
|
275
|
+
})}
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
{hasOverflow ? (
|
|
280
|
+
<div
|
|
281
|
+
ref={scrollbarTrackRef}
|
|
282
|
+
aria-hidden="true"
|
|
283
|
+
onPointerDown={handleScrollbarPointerDown}
|
|
284
|
+
onPointerMove={handleScrollbarPointerMove}
|
|
285
|
+
onPointerUp={handleScrollbarPointerUp}
|
|
286
|
+
onPointerCancel={handleScrollbarPointerUp}
|
|
287
|
+
className="absolute inset-y-3 right-1.5 w-[10px] cursor-pointer overflow-hidden rounded-full bg-[var(--demo-scroll-track)]"
|
|
288
|
+
>
|
|
289
|
+
<div
|
|
290
|
+
data-scrollbar-thumb="true"
|
|
291
|
+
className="absolute inset-x-1 rounded-full bg-[var(--demo-scroll-thumb)] shadow-[inset_0_1px_0_rgba(255,255,255,0.35)] dark:shadow-[inset_0_1px_0_rgba(255,255,255,0.08)] will-change-transform"
|
|
292
|
+
style={{
|
|
293
|
+
height: `${thumbHeight}px`,
|
|
294
|
+
transform: `translateY(${thumbOffset}px)`,
|
|
295
|
+
}}
|
|
296
|
+
/>
|
|
297
|
+
</div>
|
|
298
|
+
) : null}
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
);
|
|
302
|
+
}
|