@vllnt/ui 0.2.0 → 0.2.1-canary.73a93ee

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/README.md +27 -12
  3. package/dist/components/activity-log/activity-log.js +1 -0
  4. package/dist/components/anchor-port/anchor-port.js +51 -0
  5. package/dist/components/anchor-port/index.js +4 -0
  6. package/dist/components/animated-text/animated-text.js +1 -0
  7. package/dist/components/bottom-bar/bottom-bar.js +25 -0
  8. package/dist/components/bottom-bar/index.js +4 -0
  9. package/dist/components/canvas-shell/canvas-foundation-demo.js +183 -0
  10. package/dist/components/canvas-shell/canvas-shell-route-config.js +0 -0
  11. package/dist/components/canvas-shell/canvas-shell.js +261 -0
  12. package/dist/components/canvas-shell/index.js +4 -0
  13. package/dist/components/canvas-view/canvas-view.js +461 -0
  14. package/dist/components/canvas-view/index.js +6 -0
  15. package/dist/components/chart/area-chart.js +1 -0
  16. package/dist/components/chart/line-chart.js +1 -0
  17. package/dist/components/chat-dock-section/chat-dock-section.js +56 -0
  18. package/dist/components/chat-dock-section/index.js +6 -0
  19. package/dist/components/checklist/checklist.js +7 -0
  20. package/dist/components/checklist/index.js +3 -1
  21. package/dist/components/comment-pin/comment-pin.js +104 -0
  22. package/dist/components/comment-pin/index.js +6 -0
  23. package/dist/components/connector-edge/connector-edge.js +66 -0
  24. package/dist/components/connector-edge/index.js +6 -0
  25. package/dist/components/conversation-thread/conversation-thread.js +348 -0
  26. package/dist/components/conversation-thread/index.js +20 -0
  27. package/dist/components/curriculum/curriculum.js +349 -0
  28. package/dist/components/curriculum/index.js +10 -0
  29. package/dist/components/data-list/data-list.js +1 -0
  30. package/dist/components/edge-label/edge-label.js +26 -0
  31. package/dist/components/edge-label/index.js +4 -0
  32. package/dist/components/form/form.js +432 -0
  33. package/dist/components/form/index.js +20 -0
  34. package/dist/components/glass-panel/glass-panel.js +21 -0
  35. package/dist/components/glass-panel/index.js +4 -0
  36. package/dist/components/group-hull/group-hull.js +29 -0
  37. package/dist/components/group-hull/index.js +4 -0
  38. package/dist/components/index.js +176 -0
  39. package/dist/components/infinite-plane/index.js +6 -0
  40. package/dist/components/infinite-plane/infinite-plane.js +75 -0
  41. package/dist/components/left-rail/index.js +4 -0
  42. package/dist/components/left-rail/left-rail.js +25 -0
  43. package/dist/components/live-cursor/index.js +6 -0
  44. package/dist/components/live-cursor/live-cursor.js +62 -0
  45. package/dist/components/mini-map-panel/index.js +6 -0
  46. package/dist/components/mini-map-panel/mini-map-panel.js +74 -0
  47. package/dist/components/multi-select/index.js +6 -0
  48. package/dist/components/multi-select/multi-select.js +258 -0
  49. package/dist/components/object-card/index.js +6 -0
  50. package/dist/components/object-card/object-card.js +126 -0
  51. package/dist/components/object-handle/index.js +4 -0
  52. package/dist/components/object-handle/object-handle.js +38 -0
  53. package/dist/components/overview-board/index.js +8 -0
  54. package/dist/components/overview-board/overview-board.js +127 -0
  55. package/dist/components/presence-stack/index.js +6 -0
  56. package/dist/components/presence-stack/presence-stack.js +108 -0
  57. package/dist/components/presence-sync-indicator/index.js +6 -0
  58. package/dist/components/presence-sync-indicator/presence-sync-indicator.js +73 -0
  59. package/dist/components/progress-tracker/index.js +20 -0
  60. package/dist/components/progress-tracker/progress-tracker.js +527 -0
  61. package/dist/components/right-dock/index.js +4 -0
  62. package/dist/components/right-dock/right-dock.js +28 -0
  63. package/dist/components/run-timeline/index.js +6 -0
  64. package/dist/components/run-timeline/run-timeline.js +221 -0
  65. package/dist/components/segmented-control/index.js +12 -0
  66. package/dist/components/segmented-control/segmented-control.js +61 -0
  67. package/dist/components/selection-presence/index.js +6 -0
  68. package/dist/components/selection-presence/selection-presence.js +50 -0
  69. package/dist/components/spinner/unicode-spinner.js +1 -0
  70. package/dist/components/tags-input/index.js +4 -0
  71. package/dist/components/tags-input/tags-input.js +178 -0
  72. package/dist/components/thread-bubble/index.js +6 -0
  73. package/dist/components/thread-bubble/thread-bubble.js +85 -0
  74. package/dist/components/top-bar/index.js +4 -0
  75. package/dist/components/top-bar/top-bar.js +31 -0
  76. package/dist/components/usage-breakdown/usage-breakdown.js +1 -0
  77. package/dist/components/viewport-bookmarks/index.js +6 -0
  78. package/dist/components/viewport-bookmarks/viewport-bookmarks.js +116 -0
  79. package/dist/components/workspace-switcher/index.js +6 -0
  80. package/dist/components/workspace-switcher/workspace-switcher.js +61 -0
  81. package/dist/components/world-breadcrumbs/index.js +6 -0
  82. package/dist/components/world-breadcrumbs/world-breadcrumbs.js +114 -0
  83. package/dist/components/zoom-hud/index.js +4 -0
  84. package/dist/components/zoom-hud/zoom-hud.js +61 -0
  85. package/dist/index.d.ts +1468 -6
  86. package/package.json +7 -3
