version-pill-react 1.2.6 → 1.3.0

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/dist/index.mjs CHANGED
@@ -42,7 +42,11 @@ var COLUMN_LABELS = {
42
42
  backlog: "Backlog",
43
43
  todo: "Planned",
44
44
  "in-progress": "In Progress",
45
- done: "Shipped"
45
+ "in progress": "In Progress",
46
+ inProgress: "In Progress",
47
+ done: "Shipped",
48
+ shipped: "Shipped",
49
+ completed: "Shipped"
46
50
  };
47
51
  function useTheme(theme) {
48
52
  const [resolved, setResolved] = useState("light");
@@ -81,6 +85,13 @@ function VersionPill({
81
85
  const [isOpen, setIsOpen] = useState(false);
82
86
  const [activeTab, setActiveTab] = useState("changelog");
83
87
  const [hasNewVersion, setHasNewVersion] = useState(false);
88
+ const [showIdeaForm, setShowIdeaForm] = useState(false);
89
+ const [ideaTitle, setIdeaTitle] = useState("");
90
+ const [ideaDescription, setIdeaDescription] = useState("");
91
+ const [ideaAuthorName, setIdeaAuthorName] = useState("");
92
+ const [ideaAuthorEmail, setIdeaAuthorEmail] = useState("");
93
+ const [submittingIdea, setSubmittingIdea] = useState(false);
94
+ const [ideaSubmitMessage, setIdeaSubmitMessage] = useState(null);
84
95
  const resolvedTheme = useTheme(theme);
85
96
  const isLight = resolvedTheme === "light";
86
97
  const sizeConfig = SIZE_CONFIG[size];
@@ -126,7 +137,26 @@ function VersionPill({
126
137
  const response = await fetch(`${baseUrl}/api/roadmap/${projectId}`);
127
138
  if (!response.ok) return;
128
139
  const data = await response.json();
129
- setRoadmapTasks(data.tasks || []);
140
+ let tasks = [];
141
+ if (Array.isArray(data.tasks)) {
142
+ tasks = data.tasks;
143
+ } else if (data.tasks && typeof data.tasks === "object") {
144
+ const grouped = data.tasks;
145
+ const mapTask = (t, defaultColumn) => ({
146
+ id: t.id || t._id,
147
+ title: t.title,
148
+ description: t.description,
149
+ type: t.type || "feature",
150
+ priority: t.priority || "medium",
151
+ column: t.columnId || defaultColumn,
152
+ columnId: t.columnId,
153
+ columnName: t.columnName
154
+ });
155
+ const inProgress = (grouped.inProgress || []).map((t) => mapTask(t, "in-progress"));
156
+ const planned = (grouped.planned || []).map((t) => mapTask(t, "todo"));
157
+ tasks = [...inProgress, ...planned];
158
+ }
159
+ setRoadmapTasks(tasks);
130
160
  } catch {
131
161
  }
132
162
  }, [projectId, baseUrl]);
@@ -139,6 +169,36 @@ function VersionPill({
139
169
  } catch {
140
170
  }
141
171
  }, [projectId, baseUrl]);
172
+ const submitIdea = useCallback(async () => {
173
+ if (!ideaTitle.trim()) return;
174
+ setSubmittingIdea(true);
175
+ setIdeaSubmitMessage(null);
176
+ try {
177
+ const response = await fetch(`${baseUrl}/api/ideas/${projectId}`, {
178
+ method: "POST",
179
+ headers: { "Content-Type": "application/json" },
180
+ body: JSON.stringify({
181
+ title: ideaTitle.trim(),
182
+ description: ideaDescription.trim() || void 0,
183
+ authorName: ideaAuthorName.trim() || void 0,
184
+ authorEmail: ideaAuthorEmail.trim() || void 0
185
+ })
186
+ });
187
+ if (!response.ok) {
188
+ const error = await response.json().catch(() => ({ error: "Failed to submit" }));
189
+ throw new Error(error.error || "Failed to submit idea");
190
+ }
191
+ setIdeaSubmitMessage({ type: "success", text: "Thanks! Your idea has been submitted." });
192
+ setIdeaTitle("");
193
+ setIdeaDescription("");
194
+ setShowIdeaForm(false);
195
+ fetchIdeas();
196
+ } catch (err) {
197
+ setIdeaSubmitMessage({ type: "error", text: err.message || "Failed to submit idea" });
198
+ } finally {
199
+ setSubmittingIdea(false);
200
+ }
201
+ }, [baseUrl, projectId, ideaTitle, ideaDescription, ideaAuthorName, ideaAuthorEmail, fetchIdeas]);
142
202
  useEffect(() => {
143
203
  fetchVersion();
144
204
  }, [fetchVersion]);
@@ -268,7 +328,7 @@ function VersionPill({
268
328
  }, {});
269
329
  return /* @__PURE__ */ jsxs(Fragment, { children: [
270
330
  /* @__PURE__ */ jsx("div", { className: clsx(positionStyles[position], className), style: { display: "inline-flex" }, children: renderBadge() }),
271
- isOpen && /* @__PURE__ */ jsxs("div", { style: {
331
+ isOpen && /* @__PURE__ */ jsx("div", { style: {
272
332
  position: "fixed",
273
333
  top: 0,
274
334
  left: 0,
@@ -278,231 +338,391 @@ function VersionPill({
278
338
  height: "100vh",
279
339
  zIndex: 2147483647,
280
340
  display: "flex",
281
- alignItems: "center",
282
- justifyContent: "center",
283
- padding: 20,
284
- boxSizing: "border-box"
285
- }, children: [
286
- /* @__PURE__ */ jsx(
287
- "div",
288
- {
289
- onClick: () => setIsOpen(false),
290
- style: {
291
- position: "fixed",
292
- top: 0,
293
- left: 0,
294
- width: "100vw",
295
- height: "100vh",
296
- background: isLight ? "rgba(0,0,0,0.5)" : "rgba(0,0,0,0.7)",
297
- backdropFilter: "blur(4px)",
298
- WebkitBackdropFilter: "blur(4px)"
299
- }
300
- }
301
- ),
302
- /* @__PURE__ */ jsxs(
303
- "div",
304
- {
305
- style: {
306
- position: "relative",
307
- zIndex: 1,
308
- display: "flex",
309
- flexDirection: "column",
310
- width: "100%",
311
- maxWidth: 400,
312
- maxHeight: "min(480px, 70vh)",
313
- borderRadius: 12,
314
- boxShadow: isLight ? "0 20px 40px -10px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05)" : "0 20px 40px -10px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1)",
315
- background: isLight ? "#fff" : "#1a1a1a",
316
- overflow: "hidden"
317
- },
318
- children: [
319
- /* @__PURE__ */ jsxs(
320
- "div",
321
- {
322
- style: {
323
- flexShrink: 0,
324
- padding: "14px 16px",
325
- borderBottom: `1px solid ${isLight ? "#e5e5e5" : "#2a2a2a"}`,
326
- display: "flex",
327
- alignItems: "center",
328
- justifyContent: "space-between"
329
- },
330
- children: [
331
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
332
- project?.icon && /* @__PURE__ */ jsx("span", { style: { fontSize: 18 }, children: project.icon }),
333
- /* @__PURE__ */ jsxs("div", { children: [
334
- /* @__PURE__ */ jsx("h2", { style: { fontWeight: 600, fontSize: 15, color: isLight ? "#18181b" : "#fff", margin: 0 }, children: project?.name || "What's New" }),
335
- /* @__PURE__ */ jsxs("p", { style: { fontSize: 11, color: isLight ? "#71717a" : "#a1a1aa", margin: 0 }, children: [
336
- "v",
337
- currentVersion
338
- ] })
341
+ flexDirection: "column",
342
+ boxSizing: "border-box",
343
+ background: isLight ? "#fff" : "#0a0a0a"
344
+ }, children: /* @__PURE__ */ jsxs(
345
+ "div",
346
+ {
347
+ style: {
348
+ display: "flex",
349
+ flexDirection: "column",
350
+ width: "100%",
351
+ height: "100%",
352
+ borderRadius: 12,
353
+ overflow: "hidden"
354
+ },
355
+ children: [
356
+ /* @__PURE__ */ jsxs(
357
+ "div",
358
+ {
359
+ style: {
360
+ flexShrink: 0,
361
+ padding: "16px 20px",
362
+ borderBottom: `1px solid ${isLight ? "#e5e5e5" : "#1f1f1f"}`,
363
+ display: "flex",
364
+ alignItems: "center",
365
+ justifyContent: "space-between"
366
+ },
367
+ children: [
368
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
369
+ project?.icon && /* @__PURE__ */ jsx("span", { style: { fontSize: 24 }, children: project.icon }),
370
+ /* @__PURE__ */ jsxs("div", { children: [
371
+ /* @__PURE__ */ jsx("h2", { style: { fontWeight: 600, fontSize: 18, color: isLight ? "#18181b" : "#fff", margin: 0 }, children: project?.name || "What's New" }),
372
+ /* @__PURE__ */ jsxs("p", { style: { fontSize: 13, color: isLight ? "#71717a" : "#a1a1aa", margin: 0 }, children: [
373
+ "v",
374
+ currentVersion
339
375
  ] })
340
- ] }),
341
- /* @__PURE__ */ jsx(
342
- "button",
343
- {
344
- onClick: () => setIsOpen(false),
345
- style: {
346
- width: 28,
347
- height: 28,
348
- display: "flex",
349
- alignItems: "center",
350
- justifyContent: "center",
351
- borderRadius: 6,
352
- background: isLight ? "#f5f5f5" : "#2a2a2a",
353
- border: "none",
354
- cursor: "pointer",
355
- color: isLight ? "#71717a" : "#a1a1aa",
356
- transition: "background 150ms"
357
- },
358
- onMouseEnter: (e) => e.currentTarget.style.background = isLight ? "#e5e5e5" : "#3a3a3a",
359
- onMouseLeave: (e) => e.currentTarget.style.background = isLight ? "#f5f5f5" : "#2a2a2a",
360
- children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
361
- }
362
- )
363
- ]
364
- }
365
- ),
366
- /* @__PURE__ */ jsx(
367
- "div",
368
- {
369
- style: {
370
- flexShrink: 0,
371
- display: "flex",
372
- gap: 2,
373
- padding: "8px 12px",
374
- borderBottom: `1px solid ${isLight ? "#e5e5e5" : "#2a2a2a"}`,
375
- background: isLight ? "#fafafa" : "#151515"
376
- },
377
- children: ["changelog", "roadmap", "ideas"].map((tab) => /* @__PURE__ */ jsxs(
376
+ ] })
377
+ ] }),
378
+ /* @__PURE__ */ jsx(
378
379
  "button",
379
380
  {
380
- onClick: () => setActiveTab(tab),
381
+ onClick: () => setIsOpen(false),
381
382
  style: {
382
- padding: "6px 10px",
383
- borderRadius: 6,
383
+ width: 36,
384
+ height: 36,
385
+ display: "flex",
386
+ alignItems: "center",
387
+ justifyContent: "center",
388
+ borderRadius: 8,
389
+ background: isLight ? "#f5f5f5" : "#1f1f1f",
384
390
  border: "none",
385
391
  cursor: "pointer",
386
- fontSize: 12,
387
- fontWeight: 500,
388
- background: activeTab === tab ? isLight ? "#fff" : "#2a2a2a" : "transparent",
389
- color: activeTab === tab ? isLight ? "#18181b" : "#fff" : isLight ? "#71717a" : "#71717a",
390
- boxShadow: activeTab === tab ? isLight ? "0 1px 2px rgba(0,0,0,0.05)" : "0 1px 2px rgba(0,0,0,0.2)" : "none",
391
- transition: "all 150ms"
392
+ color: isLight ? "#71717a" : "#a1a1aa",
393
+ transition: "background 150ms"
392
394
  },
393
- children: [
394
- tab === "changelog" && "Changelog",
395
- tab === "roadmap" && "Roadmap",
396
- tab === "ideas" && "Ideas"
397
- ]
395
+ onMouseEnter: (e) => e.currentTarget.style.background = isLight ? "#e5e5e5" : "#2a2a2a",
396
+ onMouseLeave: (e) => e.currentTarget.style.background = isLight ? "#f5f5f5" : "#1f1f1f",
397
+ children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
398
+ }
399
+ )
400
+ ]
401
+ }
402
+ ),
403
+ /* @__PURE__ */ jsx(
404
+ "div",
405
+ {
406
+ style: {
407
+ flexShrink: 0,
408
+ display: "flex",
409
+ gap: 4,
410
+ padding: "12px 20px",
411
+ borderBottom: `1px solid ${isLight ? "#e5e5e5" : "#1f1f1f"}`
412
+ },
413
+ children: ["changelog", "roadmap", "ideas"].map((tab) => /* @__PURE__ */ jsxs(
414
+ "button",
415
+ {
416
+ onClick: () => setActiveTab(tab),
417
+ style: {
418
+ padding: "10px 16px",
419
+ borderRadius: 8,
420
+ border: "none",
421
+ cursor: "pointer",
422
+ fontSize: 14,
423
+ fontWeight: 500,
424
+ background: activeTab === tab ? isLight ? "#18181b" : "#fff" : "transparent",
425
+ color: activeTab === tab ? isLight ? "#fff" : "#18181b" : isLight ? "#71717a" : "#71717a",
426
+ transition: "all 150ms"
398
427
  },
399
- tab
400
- ))
401
- }
402
- ),
403
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, overflowY: "auto", padding: 12, minHeight: 0 }, children: [
404
- activeTab === "changelog" && /* @__PURE__ */ jsx("div", { children: versionsArray.length === 0 ? /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", padding: 30, color: isLight ? "#71717a" : "#a1a1aa" }, children: [
405
- /* @__PURE__ */ jsx("div", { style: { fontSize: 24, marginBottom: 6 }, children: "\u{1F680}" }),
406
- /* @__PURE__ */ jsx("div", { style: { fontSize: 13 }, children: "No releases yet" })
407
- ] }) : versionsArray.slice(0, 5).map((version, idx) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: 12, paddingBottom: 12, borderBottom: idx < versionsArray.length - 1 && idx < 4 ? `1px solid ${isLight ? "#f0f0f0" : "#252525"}` : "none" }, children: [
408
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 3 }, children: [
409
- /* @__PURE__ */ jsx("span", { style: { fontSize: 14 }, children: version.emoji || "\u{1F4E6}" }),
410
- /* @__PURE__ */ jsx("span", { style: { fontWeight: 600, fontSize: 13, color: isLight ? "#18181b" : "#fff" }, children: version.title }),
411
- /* @__PURE__ */ jsx(
412
- "span",
413
- {
414
- style: {
415
- padding: "1px 5px",
416
- fontSize: 9,
417
- fontWeight: 500,
418
- borderRadius: 3,
419
- background: version.type === "major" ? "#f3e8ff" : version.type === "minor" ? "#dbeafe" : isLight ? "#f4f4f5" : "#2a2a2a",
420
- color: version.type === "major" ? "#7c3aed" : version.type === "minor" ? "#2563eb" : isLight ? "#52525b" : "#a1a1aa"
421
- },
422
- children: version.type
423
- }
424
- )
425
- ] }),
426
- /* @__PURE__ */ jsxs("div", { style: { fontSize: 11, color: isLight ? "#71717a" : "#71717a", marginBottom: 6 }, children: [
427
- "v",
428
- version.version,
429
- " \xB7 ",
430
- new Date(version.date).toLocaleDateString()
431
- ] }),
432
- version.description && /* @__PURE__ */ jsx("p", { style: { fontSize: 12, color: isLight ? "#52525b" : "#a1a1aa", margin: "0 0 6px 0", lineHeight: 1.5 }, children: version.description }),
433
- version.features && version.features.length > 0 && /* @__PURE__ */ jsxs("ul", { style: { margin: 0, paddingLeft: 0, listStyle: "none" }, children: [
434
- version.features.slice(0, 4).map((feature, i) => /* @__PURE__ */ jsxs("li", { style: { display: "flex", alignItems: "flex-start", gap: 6, fontSize: 12, color: isLight ? "#52525b" : "#a1a1aa", marginBottom: 2, lineHeight: 1.4 }, children: [
435
- /* @__PURE__ */ jsx("span", { style: { color: "#22c55e", fontSize: 11 }, children: "\u2713" }),
436
- feature
437
- ] }, i)),
438
- version.features.length > 4 && /* @__PURE__ */ jsxs("li", { style: { fontSize: 11, color: isLight ? "#a1a1aa" : "#525252", marginTop: 2 }, children: [
439
- "+",
440
- version.features.length - 4,
441
- " more..."
442
- ] })
443
- ] })
444
- ] }, idx)) }),
445
- activeTab === "roadmap" && /* @__PURE__ */ jsx("div", { children: Object.keys(groupedTasks).length === 0 ? /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", padding: 30, color: isLight ? "#71717a" : "#a1a1aa" }, children: [
446
- /* @__PURE__ */ jsx("div", { style: { fontSize: 24, marginBottom: 6 }, children: "\u{1F5FA}\uFE0F" }),
447
- /* @__PURE__ */ jsx("div", { style: { fontSize: 13 }, children: "No public roadmap items" })
448
- ] }) : ["in-progress", "todo", "backlog"].map((col) => {
428
+ children: [
429
+ tab === "changelog" && "\u{1F680} Changelog",
430
+ tab === "roadmap" && "\u{1F5FA}\uFE0F Roadmap",
431
+ tab === "ideas" && "\u{1F4A1} Ideas"
432
+ ]
433
+ },
434
+ tab
435
+ ))
436
+ }
437
+ ),
438
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, overflowY: "auto", padding: "20px 24px", minHeight: 0 }, children: [
439
+ activeTab === "changelog" && /* @__PURE__ */ jsx("div", { style: { maxWidth: 640 }, children: versionsArray.length === 0 ? /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", padding: 60, color: isLight ? "#71717a" : "#a1a1aa" }, children: [
440
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 48, marginBottom: 12 }, children: "\u{1F680}" }),
441
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 16 }, children: "No releases yet" })
442
+ ] }) : versionsArray.slice(0, 10).map((version, idx) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: 24, paddingBottom: 24, borderBottom: idx < versionsArray.length - 1 && idx < 9 ? `1px solid ${isLight ? "#f0f0f0" : "#1f1f1f"}` : "none" }, children: [
443
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 6 }, children: [
444
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 20 }, children: version.emoji || "\u{1F4E6}" }),
445
+ /* @__PURE__ */ jsx("span", { style: { fontWeight: 600, fontSize: 18, color: isLight ? "#18181b" : "#fff" }, children: version.title }),
446
+ /* @__PURE__ */ jsx(
447
+ "span",
448
+ {
449
+ style: {
450
+ padding: "3px 8px",
451
+ fontSize: 11,
452
+ fontWeight: 500,
453
+ borderRadius: 4,
454
+ background: version.type === "major" ? "#f3e8ff" : version.type === "minor" ? "#dbeafe" : isLight ? "#f4f4f5" : "#1f1f1f",
455
+ color: version.type === "major" ? "#7c3aed" : version.type === "minor" ? "#2563eb" : isLight ? "#52525b" : "#a1a1aa"
456
+ },
457
+ children: version.type
458
+ }
459
+ )
460
+ ] }),
461
+ /* @__PURE__ */ jsxs("div", { style: { fontSize: 13, color: isLight ? "#71717a" : "#71717a", marginBottom: 10 }, children: [
462
+ "v",
463
+ version.version,
464
+ " \xB7 ",
465
+ new Date(version.date).toLocaleDateString()
466
+ ] }),
467
+ version.description && /* @__PURE__ */ jsx("p", { style: { fontSize: 15, color: isLight ? "#52525b" : "#a1a1aa", margin: "0 0 12px 0", lineHeight: 1.6 }, children: version.description }),
468
+ version.features && version.features.length > 0 && /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 0, listStyle: "none" }, children: version.features.map((feature, i) => /* @__PURE__ */ jsxs("li", { style: { display: "flex", alignItems: "flex-start", gap: 10, fontSize: 14, color: isLight ? "#52525b" : "#a1a1aa", marginBottom: 6, lineHeight: 1.5 }, children: [
469
+ /* @__PURE__ */ jsx("span", { style: { color: "#22c55e", fontSize: 14, marginTop: 2 }, children: "\u2713" }),
470
+ feature
471
+ ] }, i)) })
472
+ ] }, idx)) }),
473
+ activeTab === "roadmap" && /* @__PURE__ */ jsx("div", { style: { maxWidth: 640 }, children: Object.keys(groupedTasks).length === 0 || tasksArray.length === 0 ? /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", padding: 60, color: isLight ? "#71717a" : "#a1a1aa" }, children: [
474
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 48, marginBottom: 12 }, children: "\u{1F5FA}\uFE0F" }),
475
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 16 }, children: "No public roadmap items" })
476
+ ] }) : (
477
+ // Show all columns that have tasks, prioritizing known columns first
478
+ [.../* @__PURE__ */ new Set([
479
+ ...["in-progress", "todo", "backlog"].filter((c) => groupedTasks[c]?.length > 0),
480
+ ...Object.keys(groupedTasks).filter((c) => !["in-progress", "todo", "backlog", "done"].includes(c))
481
+ ])].map((col) => {
449
482
  const tasks = groupedTasks[col];
450
483
  if (!tasks || tasks.length === 0) return null;
451
- return /* @__PURE__ */ jsxs("div", { style: { marginBottom: 12 }, children: [
452
- /* @__PURE__ */ jsxs("h3", { style: { fontSize: 10, fontWeight: 600, color: isLight ? "#a1a1aa" : "#71717a", marginBottom: 6, textTransform: "uppercase", letterSpacing: "0.5px" }, children: [
453
- COLUMN_LABELS[col] || col,
484
+ const columnLabel = tasks[0]?.columnName || COLUMN_LABELS[col] || col;
485
+ return /* @__PURE__ */ jsxs("div", { style: { marginBottom: 24 }, children: [
486
+ /* @__PURE__ */ jsxs("h3", { style: { fontSize: 12, fontWeight: 600, color: isLight ? "#a1a1aa" : "#71717a", marginBottom: 12, textTransform: "uppercase", letterSpacing: "0.5px" }, children: [
487
+ columnLabel,
454
488
  " (",
455
489
  tasks.length,
456
490
  ")"
457
491
  ] }),
458
- tasks.slice(0, 4).map((task) => /* @__PURE__ */ jsx(
492
+ tasks.map((task) => /* @__PURE__ */ jsx(
459
493
  "div",
460
494
  {
461
495
  style: {
462
- padding: "8px 10px",
463
- marginBottom: 4,
464
- borderRadius: 5,
465
- background: isLight ? "#f5f5f5" : "#252525"
496
+ padding: "12px 16px",
497
+ marginBottom: 8,
498
+ borderRadius: 8,
499
+ background: isLight ? "#f5f5f5" : "#151515",
500
+ border: `1px solid ${isLight ? "#e5e5e5" : "#1f1f1f"}`
466
501
  },
467
- children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
502
+ children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: 10 }, children: [
468
503
  /* @__PURE__ */ jsx(
469
504
  "span",
470
505
  {
471
506
  style: {
472
- width: 6,
473
- height: 6,
507
+ width: 8,
508
+ height: 8,
474
509
  borderRadius: "50%",
475
510
  background: TYPE_COLORS[task.type] || "#71717a",
476
- flexShrink: 0
511
+ flexShrink: 0,
512
+ marginTop: 5
477
513
  }
478
514
  }
479
515
  ),
480
- /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: isLight ? "#18181b" : "#fff", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: task.title })
516
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
517
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 14, color: isLight ? "#18181b" : "#fff" }, children: task.title }),
518
+ task.description && /* @__PURE__ */ jsx("p", { style: { fontSize: 13, color: isLight ? "#71717a" : "#a1a1aa", margin: "4px 0 0 0", lineHeight: 1.5 }, children: task.description })
519
+ ] })
481
520
  ] })
482
521
  },
483
522
  task.id
484
- )),
485
- tasks.length > 4 && /* @__PURE__ */ jsxs("div", { style: { fontSize: 10, color: isLight ? "#a1a1aa" : "#525252", marginTop: 4 }, children: [
486
- "+",
487
- tasks.length - 4,
488
- " more..."
489
- ] })
523
+ ))
490
524
  ] }, col);
