@pos-360/horizon 0.2.0 → 0.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.
@@ -363,16 +363,105 @@ var Input = React.forwardRef(
363
363
  }
364
364
  );
365
365
  Input.displayName = "Input";
366
+ var accentColors = {
367
+ blue: {
368
+ selected: "bg-blue-100/80 dark:bg-blue-900/30",
369
+ selectedBorder: "border-blue-500 dark:border-blue-400",
370
+ selectedGlow: "shadow-lg shadow-blue-500/20 dark:shadow-blue-400/20",
371
+ hoverBg: "group-hover:bg-blue-50/60 dark:group-hover:bg-blue-900/20",
372
+ hoverBgDark: "hover:bg-blue-50 dark:hover:bg-blue-900/30",
373
+ iconSelected: "text-blue-600 dark:text-blue-400",
374
+ iconHover: "group-hover:text-blue-500 dark:group-hover:text-blue-400",
375
+ checkBg: "bg-blue-500 border-blue-500 dark:bg-blue-400 dark:border-blue-400",
376
+ inputBorder: "border-blue-500 dark:border-blue-400",
377
+ inputRing: "focus:ring-blue-500/20",
378
+ textHover: "hover:text-blue-600 dark:hover:text-blue-400",
379
+ toggleActive: "text-blue-600 dark:text-blue-400"
380
+ },
381
+ violet: {
382
+ selected: "bg-violet-100/80 dark:bg-violet-900/30",
383
+ selectedBorder: "border-violet-500 dark:border-violet-400",
384
+ selectedGlow: "shadow-lg shadow-violet-500/20 dark:shadow-violet-400/20",
385
+ hoverBg: "group-hover:bg-violet-50/60 dark:group-hover:bg-violet-900/20",
386
+ hoverBgDark: "hover:bg-violet-50 dark:hover:bg-violet-900/30",
387
+ iconSelected: "text-violet-600 dark:text-violet-400",
388
+ iconHover: "group-hover:text-violet-500 dark:group-hover:text-violet-400",
389
+ checkBg: "bg-violet-500 border-violet-500 dark:bg-violet-400 dark:border-violet-400",
390
+ inputBorder: "border-violet-500 dark:border-violet-400",
391
+ inputRing: "focus:ring-violet-500/20",
392
+ textHover: "hover:text-violet-600 dark:hover:text-violet-400",
393
+ toggleActive: "text-violet-600 dark:text-violet-400"
394
+ },
395
+ emerald: {
396
+ selected: "bg-emerald-100/80 dark:bg-emerald-900/30",
397
+ selectedBorder: "border-emerald-500 dark:border-emerald-400",
398
+ selectedGlow: "shadow-lg shadow-emerald-500/20 dark:shadow-emerald-400/20",
399
+ hoverBg: "group-hover:bg-emerald-50/60 dark:group-hover:bg-emerald-900/20",
400
+ hoverBgDark: "hover:bg-emerald-50 dark:hover:bg-emerald-900/30",
401
+ iconSelected: "text-emerald-600 dark:text-emerald-400",
402
+ iconHover: "group-hover:text-emerald-500 dark:group-hover:text-emerald-400",
403
+ checkBg: "bg-emerald-500 border-emerald-500 dark:bg-emerald-400 dark:border-emerald-400",
404
+ inputBorder: "border-emerald-500 dark:border-emerald-400",
405
+ inputRing: "focus:ring-emerald-500/20",
406
+ textHover: "hover:text-emerald-600 dark:hover:text-emerald-400",
407
+ toggleActive: "text-emerald-600 dark:text-emerald-400"
408
+ },
409
+ rose: {
410
+ selected: "bg-rose-100/80 dark:bg-rose-900/30",
411
+ selectedBorder: "border-rose-500 dark:border-rose-400",
412
+ selectedGlow: "shadow-lg shadow-rose-500/20 dark:shadow-rose-400/20",
413
+ hoverBg: "group-hover:bg-rose-50/60 dark:group-hover:bg-rose-900/20",
414
+ hoverBgDark: "hover:bg-rose-50 dark:hover:bg-rose-900/30",
415
+ iconSelected: "text-rose-600 dark:text-rose-400",
416
+ iconHover: "group-hover:text-rose-500 dark:group-hover:text-rose-400",
417
+ checkBg: "bg-rose-500 border-rose-500 dark:bg-rose-400 dark:border-rose-400",
418
+ inputBorder: "border-rose-500 dark:border-rose-400",
419
+ inputRing: "focus:ring-rose-500/20",
420
+ textHover: "hover:text-rose-600 dark:hover:text-rose-400",
421
+ toggleActive: "text-rose-600 dark:text-rose-400"
422
+ },
423
+ amber: {
424
+ selected: "bg-amber-100/80 dark:bg-amber-900/30",
425
+ selectedBorder: "border-amber-500 dark:border-amber-400",
426
+ selectedGlow: "shadow-lg shadow-amber-500/20 dark:shadow-amber-400/20",
427
+ hoverBg: "group-hover:bg-amber-50/60 dark:group-hover:bg-amber-900/20",
428
+ hoverBgDark: "hover:bg-amber-50 dark:hover:bg-amber-900/30",
429
+ iconSelected: "text-amber-600 dark:text-amber-400",
430
+ iconHover: "group-hover:text-amber-500 dark:group-hover:text-amber-400",
431
+ checkBg: "bg-amber-500 border-amber-500 dark:bg-amber-400 dark:border-amber-400",
432
+ inputBorder: "border-amber-500 dark:border-amber-400",
433
+ inputRing: "focus:ring-amber-500/20",
434
+ textHover: "hover:text-amber-600 dark:hover:text-amber-400",
435
+ toggleActive: "text-amber-600 dark:text-amber-400"
436
+ }
437
+ };
438
+ var defaultIconMap = {
439
+ nebula: lucideReact.Sparkles,
440
+ andromeda: lucideReact.Orbit,
441
+ cosmos: lucideReact.Globe,
442
+ stellar: lucideReact.Star,
443
+ voyager: lucideReact.Rocket,
444
+ eclipse: lucideReact.Moon
445
+ };
446
+ var getTemplateIcon = (template) => {
447
+ if (template.icon) return template.icon;
448
+ const key = template.title.toLowerCase();
449
+ return defaultIconMap[key] || lucideReact.Star;
450
+ };
366
451
  var TemplateSelector = ({
367
452
  templates,
368
453
  value,
369
454
  onChange,
455
+ onNameChange,
370
456
  defaultView = "card",
371
457
  showViewToggle = true,
458
+ editable = false,
372
459
  className,
373
460
  cardClassName,
374
- columns = 3
461
+ columns = 3,
462
+ accentColor = "blue"
375
463
  }) => {
464
+ const colors = accentColors[accentColor];
376
465
  const [view, setView] = React.useState(defaultView);
377
466
  const [selectedId, setSelectedId] = React.useState(value);
378
467
  React__namespace.useEffect(() => {
@@ -386,24 +475,27 @@ var TemplateSelector = ({
386
475
  e.stopPropagation();
387
476
  window.open(previewUrl, "_blank", "noopener,noreferrer");
388
477
  };
478
+ const handleNameChange = (templateId, newName) => {
479
+ onNameChange?.(templateId, newName);
480
+ };
389
481
  const columnClasses = {
390
482
  2: "grid-cols-1 sm:grid-cols-2",
391
483
  3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
392
484
  4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"
393
485
  };
394
486
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkTMZLQK74_js.cn("w-full", className), children: [
395
- showViewToggle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end mb-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex rounded-lg border border-neutral-200 dark:border-neutral-700 p-1 bg-neutral-50 dark:bg-neutral-800/50", children: [
487
+ showViewToggle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end mb-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex rounded-lg border border-neutral-200 dark:border-neutral-700 p-1 bg-neutral-100 dark:bg-neutral-800", children: [
396
488
  /* @__PURE__ */ jsxRuntime.jsx(
397
489
  "button",
398
490
  {
399
491
  type: "button",
400
492
  onClick: () => setView("card"),
401
493
  className: chunkTMZLQK74_js.cn(
402
- "p-2 rounded-md transition-all duration-200",
403
- view === "card" ? "bg-white dark:bg-neutral-700 shadow-sm text-blue-600 dark:text-blue-400" : "text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"
494
+ "p-2 rounded-md text-sm font-medium transition-all duration-200",
495
+ view === "card" ? `bg-white dark:bg-neutral-700 shadow-sm ${colors.toggleActive}` : "text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"
404
496
  ),
405
497
  "aria-label": "Card view",
406
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { size: 18 })
498
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { size: 16 })
407
499
  }
408
500
  ),
409
501
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -412,11 +504,11 @@ var TemplateSelector = ({
412
504
  type: "button",
413
505
  onClick: () => setView("list"),
414
506
  className: chunkTMZLQK74_js.cn(
415
- "p-2 rounded-md transition-all duration-200",
416
- view === "list" ? "bg-white dark:bg-neutral-700 shadow-sm text-blue-600 dark:text-blue-400" : "text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"
507
+ "p-2 rounded-md text-sm font-medium transition-all duration-200",
508
+ view === "list" ? `bg-white dark:bg-neutral-700 shadow-sm ${colors.toggleActive}` : "text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"
417
509
  ),
418
510
  "aria-label": "List view",
419
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { size: 18 })
511
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { size: 16 })
420
512
  }
421
513
  )
422
514
  ] }) }),
