@luxonis/component-lib 1.1.1 → 1.1.3

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
@@ -580,7 +580,7 @@ var DescriptionRecepie = cva5("flex flex-col ", {
580
580
  left: "items-start",
581
581
  right: "items-end",
582
582
  leftCenterMobile: "items-start sm:items-center",
583
- 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",
584
584
  desktopLeftMobileCenter: "w-full items-center !text-center lg:items-start lg:!text-left"
585
585
  },
586
586
  gap: {
@@ -671,6 +671,9 @@ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
671
671
  var Hero = (props) => {
672
672
  const { title, description, button, bgImageLink, desctipionSize = "default" } = props;
673
673
  const descriptionSize = () => {
674
+ if (!description) {
675
+ return "";
676
+ }
674
677
  if (desctipionSize === "lg") {
675
678
  return cx9("lg:max-w-[525px] max-w-96");
676
679
  }
@@ -689,7 +692,7 @@ var Hero = (props) => {
689
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: [
690
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" }) }),
691
694
  /* @__PURE__ */ jsxs6("div", { className: cx9("flex flex-col gap-8 md:gap-6 z-[2]", descriptionSize()), children: [
692
- /* @__PURE__ */ jsx11(Text, { text: description, color: "white", size: "lg" }),
695
+ description && /* @__PURE__ */ jsx11(Text, { text: description, color: "white", size: "lg" }),
693
696
  button
694
697
  ] })
695
698
  ] }) }),
@@ -1048,62 +1051,101 @@ var Textarea = React12.forwardRef(
1048
1051
  Textarea.displayName = "Textarea";
1049
1052
 
1050
1053
  // src/Video.tsx
1051
- 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";
1052
1059
  import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1053
- 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;
1054
1071
  const videoRef = useRef3(null);
1055
- const [isPlaying, setIsPlaying] = useState4(false);
1056
- useImperativeHandle(ref, () => ({
1057
- togglePlay: () => {
1058
- if (videoRef.current) {
1059
- if (videoRef.current.paused) {
1060
- videoRef.current.play();
1061
- setIsPlaying(true);
1062
- } else {
1063
- videoRef.current.pause();
1064
- setIsPlaying(false);
1065
- }
1066
- }
1067
- }
1068
- }));
1072
+ const { ref, inView } = useInView({});
1073
+ const [isPlaying, setIsPlaying] = useState4(true);
1069
1074
  const setPlaying = () => {
1070
- if (videoRef.current) {
1071
- if (videoRef.current.paused) {
1072
- videoRef.current.play();
1073
- setIsPlaying(true);
1074
- } else {
1075
- videoRef.current.pause();
1076
- setIsPlaying(false);
1077
- }
1075
+ if (isPlaying) {
1076
+ videoRef.current?.pause();
1077
+ setIsPlaying(false);
1078
+ return;
1078
1079
  }
1080
+ setIsPlaying(true);
1081
+ videoRef.current?.play();
1079
1082
  };
1080
- return /* @__PURE__ */ jsxs10("div", { className: `relative ${className}`, children: [
1081
- /* @__PURE__ */ jsx20("video", { onClick: setPlaying, ref: videoRef, className: "size-full object-cover", src, loop: true, children: "Your browser does not support the video tag." }),
1082
- !isPlaying && /* @__PURE__ */ jsx20(
1083
- 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",
1084
1099
  {
1085
- variant: "icon",
1086
- icon: "mdi:play",
1087
- role: "icon",
1100
+ ...rest,
1088
1101
  onClick: () => setPlaying(),
1089
- 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."
1090
1106
  }
1091
- )
1092
- ] });
1093
- });
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
+ }
1094
1136
  Video.displayName = "Video";
1095
1137
 
1096
1138
  // src/Checkbox.tsx
1097
1139
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
1098
- import { cx as cx18 } from "class-variance-authority";
1099
- import { Icon as Icon6 } from "@iconify/react";
1140
+ import { cx as cx19 } from "class-variance-authority";
1141
+ import { Icon as Icon7 } from "@iconify/react";
1100
1142
  import { jsx as jsx21 } from "react/jsx-runtime";