491
- }) }),
492
- activeTab === "ideas" && /* @__PURE__ */ jsx("div", { children: ideasArray.length === 0 ? /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", padding: 30, color: isLight ? "#71717a" : "#a1a1aa" }, children: [
493
- /* @__PURE__ */ jsx("div", { style: { fontSize: 24, marginBottom: 6 }, children: "\u{1F4A1}" }),
494
- /* @__PURE__ */ jsx("div", { style: { fontSize: 13 }, children: "No feature requests yet" })
495
- ] }) : ideasArray.slice(0, 5).map((idea) => /* @__PURE__ */ jsxs(
525
+ })
526
+ ) }),
527
+ activeTab === "ideas" && /* @__PURE__ */ jsxs("div", { style: { maxWidth: 640 }, children: [
528
+ !showIdeaForm ? /* @__PURE__ */ jsxs(
529
+ "button",
530
+ {
531
+ onClick: () => setShowIdeaForm(true),
532
+ style: {
533
+ display: "flex",
534
+ alignItems: "center",
535
+ justifyContent: "center",
536
+ gap: 8,
537
+ width: "100%",
538
+ padding: "12px 16px",
539
+ marginBottom: 20,
540
+ borderRadius: 8,
541
+ border: `1px dashed ${isLight ? "#d4d4d8" : "#3f3f46"}`,
542
+ background: "transparent",
543
+ color: isLight ? "#71717a" : "#a1a1aa",
544
+ fontSize: 14,
545
+ fontWeight: 500,
546
+ cursor: "pointer",
547
+ transition: "all 150ms"
548
+ },
549
+ onMouseEnter: (e) => {
550
+ e.currentTarget.style.borderColor = isLight ? "#a1a1aa" : "#71717a";
551
+ e.currentTarget.style.color = isLight ? "#52525b" : "#d4d4d8";
552
+ },
553
+ onMouseLeave: (e) => {
554
+ e.currentTarget.style.borderColor = isLight ? "#d4d4d8" : "#3f3f46";
555
+ e.currentTarget.style.color = isLight ? "#71717a" : "#a1a1aa";
556
+ },
557
+ children: [
558
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 18 }, children: "\u{1F4A1}" }),
559
+ "Suggest a feature"
560
+ ]
561
+ }
562
+ ) : /* @__PURE__ */ jsxs(
563
+ "div",
564
+ {
565
+ style: {
566
+ padding: 16,
567
+ marginBottom: 20,
568
+ borderRadius: 8,
569
+ background: isLight ? "#f5f5f5" : "#151515",
570
+ border: `1px solid ${isLight ? "#e5e5e5" : "#1f1f1f"}`
571
+ },
572
+ children: [
573
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 12 }, children: [
574
+ /* @__PURE__ */ jsx("span", { style: { fontWeight: 600, color: isLight ? "#18181b" : "#fff" }, children: "Suggest a Feature" }),
575
+ /* @__PURE__ */ jsx(
576
+ "button",
577
+ {
578
+ onClick: () => {
579
+ setShowIdeaForm(false);
580
+ setIdeaSubmitMessage(null);
581
+ },
582
+ style: {
583
+ background: "transparent",
584
+ border: "none",
585
+ color: isLight ? "#71717a" : "#a1a1aa",
586
+ cursor: "pointer",
587
+ fontSize: 18
588
+ },
589
+ children: "\xD7"
590
+ }
591
+ )
592
+ ] }),
593
+ /* @__PURE__ */ jsx(
594
+ "input",
595
+ {
596
+ type: "text",
597
+ value: ideaTitle,
598
+ onChange: (e) => setIdeaTitle(e.target.value),
599
+ placeholder: "Feature title *",
600
+ style: {
601
+ width: "100%",
602
+ padding: "10px 12px",
603
+ marginBottom: 8,
604
+ borderRadius: 6,
605
+ border: `1px solid ${isLight ? "#e5e5e5" : "#2a2a2a"}`,
606
+ background: isLight ? "#fff" : "#0a0a0a",
607
+ color: isLight ? "#18181b" : "#fff",
608
+ fontSize: 14,
609
+ outline: "none",
610
+ boxSizing: "border-box"
611
+ }
612
+ }
613
+ ),
614
+ /* @__PURE__ */ jsx(
615
+ "textarea",
616
+ {
617
+ value: ideaDescription,
618
+ onChange: (e) => setIdeaDescription(e.target.value),
619
+ placeholder: "Describe your idea...",
620
+ rows: 3,
621
+ style: {
622
+ width: "100%",
623
+ padding: "10px 12px",
624
+ marginBottom: 8,
625
+ borderRadius: 6,
626
+ border: `1px solid ${isLight ? "#e5e5e5" : "#2a2a2a"}`,
627
+ background: isLight ? "#fff" : "#0a0a0a",
628
+ color: isLight ? "#18181b" : "#fff",
629
+ fontSize: 14,
630
+ outline: "none",
631
+ resize: "none",
632
+ boxSizing: "border-box"
633
+ }
634
+ }
635
+ ),
636
+ /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 12 }, children: [
637
+ /* @__PURE__ */ jsx(
638
+ "input",
639
+ {
640
+ type: "text",
641
+ value: ideaAuthorName,
642
+ onChange: (e) => setIdeaAuthorName(e.target.value),
643
+ placeholder: "Name (optional)",
644
+ style: {
645
+ width: "100%",
646
+ padding: "8px 12px",
647
+ borderRadius: 6,
648
+ border: `1px solid ${isLight ? "#e5e5e5" : "#2a2a2a"}`,
649
+ background: isLight ? "#fff" : "#0a0a0a",
650
+ color: isLight ? "#18181b" : "#fff",
651
+ fontSize: 13,
652
+ outline: "none",
653
+ boxSizing: "border-box"
654
+ }
655
+ }
656
+ ),
657
+ /* @__PURE__ */ jsx(
658
+ "input",
659
+ {
660
+ type: "email",
661
+ value: ideaAuthorEmail,
662
+ onChange: (e) => setIdeaAuthorEmail(e.target.value),
663
+ placeholder: "Email (optional)",
664
+ style: {
665
+ width: "100%",
666
+ padding: "8px 12px",
667
+ borderRadius: 6,
668
+ border: `1px solid ${isLight ? "#e5e5e5" : "#2a2a2a"}`,
669
+ background: isLight ? "#fff" : "#0a0a0a",
670
+ color: isLight ? "#18181b" : "#fff",
671
+ fontSize: 13,
672
+ outline: "none",
673
+ boxSizing: "border-box"
674
+ }
675
+ }
676
+ )
677
+ ] }),
678
+ ideaSubmitMessage && /* @__PURE__ */ jsx("div", { style: {
679
+ padding: "8px 12px",
680
+ marginBottom: 12,
681
+ borderRadius: 6,
682
+ background: ideaSubmitMessage.type === "success" ? isLight ? "#dcfce7" : "#14532d" : isLight ? "#fee2e2" : "#450a0a",
683
+ color: ideaSubmitMessage.type === "success" ? isLight ? "#166534" : "#86efac" : isLight ? "#dc2626" : "#fca5a5",
684
+ fontSize: 13
685
+ }, children: ideaSubmitMessage.text }),
686
+ /* @__PURE__ */ jsx(
687
+ "button",
688
+ {
689
+ onClick: submitIdea,
690
+ disabled: submittingIdea || !ideaTitle.trim(),
691
+ style: {
692
+ width: "100%",
693
+ padding: "10px 16px",
694
+ borderRadius: 6,
695
+ border: "none",
696
+ background: "#22c55e",
697
+ color: "#fff",
698
+ fontSize: 14,
699
+ fontWeight: 500,
700
+ cursor: submittingIdea || !ideaTitle.trim() ? "not-allowed" : "pointer",
701
+ opacity: submittingIdea || !ideaTitle.trim() ? 0.6 : 1,
702
+ transition: "opacity 150ms"
703
+ },
704
+ children: submittingIdea ? "Submitting..." : "Submit Idea"
705
+ }
706
+ )
707
+ ]
708
+ }
709
+ ),
710
+ ideasArray.length === 0 && !showIdeaForm ? /* @__PURE__ */ jsxs("div", { style: { textAlign: "center", padding: 60, color: isLight ? "#71717a" : "#a1a1aa" }, children: [
711
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 48, marginBottom: 12 }, children: "\u{1F4A1}" }),
712
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 16 }, children: "No feature requests yet" }),
713
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 14, marginTop: 8 }, children: "Be the first to suggest one!" })
714
+ ] }) : ideasArray.map((idea) => /* @__PURE__ */ jsxs(
496
715
  "div",
497
716
  {
498
717
  style: {
499
- padding: 10,
500
- marginBottom: 6,
501
- borderRadius: 6,
502
- background: isLight ? "#f5f5f5" : "#252525",
718
+ padding: 16,
719
+ marginBottom: 12,
720
+ borderRadius: 8,
721
+ background: isLight ? "#f5f5f5" : "#151515",
722
+ border: `1px solid ${isLight ? "#e5e5e5" : "#1f1f1f"}`,
503
723
  display: "flex",
504
724
  alignItems: "flex-start",
505
- gap: 10
725
+ gap: 16
506
726
  },
507
727
  children: [
508
728
  /* @__PURE__ */ jsxs(
@@ -512,77 +732,80 @@ function VersionPill({
512
732
  display: "flex",
513
733
  flexDirection: "column",
514
734
  alignItems: "center",
515
- padding: "3px 6px",
516
- borderRadius: 4,
517
- background: isLight ? "#fff" : "#1a1a1a",
518
- minWidth: 32
735
+ padding: "8px 12px",
736
+ borderRadius: 6,
737
+ background: isLight ? "#fff" : "#0a0a0a",
738
+ minWidth: 50
519
739
  },
520
740
  children: [
521
- /* @__PURE__ */ jsx("span", { style: { fontSize: 12, fontWeight: 600, color: isLight ? "#18181b" : "#fff" }, children: idea.votes }),
522
- /* @__PURE__ */ jsx("span", { style: { fontSize: 9, color: isLight ? "#71717a" : "#71717a" }, children: "votes" })
741
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 18, fontWeight: 600, color: isLight ? "#18181b" : "#fff" }, children: idea.votes }),
742
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: isLight ? "#71717a" : "#71717a" }, children: "votes" })
523
743
  ]