@@ -435,7 +527,10 @@ var TemplateSelector = ({
435
527
  isSelected: selectedId === template.id,
436
528
  onSelect: handleSelect,
437
529
  onPreviewClick: handlePreviewClick,
438
- className: cardClassName
530
+ onNameChange: handleNameChange,
531
+ editable,
532
+ className: cardClassName,
533
+ colors
439
534
  },
440
535
  template.id
441
536
  ))
@@ -455,7 +550,10 @@ var TemplateSelector = ({
455
550
  template,
456
551
  isSelected: selectedId === template.id,
457
552
  onSelect: handleSelect,
458
- onPreviewClick: handlePreviewClick
553
+ onPreviewClick: handlePreviewClick,
554
+ onNameChange: handleNameChange,
555
+ editable,
556
+ colors
459
557
  },
460
558
  template.id
461
559
  ))
@@ -469,18 +567,54 @@ var TemplateCard = ({
469
567
  isSelected,
470
568
  onSelect,
471
569
  onPreviewClick,
472
- className
570
+ onNameChange,
571
+ editable,
572
+ className,
573
+ colors
473
574
  }) => {
575
+ const [isEditing, setIsEditing] = React.useState(false);
576
+ const [editValue, setEditValue] = React.useState(template.name || template.title);
577
+ const inputRef = React__namespace.useRef(null);
578
+ const displayName = template.name || template.title;
579
+ const IconComponent = getTemplateIcon(template);
580
+ const handleDoubleClick = (e) => {
581
+ if (editable) {
582
+ e.stopPropagation();
583
+ setIsEditing(true);
584
+ setEditValue(displayName);
585
+ }
586
+ };
587
+ const handleBlur = () => {
588
+ setIsEditing(false);
589
+ if (editValue.trim() && editValue !== displayName) {
590
+ onNameChange(template.id, editValue.trim());
591
+ }
592
+ };
593
+ const handleKeyDown = (e) => {
594
+ if (e.key === "Enter") {
595
+ handleBlur();
596
+ } else if (e.key === "Escape") {
597
+ setIsEditing(false);
598
+ setEditValue(displayName);
599
+ }
600
+ };
601
+ React__namespace.useEffect(() => {
602
+ if (isEditing && inputRef.current) {
603
+ inputRef.current.focus();
604
+ inputRef.current.select();
605
+ }
606
+ }, [isEditing]);
474
607
  return /* @__PURE__ */ jsxRuntime.jsxs(
475
608
  framerMotion.motion.div,
476
609
  {
477
- whileHover: { scale: 1.02 },
610
+ whileHover: { y: -4, scale: 1.02 },
478
611
  whileTap: { scale: 0.98 },
612
+ transition: { type: "spring", stiffness: 400, damping: 25 },
479
613
  onClick: () => onSelect(template.id),
480
614
  className: chunkTMZLQK74_js.cn(
481
- "relative cursor-pointer rounded-xl overflow-hidden border-2 transition-all duration-200",
615
+ "group relative cursor-pointer rounded-xl overflow-hidden border-2 transition-all duration-300",
482
616
  "bg-white dark:bg-neutral-800",
483
- isSelected ? "border-blue-500 dark:border-blue-400 ring-2 ring-blue-500/20 dark:ring-blue-400/20" : "border-neutral-200 dark:border-neutral-700 hover:border-neutral-300 dark:hover:border-neutral-600",
617
+ isSelected ? `${colors.selectedBorder} ${colors.selectedGlow}` : "border-neutral-200 dark:border-neutral-700 hover:border-neutral-300 dark:hover:border-neutral-600 hover:shadow-md",
484
618
  className
485
619
  ),
486
620
  children: [
@@ -488,10 +622,10 @@ var TemplateCard = ({
488
622
  "div",
489
623
  {
490
624
  className: chunkTMZLQK74_js.cn(
491
- "absolute top-3 left-3 z-10 w-6 h-6 rounded-full border-2 flex items-center justify-center transition-all duration-200",
492
- isSelected ? "bg-blue-500 border-blue-500 dark:bg-blue-400 dark:border-blue-400" : "bg-white/80 dark:bg-neutral-800/80 border-neutral-300 dark:border-neutral-600 backdrop-blur-sm"
625
+ "absolute top-3 left-3 z-10 w-5 h-5 rounded-full border-2 flex items-center justify-center transition-all duration-200",
626
+ isSelected ? colors.checkBg : "bg-white dark:bg-neutral-800 border-neutral-300 dark:border-neutral-600"
493
627
  ),
494
- children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 14, className: "text-white" })
628
+ children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 12, className: "text-white", strokeWidth: 3 })
495
629
  }
496
630
  ),
497
631
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -500,26 +634,69 @@ var TemplateCard = ({
500
634
  type: "button",
501
635
  onClick: (e) => onPreviewClick(e, template.previewUrl),
502
636
  className: chunkTMZLQK74_js.cn(
503
- "absolute top-3 right-3 z-10 p-2 rounded-lg transition-all duration-200",
504
- "bg-white/80 dark:bg-neutral-800/80 backdrop-blur-sm",
637
+ "absolute top-3 right-3 z-10 p-1.5 rounded-lg transition-all duration-200",
638
+ "bg-white dark:bg-neutral-700",
505
639
  "border border-neutral-200 dark:border-neutral-600",
506
- "text-neutral-600 dark:text-neutral-300",
507
- "hover:bg-white dark:hover:bg-neutral-700 hover:text-blue-600 dark:hover:text-blue-400",
508
- "hover:border-blue-300 dark:hover:border-blue-500"
640
+ "text-neutral-500 dark:text-neutral-400",
641
+ "opacity-0 group-hover:opacity-100",
642
+ "hover:bg-blue-50 dark:hover:bg-blue-900/30 hover:text-blue-600 dark:hover:text-blue-400 hover:border-blue-300 dark:hover:border-blue-600"
509
643
  ),
510
- "aria-label": `Preview ${template.title}`,
511
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { size: 16 })
644
+ "aria-label": `Preview ${displayName}`,
645
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { size: 14 })
512
646
  }
