@vllnt/ui 0.2.0 → 0.2.1-canary.9c473e0

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 (58) 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/connector-edge/connector-edge.js +66 -0
  20. package/dist/components/connector-edge/index.js +6 -0
  21. package/dist/components/data-list/data-list.js +1 -0
  22. package/dist/components/edge-label/edge-label.js +26 -0
  23. package/dist/components/edge-label/index.js +4 -0
  24. package/dist/components/form/form.js +263 -0
  25. package/dist/components/form/index.js +16 -0
  26. package/dist/components/glass-panel/glass-panel.js +21 -0
  27. package/dist/components/glass-panel/index.js +4 -0
  28. package/dist/components/group-hull/group-hull.js +29 -0
  29. package/dist/components/group-hull/index.js +4 -0
  30. package/dist/components/index.js +88 -0
  31. package/dist/components/left-rail/index.js +4 -0
  32. package/dist/components/left-rail/left-rail.js +25 -0
  33. package/dist/components/mini-map-panel/index.js +6 -0
  34. package/dist/components/mini-map-panel/mini-map-panel.js +74 -0
  35. package/dist/components/multi-select/index.js +6 -0
  36. package/dist/components/multi-select/multi-select.js +258 -0
  37. package/dist/components/object-card/index.js +6 -0
  38. package/dist/components/object-card/object-card.js +126 -0
  39. package/dist/components/object-handle/index.js +4 -0
  40. package/dist/components/object-handle/object-handle.js +38 -0
  41. package/dist/components/overview-board/index.js +8 -0
  42. package/dist/components/overview-board/overview-board.js +127 -0
  43. package/dist/components/right-dock/index.js +4 -0
  44. package/dist/components/right-dock/right-dock.js +28 -0
  45. package/dist/components/segmented-control/index.js +12 -0
  46. package/dist/components/segmented-control/segmented-control.js +61 -0
  47. package/dist/components/spinner/unicode-spinner.js +1 -0
  48. package/dist/components/tags-input/index.js +4 -0
  49. package/dist/components/tags-input/tags-input.js +178 -0
  50. package/dist/components/top-bar/index.js +4 -0
  51. package/dist/components/top-bar/top-bar.js +31 -0
  52. package/dist/components/usage-breakdown/usage-breakdown.js +1 -0
  53. package/dist/components/workspace-switcher/index.js +6 -0
  54. package/dist/components/workspace-switcher/workspace-switcher.js +61 -0
  55. package/dist/components/zoom-hud/index.js +4 -0
  56. package/dist/components/zoom-hud/zoom-hud.js +61 -0
  57. package/dist/index.d.ts +455 -5
  58. package/package.json +1 -1
