@vllnt/ui 0.2.1-canary.ab2c69a → 0.2.1-canary.bb791f1

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 (57) hide show
  1. package/dist/components/alert-pulse/alert-pulse.js +93 -0
  2. package/dist/components/alert-pulse/index.js +6 -0
  3. package/dist/components/bottom-activity-strip/bottom-activity-strip.js +91 -0
  4. package/dist/components/bottom-activity-strip/index.js +6 -0
  5. package/dist/components/comment-pin/comment-pin.js +104 -0
  6. package/dist/components/comment-pin/index.js +6 -0
  7. package/dist/components/context-lens/context-lens.js +98 -0
  8. package/dist/components/context-lens/index.js +6 -0
  9. package/dist/components/floating-toolbar/floating-toolbar.js +66 -0
  10. package/dist/components/floating-toolbar/index.js +6 -0
  11. package/dist/components/follow-mode/follow-mode.js +89 -0
  12. package/dist/components/follow-mode/index.js +6 -0
  13. package/dist/components/handoff-beacon/handoff-beacon.js +78 -0
  14. package/dist/components/handoff-beacon/index.js +6 -0
  15. package/dist/components/heat-overlay/heat-overlay.js +92 -0
  16. package/dist/components/heat-overlay/index.js +6 -0
  17. package/dist/components/index.js +108 -0
  18. package/dist/components/jarvis-dock/index.js +6 -0
  19. package/dist/components/jarvis-dock/jarvis-dock.js +98 -0
  20. package/dist/components/live-cursor/index.js +6 -0
  21. package/dist/components/live-cursor/live-cursor.js +62 -0
  22. package/dist/components/metric-cluster/index.js +6 -0
  23. package/dist/components/metric-cluster/metric-cluster.js +96 -0
  24. package/dist/components/multi-select-lasso/index.js +6 -0
  25. package/dist/components/multi-select-lasso/multi-select-lasso.js +76 -0
  26. package/dist/components/object-inspector/index.js +6 -0
  27. package/dist/components/object-inspector/object-inspector.js +136 -0
  28. package/dist/components/playback-ghost/index.js +6 -0
  29. package/dist/components/playback-ghost/playback-ghost.js +83 -0
  30. package/dist/components/policy-delivery-panel/index.js +6 -0
  31. package/dist/components/policy-delivery-panel/policy-delivery-panel.js +99 -0
  32. package/dist/components/presence-sync-indicator/index.js +6 -0
  33. package/dist/components/presence-sync-indicator/presence-sync-indicator.js +73 -0
  34. package/dist/components/property-section/index.js +6 -0
  35. package/dist/components/property-section/property-section.js +101 -0
  36. package/dist/components/relationship-inspector/index.js +6 -0
  37. package/dist/components/relationship-inspector/relationship-inspector.js +102 -0
  38. package/dist/components/routing-assignment-panel/index.js +6 -0
  39. package/dist/components/routing-assignment-panel/routing-assignment-panel.js +122 -0
  40. package/dist/components/run-timeline/index.js +6 -0
  41. package/dist/components/run-timeline/run-timeline.js +221 -0
  42. package/dist/components/runtime-overview-panel/index.js +6 -0
  43. package/dist/components/runtime-overview-panel/runtime-overview-panel.js +89 -0
  44. package/dist/components/selection-halo/index.js +6 -0
  45. package/dist/components/selection-halo/selection-halo.js +72 -0
  46. package/dist/components/snap-guides/index.js +6 -0
  47. package/dist/components/snap-guides/snap-guides.js +45 -0
  48. package/dist/components/state-badge-overlay/index.js +6 -0
  49. package/dist/components/state-badge-overlay/state-badge-overlay.js +90 -0
  50. package/dist/components/sticky-metric/index.js +6 -0
  51. package/dist/components/sticky-metric/sticky-metric.js +83 -0
  52. package/dist/components/threshold-ring/index.js +6 -0
  53. package/dist/components/threshold-ring/threshold-ring.js +160 -0
  54. package/dist/components/timeline-scrubber/index.js +6 -0
  55. package/dist/components/timeline-scrubber/timeline-scrubber.js +179 -0
  56. package/dist/index.d.ts +2168 -107
  57. package/package.json +1 -1