513
647
  ),
514
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/10] overflow-hidden bg-neutral-100 dark:bg-neutral-900", children: /* @__PURE__ */ jsxRuntime.jsx(
515
- "img",
648
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[4/3] overflow-hidden bg-neutral-50 dark:bg-neutral-800/80 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
649
+ framerMotion.motion.div,
516
650
  {
517
- src: template.previewImage,
518
- alt: template.title,
519
- className: "w-full h-full object-cover object-top transition-transform duration-300 group-hover:scale-105"
651
+ initial: { scale: 0.9, opacity: 0.5 },
652
+ animate: { scale: 1, opacity: 1 },
653
+ className: chunkTMZLQK74_js.cn(
654
+ "p-6 rounded-full transition-all duration-300",
655
+ isSelected ? colors.selected : `bg-neutral-100 dark:bg-neutral-700/50 ${colors.hoverBg}`
656
+ ),
657
+ children: /* @__PURE__ */ jsxRuntime.jsx(
658
+ IconComponent,
659
+ {
660
+ size: 48,
661
+ strokeWidth: 1.5,
662
+ className: chunkTMZLQK74_js.cn(
663
+ "transition-colors duration-300",
664
+ isSelected ? colors.iconSelected : `text-neutral-400 dark:text-neutral-500 ${colors.iconHover}`
665
+ )
666
+ }
667
+ )
520
668
  }
