@luxonis/component-lib 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -578,8 +578,9 @@ var DescriptionRecepie = cva5("flex flex-col ", {
578
578
  center: "items-start sm:items-center",
579
579
  allwayscenter: "items-center",
580
580
  left: "items-start",
581
+ right: "items-end",
581
582
  leftCenterMobile: "items-start sm:items-center",
582
- desktopCenterMobileLeft: "w-full items-start !text-left sm:items-center sm:!text-center",
583
+ desktopCenterMobileLeft: "w-full items-start !text-left sm:!items-center sm:!text-center",
583
584
  desktopLeftMobileCenter: "w-full items-center !text-center lg:items-start lg:!text-left"
584
585
  },
585
586
  gap: {
@@ -619,7 +620,7 @@ var Description = (props) => {
619
620
  descriptionStyle,
620
621
  wrapperClassName
621
622
  } = props;
622
- const alingText = align === "left" || align === "desktopLeftMobileCenter" ? "left" : "center";
623
+ const alingText = align === "left" || align === "desktopLeftMobileCenter" ? "left" : align === "right" ? "right" : "center";
623
624
  return /* @__PURE__ */ jsxs5("div", { className: cx7(DescriptionRecepie({ align, gap }), className), children: [
624
625
  /* @__PURE__ */ jsxs5("div", { className: cx7(`flex flex-col gap-4 sm:gap-6 w-full`, wrapperClassName ?? "", InnerGap({ innerGap })), children: [
625
626
  subTitle && /* @__PURE__ */ jsx9(
@@ -670,6 +671,9 @@ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
670
671
  var Hero = (props) => {
671
672
  const { title, description, button, bgImageLink, desctipionSize = "default" } = props;
672
673
  const descriptionSize = () => {
674
+ if (!description) {
675
+ return "";
676
+ }
673
677
  if (desctipionSize === "lg") {
674
678
  return cx9("lg:max-w-[525px] max-w-96");
675
679
  }
@@ -688,7 +692,7 @@ var Hero = (props) => {
688
692
  /* @__PURE__ */ jsx11("div", { className: "page-card-content relative size-full h-[810px] w-full sm:h-[914px]", children: /* @__PURE__ */ jsxs6("div", { className: " absolute inset-x-0 bottom-10 mx-auto flex w-full flex-col items-center justify-between gap-4 md:flex-row md:items-end ", children: [
689
693
  /* @__PURE__ */ jsx11("div", { className: "flex w-full flex-row justify-center text-white md:justify-start", children: /* @__PURE__ */ jsx11(Text, { text: title, size: "h1", className: "z-[2] w-96 text-h4 sm:text-h4 xl:w-auto xl:text-h1" }) }),
690
694
  /* @__PURE__ */ jsxs6("div", { className: cx9("flex flex-col gap-8 md:gap-6 z-[2]", descriptionSize()), children: [
691
- /* @__PURE__ */ jsx11(Text, { text: description, color: "white", size: "lg" }),
695
+ description && /* @__PURE__ */ jsx11(Text, { text: description, color: "white", size: "lg" }),
692
696
  button
693
697
  ] })
694
698
  ] }) }),
@@ -1047,62 +1051,101 @@ var Textarea = React12.forwardRef(
1047
1051
  Textarea.displayName = "Textarea";
1048
1052
 
1049
1053
  // src/Video.tsx
1050
- import { useRef as useRef3, forwardRef as forwardRef8, useImperativeHandle, useState as useState4 } from "react";
1054
+ import { FullScreen, useFullScreenHandle } from "react-full-screen";
1055
+ import { useEffect as useEffect2, useRef as useRef3, useState as useState4 } from "react";
1056
+ import { cx as cx18 } from "class-variance-authority";
1057
+ import { Icon as Icon6 } from "@iconify/react";
1058
+ import { useInView } from "react-intersection-observer";
1051
1059
  import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1052
- var Video = forwardRef8(({ src, className }, ref) => {
1060
+ function Video(props) {
1061
+ const {
1062
+ src,
1063
+ buttonPlay,
1064
+ buttonRepeat,
1065
+ className,
1066
+ wrapperClassName,
1067
+ autoPlayInView,
1068
+ buttonFullscreen,
1069
+ ...rest
1070
+ } = props;
1053
1071
  const videoRef = useRef3(null);
1054
- const [isPlaying, setIsPlaying] = useState4(false);
1055
- useImperativeHandle(ref, () => ({
1056
- togglePlay: () => {
1057
- if (videoRef.current) {
1058
- if (videoRef.current.paused) {
1059
- videoRef.current.play();
1060
- setIsPlaying(true);
1061
- } else {
1062
- videoRef.current.pause();
1063
- setIsPlaying(false);
1064
- }
1065
- }
1066
- }
1067
- }));
1072
+ const { ref, inView } = useInView({});
1073
+ const [isPlaying, setIsPlaying] = useState4(true);
1068
1074
  const setPlaying = () => {
1069
- if (videoRef.current) {
1070
- if (videoRef.current.paused) {
1071
- videoRef.current.play();
1072
- setIsPlaying(true);
1073
- } else {
1074
- videoRef.current.pause();
1075
- setIsPlaying(false);
1076
- }
1075
+ if (isPlaying) {
1076
+ videoRef.current?.pause();
1077
+ setIsPlaying(false);
1078
+ return;
1077
1079
  }
1080
+ setIsPlaying(true);
1081
+ videoRef.current?.play();
1078
1082
  };
1079
- return /* @__PURE__ */ jsxs10("div", { className: `relative ${className}`, children: [
1080
- /* @__PURE__ */ jsx20("video", { onClick: setPlaying, ref: videoRef, className: "size-full object-cover", src, loop: true, children: "Your browser does not support the video tag." }),
1081
- !isPlaying && /* @__PURE__ */ jsx20(
1082
- Button,
1083
+ useEffect2(() => {
1084
+ if (autoPlayInView && inView) {
1085
+ videoRef.current?.play();
1086
+ }
1087
+ }, [autoPlayInView, inView]);
1088
+ const setStart = () => {
1089
+ const v = videoRef.current;
1090
+ if (!v) return;
1091
+ v.pause();
1092
+ v.currentTime = 0;
1093
+ void v.play();
1094
+ };
1095
+ const handle = useFullScreenHandle();
1096
+ return /* @__PURE__ */ jsx20(FullScreen, { handle, className: `flex items-center justify-center `, children: /* @__PURE__ */ jsxs10("div", { className: cx18("relative size-full", handle.active ? "!max-h-none" : "", wrapperClassName), ref, children: [
1097
+ /* @__PURE__ */ jsx20(
1098
+ "video",
1083
1099
  {
1084
- variant: "icon",
1085
- icon: "mdi:play",
1086
- role: "icon",
1100
+ ...rest,
1087
1101
  onClick: () => setPlaying(),
1088
- className: "absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white p-2 shadow-md"
1102
+ ref: videoRef,
1103
+ className: cx18("size-full object-cover", className, handle.active ? "!max-h-none" : ""),
1104
+ src,
1105
+ children: "Your browser does not support the video tag."
1089
1106
  }
1090
- )
1091
- ] });
1092
- });
1107
+ ),
1108
+ /* @__PURE__ */ jsxs10("div", { className: "absolute bottom-2 right-2 z-10 flex items-center justify-center gap-2", children: [
1109
+ buttonRepeat && /* @__PURE__ */ jsx20(
1110
+ "button",
1111
+ {
1112
+ className: " flex size-10 items-center justify-center rounded-full bg-black/50 text-white",
1113
+ onClick: () => setStart(),
1114
+ children: /* @__PURE__ */ jsx20(Icon6, { icon: "fa:repeat", className: "" })
1115
+ }
1116
+ ),
1117
+ buttonPlay && /* @__PURE__ */ jsx20(
1118
+ "button",
1119
+ {
1120
+ className: " flex size-10 items-center justify-center rounded-full bg-black/50 p-1.5 text-white",
1121
+ onClick: () => setPlaying(),
1122
+ children: /* @__PURE__ */ jsx20(Icon6, { icon: isPlaying ? "mdi:pause" : "mdi:play", className: "" })
1123
+ }
1124
+ ),
1125
+ buttonFullscreen && /* @__PURE__ */ jsx20(
1126
+ "button",
1127
+ {
1128
+ className: " flex size-10 items-center justify-center rounded-full bg-black/50 p-1.5 text-white",
1129
+ onClick: () => handle.active ? handle.exit() : handle.enter(),
1130
+ children: /* @__PURE__ */ jsx20(Icon6, { icon: handle.active ? "mdi:fullscreen-exit" : "mdi:fullscreen", className: "" })
1131
+ }
1132
+ )
1133
+ ] })
1134
+ ] }) });
1135
+ }
1093
1136
  Video.displayName = "Video";
1094
1137
 
1095
1138
  // src/Checkbox.tsx
1096
1139
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
1097
- import { cx as cx18 } from "class-variance-authority";
1098
- import { Icon as Icon6 } from "@iconify/react";
1140
+ import { cx as cx19 } from "class-variance-authority";
1141
+ import { Icon as Icon7 } from "@iconify/react";
1099
1142
  import { jsx as jsx21 } from "react/jsx-runtime";
1100
1143
  function Checkbox({ className, ...props }) {
1101
1144
  return /* @__PURE__ */ jsx21(
1102
1145
  CheckboxPrimitive.Root,
1103
1146
  {
1104
1147
  "data-slot": "checkbox",
1105
- className: cx18(
1148
+ className: cx19(
1106
1149
  "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
1107
1150
  className
1108
1151
  ),
@@ -1112,7 +1155,7 @@ function Checkbox({ className, ...props }) {
1112
1155
  {
1113
1156
  "data-slot": "checkbox-indicator",
1114
1157
  className: "flex items-center justify-center text-current transition-none",
1115
- children: /* @__PURE__ */ jsx21(Icon6, { className: "size-3.5 text-white", icon: "lucide:check" })
1158
+ children: /* @__PURE__ */ jsx21(Icon7, { className: "size-3.5 text-white", icon: "lucide:check" })
1116
1159
  }
1117
1160
  )
1118
1161
  }
@@ -1120,25 +1163,25 @@ function Checkbox({ className, ...props }) {
1120
1163
  }
1121
1164
 
1122
1165
  // src/DualRangeSlider.tsx
1123
- import * as React14 from "react";
1166
+ import * as React13 from "react";
1124
1167
  import * as SliderPrimitive from "@radix-ui/react-slider";
1125
- import { cx as cx19 } from "class-variance-authority";
1168
+ import { cx as cx20 } from "class-variance-authority";
1126
1169
  import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
1127
- var DualRangeSlider = React14.forwardRef(
1170
+ var DualRangeSlider = React13.forwardRef(
1128
1171
  ({ className, label, labelPosition = "top", ...props }, ref) => {
1129
1172
  const initialValue = Array.isArray(props.value) ? props.value : [props.min, props.max];
1130
1173
  return /* @__PURE__ */ jsxs11(
1131
1174
  SliderPrimitive.Root,
1132
1175
  {
1133
1176
  ref,
1134
- className: cx19("relative flex w-full touch-none select-none items-center", className),
1177
+ className: cx20("relative flex w-full touch-none select-none items-center", className),
1135
1178
  ...props,
1136
1179
  children: [
1137
1180
  /* @__PURE__ */ jsx22(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx22(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
1138
- initialValue.map((value, index) => /* @__PURE__ */ jsx22(React14.Fragment, { children: /* @__PURE__ */ jsx22(SliderPrimitive.Thumb, { className: "ring-offset-background focus-visible:ring-ring relative block size-4 rounded-full border-2 border-primary bg-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", children: label && /* @__PURE__ */ jsx22(
1181
+ initialValue.map((value, index) => /* @__PURE__ */ jsx22(React13.Fragment, { children: /* @__PURE__ */ jsx22(SliderPrimitive.Thumb, { className: "ring-offset-background focus-visible:ring-ring relative block size-4 rounded-full border-2 border-primary bg-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", children: label && /* @__PURE__ */ jsx22(
1139
1182
  "span",
1140
1183
  {
1141
- className: cx19(
1184
+ className: cx20(
1142
1185
  "absolute flex w-full justify-center",
1143
1186
  labelPosition === "top" && "-top-7",
1144
1187
  labelPosition === "bottom" && "top-4"
@@ -1154,13 +1197,13 @@ var DualRangeSlider = React14.forwardRef(
1154
1197
  DualRangeSlider.displayName = "DualRangeSlider";
1155
1198
 
1156
1199
  // src/LuxonisChat.tsx
1157
- import { useCallback, useEffect as useEffect2, useRef as useRef4, useState as useState5 } from "react";
1200
+ import { useCallback, useEffect as useEffect3, useRef as useRef4, useState as useState5 } from "react";
1158
1201
  import markdownit from "markdown-it";
1159
- import { Icon as Icon7 } from "@iconify/react";
1202
+ import { Icon as Icon8 } from "@iconify/react";
1160
1203
 
1161
1204
  // src/Tooltip.tsx
1162
1205
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
1163
- import { cx as cx20 } from "class-variance-authority";
1206
+ import { cx as cx21 } from "class-variance-authority";
1164
1207
  import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
1165
1208
  function TooltipProvider({ delayDuration = 0, ...props }) {
1166
1209
  return /* @__PURE__ */ jsx23(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration, ...props });
@@ -1182,7 +1225,7 @@ function TooltipContent({
1182
1225
  {
1183
1226
  "data-slot": "tooltip-content",
1184
1227
  sideOffset,
1185
- className: cx20(
1228
+ className: cx21(
1186
1229
  "bg-white text-black shadow-md shadow-secondaryBorder animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
1187
1230
  className
1188
1231
  ),
@@ -1310,13 +1353,13 @@ function ChatButton(props) {
1310
1353
  },
1311
1354
  [userInput, onSubmit]
1312
1355
  );
1313
- useEffect2(() => {
1356
+ useEffect3(() => {
1314
1357
  if (messageListRef.current) {
1315
1358
  const messageList = messageListRef.current;
1316
1359
  messageList.scrollTop = messageList.scrollHeight;
1317
1360
  }
1318
1361
  }, [messages]);
1319
- useEffect2(() => {
1362
+ useEffect3(() => {
1320
1363
  async function fetchSearchQuery() {
1321
1364
  setUserInput(`Can you tell me about ${messageFromSearch}`);
1322
1365
  await onSubmit(void 0);
@@ -1357,7 +1400,7 @@ function ChatButton(props) {
1357
1400
  animationTimingFunction: "ease-in"
1358
1401
  },
1359
1402
  className: "flex size-full items-center justify-center",
1360
- children: chatOpened ? /* @__PURE__ */ jsx24(Icon7, { icon: "mdi:close", className: "size-[32px] text-white" }) : /* @__PURE__ */ jsx24("img", { src: "https://docs.luxonis.com/static/images/icons/chat-icon.svg", width: "32", height: "32", alt: "Chat" })
1403
+ children: chatOpened ? /* @__PURE__ */ jsx24(Icon8, { icon: "mdi:close", className: "size-[32px] text-white" }) : /* @__PURE__ */ jsx24("img", { src: "https://docs.luxonis.com/static/images/icons/chat-icon.svg", width: "32", height: "32", alt: "Chat" })
1361
1404
  },
1362
1405
  iconKey
1363
1406
  )
@@ -1367,7 +1410,7 @@ function ChatButton(props) {
1367
1410
  /* @__PURE__ */ jsxs13("div", { className: "flex h-8 flex-row justify-between gap-2", children: [
1368
1411
  /* @__PURE__ */ jsxs13("h2", { className: "relative text-2xl", children: [
1369
1412
  /* @__PURE__ */ jsx24("a", { target: "_blank", rel: "noopener noreferrer", href: "https://chat.luxonis.com", children: "Chat with Luxonis AI" }),
1370
- /* @__PURE__ */ jsx24(Icon7, { icon: "mingcute:ai-fill", className: "absolute -right-4 -top-2 size-5 text-primary" })
1413
+ /* @__PURE__ */ jsx24(Icon8, { icon: "mingcute:ai-fill", className: "absolute -right-4 -top-2 size-5 text-primary" })
1371
1414
  ] }),
1372
1415
  /* @__PURE__ */ jsxs13("div", { className: "flex flex-row items-center justify-end ", children: [
1373
1416
  /* @__PURE__ */ jsxs13(Tooltip, { children: [
@@ -1389,7 +1432,7 @@ function ChatButton(props) {
1389
1432
  setSlackThreadTs(null);
1390
1433
  },
1391
1434
  children: /* @__PURE__ */ jsx24(
1392
- Icon7,
1435
+ Icon8,
1393
1436
  {
1394
1437
  icon: "fluent:chat-add-16-regular",
1395
1438
  className: loading ? "text-black/40" : "text-primary",
@@ -1408,7 +1451,7 @@ function ChatButton(props) {
1408
1451
  setChatOpened(false);
1409
1452
  setMessageFromSearch("");
1410
1453
  },
1411
- children: /* @__PURE__ */ jsx24(Icon7, { icon: "mdi:close", className: "text-black", width: 32, height: 32 })
1454
+ children: /* @__PURE__ */ jsx24(Icon8, { icon: "mdi:close", className: "text-black", width: 32, height: 32 })
1412
1455
  }
1413
1456
  )
1414
1457
  ] })
@@ -1464,7 +1507,7 @@ function ChatButton(props) {
1464
1507
  name: "sendButton",
1465
1508
  variant: "primary",
1466
1509
  className: "!size-10 !p-2 " + (loading || inputRef.current?.value.length === 0 ? "bg-gray-100 transition-colors cursor-not-allowed" : "bg-primary cursor-pointer"),
1467
- children: /* @__PURE__ */ jsx24(Icon7, { icon: "mdi:send", className: "!text-white" })
1510
+ children: /* @__PURE__ */ jsx24(Icon8, { icon: "mdi:send", className: "!text-white" })
1468
1511
  }
1469
1512
  ) })
1470
1513
  ]
@@ -1483,7 +1526,7 @@ var ChatMessage = (props) => {
1483
1526
  {
1484
1527
  className: `flex h-fit w-full gap-2 ${props.user === "bot" ? props.loading ? "bg-gray-100 transition-colors" : "bg-gray-100" : "bg-white"}`,
1485
1528
  children: [
1486
- /* @__PURE__ */ jsx24("div", { className: "flex min-h-10 min-w-10 items-start overflow-x-auto pl-2 pt-1.5 ", children: /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-center pb-1.5", children: props.user === "user" ? /* @__PURE__ */ jsx24(Icon7, { icon: "mdi:account", className: "h-[38px] w-[32px]" }) : props.loading ? /* @__PURE__ */ jsx24("img", { src: "https://static.luxonis.com/images/chatbot.webp", width: "32", height: "32", alt: "Chatbot Icon" }) : /* @__PURE__ */ jsx24("img", { src: "https://static.luxonis.com/images/chatbot.webp", width: "32", height: "32", alt: "Chatbot Icon" }) }) }),
1529
+ /* @__PURE__ */ jsx24("div", { className: "flex min-h-10 min-w-10 items-start overflow-x-auto pl-2 pt-1.5 ", children: /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-center pb-1.5", children: props.user === "user" ? /* @__PURE__ */ jsx24(Icon8, { icon: "mdi:account", className: "h-[38px] w-[32px]" }) : props.loading ? /* @__PURE__ */ jsx24("img", { src: "https://static.luxonis.com/images/chatbot.webp", width: "32", height: "32", alt: "Chatbot Icon" }) : /* @__PURE__ */ jsx24("img", { src: "https://static.luxonis.com/images/chatbot.webp", width: "32", height: "32", alt: "Chatbot Icon" }) }) }),
1487
1530
  /* @__PURE__ */ jsx24(
1488
1531
  "div",
1489
1532
  {
@@ -1505,14 +1548,14 @@ var ChatMessage = (props) => {
1505
1548
  // src/Tabs.tsx
1506
1549
  import * as React15 from "react";
1507
1550
  import * as TabsPrimitive from "@radix-ui/react-tabs";
1508
- import { cx as cx21 } from "class-variance-authority";
1551
+ import { cx as cx22 } from "class-variance-authority";
1509
1552
  import { jsx as jsx25 } from "react/jsx-runtime";
1510
1553
  var Tabs = TabsPrimitive.Root;
1511
1554
  var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
1512
1555
  TabsPrimitive.List,
1513
1556
  {
1514
1557
  ref,
1515
- className: cx21(
1558
+ className: cx22(
1516
1559
  "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
1517
1560
  className
1518
1561
  ),
@@ -1524,7 +1567,7 @@ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
1524
1567
  TabsPrimitive.Trigger,
1525
1568
  {
1526
1569
  ref,
1527
- className: cx21(
1570
+ className: cx22(
1528
1571
  "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
1529
1572
  className
1530
1573
  ),
@@ -1536,7 +1579,7 @@ var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
1536
1579
  TabsPrimitive.Content,
1537
1580
  {
1538
1581
  ref,
1539
- className: cx21(
1582
+ className: cx22(
1540
1583
  "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1541
1584
  className
1542
1585
  ),
@@ -1548,13 +1591,13 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
1548
1591
  // src/ProgressBar.tsx
1549
1592
  import * as React16 from "react";
1550
1593
  import * as ProgressPrimitive from "@radix-ui/react-progress";
1551
- import { cx as cx22 } from "class-variance-authority";
1594
+ import { cx as cx23 } from "class-variance-authority";
1552
1595
  import { jsx as jsx26 } from "react/jsx-runtime";
1553
1596
  var Progress = React16.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx26(
1554
1597
  ProgressPrimitive.Root,
1555
1598
  {
1556
1599
  ref,
1557
- className: cx22("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
1600
+ className: cx23("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
1558
1601
  ...props,
1559
1602
  children: /* @__PURE__ */ jsx26(
1560
1603
  ProgressPrimitive.Indicator,
@@ -1568,8 +1611,8 @@ var Progress = React16.forwardRef(({ className, value, ...props }, ref) => /* @_
1568
1611
  Progress.displayName = ProgressPrimitive.Root.displayName;
1569
1612
 
1570
1613
  // src/EdgeSlideshow.tsx
1571
- import { useEffect as useEffect3, useState as useState6 } from "react";
1572
- import { useInView } from "react-intersection-observer";
1614
+ import { useEffect as useEffect4, useState as useState6 } from "react";
1615
+ import { useInView as useInView2 } from "react-intersection-observer";
1573
1616
  import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
1574
1617
  var slides = [
1575
1618
  "ai-performance",
@@ -1757,7 +1800,7 @@ function EdgeSlideshowHeader() {
1757
1800
  function EdgeSlideshowNav(props) {
1758
1801
  const { activeSlide, setActiveSlide, autoscrolling, inView } = props;
1759
1802
  const [progress, setProgress] = useState6(0);
1760
- useEffect3(() => {
1803
+ useEffect4(() => {
1761
1804
  let intervalId;
1762
1805
  const startTime = Date.now();
1763
1806
  if (autoscrolling && inView) {
@@ -1827,8 +1870,8 @@ function EdgeSlideshowText(props) {
1827
1870
  function EdgeSlideshow() {
1828
1871
  const [activeSlide, setActiveSlide] = useState6("ai-performance");
1829
1872
  const [autoscrolling, setAutoscrolling] = useState6(true);
1830
- const { ref, inView } = useInView({});
1831
- useEffect3(() => {
1873
+ const { ref, inView } = useInView2({});
1874
+ useEffect4(() => {
1832
1875
  let intervalId;
1833
1876
  if (inView) {
1834
1877
  intervalId = window.setInterval(() => {
@@ -1867,7 +1910,7 @@ function EdgeSlideshow() {
1867
1910
  }
1868
1911
 
1869
1912
  // src/StereoDepthCalibration.tsx
1870
- import { Icon as Icon8 } from "@iconify/react";
1913
+ import { Icon as Icon9 } from "@iconify/react";
1871
1914
  import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
1872
1915
  var cards = [
1873
1916
  {
@@ -1897,7 +1940,7 @@ function StereoDepthCalibrationWrapper() {
1897
1940
  "img",
1898
1941
  {
1899
1942
  alt: "Stereo Depth Calibration Background Overlay",
1900
- src: "/assets/stereo-depth/stereo-depth-calibration-bg.webp",
1943
+ src: "https://www.luxonis.com/assets/stereo-depth/stereo-depth-calibration-bg.webp",
1901
1944
  className: "absolute size-full bg-cover bg-center bg-no-repeat object-cover md:h-5/6"
1902
1945
  }
1903
1946
  ),
@@ -1934,7 +1977,7 @@ function StereoDepthCalibrationFooter() {
1934
1977
  }
1935
1978
  function StereoDepthCalibrationFooterCard(props) {
1936
1979
  return /* @__PURE__ */ jsxs15(FrostedCard, { className: "flex h-full flex-col items-start justify-start gap-2", children: [
1937
- /* @__PURE__ */ jsx28(Icon8, { icon: props.icon, width: 32, height: 32, className: "card-icon" }),
1980
+ /* @__PURE__ */ jsx28(Icon9, { icon: props.icon, width: 32, height: 32, className: "card-icon" }),
1938
1981
  /* @__PURE__ */ jsx28(Text, { text: props.title, size: "lg", color: "white", weight: "semibold" }),
1939
1982
  /* @__PURE__ */ jsx28(Text, { text: props.text, size: "sm", color: "white" })
1940
1983
  ] });
@@ -1953,7 +1996,7 @@ function StereoDepthCalibration() {
1953
1996
  }
1954
1997
 
1955
1998
  // src/Support.tsx
1956
- import { cx as cx23 } from "class-variance-authority";
1999
+ import { cx as cx24 } from "class-variance-authority";
1957
2000
 
1958
2001
  // src/links.ts
1959
2002
  var github = "https://github.com/luxonis/";
@@ -1983,6 +2026,7 @@ var applyMailClean = "careers@luxonis.com";
1983
2026
  var showcaseMail = "mailto:support@luxonis.com";
1984
2027
  var showcaseMailClean = "support@luxonis.com";
1985
2028
  var blog = "https://discuss.luxonis.com/blog";
2029
+ var stereoTuningAssistance = "/stereo-tuning-assistance";
1986
2030
  var privacy = "/privacy";
1987
2031
  var termsOfService = "/terms-of-service";
1988
2032
  var aboutUs = "/about-us";
@@ -2011,15 +2055,45 @@ function TalkToSalesButton() {
2011
2055
  return /* @__PURE__ */ jsx29("a", { href: contactLink, target: "_blank", children: /* @__PURE__ */ jsx29(Button, { variant: "secondary", color: "white", role: "continue", children: "Talk to Sales" }) });
2012
2056
  }
2013
2057
 
2014
- // src/ContactUsForm.tsx
2015
- import { z } from "zod";
2016
- import React17 from "react";
2058
+ // src/Support.tsx
2059
+ import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
2060
+ var Support = (props) => {
2061
+ const { variant = "fullpage", text } = props;
2062
+ return /* @__PURE__ */ jsx30("div", { className: "page-card page-padding", children: /* @__PURE__ */ jsx30(
2063
+ Card,
2064
+ {
2065
+ variant,
2066
+ outerStyles: "h-full",
2067
+ className: cx24(
2068
+ "page-card-content mx-auto flex w-full h-full flex-col gap-x-20 gap-y-4 justify-between overflow-hidden bg-gradient-stereo-depth xl:p-8 xl:flex-row py-8 px-4"
2069
+ ),
2070
+ children: /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col items-center gap-8 text-white xl:w-fit xl:items-start xl:gap-10 xl:px-0", children: [
2071
+ /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col items-center gap-4 text-white xl:items-start xl:gap-6", children: [
2072
+ /* @__PURE__ */ jsx30(Text, { size: "h2", text: text ?? "Need More Help?", className: "text-center xl:text-left" }),
2073
+ /* @__PURE__ */ jsx30(
2074
+ Text,
2075
+ {
2076
+ size: "lg",
2077
+ text: "Our dedicated team is available for technical support, business solutions, and more. Let us provide the help you need.",
2078
+ className: "w-full text-center xl:text-left"
2079
+ }
2080
+ )
2081
+ ] }),
2082
+ /* @__PURE__ */ jsxs16("div", { className: "flex w-fit flex-col items-center gap-4 md:flex-row", children: [
2083
+ /* @__PURE__ */ jsx30(TalkToSalesButton, {}),
2084
+ /* @__PURE__ */ jsx30("a", { href: "https://chat.luxonis.com", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx30(Button, { size: "lg", variant: "secondary", role: "continue", children: "Get Instant Support" }) }),
2085
+ /* @__PURE__ */ jsx30("a", { href: supportMail, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx30(Button, { size: "lg", variant: "secondary", role: "continue", children: "Support via Email" }) })
2086
+ ] })
2087
+ ] })
2088
+ }
2089
+ ) });
2090
+ };
2017
2091
 
2018
2092
  // src/useRudderAnalytics.ts
2019
- import { useEffect as useEffect4, useState as useState7 } from "react";
2093
+ import { useEffect as useEffect5, useState as useState7 } from "react";
2020
2094
  var useRudderStackAnalytics = () => {
2021
2095
  const [analytics, setAnalytics] = useState7();
2022
- useEffect4(() => {
2096
+ useEffect5(() => {
2023
2097
  if (!analytics) {
2024
2098
  const initialize = async () => {
2025
2099
  const { RudderAnalytics } = await import("@rudderstack/analytics-js");
@@ -2046,7 +2120,9 @@ var useRudderStackAnalytics = () => {
2046
2120
  };
2047
2121
 
2048
2122
  // src/ContactUsForm.tsx
2049
- import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
2123
+ import { z } from "zod";
2124
+ import React17 from "react";
2125
+ import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
2050
2126
  var formSchema = z.object({
2051
2127
  name: z.string().min(1),
2052
2128
  company: z.string().min(1),
@@ -2114,7 +2190,7 @@ function ContactUsForm() {
2114
2190
  setFormSubmitted(true);
2115
2191
  };
2116
2192
  if (formSubmitted) {
2117
- return /* @__PURE__ */ jsx30("div", { className: "m-auto flex size-full h-[456px] flex-col items-center justify-center px-4", children: /* @__PURE__ */ jsx30(
2193
+ return /* @__PURE__ */ jsx31("div", { className: "m-auto flex size-full h-[456px] flex-col items-center justify-center px-4", children: /* @__PURE__ */ jsx31(
2118
2194
  Text,
2119
2195
  {
2120
2196
  size: "h4",
@@ -2124,107 +2200,80 @@ function ContactUsForm() {
2124
2200
  }
2125
2201
  ) });
2126
2202
  }
2127
- return /* @__PURE__ */ jsxs16("form", { id: "contact-form-anchor", className: "flex w-full flex-col gap-6 text-white", onSubmit: handleSubmit, children: [
2128
- /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col gap-6 lg:flex-row", children: [
2129
- /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col gap-2", children: [
2130
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "name", children: "Name *" }),
2131
- /* @__PURE__ */ jsx30(Input, { type: "text", id: "name", placeholder: "E.g. Hanna Johns" })
2203
+ return /* @__PURE__ */ jsxs17("form", { id: "contact-form-anchor", className: "flex w-full flex-col gap-6 text-white", onSubmit: handleSubmit, children: [
2204
+ /* @__PURE__ */ jsxs17("div", { className: "flex w-full flex-col gap-6 lg:flex-row", children: [
2205
+ /* @__PURE__ */ jsxs17("div", { className: "flex w-full flex-col gap-2", children: [
2206
+ /* @__PURE__ */ jsx31(Label, { className: "font-normal", htmlFor: "name", children: "Name *" }),
2207
+ /* @__PURE__ */ jsx31(Input, { type: "text", id: "name", placeholder: "E.g. Hanna Johns" })
2132
2208
  ] }),
2133
- /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col gap-2", children: [
2134
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "Company", children: "Company *" }),
2135
- /* @__PURE__ */ jsx30(Input, { type: "text", id: "company", placeholder: "E.g. Hanna" })
2209
+ /* @__PURE__ */ jsxs17("div", { className: "flex w-full flex-col gap-2", children: [
2210
+ /* @__PURE__ */ jsx31(Label, { className: "font-normal", htmlFor: "Company", children: "Company *" }),
2211
+ /* @__PURE__ */ jsx31(Input, { type: "text", id: "company", placeholder: "E.g. Hanna" })
2136
2212
  ] })
2137
2213
  ] }),
2138
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2", children: [
2139
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "email", children: "E-mail *" }),
2140
- /* @__PURE__ */ jsx30(Input, { type: "email", id: "email", placeholder: "E.g. info@email.com" })
2214
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2", children: [
2215
+ /* @__PURE__ */ jsx31(Label, { className: "font-normal", htmlFor: "email", children: "E-mail *" }),
2216
+ /* @__PURE__ */ jsx31(Input, { type: "email", id: "email", placeholder: "E.g. info@email.com" })
2141
2217
  ] }),
2142
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2", children: [
2143
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "inquiry", children: "Type of Inquiry *" }),
2144
- /* @__PURE__ */ jsxs16(Select, { children: [
2145
- /* @__PURE__ */ jsx30(SelectTrigger, { className: "h-[48px] bg-white text-black ", children: /* @__PURE__ */ jsx30(SelectValue, { id: "inquiry", placeholder: "Select..." }) }),
2146
- /* @__PURE__ */ jsxs16(SelectContent, { className: "bg-white", children: [
2147
- /* @__PURE__ */ jsx30(SelectItem, { value: "Hub assistance", children: "Hub assistance" }),
2148
- /* @__PURE__ */ jsx30(SelectItem, { value: "hardware-issue", children: "Hardware issue" }),
2149
- /* @__PURE__ */ jsx30(SelectItem, { value: "support", children: "Support" }),
2150
- /* @__PURE__ */ jsx30(SelectItem, { value: "training", children: "Training" }),
2151
- /* @__PURE__ */ jsx30(SelectItem, { value: "other", children: "Other" })
2218
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2", children: [
2219
+ /* @__PURE__ */ jsx31(Label, { className: "font-normal", htmlFor: "inquiry", children: "Type of Inquiry *" }),
2220
+ /* @__PURE__ */ jsxs17(Select, { children: [
2221
+ /* @__PURE__ */ jsx31(SelectTrigger, { className: "h-[48px] bg-white text-black ", children: /* @__PURE__ */ jsx31(SelectValue, { id: "inquiry", placeholder: "Select..." }) }),
2222
+ /* @__PURE__ */ jsxs17(SelectContent, { className: "bg-white", children: [
2223
+ /* @__PURE__ */ jsx31(SelectItem, { value: "Hub assistance", children: "Hub assistance" }),
2224
+ /* @__PURE__ */ jsx31(SelectItem, { value: "hardware-issue", children: "Hardware issue" }),
2225
+ /* @__PURE__ */ jsx31(SelectItem, { value: "support", children: "Support" }),
2226
+ /* @__PURE__ */ jsx31(SelectItem, { value: "training", children: "Training" }),
2227
+ /* @__PURE__ */ jsx31(SelectItem, { value: "other", children: "Other" })
2152
2228
  ] })
2153
2229
  ] })
2154
2230
  ] }),
2155
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2", children: [
2156
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "message", children: "Message *" }),
2157
- /* @__PURE__ */ jsx30(Input, { type: "text", id: "message", placeholder: "Type..." })
2231
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2", children: [
2232
+ /* @__PURE__ */ jsx31(Label, { className: "font-normal", htmlFor: "message", children: "Message *" }),
2233
+ /* @__PURE__ */ jsx31(Input, { type: "text", id: "message", placeholder: "Type..." })
2158
2234
  ] }),
2159
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-row items-center justify-start gap-8", children: [
2160
- /* @__PURE__ */ jsx30(Button, { type: "submit", variant: "secondary", size: "lg", role: "continue", className: "w-fit", children: formIsLoading ? "Submitting..." : "Submit" }),
2161
- formHasError && /* @__PURE__ */ jsx30(Text, { text: "Please fill out all fields", color: "error", size: "xl" })
2235
+ /* @__PURE__ */ jsxs17("div", { className: "flex flex-row items-center justify-start gap-8", children: [
2236
+ /* @__PURE__ */ jsx31(Button, { type: "submit", variant: "secondary", size: "lg", role: "continue", className: "w-fit", children: formIsLoading ? "Submitting..." : "Submit" }),
2237
+ formHasError && /* @__PURE__ */ jsx31(Text, { text: "Please fill out all fields", color: "error", size: "xl" })
2162
2238
  ] })
2163
2239
  ] });
2164
2240
  }
2165
2241
 
2166
- // src/Support.tsx
2167
- import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
2168
- var Support = (props) => {
2169
- const { variant = "fullpage" } = props;
2170
- return /* @__PURE__ */ jsx31("div", { className: "page-card page-padding", children: /* @__PURE__ */ jsxs17(
2171
- Card,
2172
- {
2173
- variant,
2174
- outerStyles: "h-full",
2175
- className: cx23(
2176
- "page-card-content mx-auto flex w-full h-full flex-col gap-x-20 gap-y-4 justify-between overflow-hidden bg-gradient-stereo-depth pt-12 xl:p-8 xl:flex-row"
2177
- ),
2178
- children: [
2179
- /* @__PURE__ */ jsxs17("div", { className: "flex w-full flex-col items-center gap-8 px-4 text-white xl:w-fit xl:items-start xl:gap-10 xl:px-0", children: [
2180
- /* @__PURE__ */ jsxs17("div", { className: "flex w-full flex-col items-center gap-4 text-white xl:items-start xl:gap-6", children: [
2181
- /* @__PURE__ */ jsx31(Text, { size: "h2", text: "Need More Help?", className: "max-w-[650px] text-center xl:text-left" }),
2182
- /* @__PURE__ */ jsx31(
2183
- Text,
2184
- {
2185
- size: "lg",
2186
- text: "Our dedicated team is available for technical support, business solutions, and more. Let us provide the help you need.",
2187
- className: "w-full max-w-105 text-center xl:text-left"
2188
- }
2189
- )
2190
- ] }),
2191
- /* @__PURE__ */ jsxs17("div", { className: "flex w-fit flex-col gap-4 md:flex-row", children: [
2192
- /* @__PURE__ */ jsx31(TalkToSalesButton, {}),
2193
- /* @__PURE__ */ jsx31("a", { href: "https://chat.luxonis.com", target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx31(Button, { size: "lg", variant: "secondary", role: "continue", children: "Get Instant Support" }) })
2194
- ] })
2195
- ] }),
2196
- /* @__PURE__ */ jsx31("div", { className: "w-full p-4 xl:p-0", children: /* @__PURE__ */ jsx31(FrostedCard, { className: "h-full", children: /* @__PURE__ */ jsx31(ContactUsForm, {}) }) })
2197
- ]
2198
- }
2199
- ) });
2200
- };
2201
-
2202
2242
  // src/ContactUs.tsx
2203
2243
  import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
2204
2244
  var ContactUsSection = (props) => {
2205
2245
  const {
2206
- title = "Let\u2019s Build \n the Future of \n Vision Together",
2246
+ title = "Let\u2019s Build the Future of Vision Together",
2207
2247
  description = "Our dedicated team is available for technical support, business solutions, and more. Let us provide the help you need."
2208
2248
  } = props;
2209
- return /* @__PURE__ */ jsx32("section", { id: "contact-us", className: "page-card page-padding", children: /* @__PURE__ */ jsxs18("section", { className: "page-card-content flex flex-col gap-8 rounded-lg p-4 pt-12 [background:radial-gradient(416.66%_106.71%_at_76.3%_37.11%,#5724E8_0%,#000_100%),#000] md:p-12 lg:flex-row lg:justify-between", children: [
2210
- /* @__PURE__ */ jsx32(
2211
- Description,
2212
- {
2213
- title,
2214
- align: "left",
2215
- textStyle: "max-w-none w-fit lg:max-w-auto lg:justify-start justify-center lg:text-left text-center",
2216
- wrapperClassName: "lg:items-start items-center lg:text-left text-center flex",
2217
- description,
2218
- className: "text-white ",
2219
- children: /* @__PURE__ */ jsxs18("div", { className: "flex w-full max-w-[500px] flex-col flex-wrap items-center gap-4 lg:flex-row lg:justify-start", children: [
2220
- /* @__PURE__ */ jsx32("a", { href: "https://hub.luxonis.com", target: "_blank", className: "w-fit", children: /* @__PURE__ */ jsx32(Button, { variant: "secondary", size: "lg", role: "continue", className: "w-full", children: "Start for Free" }) }),
2221
- /* @__PURE__ */ jsx32(TalkToSalesButton, {})
2222
- ] })
2223
- }
2224
- ),
2225
- /* @__PURE__ */ jsx32(FrostedCard, { className: "!p-6", children: /* @__PURE__ */ jsx32(ContactUsForm, {}) })
2226
- ] }) });
2249
+ return /* @__PURE__ */ jsx32("section", { id: "contact-us", className: "page-card page-padding", children: /* @__PURE__ */ jsx32("section", { className: "page-card-content flex flex-col gap-8 rounded-lg px-4 py-8 [background:radial-gradient(416.66%_106.71%_at_76.3%_37.11%,#5724E8_0%,#000_100%),#000] md:p-12 lg:flex-row lg:justify-between xl:p-8", children: /* @__PURE__ */ jsx32(
2250
+ Description,
2251
+ {
2252
+ title,
2253
+ align: "left",
2254
+ textStyle: "max-w-none w-fit lg:max-w-none lg:justify-start justify-center lg:text-left text-center",
2255
+ wrapperClassName: "lg:items-start items-center lg:text-left text-center flex",
2256
+ description,
2257
+ className: "text-white ",
2258
+ children: /* @__PURE__ */ jsxs18("div", { className: "flex w-full flex-col flex-wrap items-center gap-4 lg:flex-row lg:justify-start", children: [
2259
+ /* @__PURE__ */ jsx32("a", { href: "https://hub.luxonis.com", target: "_blank", className: "w-fit", children: /* @__PURE__ */ jsx32(Button, { variant: "secondary", size: "lg", role: "continue", className: "w-full", children: "Start for Free" }) }),
2260
+ /* @__PURE__ */ jsx32(TalkToSalesButton, {}),
2261
+ /* @__PURE__ */ jsx32("a", { href: supportMail, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx32(Button, { size: "lg", variant: "secondary", role: "continue", children: "Support via Email" }) })
2262
+ ] })
2263
+ }
2264
+ ) }) });
2227
2265
  };
2266
+
2267
+ // src/useChat.tsx
2268
+ import React18 from "react";
2269
+ var useChatContext = React18.createContext(null);
2270
+ function useChat() {
2271
+ const context = React18.useContext(useChatContext);
2272
+ if (!context) {
2273
+ throw new Error("useChat must be used within a <ChatProvider />");
2274
+ }
2275
+ return context;
2276
+ }
2228
2277
  export {
2229
2278
  Accordion,
2230
2279
  AccordionContent,
@@ -2330,6 +2379,7 @@ export {
2330
2379
  showcaseMail,
2331
2380
  showcaseMailClean,
2332
2381
  status,
2382
+ stereoTuningAssistance,
2333
2383
  store,
2334
2384
  supportForm,
2335
2385
  supportMail,
@@ -2337,6 +2387,8 @@ export {
2337
2387
  techcrunch,
2338
2388
  termsOfService,
2339
2389
  twitter,
2390
+ useChat,
2391
+ useChatContext,
2340
2392
  useRudderStackAnalytics,
2341
2393
  youtube
2342
2394
  };