@@ -0,0 +1,92 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { forwardRef, useId } from "react";
4
+ import { cn } from "../../lib/utils";
5
+ const TONE_FILL = {
6
+ cool: "fill-blue-500",
7
+ danger: "fill-red-500",
8
+ neutral: "fill-foreground",
9
+ warn: "fill-amber-500"
10
+ };
11
+ const DEFAULT_LABELS = {
12
+ region: "Heat overlay"
13
+ };
14
+ const clamp01 = (v) => {
15
+ if (v < 0) {
16
+ return 0;
17
+ }
18
+ if (v > 1) {
19
+ return 1;
20
+ }
21
+ return v;
22
+ };
23
+ const HeatBlob = (props) => {
24
+ const { defaultTone, gradientId, intensity, point } = props;
25
+ const weight = clamp01(point.weight);
26
+ const tone = point.tone ?? defaultTone;
27
+ return /* @__PURE__ */ jsx(
28
+ "circle",
29
+ {
30
+ className: cn("mix-blend-multiply", TONE_FILL[tone]),
31
+ cx: point.x,
32
+ cy: point.y,
33
+ "data-heat-point": point.id,
34
+ "data-heat-tone": tone,
35
+ fill: `url(#${gradientId})`,
36
+ fillOpacity: weight * 0.6,
37
+ r: Math.max(8, intensity * weight)
38
+ }
39
+ );
40
+ };
41
+ const HeatOverlay = forwardRef(
42
+ (props, ref) => {
43
+ const {
44
+ className,
45
+ defaultTone = "warn",
46
+ intensity = 48,
47
+ labels,
48
+ points,
49
+ ...rest
50
+ } = props;
51
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
52
+ const gradientId = useId();
53
+ if (points.length === 0) {
54
+ return null;
55
+ }
56
+ return /* @__PURE__ */ jsxs(
57
+ "svg",
58
+ {
59
+ "aria-label": resolvedLabels.region,
60
+ className: cn(
61
+ "pointer-events-none absolute inset-0 z-10 h-full w-full",
62
+ className
63
+ ),
64
+ "data-heat-overlay": true,
65
+ ref,
66
+ role: "img",
67
+ ...rest,
68
+ children: [
69
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("radialGradient", { cx: "50%", cy: "50%", id: gradientId, r: "50%", children: [
70
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "1" }),
71
+ /* @__PURE__ */ jsx("stop", { offset: "70%", stopColor: "currentColor", stopOpacity: "0.4" }),
72
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
73
+ ] }) }),
74
+ points.map((point) => /* @__PURE__ */ jsx(
75
+ HeatBlob,
76
+ {
77
+ defaultTone,
78
+ gradientId,
79
+ intensity,
80
+ point
81
+ },
82
+ point.id
83
+ ))
84
+ ]
85
+ }
86
+ );
87
+ }
88
+ );
89
+ HeatOverlay.displayName = "HeatOverlay";
90
+ export {
91
+ HeatOverlay
92
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ HeatOverlay
3
+ } from "./heat-overlay";
4
+ export {
5
+ HeatOverlay
6
+ };
@@ -505,6 +505,15 @@ import {
505
505
  import {
506
506
  FloatingActionButton
507
507
  } from "./floating-action-button";
508
+ import {
509
+ FloatingToolbar
510
+ } from "./floating-toolbar";
511
+ import {
512
+ SelectionHalo
513
+ } from "./selection-halo";
514
+ import {
515
+ SnapGuides
516
+ } from "./snap-guides";
508
517
  import {
509
518
  KeyboardShortcutsHelp
510
519
  } from "./keyboard-shortcuts-help";
@@ -525,6 +534,12 @@ import {
525
534
  import {
526
535
  HorizontalScrollRow
527
536
  } from "./horizontal-scroll-row";
537
+ import {
538
+ FollowMode
539
+ } from "./follow-mode";
540
+ import {
541
+ HandoffBeacon
542
+ } from "./handoff-beacon";
528
543
  import {
529
544
  ViewSwitcher
530
545
  } from "./view-switcher";
@@ -538,25 +553,91 @@ import {
538
553
  FlowFullscreen,
539
554
  useFlowDiagram
540
555
  } from "./flow-diagram";
556
+ import {
557
+ AlertPulse
558
+ } from "./alert-pulse";
541
559
  import { AnchorPort } from "./anchor-port";
560
+ import {
561
+ BottomActivityStrip
562
+ } from "./bottom-activity-strip";
563
+ import {
564
+ CommentPin
565
+ } from "./comment-pin";
542
566
  import {
543
567
  ConnectorEdge
544
568
  } from "./connector-edge";
569
+ import {
570
+ ContextLens
571
+ } from "./context-lens";
545
572
  import { EdgeLabel } from "./edge-label";
546
573
  import { GroupHull } from "./group-hull";
574
+ import {
575
+ HeatOverlay
576
+ } from "./heat-overlay";
577
+ import {
578
+ JarvisDock
579
+ } from "./jarvis-dock";
580
+ import {
581
+ LiveCursor
582
+ } from "./live-cursor";
583
+ import {
584
+ MetricCluster
585
+ } from "./metric-cluster";
586
+ import {
587
+ MultiSelectLasso
588
+ } from "./multi-select-lasso";
547
589
  import {
548
590
  ObjectCard
549
591
  } from "./object-card";
550
592
  import { ObjectHandle } from "./object-handle";
593
+ import {
594
+ ObjectInspector
595
+ } from "./object-inspector";
596
+ import {
597
+ PlaybackGhost
598
+ } from "./playback-ghost";
599
+ import {
600
+ PolicyDeliveryPanel
601
+ } from "./policy-delivery-panel";
551
602
  import {
552
603
  PresenceStack
553
604
  } from "./presence-stack";
605
+ import {
606
+ PresenceSyncIndicator
607
+ } from "./presence-sync-indicator";
608
+ import {
609
+ PropertySection
610
+ } from "./property-section";
611
+ import {
612
+ RelationshipInspector
613
+ } from "./relationship-inspector";
614
+ import {
615
+ RoutingAssignmentPanel
616
+ } from "./routing-assignment-panel";
617
+ import {
618
+ RunTimeline
619
+ } from "./run-timeline";
620
+ import {
621
+ RuntimeOverviewPanel
622
+ } from "./runtime-overview-panel";
554
623
  import {
555
624
  SelectionPresence
556
625
  } from "./selection-presence";
626
+ import {
627
+ StateBadgeOverlay
628
+ } from "./state-badge-overlay";
629
+ import {
630
+ StickyMetric
631
+ } from "./sticky-metric";
557
632
  import {
558
633
  ThreadBubble
559
634
  } from "./thread-bubble";
635
+ import {
636
+ ThresholdRing
637
+ } from "./threshold-ring";
638
+ import {
639
+ TimelineScrubber
640
+ } from "./timeline-scrubber";
560
641
  import {
561
642
  ConversationEmpty,
562
643
  ConversationHeader,
@@ -598,6 +679,7 @@ export {
598
679
  AlertDialogPortal,
599
680
  AlertDialogTitle,
600
681
  AlertDialogTrigger,
682
+ AlertPulse,
601
683
  AlertTitle,
602
684
  AnchorPort,
603
685
  AnimatedText,
@@ -613,6 +695,7 @@ export {
613
695
  BeforeAfter,
614
696
  BlogCard,
615
697
  BorderBeam,
698
+ BottomActivityStrip,
616
699
  BottomBar,
617
700
  Breadcrumb,
618
701
  Button,
@@ -651,12 +734,14 @@ export {
651
734
  CommandList,
652
735
  CommandSeparator,
653
736
  CommandShortcut,
737
+ CommentPin,
654
738
  CommonMistake,
655
739
  Comparison,
656
740
  CompletionDialog,
657
741
  ConnectorEdge,
658
742
  ContentCard,
659
743
  ContentIntro,
744
+ ContextLens,
660
745
  ContextMenu,
661
746
  ContextMenuCheckboxItem,
662
747
  ContextMenuContent,
@@ -736,10 +821,12 @@ export {
736
821
  FilterBar,
737
822
  Flashcard,
738
823
  FloatingActionButton,
824
+ FloatingToolbar,
739
825
  FlowControls,
740
826
  FlowDiagram,
741
827
  FlowErrorBoundary,
742
828
  FlowFullscreen,
829
+ FollowMode,
743
830
  Form,
744
831
  FormControl,
745
832
  FormDescription,
@@ -750,6 +837,8 @@ export {
750
837
  GlassPanel,
751
838
  Glossary,
752
839
  GroupHull,
840
+ HandoffBeacon,
841
+ HeatOverlay,
753
842
  Highlight,
754
843
  HorizontalScrollRow,
755
844
  HoverCard,
@@ -762,6 +851,7 @@ export {
762
851
  InputOTPGroup,
763
852
  InputOTPSeparator,
764
853
  InputOTPSlot,
854
+ JarvisDock,
765
855
  KeyConcept,
766
856
  KeyboardShortcutsHelp,
767
857
  Label,
@@ -769,6 +859,7 @@ export {
769
859
  LearningObjectives,
770
860
  LeftRail,
771
861
  LineChart,
862
+ LiveCursor,
772
863
  LiveFeed,
773
864
  MDXContent,
774
865
  MarketTreemap,
@@ -789,10 +880,12 @@ export {
789
880
  MenubarSubContent,
790
881
  MenubarSubTrigger,
791
882
  MenubarTrigger,
883
+ MetricCluster,
792
884
  MetricGauge,
793
885
  MiniMapPanel,
794
886
  ModelSelector,
795
887
  MultiSelect,
888
+ MultiSelectLasso,
796
889
  NavbarSaas,
797
890
  NavigationMenu,
798
891
  NavigationMenuContent,
@@ -806,18 +899,22 @@ export {
806
899
  NumberTicker,
807
900
  ObjectCard,
808
901
  ObjectHandle,
902
+ ObjectInspector,
809
903
  OrderBook,
810
904
  OverviewBoard,
811
905
  OverviewCard,
812
906
  Pagination,
813
907
  PasswordInput,
814
908
  PlanBadge,
909
+ PlaybackGhost,
910
+ PolicyDeliveryPanel,
815
911
  Popover,
816
912
  PopoverAnchor,
817
913
  PopoverContent,
818
914
  PopoverTrigger,
819
915
  Prerequisites,
820
916
  PresenceStack,
917
+ PresenceSyncIndicator,
821
918
  ProTip,
822
919
  ProfileSection,
823
920
  ProgressBar,
@@ -829,15 +926,20 @@ export {
829
926
  ProgressTrackerOverview,
830
927
  ProgressTrackerStat,
831
928
  ProgressTrackerStats,
929
+ PropertySection,
832
930
  Quiz,
833
931
  RadioGroup,
834
932
  RadioGroupItem,
835
933
  Rating,
934
+ RelationshipInspector,
836
935
  ResizableHandle,
837
936
  ResizablePanel,
838
937
  ResizablePanelGroup,
839
938
  RightDock,
840
939
  RoleBadge,
940
+ RoutingAssignmentPanel,
941
+ RunTimeline,
942
+ RuntimeOverviewPanel,
841
943
  ScopeSelector,
842
944
  ScrollArea,
843
945
  ScrollBar,
@@ -855,6 +957,7 @@ export {
855
957
  SelectSeparator,
856
958
  SelectTrigger,
857
959
  SelectValue,
960
+ SelectionHalo,
858
961
  SelectionPresence,
859
962
  Separator,
860
963
  SeverityBadge,
@@ -877,16 +980,19 @@ export {
877
980
  Skeleton,
878
981
  Slider,
879
982
  Slideshow,
983
+ SnapGuides,
880
984
  SocialFAB,
881
985
  SparklineGrid,
882
986
  Spinner,
883
987
  StatCard,
988
+ StateBadgeOverlay,
884
989
  StatusBoard,
885
990
  StatusIndicator,
886
991
  Step,
887
992
  StepByStep,
888
993
  StepNavigation,
889
994
  Stepper,
995
+ StickyMetric,
890
996
  SubscriptionCard,
891
997
  Summary,
892
998
  Switch,
@@ -912,7 +1018,9 @@ export {
912
1018
  ThemeToggle,
913
1019
  ThinkingBlock,
914
1020
  ThreadBubble,
1021
+ ThresholdRing,
915
1022
  TickerTape,
1023
+ TimelineScrubber,
916
1024
  Toast,
917
1025
  ToastAction,
918
1026
  ToastClose,
@@ -0,0 +1,6 @@
1
+ import {
2
+ JarvisDock
3
+ } from "./jarvis-dock";
4
+ export {
5
+ JarvisDock
6
+ };
@@ -0,0 +1,98 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ forwardRef
5
+ } from "react";
6
+ import { cn } from "../../lib/utils";
7
+ const TONE_CLASS = {
8
+ danger: "text-red-600 dark:text-red-400",
9
+ neutral: "text-foreground",
10
+ primary: "text-blue-600 dark:text-blue-400",
11
+ success: "text-emerald-600 dark:text-emerald-400"
12
+ };
13
+ const DEFAULT_LABELS = {
14
+ paletteTrigger: "Open command palette",
15
+ region: "Jarvis dock"
16
+ };
17
+ const ActionButton = (props) => {
18
+ const { action } = props;
19
+ const tone = action.tone ?? "neutral";
20
+ const handleClick = () => {
21
+ action.onActivate();
22
+ };
23
+ return /* @__PURE__ */ jsxs(
24
+ "button",
25
+ {
26
+ className: "group relative flex h-12 w-12 flex-col items-center justify-center gap-0.5 rounded-md border border-transparent text-[10px] uppercase tracking-wide text-muted-foreground transition-colors hover:border-border hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
27
+ "data-jarvis-action": action.id,
28
+ "data-jarvis-tone": tone,
29
+ onClick: handleClick,
30
+ type: "button",
31
+ children: [
32
+ /* @__PURE__ */ jsx(
33
+ "span",
34
+ {
35
+ "aria-hidden": "true",
36
+ className: cn(
37
+ "text-base leading-none transition-transform group-hover:scale-110",
38
+ TONE_CLASS[tone]
39
+ ),
40
+ children: action.glyph
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: action.label }),
44
+ action.badge ? /* @__PURE__ */ jsx(
45
+ "span",
46
+ {
47
+ className: "absolute right-1 top-1 inline-flex min-h-[14px] min-w-[14px] items-center justify-center rounded-full bg-foreground px-1 text-[9px] font-medium text-background",
48
+ "data-jarvis-badge": true,
49
+ children: action.badge
50
+ }
51
+ ) : null
52
+ ]
53
+ }
54
+ );
55
+ };
56
+ const JarvisDock = forwardRef(
57
+ (props, ref) => {
58
+ const { actions, className, labels, onOpenPalette, ...rest } = props;
59
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
60
+ const handlePalette = () => {
61
+ onOpenPalette?.();
62
+ };
63
+ return /* @__PURE__ */ jsxs(
64
+ "nav",
65
+ {
66
+ "aria-label": resolvedLabels.region,
67
+ className: cn(
68
+ "inline-flex items-center gap-1 rounded-2xl border bg-background/90 p-1.5 shadow-md backdrop-blur",
69
+ className
70
+ ),
71
+ "data-jarvis-dock": true,
72
+ ref,
73
+ ...rest,
74
+ children: [
75
+ actions.map((action) => /* @__PURE__ */ jsx(ActionButton, { action }, action.id)),
76
+ onOpenPalette ? /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 h-8 w-px bg-border" }),
78
+ /* @__PURE__ */ jsx(
79
+ "button",
80
+ {
81
+ "aria-label": resolvedLabels.paletteTrigger,
82
+ className: "flex h-12 w-12 items-center justify-center rounded-md border border-transparent text-base text-muted-foreground transition-colors hover:border-border hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
83
+ "data-jarvis-palette-trigger": true,
84
+ onClick: handlePalette,
85
+ type: "button",
86
+ children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2318" })
87
+ }
88
+ )
89
+ ] }) : null
90
+ ]
91
+ }
92
+ );
93
+ }
94
+ );
95
+ JarvisDock.displayName = "JarvisDock";
96
+ export {
97
+ JarvisDock
98
+ };
@@ -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
+ MetricCluster
3
+ } from "./metric-cluster";
4
+ export {
5
+ MetricCluster
6
+ };
@@ -0,0 +1,96 @@
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 TONE_DOT = {
8
+ danger: "bg-red-500",
9
+ neutral: "bg-muted-foreground",
10
+ success: "bg-emerald-500",
11
+ warn: "bg-amber-500"
12
+ };
13
+ const ANCHOR_TRANSFORM = {
14
+ "bottom-left": "translate(-100%, 100%)",
15
+ "bottom-right": "translate(0%, 100%)",
16
+ "top-left": "translate(-100%, -100%)",
17
+ "top-right": "translate(0%, -100%)"
18
+ };
19
+ const DEFAULT_LABELS = {
20
+ region: "Metric cluster"
21
+ };
22
+ const Row = (props) => {
23
+ const { entry } = props;
24
+ const tone = entry.tone ?? "neutral";
25
+ return /* @__PURE__ */ jsxs(
26
+ "li",
27
+ {
28
+ className: "flex items-center justify-between gap-2 text-[11px]",
29
+ "data-metric-cluster-row": entry.id,
30
+ "data-metric-cluster-tone": tone,
31
+ children: [
32
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-muted-foreground", children: [
33
+ /* @__PURE__ */ jsx(
34
+ "span",
35
+ {
36
+ "aria-hidden": "true",
37
+ className: cn("h-1.5 w-1.5 rounded-full", TONE_DOT[tone])
38
+ }
39
+ ),
40
+ entry.label
41
+ ] }),
42
+ /* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground", children: entry.value })
43
+ ]
44
+ }
45
+ );
46
+ };
47
+ const MetricCluster = forwardRef(
48
+ (props, ref) => {
49
+ const {
50
+ anchor = "top-right",
51
+ className,
52
+ labels,
53
+ metrics,
54
+ title,
55
+ x,
56
+ y,
57
+ ...rest
58
+ } = props;
59
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
60
+ return /* @__PURE__ */ jsxs(
61
+ "div",
62
+ {
63
+ "aria-label": resolvedLabels.region,
64
+ className: cn(
65
+ "pointer-events-none absolute z-20 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-2 shadow-sm backdrop-blur",
66
+ className
67
+ ),
68
+ "data-metric-cluster": true,
69
+ "data-metric-cluster-anchor": anchor,
70
+ ref,
71
+ role: "status",
72
+ style: {
73
+ left: x,
74
+ top: y,
75
+ transform: ANCHOR_TRANSFORM[anchor]
76
+ },
77
+ ...rest,
78
+ children: [
79
+ title ? /* @__PURE__ */ jsx(
80
+ "header",
81
+ {
82
+ className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground",
83
+ "data-metric-cluster-title": true,
84
+ children: title
85
+ }
86
+ ) : null,
87
+ /* @__PURE__ */ jsx("ul", { className: "space-y-0.5", children: metrics.map((entry) => /* @__PURE__ */ jsx(Row, { entry }, entry.id)) })
88
+ ]
89
+ }
90
+ );
91
+ }
92
+ );
93
+ MetricCluster.displayName = "MetricCluster";
94
+ export {
95
+ MetricCluster
96
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ MultiSelectLasso
3
+ } from "./multi-select-lasso";
4
+ export {
5
+ MultiSelectLasso
6
+ };