521
669
  ) }),
522
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium text-neutral-900 dark:text-neutral-100 truncate", children: template.title }) })
670
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3 border-t border-neutral-100 dark:border-neutral-700", children: isEditing ? /* @__PURE__ */ jsxRuntime.jsx(
671
+ "input",
672
+ {
673
+ ref: inputRef,
674
+ type: "text",
675
+ value: editValue,
676
+ onChange: (e) => setEditValue(e.target.value),
677
+ onBlur: handleBlur,
678
+ onKeyDown: handleKeyDown,
679
+ onClick: (e) => e.stopPropagation(),
680
+ className: chunkTMZLQK74_js.cn(
681
+ "w-full px-2 py-1 text-sm font-medium rounded",
682
+ "bg-neutral-100 dark:bg-neutral-700",
683
+ `border ${colors.inputBorder}`,
684
+ "text-neutral-900 dark:text-neutral-100",
685
+ `focus:outline-none focus:ring-2 ${colors.inputRing}`
686
+ )
687
+ }
688
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
689
+ "h3",
690
+ {
691
+ onDoubleClick: handleDoubleClick,
692
+ className: chunkTMZLQK74_js.cn(
693
+ "text-sm font-medium text-neutral-900 dark:text-neutral-100 truncate",
694
+ editable && `cursor-text ${colors.textHover}`
695
+ ),
696
+ title: editable ? "Double-click to rename" : displayName,
697
+ children: displayName
698
+ }
699
+ ) })
523
700
  ]