@@ -62,6 +62,26 @@ import { Label } from "./label";
62
62
  import { NumberInput } from "./number-input";
63
63
  import { PasswordInput } from "./password-input";
64
64
  import { Switch } from "./switch";
65
+ import {
66
+ Form,
67
+ FormControl,
68
+ FormDescription,
69
+ FormField,
70
+ FormItem,
71
+ FormLabel,
72
+ FormMessage,
73
+ useFormField
74
+ } from "./form";
75
+ import {
76
+ MultiSelect
77
+ } from "./multi-select";
78
+ import { TagsInput } from "./tags-input";
79
+ import {
80
+ SegmentedControl,
81
+ SegmentedControlItem,
82
+ segmentedControlItemVariants,
83
+ segmentedControlVariants
84
+ } from "./segmented-control";
65
85
  import {
66
86
  toast,
67
87
  Toast,
@@ -275,13 +295,44 @@ import {
275
295
  } from "./world-clock-bar";
276
296
  import { CodeBlock } from "./code-block";
277
297
  import { MDXContent } from "./mdx-content";
298
+ import {
299
+ CanvasShell
300
+ } from "./canvas-shell";
301
+ import {
302
+ CanvasView
303
+ } from "./canvas-view";
304
+ import { BottomBar } from "./bottom-bar";
305
+ import {
306
+ ChatDockSection
307
+ } from "./chat-dock-section";
308
+ import { GlassPanel } from "./glass-panel";
309
+ import {
310
+ InfinitePlane
311
+ } from "./infinite-plane";
312
+ import { LeftRail } from "./left-rail";
313
+ import {
314
+ MiniMapPanel
315
+ } from "./mini-map-panel";
316
+ import {
317
+ OverviewBoard,
318
+ OverviewCard
319
+ } from "./overview-board";
278
320
  import {
279
321
  NavbarSaas,
280
322
  useMobile
281
323
  } from "./navbar-saas";
324
+ import { RightDock } from "./right-dock";
282
325
  import { Sidebar } from "./sidebar";
283
326
  import { SidebarProvider, useSidebar } from "./sidebar-provider";
284
327
  import { TableOfContents } from "./table-of-contents";
328
+ import { TopBar } from "./top-bar";
329
+ import {
330
+ ViewportBookmarks
331
+ } from "./viewport-bookmarks";
332
+ import {
333
+ WorldBreadcrumbs
334
+ } from "./world-breadcrumbs";
335
+ import { ZoomHUD } from "./zoom-hud";
285
336
  import {
286
337
  ActivityLog
287
338
  } from "./activity-log";
@@ -384,7 +435,25 @@ import {
384
435
  Prerequisites,
385
436
  Summary
386
437
  } from "./learning-objectives";
438
+ import {
439
+ Curriculum,
440
+ CurriculumLesson,
441
+ CurriculumModule
442
+ } from "./curriculum";
387
443
  import { ProgressBar } from "./progress-bar";
444
+ import {
445
+ ProgressCard
446
+ } from "./progress-card";
447
+ import {
448
+ ProgressTracker,
449
+ ProgressTrackerBadge,
450
+ ProgressTrackerModule,
451
+ ProgressTrackerModules,
452
+ ProgressTrackerOverview,
453
+ ProgressTrackerStat,
454
+ ProgressTrackerStats,
455
+ useProgressTrackerContext
456
+ } from "./progress-tracker";
388
457
  import {
389
458
  CommonMistake,
390
459
  ProTip
@@ -459,6 +528,9 @@ import {
459
528
  import {
460
529
  ViewSwitcher
461
530
  } from "./view-switcher";
531
+ import {
532
+ WorkspaceSwitcher
533
+ } from "./workspace-switcher";
462
534
  import {
463
535
  FlowControls,
464
536
  FlowDiagram,
@@ -466,6 +538,47 @@ import {
466
538
  FlowFullscreen,
467
539
  useFlowDiagram
468
540
  } from "./flow-diagram";
541
+ import { AnchorPort } from "./anchor-port";
542
+ import {
543
+ CommentPin
544
+ } from "./comment-pin";
545
+ import {
546
+ ConnectorEdge
547
+ } from "./connector-edge";
548
+ import { EdgeLabel } from "./edge-label";
549
+ import { GroupHull } from "./group-hull";
550
+ import {
551
+ LiveCursor
552
+ } from "./live-cursor";
553
+ import {
554
+ ObjectCard
555
+ } from "./object-card";
556
+ import { ObjectHandle } from "./object-handle";
557
+ import {
558
+ PresenceStack
559
+ } from "./presence-stack";
560
+ import {
561
+ PresenceSyncIndicator
562
+ } from "./presence-sync-indicator";
563
+ import {
564
+ RunTimeline
565
+ } from "./run-timeline";
566
+ import {
567
+ SelectionPresence
568
+ } from "./selection-presence";
569
+ import {
570
+ ThreadBubble
571
+ } from "./thread-bubble";
572
+ import {
573
+ ConversationEmpty,
574
+ ConversationHeader,
575
+ ConversationLoading,
576
+ ConversationMessages,
577
+ ConversationScrollButton,
578
+ ConversationSuggestions,
579
+ ConversationThread,
580
+ ConversationTitle
581
+ } from "./conversation-thread";
469
582
  import { InlineInput } from "./inline-input";
470
583
  import {
471
584
  ModelSelector
@@ -498,6 +611,7 @@ export {
498
611
  AlertDialogTitle,
499
612
  AlertDialogTrigger,
500
613
  AlertTitle,
614
+ AnchorPort,
501
615
  AnimatedText,
502
616
  Annotation,
503
617
  AreaChart,
@@ -511,11 +625,14 @@ export {
511
625
  BeforeAfter,
512
626
  BlogCard,
513
627
  BorderBeam,
628
+ BottomBar,
514
629
  Breadcrumb,
515
630
  Button,
516
631
  Calendar,
517
632
  Callout,
518
633
  CandlestickChart,
634
+ CanvasShell,
635
+ CanvasView,
519
636
  Card,
520
637
  CardContent,
521
638
  CardDescription,
@@ -528,6 +645,7 @@ export {
528
645
  CarouselNext,
529
646
  CarouselPrevious,
530
647
  CategoryFilter,
648
+ ChatDockSection,
531
649
  Checkbox,
532
650
  Checklist,
533
651
  CodeBlock,
@@ -545,9 +663,11 @@ export {
545
663
  CommandList,
546
664
  CommandSeparator,
547
665
  CommandShortcut,
666
+ CommentPin,
548
667
  CommonMistake,
549
668
  Comparison,
550
669
  CompletionDialog,
670
+ ConnectorEdge,
551
671
  ContentCard,
552
672
  ContentIntro,
553
673
  ContextMenu,
@@ -565,9 +685,20 @@ export {
565
685
  ContextMenuSubContent,
566
686
  ContextMenuSubTrigger,
567
687
  ContextMenuTrigger,
688
+ ConversationEmpty,
689
+ ConversationHeader,
690
+ ConversationLoading,
691
+ ConversationMessages,
692
+ ConversationScrollButton,
693
+ ConversationSuggestions,
694
+ ConversationThread,
695
+ ConversationTitle,
568
696
  CookieConsent,
569
697
  CountdownTimer,
570
698
  CreditBadge,
699
+ Curriculum,
700
+ CurriculumLesson,
701
+ CurriculumModule,
571
702
  DataList,
572
703
  DataListItem,
573
704
  DataListLabel,
@@ -609,6 +740,7 @@ export {
609
740
  DropdownMenuSubContent,
610
741
  DropdownMenuSubTrigger,
611
742
  DropdownMenuTrigger,
743
+ EdgeLabel,
612
744
  Exercise,
613
745
  FAQ,
614
746
  FAQItem,
@@ -621,12 +753,22 @@ export {
621
753
  FlowDiagram,
622
754
  FlowErrorBoundary,
623
755
  FlowFullscreen,
756
+ Form,
757
+ FormControl,
758
+ FormDescription,
759
+ FormField,
760
+ FormItem,
761
+ FormLabel,
762
+ FormMessage,
763
+ GlassPanel,
624
764
  Glossary,
765
+ GroupHull,
625
766
  Highlight,
626
767
  HorizontalScrollRow,
627
768
  HoverCard,
628
769
  HoverCardContent,
629
770
  HoverCardTrigger,
771
+ InfinitePlane,
630
772
  InlineInput,
631
773
  Input,
632
774
  InputOTP,
@@ -638,7 +780,9 @@ export {
638
780
  Label,
639
781
  LangProvider,
640
782
  LearningObjectives,
783
+ LeftRail,
641
784
  LineChart,
785
+ LiveCursor,
642
786
  LiveFeed,
643
787
  MDXContent,
644
788
  MarketTreemap,
@@ -660,7 +804,9 @@ export {
660
804
  MenubarSubTrigger,
661
805
  MenubarTrigger,
662
806
  MetricGauge,
807
+ MiniMapPanel,
663
808
  ModelSelector,
809
+ MultiSelect,
664
810
  NavbarSaas,
665
811
  NavigationMenu,
666
812
  NavigationMenuContent,
@@ -672,7 +818,11 @@ export {
672
818
  NavigationMenuViewport,
673
819
  NumberInput,
674
820
  NumberTicker,
821
+ ObjectCard,
822
+ ObjectHandle,
675
823
  OrderBook,
824
+ OverviewBoard,
825
+ OverviewCard,
676
826
  Pagination,
677
827
  PasswordInput,
678
828
  PlanBadge,
@@ -681,9 +831,19 @@ export {
681
831
  PopoverContent,
682
832
  PopoverTrigger,
683
833
  Prerequisites,
834
+ PresenceStack,
835
+ PresenceSyncIndicator,
684
836
  ProTip,
685
837
  ProfileSection,
686
838
  ProgressBar,
839
+ ProgressCard,
840
+ ProgressTracker,
841
+ ProgressTrackerBadge,
842
+ ProgressTrackerModule,
843
+ ProgressTrackerModules,
844
+ ProgressTrackerOverview,
845
+ ProgressTrackerStat,
846
+ ProgressTrackerStats,
687
847
  Quiz,
688
848
  RadioGroup,
689
849
  RadioGroupItem,
@@ -691,12 +851,16 @@ export {
691
851
  ResizableHandle,
692
852
  ResizablePanel,
693
853
  ResizablePanelGroup,
854
+ RightDock,
694
855
  RoleBadge,
856
+ RunTimeline,
695
857
  ScopeSelector,
696
858
  ScrollArea,
697
859
  ScrollBar,
698
860
  SearchBar,
699
861
  SearchDialog,
862
+ SegmentedControl,
863
+ SegmentedControlItem,
700
864
  Select,
701
865
  SelectContent,
702
866
  SelectGroup,
@@ -707,6 +871,7 @@ export {
707
871
  SelectSeparator,
708
872
  SelectTrigger,
709
873
  SelectValue,
874
+ SelectionPresence,
710
875
  Separator,
711
876
  SeverityBadge,
712
877
  ShareDialog,
@@ -756,11 +921,13 @@ export {
756
921
  TabsContent,
757
922
  TabsList,
758
923
  TabsTrigger,
924
+ TagsInput,
759
925
  Terminal,
760
926
  Textarea,
761
927
  ThemeProvider,
762
928
  ThemeToggle,
763
929
  ThinkingBlock,
930
+ ThreadBubble,
764
931
  TickerTape,
765
932
  Toast,
766
933
  ToastAction,
@@ -775,6 +942,7 @@ export {
775
942
  TooltipContent,
776
943
  TooltipProvider,
777
944
  TooltipTrigger,
945
+ TopBar,
778
946
  Tour,
779
947
  TruncatedText,
780
948
  TutorialCard,
@@ -786,9 +954,13 @@ export {
786
954
  UsageBreakdown,
787
955
  VideoEmbed,
788
956
  ViewSwitcher,
957
+ ViewportBookmarks,
789
958
  WalletCard,
790
959
  Watchlist,
960
+ WorkspaceSwitcher,
961
+ WorldBreadcrumbs,
791
962
  WorldClockBar,
963
+ ZoomHUD,
792
964
  alertVariants,
793
965
  avatarGroupVariants,
794
966
  avatarItemVariants,
@@ -800,13 +972,17 @@ export {
800
972
  dotVariants,
801
973
  mdxComponents,
802
974
  navigationMenuTriggerStyle,
975
+ segmentedControlItemVariants,
976
+ segmentedControlVariants,
803
977
  severityBadgeVariants,
804
978
  statCardVariants,
805
979
  statusIndicatorVariants,
806
980
  toast,
807
981
  toggleVariants,
808
982
  useFlowDiagram,
983
+ useFormField,
809
984
  useMobile,
985
+ useProgressTrackerContext,
810
986
  useSidebar,
811
987
  useSocialFab
812
988
  };
@@ -0,0 +1,6 @@
1
+ import {
2
+ InfinitePlane
3
+ } from "./infinite-plane";
4
+ export {
5
+ InfinitePlane
6
+ };
@@ -0,0 +1,75 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const DEFAULT_LABELS = {
8
+ region: "Infinite plane"
9
+ };
10
+ const safeSpacing = (value) => value < 4 ? 4 : value;
11
+ const safeZoom = (value) => {
12
+ if (value < 0.1) {
13
+ return 0.1;
14
+ }
15
+ if (value > 10) {
16
+ return 10;
17
+ }
18
+ return value;
19
+ };
20
+ const buildBackground = (input) => {
21
+ if (input.pattern === "blank") {
22
+ return {};
23
+ }
24
+ const size = safeSpacing(input.spacing) * safeZoom(input.zoom);
25
+ const pos = `${input.translate.x}px ${input.translate.y}px`;
26
+ if (input.pattern === "grid") {
27
+ return {
28
+ backgroundImage: "linear-gradient(to right, hsl(var(--border)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--border)) 1px, transparent 1px)",
29
+ backgroundPosition: pos,
30
+ backgroundSize: `${size}px ${size}px`
31
+ };
32
+ }
33
+ return {
34
+ backgroundImage: "radial-gradient(circle, hsl(var(--border)) 1px, transparent 1px)",
35
+ backgroundPosition: pos,
36
+ backgroundSize: `${size}px ${size}px`
37
+ };
38
+ };
39
+ const InfinitePlane = forwardRef(
40
+ (props, ref) => {
41
+ const {
42
+ children,
43
+ className,
44
+ labels,
45
+ pattern = "dot",
46
+ spacing = 32,
47
+ translate = { x: 0, y: 0 },
48
+ zoom = 1,
49
+ ...rest
50
+ } = props;
51
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
52
+ const background = buildBackground({ pattern, spacing, translate, zoom });
53
+ return /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ "aria-label": resolvedLabels.region,
57
+ className: cn(
58
+ "relative h-full w-full overflow-hidden bg-background",
59
+ className
60
+ ),
61
+ "data-infinite-plane": true,
62
+ "data-infinite-plane-pattern": pattern,
63
+ ref,
64
+ role: "region",
65
+ style: background,
66
+ ...rest,
67
+ children
68
+ }
69
+ );
70
+ }
71
+ );
72
+ InfinitePlane.displayName = "InfinitePlane";
73
+ export {
74
+ InfinitePlane
75
+ };
@@ -0,0 +1,4 @@
1
+ import { LeftRail } from "./left-rail";
2
+ export {
3
+ LeftRail
4
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cn } from "../../lib/utils";
4
+ const LeftRail = forwardRef(
5
+ ({ children, className, footer, title, ...props }, ref) => /* @__PURE__ */ jsxs(
6
+ "aside",
7
+ {
8
+ className: cn(
9
+ "flex h-full w-[4.5rem] shrink-0 flex-col items-center gap-3 border-r border-border bg-background px-2 py-3",
10
+ className
11
+ ),
12
+ ref,
13
+ ...props,
14
+ children: [
15
+ title ? /* @__PURE__ */ jsx("div", { className: "flex min-h-9 items-center text-[11px] font-medium uppercase tracking-[0.24em] text-muted-foreground", children: title }) : null,
16
+ /* @__PURE__ */ jsx("div", { className: "flex w-full flex-1 flex-col items-center gap-2", children }),
17
+ footer ? /* @__PURE__ */ jsx("div", { className: "flex w-full flex-col items-center gap-2", children: footer }) : null
18
+ ]
19
+ }
20
+ )
21
+ );
22
+ LeftRail.displayName = "LeftRail";
23
+ export {
24
+ LeftRail
25
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ LiveCursor
3
+ } from "./live-cursor";
4
+ export {
5
+ LiveCursor
6
+ };
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const DEFAULT_LABELS = {
8
+ region: "Live cursor"
9
+ };
10
+ const LiveCursor = forwardRef(
11
+ (props, ref) => {
12
+ const { className, color, labels, name, status, x, y, ...rest } = props;
13
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
14
+ const resolvedColor = color ?? "var(--foreground)";
15
+ return /* @__PURE__ */ jsxs(
16
+ "div",
17
+ {
18
+ "aria-label": typeof name === "string" ? `${resolvedLabels.region}: ${name}` : resolvedLabels.region,
19
+ className: cn(
20
+ "pointer-events-none absolute z-30 flex items-start gap-1",
21
+ className
22
+ ),
23
+ "data-live-cursor": true,
24
+ ref,
25
+ role: "img",
26
+ style: { left: x, top: y },
27
+ ...rest,
28
+ children: [
29
+ /* @__PURE__ */ jsx(
30
+ "svg",
31
+ {
32
+ "aria-hidden": "true",
33
+ className: "-ml-1 -mt-1 drop-shadow-sm",
34
+ "data-live-cursor-pointer": true,
35
+ fill: resolvedColor,
36
+ height: 18,
37
+ viewBox: "0 0 16 18",
38
+ width: 16,
39
+ children: /* @__PURE__ */ jsx("path", { d: "M0 0 L0 14 L4 11 L7 17 L10 16 L7 10 L13 10 Z" })
40
+ }
41
+ ),
42
+ name === null || name === void 0 ? null : /* @__PURE__ */ jsxs(
43
+ "span",
44
+ {
45
+ className: "ml-2 mt-2 inline-flex flex-col rounded-md px-1.5 py-0.5 text-[10px] font-medium text-white shadow-sm",
46
+ "data-live-cursor-chip": true,
47
+ style: { backgroundColor: resolvedColor },
48
+ children: [
49
+ /* @__PURE__ */ jsx("span", { children: name }),
50
+ status ? /* @__PURE__ */ jsx("span", { className: "text-[9px] opacity-80", "data-live-cursor-status": true, children: status }) : null
51
+ ]
52
+ }
53
+ )
54
+ ]
55
+ }
56
+ );
57
+ }
58
+ );
59
+ LiveCursor.displayName = "LiveCursor";
60
+ export {
61
+ LiveCursor
62
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ MiniMapPanel
3
+ } from "./mini-map-panel";
4
+ export {
5
+ MiniMapPanel
6
+ };
@@ -0,0 +1,74 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cn } from "../../lib/utils";
4
+ const MiniMapPanel = forwardRef(
5
+ ({ className, markers = [], title = "Overview", viewport, world, ...props }, ref) => {
6
+ const viewportWidth = Math.max(
7
+ viewport.width / viewport.zoom / world.width * 100,
8
+ 8
9
+ );
10
+ const viewportHeight = Math.max(
11
+ viewport.height / viewport.zoom / world.height * 100,
12
+ 8
13
+ );
14
+ const viewportLeft = Math.min(
15
+ Math.max(viewport.x / world.width * 100, 0),
16
+ 100 - viewportWidth
17
+ );
18
+ const viewportTop = Math.min(
19
+ Math.max(viewport.y / world.height * 100, 0),
20
+ 100 - viewportHeight
21
+ );
22
+ return /* @__PURE__ */ jsxs(
23
+ "div",
24
+ {
25
+ className: cn(
26
+ "w-52 rounded-sm border border-border bg-background p-3 font-mono",
27
+ className
28
+ ),
29
+ ref,
30
+ ...props,
31
+ children: [
32
+ /* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center justify-between", children: /* @__PURE__ */ jsxs("div", { children: [
33
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground", children: title }),
34
+ /* @__PURE__ */ jsxs("div", { className: "mt-1 text-xs text-muted-foreground", children: [
35
+ "Zoom ",
36
+ Math.round(viewport.zoom * 100),
37
+ "%"
38
+ ] })
39
+ ] }) }),
40
+ /* @__PURE__ */ jsxs("div", { className: "relative aspect-[4/3] overflow-hidden rounded-sm border border-border bg-background", children: [
41
+ markers.map((marker) => /* @__PURE__ */ jsx(
42
+ "div",
43
+ {
44
+ className: "absolute size-1.5 -translate-x-1/2 -translate-y-1/2 bg-foreground",
45
+ style: {
46
+ left: `${marker.x / world.width * 100}%`,
47
+ top: `${marker.y / world.height * 100}%`
48
+ },
49
+ title: marker.label
50
+ },
51
+ marker.id
52
+ )),
53
+ /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ className: "absolute border border-foreground/80 bg-transparent",
57
+ style: {
58
+ height: `${viewportHeight}%`,
59
+ left: `${viewportLeft}%`,
60
+ top: `${viewportTop}%`,
61
+ width: `${viewportWidth}%`
62
+ }
63
+ }
64
+ )
65
+ ] })
66
+ ]
67
+ }
68
+ );
69
+ }
70
+ );
71
+ MiniMapPanel.displayName = "MiniMapPanel";
72
+ export {
73
+ MiniMapPanel
74
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ MultiSelect
3
+ } from "./multi-select";
4
+ export {
5
+ MultiSelect
6
+ };