@@ -0,0 +1,263 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+ import { cn } from "../../lib/utils";
6
+ import { Label } from "../label";
7
+ const FormRootContext = React.createContext(
8
+ void 0
9
+ );
10
+ const FormItemContext = React.createContext(
11
+ void 0
12
+ );
13
+ function useFormRootContext(componentName) {
14
+ const context = React.useContext(FormRootContext);
15
+ if (context === void 0) {
16
+ throw new Error(`${componentName} must be used within Form.`);
17
+ }
18
+ return context;
19
+ }
20
+ function useFormItemContext(componentName) {
21
+ const context = React.useContext(FormItemContext);
22
+ if (context === void 0) {
23
+ throw new Error(`${componentName} must be used within FormItem.`);
24
+ }
25
+ return context;
26
+ }
27
+ function composeIds(...ids) {
28
+ const value = ids.filter((id) => id !== void 0 && id.length > 0).join(" ");
29
+ return value.length > 0 ? value : void 0;
30
+ }
31
+ function resolveItemId(baseId, generatedId, suffix) {
32
+ if (baseId === void 0) {
33
+ return `${generatedId}-${suffix}`;
34
+ }
35
+ return baseId.endsWith(`-${suffix}`) ? `${baseId}-${generatedId}` : `${baseId}-${suffix}-${generatedId}`;
36
+ }
37
+ function isNamedFormChild(child, name) {
38
+ if (!React.isValidElement(child)) {
39
+ return false;
40
+ }
41
+ const { type } = child;
42
+ if (typeof type === "string" || typeof type === "symbol") {
43
+ return false;
44
+ }
45
+ return "displayName" in type && type.displayName === name;
46
+ }
47
+ function hasVisibleContent(children) {
48
+ return React.Children.toArray(children).some((child) => {
49
+ if (child === null || child === void 0 || typeof child === "boolean") {
50
+ return false;
51
+ }
52
+ if (typeof child === "string") {
53
+ return child.length > 0;
54
+ }
55
+ if (typeof child === "number") {
56
+ return true;
57
+ }
58
+ if (React.isValidElement(child)) {
59
+ const nestedChildren = child.props.children;
60
+ return nestedChildren === void 0 ? true : hasVisibleContent(nestedChildren);
61
+ }
62
+ return true;
63
+ });
64
+ }
65
+ function hasRenderedFormChild(children, name) {
66
+ return React.Children.toArray(children).some((child) => {
67
+ if (isNamedFormChild(child, name)) {
68
+ return name === "FormMessage" ? hasVisibleContent(child.props.children) : true;
69
+ }
70
+ if (React.isValidElement(child)) {
71
+ return hasRenderedFormChild(child.props.children, name);
72
+ }
73
+ return false;
74
+ });
75
+ }
76
+ const Form = React.forwardRef(
77
+ ({
78
+ className,
79
+ controlId,
80
+ descriptionId,
81
+ disabled = false,
82
+ invalid = false,
83
+ messageId,
84
+ required = false,
85
+ ...props
86
+ }, ref) => {
87
+ const value = React.useMemo(
88
+ () => ({
89
+ controlId,
90
+ descriptionId,
91
+ disabled,
92
+ invalid,
93
+ messageId,
94
+ required
95
+ }),
96
+ [controlId, descriptionId, disabled, invalid, messageId, required]
97
+ );
98
+ return /* @__PURE__ */ jsx(FormRootContext.Provider, { value, children: /* @__PURE__ */ jsx(
99
+ "form",
100
+ {
101
+ className: cn("space-y-2", className),
102
+ "data-disabled": disabled ? "true" : void 0,
103
+ "data-invalid": invalid ? "true" : void 0,
104
+ ref,
105
+ ...props
106
+ }
107
+ ) });
108
+ }
109
+ );
110
+ Form.displayName = "Form";
111
+ const FormItem = React.forwardRef(
112
+ ({
113
+ children,
114
+ className,
115
+ disabled: itemDisabled,
116
+ invalid: itemInvalid,
117
+ required: itemRequired,
118
+ ...props
119
+ }, ref) => {
120
+ const {
121
+ controlId: controlIdBase,
122
+ descriptionId: descriptionIdBase,
123
+ disabled,
124
+ invalid,
125
+ messageId: messageIdBase,
126
+ required
127
+ } = useFormRootContext("FormItem");
128
+ const generatedId = React.useId();
129
+ const hasDescription = hasRenderedFormChild(children, "FormDescription");
130
+ const hasMessage = hasRenderedFormChild(children, "FormMessage");
131
+ const effectiveDisabled = itemDisabled ?? disabled;
132
+ const effectiveInvalid = itemInvalid ?? invalid;
133
+ const effectiveRequired = itemRequired ?? required;
134
+ const value = React.useMemo(
135
+ () => ({
136
+ controlId: resolveItemId(controlIdBase, generatedId, "control"),
137
+ descriptionId: resolveItemId(
138
+ descriptionIdBase,
139
+ generatedId,
140
+ "description"
141
+ ),
142
+ disabled: effectiveDisabled,
143
+ hasDescription,
144
+ hasMessage,
145
+ invalid: effectiveInvalid,
146
+ messageId: resolveItemId(messageIdBase, generatedId, "message"),
147
+ required: effectiveRequired
148
+ }),
149
+ [
150
+ controlIdBase,
151
+ descriptionIdBase,
152
+ effectiveDisabled,
153
+ effectiveInvalid,
154
+ effectiveRequired,
155
+ generatedId,
156
+ hasDescription,
157
+ hasMessage,
158
+ messageIdBase
159
+ ]
160
+ );
161
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { className: cn("space-y-2", className), ref, ...props, children }) });
162
+ }
163
+ );
164
+ FormItem.displayName = "FormItem";
165
+ const FormLabel = React.forwardRef(({ className, htmlFor, ...props }, ref) => {
166
+ const { controlId, invalid } = useFormItemContext("FormLabel");
167
+ return /* @__PURE__ */ jsx(
168
+ Label,
169
+ {
170
+ className: cn(invalid && "text-destructive", className),
171
+ "data-invalid": invalid ? "true" : void 0,
172
+ htmlFor: htmlFor ?? controlId,
173
+ ref,
174
+ ...props
175
+ }
176
+ );
177
+ });
178
+ FormLabel.displayName = "FormLabel";
179
+ const FormControl = React.forwardRef(
180
+ ({ disabled: controlDisabled, id: _id, required: controlRequired, ...props }, ref) => {
181
+ const {
182
+ controlId,
183
+ descriptionId,
184
+ disabled,
185
+ hasDescription,
186
+ hasMessage,
187
+ invalid,
188
+ messageId,
189
+ required
190
+ } = useFormItemContext("FormControl");
191
+ const describedBy = composeIds(
192
+ props["aria-describedby"],
193
+ hasDescription ? descriptionId : void 0,
194
+ invalid && hasMessage ? messageId : void 0
195
+ );
196
+ const effectiveDisabled = controlDisabled ?? disabled;
197
+ const effectiveRequired = controlRequired ?? required;
198
+ const nativeConstraintProps = {
199
+ disabled: effectiveDisabled || void 0,
200
+ required: effectiveRequired || void 0
201
+ };
202
+ return /* @__PURE__ */ jsx(
203
+ Slot,
204
+ {
205
+ ...props,
206
+ ...nativeConstraintProps,
207
+ "aria-describedby": describedBy,
208
+ "aria-disabled": props["aria-disabled"] ?? (effectiveDisabled || void 0),
209
+ "aria-invalid": props["aria-invalid"] ?? (invalid || void 0),
210
+ "aria-required": props["aria-required"] ?? (effectiveRequired || void 0),
211
+ "data-disabled": effectiveDisabled ? "true" : void 0,
212
+ "data-invalid": invalid ? "true" : void 0,
213
+ id: controlId,
214
+ ref
215
+ }
216
+ );
217
+ }
218
+ );
219
+ FormControl.displayName = "FormControl";
220
+ const FormDescription = React.forwardRef(({ className, id: _id, ...props }, ref) => {
221
+ const { descriptionId } = useFormItemContext("FormDescription");
222
+ return /* @__PURE__ */ jsx(
223
+ "p",
224
+ {
225
+ ...props,
226
+ className: cn("text-sm text-muted-foreground", className),
227
+ id: descriptionId,
228
+ ref
229
+ }
230
+ );
231
+ });
232
+ FormDescription.displayName = "FormDescription";
233
+ const FormMessage = React.forwardRef(({ children, className, id: _id, ...props }, ref) => {
234
+ const { invalid, messageId } = useFormItemContext("FormMessage");
235
+ const hasChildren = hasVisibleContent(children);
236
+ if (!hasChildren) {
237
+ return null;
238
+ }
239
+ return /* @__PURE__ */ jsx(
240
+ "p",
241
+ {
242
+ ...props,
243
+ className: cn(
244
+ "text-sm font-medium",
245
+ invalid ? "text-destructive" : "text-foreground",
246
+ className
247
+ ),
248
+ id: messageId,
249
+ ref,
250
+ role: invalid ? "alert" : void 0,
251
+ children
252
+ }
253
+ );
254
+ });
255
+ FormMessage.displayName = "FormMessage";
256
+ export {
257
+ Form,
258
+ FormControl,
259
+ FormDescription,
260
+ FormItem,
261
+ FormLabel,
262
+ FormMessage
263
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ Form,
3
+ FormControl,
4
+ FormDescription,
5
+ FormItem,
6
+ FormLabel,
7
+ FormMessage
8
+ } from "./form";
9
+ export {
10
+ Form,
11
+ FormControl,
12
+ FormDescription,
13
+ FormItem,
14
+ FormLabel,
15
+ FormMessage
16
+ };
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cn } from "../../lib/utils";
4
+ const GlassPanel = forwardRef(
5
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ jsx(
6
+ "div",
7
+ {
8
+ className: cn(
9
+ "rounded-2xl border border-border/60 bg-background/70 shadow-[0_12px_40px_hsl(var(--foreground)/0.08)] backdrop-blur-xl",
10
+ className
11
+ ),
12
+ ref,
13
+ ...props,
14
+ children
15
+ }
16
+ )
17
+ );
18
+ GlassPanel.displayName = "GlassPanel";
19
+ export {
20
+ GlassPanel
21
+ };
@@ -0,0 +1,4 @@
1
+ import { GlassPanel } from "./glass-panel";
2
+ export {
3
+ GlassPanel
4
+ };
@@ -0,0 +1,29 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cn } from "../../lib/utils";
4
+ const GroupHull = forwardRef(
5
+ ({ children, className, description, eyebrow, title, ...props }, ref) => /* @__PURE__ */ jsxs(
6
+ "section",
7
+ {
8
+ className: cn(
9
+ "relative flex min-h-[280px] flex-col gap-4 rounded-[2rem] border border-dashed border-border/70 bg-muted/12 p-5",
10
+ className
11
+ ),
12
+ ref,
13
+ ...props,
14
+ children: [
15
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-3 rounded-[1.5rem] border border-border/40" }),
16
+ /* @__PURE__ */ jsxs("div", { className: "relative space-y-1", children: [
17
+ eyebrow ? /* @__PURE__ */ jsx("div", { className: "text-[11px] uppercase tracking-[0.18em] text-muted-foreground", children: eyebrow }) : null,
18
+ /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold tracking-tight text-foreground", children: title }),
19
+ description ? /* @__PURE__ */ jsx("p", { className: "max-w-[48ch] text-sm leading-6 text-muted-foreground", children: description }) : null
20
+ ] }),
21
+ /* @__PURE__ */ jsx("div", { className: "relative flex flex-1 flex-wrap items-start gap-4", children })
22
+ ]
23
+ }
24
+ )
25
+ );
26
+ GroupHull.displayName = "GroupHull";
27
+ export {
28
+ GroupHull
29
+ };
@@ -0,0 +1,4 @@
1
+ import { GroupHull } from "./group-hull";
2
+ export {
3
+ GroupHull
4
+ };
@@ -62,6 +62,24 @@ 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
+ FormItem,
70
+ FormLabel,
71
+ FormMessage
72
+ } from "./form";
73
+ import {
74
+ MultiSelect
75
+ } from "./multi-select";
76
+ import { TagsInput } from "./tags-input";
77
+ import {
78
+ SegmentedControl,
79
+ SegmentedControlItem,
80
+ segmentedControlItemVariants,
81
+ segmentedControlVariants
82
+ } from "./segmented-control";
65
83
  import {
66
84
  toast,
67
85
  Toast,
@@ -275,13 +293,35 @@ import {
275
293
  } from "./world-clock-bar";
276
294
  import { CodeBlock } from "./code-block";
277
295
  import { MDXContent } from "./mdx-content";
296
+ import {
297
+ CanvasShell
298
+ } from "./canvas-shell";
299
+ import {
300
+ CanvasView
301
+ } from "./canvas-view";
302
+ import { BottomBar } from "./bottom-bar";
303
+ import {
304
+ ChatDockSection
305
+ } from "./chat-dock-section";
306
+ import { GlassPanel } from "./glass-panel";
307
+ import { LeftRail } from "./left-rail";
308
+ import {
309
+ MiniMapPanel
310
+ } from "./mini-map-panel";
311
+ import {
312
+ OverviewBoard,
313
+ OverviewCard
314
+ } from "./overview-board";
278
315
  import {
279
316
  NavbarSaas,
280
317
  useMobile
281
318
  } from "./navbar-saas";
319
+ import { RightDock } from "./right-dock";
282
320
  import { Sidebar } from "./sidebar";
283
321
  import { SidebarProvider, useSidebar } from "./sidebar-provider";
284
322
  import { TableOfContents } from "./table-of-contents";
323
+ import { TopBar } from "./top-bar";
324
+ import { ZoomHUD } from "./zoom-hud";
285
325
  import {
286
326
  ActivityLog
287
327
  } from "./activity-log";
@@ -385,6 +425,9 @@ import {
385
425
  Summary
386
426
  } from "./learning-objectives";
387
427
  import { ProgressBar } from "./progress-bar";
428
+ import {
429
+ ProgressCard
430
+ } from "./progress-card";
388
431
  import {
389
432
  CommonMistake,
390
433
  ProTip
@@ -459,6 +502,9 @@ import {
459
502
  import {
460
503
  ViewSwitcher
461
504
  } from "./view-switcher";
505
+ import {
506
+ WorkspaceSwitcher
507
+ } from "./workspace-switcher";
462
508
  import {
463
509
  FlowControls,
464
510
  FlowDiagram,
@@ -466,6 +512,16 @@ import {
466
512
  FlowFullscreen,
467
513
  useFlowDiagram
468
514
  } from "./flow-diagram";
515
+ import { AnchorPort } from "./anchor-port";
516
+ import {
517
+ ConnectorEdge
518
+ } from "./connector-edge";
519
+ import { EdgeLabel } from "./edge-label";
520
+ import { GroupHull } from "./group-hull";
521
+ import {
522
+ ObjectCard
523
+ } from "./object-card";
524
+ import { ObjectHandle } from "./object-handle";
469
525
  import { InlineInput } from "./inline-input";
470
526
  import {
471
527
  ModelSelector
@@ -498,6 +554,7 @@ export {
498
554
  AlertDialogTitle,
499
555
  AlertDialogTrigger,
500
556
  AlertTitle,
557
+ AnchorPort,
501
558
  AnimatedText,
502
559
  Annotation,
503
560
  AreaChart,
@@ -511,11 +568,14 @@ export {
511
568
  BeforeAfter,
512
569
  BlogCard,
513
570
  BorderBeam,
571
+ BottomBar,
514
572
  Breadcrumb,
515
573
  Button,
516
574
  Calendar,
517
575
  Callout,
518
576
  CandlestickChart,
577
+ CanvasShell,
578
+ CanvasView,
519
579
  Card,
520
580
  CardContent,
521
581
  CardDescription,
@@ -528,6 +588,7 @@ export {
528
588
  CarouselNext,
529
589
  CarouselPrevious,
530
590
  CategoryFilter,
591
+ ChatDockSection,
531
592
  Checkbox,
532
593
  Checklist,
533
594
  CodeBlock,
@@ -548,6 +609,7 @@ export {
548
609
  CommonMistake,
549
610
  Comparison,
550
611
  CompletionDialog,
612
+ ConnectorEdge,
551
613
  ContentCard,
552
614
  ContentIntro,
553
615
  ContextMenu,
@@ -609,6 +671,7 @@ export {
609
671
  DropdownMenuSubContent,
610
672
  DropdownMenuSubTrigger,
611
673
  DropdownMenuTrigger,
674
+ EdgeLabel,
612
675
  Exercise,
613
676
  FAQ,
614
677
  FAQItem,
@@ -621,7 +684,15 @@ export {
621
684
  FlowDiagram,
622
685
  FlowErrorBoundary,
623
686
  FlowFullscreen,
687
+ Form,
688
+ FormControl,
689
+ FormDescription,
690
+ FormItem,
691
+ FormLabel,
692
+ FormMessage,
693
+ GlassPanel,
624
694
  Glossary,
695
+ GroupHull,
625
696
  Highlight,
626
697
  HorizontalScrollRow,
627
698
  HoverCard,
@@ -638,6 +709,7 @@ export {
638
709
  Label,
639
710
  LangProvider,
640
711
  LearningObjectives,
712
+ LeftRail,
641
713
  LineChart,
642
714
  LiveFeed,
643
715
  MDXContent,
@@ -660,7 +732,9 @@ export {
660
732
  MenubarSubTrigger,
661
733
  MenubarTrigger,
662
734
  MetricGauge,
735
+ MiniMapPanel,
663
736
  ModelSelector,
737
+ MultiSelect,
664
738
  NavbarSaas,
665
739
  NavigationMenu,
666
740
  NavigationMenuContent,
@@ -672,7 +746,11 @@ export {
672
746
  NavigationMenuViewport,
673
747
  NumberInput,
674
748
  NumberTicker,
749
+ ObjectCard,
750
+ ObjectHandle,
675
751
  OrderBook,
752
+ OverviewBoard,
753
+ OverviewCard,
676
754
  Pagination,
677
755
  PasswordInput,
678
756
  PlanBadge,
@@ -684,6 +762,7 @@ export {
684
762
  ProTip,
685
763
  ProfileSection,
686
764
  ProgressBar,
765
+ ProgressCard,
687
766
  Quiz,
688
767
  RadioGroup,
689
768
  RadioGroupItem,
@@ -691,12 +770,15 @@ export {
691
770
  ResizableHandle,
692
771
  ResizablePanel,
693
772
  ResizablePanelGroup,
773
+ RightDock,
694
774
  RoleBadge,
695
775
  ScopeSelector,
696
776
  ScrollArea,
697
777
  ScrollBar,
698
778
  SearchBar,
699
779
  SearchDialog,
780
+ SegmentedControl,
781
+ SegmentedControlItem,
700
782
  Select,
701
783
  SelectContent,
702
784
  SelectGroup,
@@ -756,6 +838,7 @@ export {
756
838
  TabsContent,
757
839
  TabsList,
758
840
  TabsTrigger,
841
+ TagsInput,
759
842
  Terminal,
760
843
  Textarea,
761
844
  ThemeProvider,
@@ -775,6 +858,7 @@ export {
775
858
  TooltipContent,
776
859
  TooltipProvider,
777
860
  TooltipTrigger,
861
+ TopBar,
778
862
  Tour,
779
863
  TruncatedText,
780
864
  TutorialCard,
@@ -788,7 +872,9 @@ export {
788
872
  ViewSwitcher,
789
873
  WalletCard,
790
874
  Watchlist,
875
+ WorkspaceSwitcher,
791
876
  WorldClockBar,
877
+ ZoomHUD,
792
878
  alertVariants,
793
879
  avatarGroupVariants,
794
880
  avatarItemVariants,
@@ -800,6 +886,8 @@ export {
800
886
  dotVariants,
801
887
  mdxComponents,
802
888
  navigationMenuTriggerStyle,
889
+ segmentedControlItemVariants,
890
+ segmentedControlVariants,
803
891
  severityBadgeVariants,
804
892
  statCardVariants,
805
893
  statusIndicatorVariants,
@@ -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
+ 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
+ };