524
701
  }
525
702
  );
@@ -528,18 +705,54 @@ var TemplateListItem = ({
528
705
  template,
529
706
  isSelected,
530
707
  onSelect,
531
- onPreviewClick
708
+ onPreviewClick,
709
+ onNameChange,
710
+ editable,
711
+ colors
532
712
  }) => {
713
+ const [isEditing, setIsEditing] = React.useState(false);
714
+ const [editValue, setEditValue] = React.useState(template.name || template.title);
715
+ const inputRef = React__namespace.useRef(null);
716
+ const displayName = template.name || template.title;
717
+ const IconComponent = getTemplateIcon(template);
718
+ const handleDoubleClick = (e) => {
719
+ if (editable) {
720
+ e.stopPropagation();
721
+ setIsEditing(true);
722
+ setEditValue(displayName);
723
+ }
724
+ };
725
+ const handleBlur = () => {
726
+ setIsEditing(false);
727
+ if (editValue.trim() && editValue !== displayName) {
728
+ onNameChange(template.id, editValue.trim());
729
+ }
730
+ };
731
+ const handleKeyDown = (e) => {
732
+ if (e.key === "Enter") {
733
+ handleBlur();
734
+ } else if (e.key === "Escape") {
735
+ setIsEditing(false);
736
+ setEditValue(displayName);
737
+ }
738
+ };
739
+ React__namespace.useEffect(() => {
740
+ if (isEditing && inputRef.current) {
741
+ inputRef.current.focus();
742
+ inputRef.current.select();
743
+ }
744
+ }, [isEditing]);
533
745
  return /* @__PURE__ */ jsxRuntime.jsxs(
534
746
  framerMotion.motion.div,
535
747
  {
536
- whileHover: { x: 4 },
537
- whileTap: { scale: 0.99 },
748
+ whileHover: { x: 4, scale: 1.01 },
749
+ whileTap: { scale: 0.995 },
750
+ transition: { type: "spring", stiffness: 400, damping: 25 },
538
751
  onClick: () => onSelect(template.id),
539
752
  className: chunkTMZLQK74_js.cn(
540
- "flex items-center gap-4 p-3 cursor-pointer rounded-xl border-2 transition-all duration-200",
753
+ "group flex items-center gap-4 p-3 cursor-pointer rounded-xl border-2 transition-all duration-300",
541
754
  "bg-white dark:bg-neutral-800",
542
- isSelected ? "border-blue-500 dark:border-blue-400 ring-2 ring-blue-500/20 dark:ring-blue-400/20" : "border-neutral-200 dark:border-neutral-700 hover:border-neutral-300 dark:hover:border-neutral-600"
755
+ isSelected ? `${colors.selectedBorder} shadow-md ${colors.selectedGlow}` : "border-neutral-200 dark:border-neutral-700 hover:border-neutral-300 dark:hover:border-neutral-600"
543
756
  ),
544
757
  children: [
545
758
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -547,20 +760,61 @@ var TemplateListItem = ({
547
760
  {
548
761
  className: chunkTMZLQK74_js.cn(
549
762
  "w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0 transition-all duration-200",
550
- isSelected ? "bg-blue-500 border-blue-500 dark:bg-blue-400 dark:border-blue-400" : "bg-white dark:bg-neutral-800 border-neutral-300 dark:border-neutral-600"
763
+ isSelected ? colors.checkBg : "bg-white dark:bg-neutral-800 border-neutral-300 dark:border-neutral-600"
764
+ ),
765
+ children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 12, className: "text-white", strokeWidth: 3 })
766
+ }
767
+ ),
768
+ /* @__PURE__ */ jsxRuntime.jsx(
769
+ "div",
770
+ {
771
+ className: chunkTMZLQK74_js.cn(
772
+ "w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0 transition-colors duration-300",
773
+ isSelected ? colors.selected : `bg-neutral-100 dark:bg-neutral-700/50 ${colors.hoverBg}`
551
774
  ),
552
- children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 12, className: "text-white" })
775
+ children: /* @__PURE__ */ jsxRuntime.jsx(
776
+ IconComponent,
777
+ {
778
+ size: 24,
779
+ strokeWidth: 1.5,
780
+ className: chunkTMZLQK74_js.cn(
781
+ "transition-colors duration-300",
782
+ isSelected ? colors.iconSelected : `text-neutral-400 dark:text-neutral-500 ${colors.iconHover}`
783
+ )
784
+ }
785
+ )
553
786
  }
554
787
  ),
555
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-14 rounded-lg overflow-hidden bg-neutral-100 dark:bg-neutral-900 flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
556
- "img",
788
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: isEditing ? /* @__PURE__ */ jsxRuntime.jsx(
789
+ "input",
790
+ {
791
+ ref: inputRef,
792
+ type: "text",
793
+ value: editValue,
794
+ onChange: (e) => setEditValue(e.target.value),
795
+ onBlur: handleBlur,
796
+ onKeyDown: handleKeyDown,
797
+ onClick: (e) => e.stopPropagation(),
798
+ className: chunkTMZLQK74_js.cn(
799
+ "w-full px-2 py-1 text-sm font-medium rounded",
800
+ "bg-neutral-100 dark:bg-neutral-700",
801
+ `border ${colors.inputBorder}`,
802
+ "text-neutral-900 dark:text-neutral-100",
803
+ `focus:outline-none focus:ring-2 ${colors.inputRing}`
804
+ )
805
+ }
806
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
807
+ "h3",
557
808
  {
558
- src: template.previewImage,
559
- alt: template.title,
560
- className: "w-full h-full object-cover object-top"
809
+ onDoubleClick: handleDoubleClick,
810
+ className: chunkTMZLQK74_js.cn(
811
+ "text-sm font-medium text-neutral-900 dark:text-neutral-100 truncate",
812
+ editable && `cursor-text ${colors.textHover}`
813
+ ),
814
+ title: editable ? "Double-click to rename" : displayName,
815
+ children: displayName
561
816
  }
562
817
  ) }),