524
744
  }
525
745
  ),
526
746
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
527
- /* @__PURE__ */ jsx("div", { style: { fontSize: 12, fontWeight: 500, color: isLight ? "#18181b" : "#fff", marginBottom: 2 }, children: idea.title }),
528
- idea.description && /* @__PURE__ */ jsx("div", { style: { fontSize: 11, color: isLight ? "#71717a" : "#71717a", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: idea.description.slice(0, 80) })
747
+ /* @__PURE__ */ jsx("div", { style: { fontSize: 16, fontWeight: 500, color: isLight ? "#18181b" : "#fff", marginBottom: 4 }, children: idea.title }),
748
+ idea.description && /* @__PURE__ */ jsx("div", { style: { fontSize: 14, color: isLight ? "#71717a" : "#71717a", lineHeight: 1.5 }, children: idea.description })
529
749
  ] })
530
750
  ]
531
751
  },
532
752
  idea.id
533
- )) })
534
- ] }),
535
- /* @__PURE__ */ jsxs(
536
- "div",
537
- {
538
- style: {
539
- flexShrink: 0,
540
- padding: "10px 12px",
541
- borderTop: `1px solid ${isLight ? "#e5e5e5" : "#2a2a2a"}`,
542
- background: isLight ? "#fafafa" : "#151515",
543
- display: "flex",
544
- alignItems: "center",
545
- justifyContent: "space-between"
546
- },
547
- children: [
548
- showBranding && /* @__PURE__ */ jsx(
549
- "a",
550
- {
551
- href: "https://versionpill.com",
552
- target: "_blank",
553
- rel: "noopener noreferrer",
554
- style: { fontSize: 10, color: isLight ? "#a1a1aa" : "#525252", textDecoration: "none" },
555
- children: "Powered by Version Pill"
556
- }
557
- ),
558
- /* @__PURE__ */ jsx(
559
- "a",
560
- {
561
- href: `${baseUrl}/${projectId}/${activeTab === "ideas" ? "feature-requests" : activeTab}`,
562
- target: "_blank",
563
- rel: "noopener noreferrer",
564
- style: {
565
- padding: "5px 10px",
566
- fontSize: 11,
567
- fontWeight: 500,
568
- borderRadius: 5,
569
- background: "#22c55e",
570
- color: "#fff",
571
- textDecoration: "none",
572
- transition: "background 150ms"
573
- },
574
- onMouseEnter: (e) => e.currentTarget.style.background = "#16a34a",
575
- onMouseLeave: (e) => e.currentTarget.style.background = "#22c55e",
576
- children: "View All \u2192"
577
- }
578
- )
579
- ]
580
- }
581
- )
582
- ]
583
- }
584
- )
585
- ] })
753
+ ))
754
+ ] })
755
+ ] }),
756
+ /* @__PURE__ */ jsxs(
757
+ "div",
758
+ {
759
+ style: {
760
+ flexShrink: 0,
761
+ padding: "16px 24px",
762
+ borderTop: `1px solid ${isLight ? "#e5e5e5" : "#1f1f1f"}`,
763
+ display: "flex",
764
+ alignItems: "center",
765
+ justifyContent: "space-between"
766
+ },
767
+ children: [
768
+ showBranding && /* @__PURE__ */ jsx(
769
+ "a",
770
+ {
771
+ href: "https://versionpill.com",
772
+ target: "_blank",
773
+ rel: "noopener noreferrer",
774
+ style: { fontSize: 12, color: isLight ? "#a1a1aa" : "#525252", textDecoration: "none" },
775
+ children: "Powered by Version Pill"
776
+ }
777
+ ),
778
+ /* @__PURE__ */ jsxs(
779
+ "a",
780
+ {
781
+ href: `${baseUrl}/${projectId}/${activeTab === "ideas" ? "feature-requests" : activeTab}`,
782
+ target: "_blank",
783
+ rel: "noopener noreferrer",
784
+ style: {
785
+ padding: "10px 20px",
786
+ fontSize: 14,
787
+ fontWeight: 500,
788
+ borderRadius: 8,
789
+ background: "#22c55e",
790
+ color: "#fff",
791
+ textDecoration: "none",
792
+ transition: "background 150ms"
793
+ },
794
+ onMouseEnter: (e) => e.currentTarget.style.background = "#16a34a",
795
+ onMouseLeave: (e) => e.currentTarget.style.background = "#22c55e",
796
+ children: [
797
+ "View Full ",
798
+ activeTab === "changelog" ? "Changelog" : activeTab === "roadmap" ? "Roadmap" : "Ideas",
799
+ " \u2192"
800
+ ]
801
+ }
802
+ )
803
+ ]
804
+ }
805
+ )
806
+ ]
807
+ }
808
+ ) })
586
809
  ] });
587
810
  }
588
811
  function VersionBadge({