1101
1143
  function Checkbox({ className, ...props }) {
1102
1144
  return /* @__PURE__ */ jsx21(
1103
1145
  CheckboxPrimitive.Root,
1104
1146
  {
1105
1147
  "data-slot": "checkbox",
1106
- className: cx18(
1148
+ className: cx19(
1107
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",
1108
1150
  className
1109
1151
  ),
@@ -1113,7 +1155,7 @@ function Checkbox({ className, ...props }) {
1113
1155
  {
1114
1156
  "data-slot": "checkbox-indicator",
1115
1157
  className: "flex items-center justify-center text-current transition-none",
1116
- 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" })
1117
1159
  }
1118
1160
  )
1119
1161
  }
@@ -1121,25 +1163,25 @@ function Checkbox({ className, ...props }) {
1121
1163
  }
1122
1164
 
1123
1165
  // src/DualRangeSlider.tsx
1124
- import * as React14 from "react";
1166
+ import * as React13 from "react";
1125
1167
  import * as SliderPrimitive from "@radix-ui/react-slider";
1126
- import { cx as cx19 } from "class-variance-authority";
1168
+ import { cx as cx20 } from "class-variance-authority";
1127
1169
  import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
1128
- var DualRangeSlider = React14.forwardRef(
1170
+ var DualRangeSlider = React13.forwardRef(
1129
1171
  ({ className, label, labelPosition = "top", ...props }, ref) => {
1130
1172
  const initialValue = Array.isArray(props.value) ? props.value : [props.min, props.max];
1131
1173
  return /* @__PURE__ */ jsxs11(
1132
1174
  SliderPrimitive.Root,
1133
1175
  {
1134
1176
  ref,
1135
- 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),
1136
1178
  ...props,
1137
1179
  children: [
1138
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" }) }),
1139
- 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(
1140
1182
  "span",
1141
1183
  {
1142
- className: cx19(
1184
+ className: cx20(
1143
1185
  "absolute flex w-full justify-center",
1144
1186
  labelPosition === "top" && "-top-7",
1145
1187
  labelPosition === "bottom" && "top-4"
@@ -1155,13 +1197,13 @@ var DualRangeSlider = React14.forwardRef(
1155
1197
  DualRangeSlider.displayName = "DualRangeSlider";
1156
1198
 
1157
1199
  // src/LuxonisChat.tsx
1158
- 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";
1159
1201
  import markdownit from "markdown-it";
1160
- import { Icon as Icon7 } from "@iconify/react";
1202
+ import { Icon as Icon8 } from "@iconify/react";
1161
1203
 
1162
1204
  // src/Tooltip.tsx
1163
1205
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
1164
- import { cx as cx20 } from "class-variance-authority";
1206
+ import { cx as cx21 } from "class-variance-authority";
1165
1207
  import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
1166
1208
  function TooltipProvider({ delayDuration = 0, ...props }) {
1167
1209
  return /* @__PURE__ */ jsx23(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration, ...props });
@@ -1183,7 +1225,7 @@ function TooltipContent({
1183
1225
  {
1184
1226
  "data-slot": "tooltip-content",
1185
1227
  sideOffset,
1186
- className: cx20(
1228
+ className: cx21(
1187
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",
1188
1230
  className
1189
1231
  ),
@@ -1311,13 +1353,13 @@ function ChatButton(props) {
1311
1353
  },
1312
1354
  [userInput, onSubmit]
1313
1355
  );
1314
- useEffect2(() => {
1356
+ useEffect3(() => {
1315
1357
  if (messageListRef.current) {
1316
1358
  const messageList = messageListRef.current;
1317
1359
  messageList.scrollTop = messageList.scrollHeight;
1318
1360
  }
1319
1361
  }, [messages]);
1320
- useEffect2(() => {
1362
+ useEffect3(() => {
1321
1363
  async function fetchSearchQuery() {
1322
1364
  setUserInput(`Can you tell me about ${messageFromSearch}`);
1323
1365
  await onSubmit(void 0);
@@ -1358,7 +1400,7 @@ function ChatButton(props) {
1358
1400
  animationTimingFunction: "ease-in"
1359
1401
  },
1360
1402
  className: "flex size-full items-center justify-center",
1361
- 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" })
1362
1404
  },
1363
1405
  iconKey
1364
1406
  )
@@ -1368,7 +1410,7 @@ function ChatButton(props) {
1368
1410
  /* @__PURE__ */ jsxs13("div", { className: "flex h-8 flex-row justify-between gap-2", children: [
1369
1411
  /* @__PURE__ */ jsxs13("h2", { className: "relative text-2xl", children: [
1370
1412
  /* @__PURE__ */ jsx24("a", { target: "_blank", rel: "noopener noreferrer", href: "https://chat.luxonis.com", children: "Chat with Luxonis AI" }),
1371
- /* @__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" })
1372
1414
  ] }),
1373
1415
  /* @__PURE__ */ jsxs13("div", { className: "flex flex-row items-center justify-end ", children: [
1374
1416
  /* @__PURE__ */ jsxs13(Tooltip, { children: [
@@ -1390,7 +1432,7 @@ function ChatButton(props) {
1390
1432
  setSlackThreadTs(null);
1391
1433
  },
1392
1434
  children: /* @__PURE__ */ jsx24(
1393
- Icon7,
1435
+ Icon8,
1394
1436
  {
1395
1437
  icon: "fluent:chat-add-16-regular",
1396
1438
  className: loading ? "text-black/40" : "text-primary",
@@ -1409,7 +1451,7 @@ function ChatButton(props) {
1409
1451
  setChatOpened(false);
1410
1452
  setMessageFromSearch("");
1411
1453
  },
1412
- 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 })
1413
1455
  }
1414
1456
  )
1415
1457
  ] })
@@ -1465,7 +1507,7 @@ function ChatButton(props) {
1465
1507
  name: "sendButton",
1466
1508
  variant: "primary",
1467
1509
  className: "!size-10 !p-2 " + (loading || inputRef.current?.value.length === 0 ? "bg-gray-100 transition-colors cursor-not-allowed" : "bg-primary cursor-pointer"),
1468
- children: /* @__PURE__ */ jsx24(Icon7, { icon: "mdi:send", className: "!text-white" })
1510
+ children: /* @__PURE__ */ jsx24(Icon8, { icon: "mdi:send", className: "!text-white" })
1469
1511
  }
1470
1512
  ) })
1471
1513
  ]
@@ -1484,7 +1526,7 @@ var ChatMessage = (props) => {
1484
1526
  {
1485
1527
  className: `flex h-fit w-full gap-2 ${props.user === "bot" ? props.loading ? "bg-gray-100 transition-colors" : "bg-gray-100" : "bg-white"}`,
1486
1528
  children: [
1487
- /* @__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" }) }) }),
1488
1530
  /* @__PURE__ */ jsx24(
1489
1531
  "div",
1490
1532
  {
@@ -1506,14 +1548,14 @@ var ChatMessage = (props) => {
1506
1548
  // src/Tabs.tsx
1507
1549
  import * as React15 from "react";
1508
1550
  import * as TabsPrimitive from "@radix-ui/react-tabs";
1509
- import { cx as cx21 } from "class-variance-authority";
1551
+ import { cx as cx22 } from "class-variance-authority";
1510
1552
  import { jsx as jsx25 } from "react/jsx-runtime";
1511
1553
  var Tabs = TabsPrimitive.Root;
1512
1554
  var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
1513
1555
  TabsPrimitive.List,
1514
1556
  {
1515
1557
  ref,
1516
- className: cx21(
1558
+ className: cx22(
1517
1559
  "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
1518
1560
  className
1519
1561
  ),
@@ -1525,7 +1567,7 @@ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
1525
1567
  TabsPrimitive.Trigger,
1526
1568
  {
1527
1569
  ref,
1528
- className: cx21(
1570
+ className: cx22(
1529
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",
1530
1572
  className
1531
1573
  ),
@@ -1537,7 +1579,7 @@ var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
1537
1579
  TabsPrimitive.Content,
1538
1580
  {
1539
1581
  ref,
1540
- className: cx21(
1582
+ className: cx22(
1541
1583
  "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1542
1584
  className
1543
1585
  ),
@@ -1549,13 +1591,13 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
1549
1591
  // src/ProgressBar.tsx
1550
1592
  import * as React16 from "react";
1551
1593
  import * as ProgressPrimitive from "@radix-ui/react-progress";
1552
- import { cx as cx22 } from "class-variance-authority";
1594
+ import { cx as cx23 } from "class-variance-authority";
1553
1595
  import { jsx as jsx26 } from "react/jsx-runtime";
1554
1596
  var Progress = React16.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx26(
1555
1597
  ProgressPrimitive.Root,
1556
1598
  {
1557
1599
  ref,
1558
- 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),
1559
1601
  ...props,
1560
1602
  children: /* @__PURE__ */ jsx26(
1561
1603
  ProgressPrimitive.Indicator,
@@ -1569,8 +1611,8 @@ var Progress = React16.forwardRef(({ className, value, ...props }, ref) => /* @_
1569
1611
  Progress.displayName = ProgressPrimitive.Root.displayName;
1570
1612
 
1571
1613
  // src/EdgeSlideshow.tsx
1572
- import { useEffect as useEffect3, useState as useState6 } from "react";
1573
- 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";
1574
1616
  import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
1575
1617
  var slides = [
1576
1618
  "ai-performance",
@@ -1758,7 +1800,7 @@ function EdgeSlideshowHeader() {
1758
1800
  function EdgeSlideshowNav(props) {
1759
1801
  const { activeSlide, setActiveSlide, autoscrolling, inView } = props;
1760
1802
  const [progress, setProgress] = useState6(0);
1761
- useEffect3(() => {
1803
+ useEffect4(() => {
1762
1804
  let intervalId;
1763
1805
  const startTime = Date.now();
1764
1806
  if (autoscrolling && inView) {
@@ -1828,8 +1870,8 @@ function EdgeSlideshowText(props) {
1828
1870
  function EdgeSlideshow() {
1829
1871
  const [activeSlide, setActiveSlide] = useState6("ai-performance");
1830
1872
  const [autoscrolling, setAutoscrolling] = useState6(true);
1831
- const { ref, inView } = useInView({});
1832
- useEffect3(() => {
1873
+ const { ref, inView } = useInView2({});
1874
+ useEffect4(() => {
1833
1875
  let intervalId;
1834
1876
  if (inView) {
1835
1877
  intervalId = window.setInterval(() => {
@@ -1868,7 +1910,7 @@ function EdgeSlideshow() {
1868
1910
  }
1869
1911
 
1870
1912
  // src/StereoDepthCalibration.tsx
1871
- import { Icon as Icon8 } from "@iconify/react";
1913
+ import { Icon as Icon9 } from "@iconify/react";
1872
1914
  import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
1873
1915
  var cards = [
1874
1916
  {
@@ -1935,7 +1977,7 @@ function StereoDepthCalibrationFooter() {
1935
1977
  }
1936
1978
  function StereoDepthCalibrationFooterCard(props) {
1937
1979
  return /* @__PURE__ */ jsxs15(FrostedCard, { className: "flex h-full flex-col items-start justify-start gap-2", children: [
1938
- /* @__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" }),
1939
1981
  /* @__PURE__ */ jsx28(Text, { text: props.title, size: "lg", color: "white", weight: "semibold" }),
1940
1982
  /* @__PURE__ */ jsx28(Text, { text: props.text, size: "sm", color: "white" })
1941
1983
  ] });
@@ -1954,7 +1996,7 @@ function StereoDepthCalibration() {
1954
1996
  }
1955
1997
 
1956
1998
  // src/Support.tsx
1957
- import { cx as cx23 } from "class-variance-authority";
1999
+ import { cx as cx24 } from "class-variance-authority";
1958
2000
 
1959
2001
  // src/links.ts
1960
2002
  var github = "https://github.com/luxonis/";
@@ -1984,6 +2026,7 @@ var applyMailClean = "careers@luxonis.com";
1984
2026
  var showcaseMail = "mailto:support@luxonis.com";
1985
2027
  var showcaseMailClean = "support@luxonis.com";
1986
2028
  var blog = "https://discuss.luxonis.com/blog";
2029
+ var stereoTuningAssistance = "/stereo-tuning-assistance";
1987
2030
  var privacy = "/privacy";
1988
2031
  var termsOfService = "/terms-of-service";
1989
2032
  var aboutUs = "/about-us";
@@ -2012,15 +2055,45 @@ function TalkToSalesButton() {
2012
2055
  return /* @__PURE__ */ jsx29("a", { href: contactLink, target: "_blank", children: /* @__PURE__ */ jsx29(Button, { variant: "secondary", color: "white", role: "continue", children: "Talk to Sales" }) });
2013
2056
  }
2014
2057
 
2015
- // src/ContactUsForm.tsx
2016
- import { z } from "zod";
2017
- 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
+ };
2018
2091
 
2019
2092
  // src/useRudderAnalytics.ts
2020
- import { useEffect as useEffect4, useState as useState7 } from "react";
2093
+ import { useEffect as useEffect5, useState as useState7 } from "react";
2021
2094
  var useRudderStackAnalytics = () => {
2022
2095
  const [analytics, setAnalytics] = useState7();
2023
- useEffect4(() => {
2096
+ useEffect5(() => {
2024
2097
  if (!analytics) {
2025
2098
  const initialize = async () => {
2026
2099
  const { RudderAnalytics } = await import("@rudderstack/analytics-js");
@@ -2047,7 +2120,9 @@ var useRudderStackAnalytics = () => {
2047
2120
  };
2048
2121
 
2049
2122
  // src/ContactUsForm.tsx
2050
- 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";
2051
2126
  var formSchema = z.object({
2052
2127
  name: z.string().min(1),
2053
2128
  company: z.string().min(1),
@@ -2115,7 +2190,7 @@ function ContactUsForm() {
2115
2190
  setFormSubmitted(true);
2116
2191
  };
2117
2192
  if (formSubmitted) {
2118
- 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(
2119
2194
  Text,
2120
2195
  {
2121
2196
  size: "h4",
@@ -2125,107 +2200,80 @@ function ContactUsForm() {
2125
2200
  }
2126
2201
  ) });
2127
2202
  }
2128
- return /* @__PURE__ */ jsxs16("form", { id: "contact-form-anchor", className: "flex w-full flex-col gap-6 text-white", onSubmit: handleSubmit, children: [
2129
- /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col gap-6 lg:flex-row", children: [
2130
- /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col gap-2", children: [
2131
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "name", children: "Name *" }),
2132
- /* @__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" })
2133
2208
  ] }),
2134
- /* @__PURE__ */ jsxs16("div", { className: "flex w-full flex-col gap-2", children: [
2135
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "Company", children: "Company *" }),
2136
- /* @__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" })
2137
2212
  ] })
2138
2213
  ] }),
2139
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2", children: [
2140
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "email", children: "E-mail *" }),
2141
- /* @__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" })
2142
2217
  ] }),
2143
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2", children: [
2144
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "inquiry", children: "Type of Inquiry *" }),
2145
- /* @__PURE__ */ jsxs16(Select, { children: [
2146
- /* @__PURE__ */ jsx30(SelectTrigger, { className: "h-[48px] bg-white text-black ", children: /* @__PURE__ */ jsx30(SelectValue, { id: "inquiry", placeholder: "Select..." }) }),
2147
- /* @__PURE__ */ jsxs16(SelectContent, { className: "bg-white", children: [
2148
- /* @__PURE__ */ jsx30(SelectItem, { value: "Hub assistance", children: "Hub assistance" }),
2149
- /* @__PURE__ */ jsx30(SelectItem, { value: "hardware-issue", children: "Hardware issue" }),
2150
- /* @__PURE__ */ jsx30(SelectItem, { value: "support", children: "Support" }),
2151
- /* @__PURE__ */ jsx30(SelectItem, { value: "training", children: "Training" }),
2152
- /* @__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" })
2153
2228
  ] })
2154
2229
  ] })
2155
2230
  ] }),
2156
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2", children: [
2157
- /* @__PURE__ */ jsx30(Label, { className: "font-normal", htmlFor: "message", children: "Message *" }),
2158
- /* @__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..." })
2159
2234
  ] }),
2160
- /* @__PURE__ */ jsxs16("div", { className: "flex flex-row items-center justify-start gap-8", children: [
2161
- /* @__PURE__ */ jsx30(Button, { type: "submit", variant: "secondary", size: "lg", role: "continue", className: "w-fit", children: formIsLoading ? "Submitting..." : "Submit" }),
2162
- 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" })
2163
2238
  ] })
2164
2239
  ] });
2165
2240
  }
2166
2241
 
2167
- // src/Support.tsx
2168
- import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
2169
- var Support = (props) => {
2170
- const { variant = "fullpage", text } = props;
2171
- return /* @__PURE__ */ jsx31("div", { className: "page-card page-padding", children: /* @__PURE__ */ jsxs17(
2172
- Card,
2173
- {
2174
- variant,
2175
- outerStyles: "h-full",
2176
- className: cx23(
2177
- "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"
2178
- ),
2179
- children: [
2180
- /* @__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: [
2181
- /* @__PURE__ */ jsxs17("div", { className: "flex w-full flex-col items-center gap-4 text-white xl:items-start xl:gap-6", children: [
2182
- /* @__PURE__ */ jsx31(Text, { size: "h2", text: text ?? "Need More Help?", className: "max-w-[650px] text-center xl:text-left" }),
2183
- /* @__PURE__ */ jsx31(
2184
- Text,
2185
- {
2186
- size: "lg",
2187
- text: "Our dedicated team is available for technical support, business solutions, and more. Let us provide the help you need.",
2188
- className: "w-full max-w-105 text-center xl:text-left"
2189
- }
2190
- )
2191
- ] }),
2192
- /* @__PURE__ */ jsxs17("div", { className: "flex w-fit flex-col gap-4 md:flex-row", children: [
2193
- /* @__PURE__ */ jsx31(TalkToSalesButton, {}),
2194
- /* @__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" }) })
2195
- ] })
2196
- ] }),
2197
- /* @__PURE__ */ jsx31("div", { className: "w-full p-4 xl:p-0", children: /* @__PURE__ */ jsx31(FrostedCard, { className: "h-full", children: /* @__PURE__ */ jsx31(ContactUsForm, {}) }) })
2198
- ]
2199
- }
2200
- ) });
2201
- };
2202
-
2203
2242
  // src/ContactUs.tsx
2204
2243
  import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
2205
2244
  var ContactUsSection = (props) => {
2206
2245
  const {
2207
- title = "Let\u2019s Build \n the Future of \n Vision Together",
2246
+ title = "Let\u2019s Build the Future of Vision Together",
2208
2247
  description = "Our dedicated team is available for technical support, business solutions, and more. Let us provide the help you need."
2209
2248
  } = props;
2210
- 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: [
2211
- /* @__PURE__ */ jsx32(
2212
- Description,
2213
- {
2214
- title,
2215
- align: "left",
2216
- textStyle: "max-w-none w-fit lg:max-w-auto lg:justify-start justify-center lg:text-left text-center",
2217
- wrapperClassName: "lg:items-start items-center lg:text-left text-center flex",
2218
- description,
2219
- className: "text-white ",
2220
- 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: [
2221
- /* @__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" }) }),
2222
- /* @__PURE__ */ jsx32(TalkToSalesButton, {})
2223
- ] })
2224
- }
2225
- ),
2226
- /* @__PURE__ */ jsx32(FrostedCard, { className: "!p-6", children: /* @__PURE__ */ jsx32(ContactUsForm, {}) })
2227
- ] }) });
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
+ ) }) });
2228
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
+ }
2229
2277
  export {
2230
2278
  Accordion,
2231
2279
  AccordionContent,
@@ -2331,6 +2379,7 @@ export {
2331
2379
  showcaseMail,
2332
2380
  showcaseMailClean,
2333
2381
  status,
2382
+ stereoTuningAssistance,
2334
2383
  store,
2335
2384
  supportForm,
2336
2385
  supportMail,
@@ -2338,6 +2387,8 @@ export {
2338
2387
  techcrunch,
2339
2388
  termsOfService,
2340
2389
  twitter,
2390
+ useChat,
2391
+ useChatContext,
2341
2392
  useRudderStackAnalytics,
2342
2393
  youtube
2343
2394
  };