563
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium text-neutral-900 dark:text-neutral-100 truncate", children: template.title }) }),
564
818
  /* @__PURE__ */ jsxRuntime.jsx(
565
819
  "button",
566
820
  {
@@ -568,12 +822,13 @@ var TemplateListItem = ({
568
822
  onClick: (e) => onPreviewClick(e, template.previewUrl),
569
823
  className: chunkTMZLQK74_js.cn(
570
824
  "p-2 rounded-lg transition-all duration-200 flex-shrink-0",
571
- "text-neutral-500 dark:text-neutral-400",
572
- "hover:bg-neutral-100 dark:hover:bg-neutral-700",
573
- "hover:text-blue-600 dark:hover:text-blue-400"
825
+ "text-neutral-400 dark:text-neutral-500",
826
+ "opacity-0 group-hover:opacity-100",
827
+ colors.hoverBgDark,
828
+ colors.textHover
574
829
  ),
575
- "aria-label": `Preview ${template.title}`,
576
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { size: 18 })
830
+ "aria-label": `Preview ${displayName}`,
831
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { size: 16 })
577
832
  }
578
833
  )
579
834
  ]
@@ -707,10 +962,34 @@ var Toast = ({
707
962
  );
708
963
  };
709
964
 
965
+ Object.defineProperty(exports, "Globe", {
966
+ enumerable: true,
967
+ get: function () { return lucideReact.Globe; }
968
+ });
969
+ Object.defineProperty(exports, "Moon", {
970
+ enumerable: true,
971
+ get: function () { return lucideReact.Moon; }
972
+ });
973
+ Object.defineProperty(exports, "Orbit", {
974
+ enumerable: true,
975
+ get: function () { return lucideReact.Orbit; }
976
+ });
977
+ Object.defineProperty(exports, "Rocket", {
978
+ enumerable: true,
979
+ get: function () { return lucideReact.Rocket; }
980
+ });
981
+ Object.defineProperty(exports, "Sparkles", {
982
+ enumerable: true,
983
+ get: function () { return lucideReact.Sparkles; }
984
+ });
985
+ Object.defineProperty(exports, "Star", {
986
+ enumerable: true,
987
+ get: function () { return lucideReact.Star; }
988
+ });
710
989
  exports.AnimatedButton = AnimatedButton;
711
990
  exports.Input = Input;
712
991
  exports.TemplateSelector = TemplateSelector;
713
992
  exports.TextButton = TextButton;
714
993
  exports.Toast = Toast;
715
- //# sourceMappingURL=chunk-24KNWDO5.js.map
716
- //# sourceMappingURL=chunk-24KNWDO5.js.map
994
+ //# sourceMappingURL=chunk-BWR6DSQJ.js.map
995
+ //# sourceMappingURL=chunk-BWR6DSQJ.js.map